QoS Theory and Practice of Key Business Service Assurance Technology

QoS Theory and Practice of Key Business Service Assurance Technology


QoS It guarantees the availability of applications running in the enterprise network. By deploying QoS to meet the traffic requirements of critical business, real-time voice, video and other sensitive applications, the network provides safe and efficient data transmission and prevents data packet loss and delay. , quality degradation caused by jitter.

What is QoS

QoS (Quality of Service) refers to a service assurance technology that manages data traffic to reduce packet loss, delay, and jitter on the network. QoS controls and manages network resources by setting differentiated priorities for specific types of data on the network. Without QoS, network data may become disorganized. In the case of network bandwidth congestion, data integrity and security may be damaged, or even a complete network interruption may occur. QoS technology itself will not increase the bandwidth of the network, but how to allocate bandwidth to various services in the network in a balanced manner under the limited bandwidth resources in the network, and provide service quality assurance for the service value requirements of various service flows . In other words, the network can only transmit so much information at any given time. Therefore, QoS tools prioritize packets in a certain way to ensure that bandwidth is used within a fixed amount of time to provide the best possible service.

QoS benefits

QoS It guarantees the availability of applications running in the enterprise network. By deploying QoS to meet the traffic requirements of critical business, real-time voice, video and other sensitive applications, the network provides safe and efficient data transmission and prevents data packet loss and delay. , quality degradation caused by jitter. By deploying QoS, the existing bandwidth resources of the network can be effectively and reasonably utilized, instead of blindly investing costs to upgrade the network infrastructure to expand the network bandwidth. Specific benefits include: business-critical applications can get the resources they need, network administrators can better manage traffic in the network, enterprises can reduce costs by eliminating the need to upgrade infrastructure, and user experience is improved.

Common application scenarios of QoS

The enterprise's WAN connects the headquarters and local branches by leased operator's dedicated line, and is equipped with redundant lines to improve network availability. Since the operator's dedicated line generally adopts the bandwidth pricing model, the daily operation cost of the WAN is high. At the same time, according to the needs of business management, enterprises generally manage and divide the traffic carried by the WAN into multiple similar types such as voice, video, production, office, testing, and big data transmission. Due to the different business values ​​of different WAN traffic, different network management and control requirements, different traffic characteristics, and different requirements for delay and bandwidth; how to reasonably plan and allocate line resources on WAN lines requires the use of QoS provides targeted service assurance and control.

QoS Metrics

Enterprises can provide service assurance for key businesses to achieve expected service levels by using multiple parameters to quantitatively measure, including the following:

ØPacket loss rate: This is the percentage of data packets lost during network transmission. When the network link is congested and routers and switches start to discard data packets, the packet loss rate occurs. Packets are dropped when the queue or packets waiting to be sent overflow. If data packets are lost during real-time communication (such as voice or video calls), the voice may appear unclear and choppy, and the video may appear stuttering, frame dropping, etc.

Ø Jitter: This is the result of network congestion, timing drift, and routing changes. Excessive jitter can degrade the quality of voice and video communications.

Ø Latency: This is the time it takes for a packet to travel from source to destination. The delay should be as small as possible. If the Voice over IP call has a lot of delay, users may experience echoes and overlapping audio situations.

ØBandwidth: This is the ability of a network communication link to transmit the maximum amount of data from one point to another in a given amount of time. QoS optimizes network performance by managing bandwidth and giving high-priority applications with more stringent performance requirements more resources than other applications.

Ø Mean Opinion Score (MOS): This is a metric that rates voice quality using a five-point scale, with five indicating the highest quality.

Three QoS service models

Network applications are all end-to-end communications. Two hosts may communicate across multiple physical networks and pass through multiple routers. To achieve end-to-end QoS, you must consider the overall situation. The service model of QoS is to study what mode to adopt to realize the overall quality of service guarantee.

ØBest-Effort service model (Best-Effort): The simplest QoS service model, all data packets in the network have the same priority, the network does its best to send packets, but does not guarantee the delivery of data packets; when When no QoS policy is configured in the network or the infrastructure does not support QoS, service traffic will be transmitted in Best Effort.

ØIntegrated service (IntServ): The IntServ model means that the application program needs to describe its traffic parameters to the network through signaling (signaling) and apply for a specific QoS service before sending a message. IntServ mode is to reserve bandwidth on a specific path on the network. Applications request resource reservations from the network, and network devices monitor packet flows to ensure network resources can deliver packets. Implementing IntServ requires routers that support IntServ and use the Resource Reservation Protocol ( RSVP ) for network resource reservation. However, IntServ has limited scalability and consumes a lot of network resources.

ØDifferentiated service (DiffServ): The DiffServ model is to divide the traffic in the network into multiple classes, and each class enjoys different processing, especially when the network is congested, different classes will enjoy different priority processing, so as to obtain different Drop rate, delay and delay jitter. For example, voice traffic can be assigned a higher priority than other types of traffic, and data packets can be assigned priority for classification using Differentiated Services Code Point (DSCP). Compared with the Intserv model, the DiffServ model does not require signaling. In the DiffServ model, before the application program sends a message, it does not need to apply for resources to the network in advance, but informs the network node of its QoS requirements by setting the QoS parameter information in the header of the IP message. The network does not need to maintain the state for each flow, but provides services according to the QoS parameter information specified by each packet flow, divides the service level of the packet, and performs flow control and forwarding differently, providing end-to-end QoS guarantee .

QoS mechanism

Certain QoS mechanisms can manage the quality of data traffic and maintain the QoS requirements specified in the SLA. QoS mechanisms fall into specific categories depending on the role they play in managing the network.

Ø Classification and marking: distinguish applications and classify packets into different traffic types, indicate each packet as a member of a network class, identify traffic and mark it to ensure that other network devices can identify and prioritize it class. Classification and marking are implemented on network devices such as routers, switches, and access points, and are generally configured in the inbound direction of network devices.

Ø Congestion management: Use packet classification and marking to determine which queue to put packets into. Congestion management tools include priority queues, first-in-first-out, and low-latency queues.

Ø Congestion Avoidance: Monitor network traffic congestion and discard low-priority data packets when congestion occurs. Congestion avoidance includes Weighted Random Detection (WRED) and Random Early Detection (RED), where WRED is to drop low-priority data streams to protect high-priority data from network congestion.

ØTraffic shaping: Similar to congestion avoidance, except that excess traffic is buffered instead of dropping them entirely. Traffic shaping generally prioritizes real-time applications over less time-sensitive applications such as email and messaging. Traffic shaping tools include buffers, general purpose traffic shaping, and frame relay traffic shaping.

QoS deployment location and direction

For the rate limit policy, it should be deployed in the nearest inbound direction of the traffic origin as much as possible. For the guarantee policy, QoS should be deployed in the outbound direction of the traffic outbound interface. For bidirectional traffic, QoS needs to be deployed on devices at both ends of the outbound line; for unidirectional data transmission traffic, QoS can only be deployed in the egress direction of data transmission.

Basic Principles of Traffic Classification

QoS is divided into guarantee type and restriction type. For critical and important business traffic, and important traffic that is sensitive to delay, a guarantee queue should be used, that is, when the link traffic is congested, the traffic in the guarantee queue can be forwarded preferentially within a certain limit. For services with high traffic volume and high importance, bandwidth guarantees and restrictions should be implemented to meet business needs. Service traffic with high traffic volume and low importance should be restricted to avoid its impact on other traffic in the non-guaranteed queue.

Common QoS types

ØPriority queue (PQ) will serve the high-priority queue first, after there is no data in the high-priority sub-queue, then serve the medium-priority sub-queue, and so on. If the PQ is serving the medium priority subqueue, but there is another data packet in the high priority queue, the PQ will interrupt the service of the medium priority subqueue and serve the high priority subqueue instead. Each sub-queue has a maximum queue depth. If the maximum queue depth is reached, tail discarding will be performed. The biggest disadvantage of PQ is that the low-priority queue will be "starved to death", because only the high-priority queue has data, and PQ will not serve the low-priority queue. Therefore, this method can be used with caution when the traffic is simple and the priority is clear; PQ should be avoided as much as possible on complex traffic lines. If PQ is required, it can be combined with rate limiting to ensure the transmission of traffic in other queues.

Ø Class-Based Weighted Fair Queuing (CBWFQ) typically uses ACLs to define traffic classes and applies parameters such as injected bandwidth and queue limits to these classes. CBWFQ is a queue configuration scheme in a network that allows traffic to be categorized based on criteria. CBWFQ can guarantee a certain amount of bandwidth for different classes. It extends the traditional WFQ (Weighted Fair Queue) to support user-defined traffic classification. The number of queues and the class are in one-to-one correspondence, and bandwidth is reserved for each class. CBWFQ is more flexible to use, and the administrator can flexibly classify traffic.

ØLow Latency Queuing (LLQ) provides absolute priority queuing function for Class-Based Weighted Fair Queuing (CBWFQ), reducing the jitter of voice conversations. LLQ is equivalent to CBWFQ plus a strict priority queue, which has a higher priority than all other queues and is very suitable for delay-sensitive applications. The strict priority queue of LLQ is a priority queue with minimum guaranteed bandwidth. When congestion occurs, the amount of data in this queue cannot exceed the allowed bandwidth, otherwise it will be discarded. The biggest advantage of LLQ is that it can provide one or more strict priority queues with guaranteed bandwidth for traffic of delay- and jitter-sensitive applications. LLQ is not limited to specific platforms or transmission media. On the link with voice and video transmission, you can consider using this kind of queue.

ØFlow limit, the flow that needs to be limited by speed is mostly in the Best-effort queue, of course, you can also create a new queue and limit the speed of the entire queue. For unimportant and high-traffic data flows, limit processing is required. Even if the link is idle, this part of the traffic will be limited. This part of the traffic can reduce its priority or increase its discard priority.

Notes on QoS Deployment

Ø There is a possibility of "starving to death" in the PQ queue, so it should be carefully selected or used in conjunction with traffic limitation. Since the PQ queue has the highest priority, after configuring the PQ queue, other queues need to give way to it, which will easily cause other queues to be "starved to death" , due to full consideration or selection in conjunction with traffic restrictions during configuration.

ØNetwork protocol traffic (generally the default high-priority queue) and monitoring traffic should be guaranteed, otherwise, neighbors may be interrupted due to network protocol traffic congestion, or monitoring traffic congestion may cause monitoring failure or false alarms.

ØWhen deploying QoS, bandwidth should be planned from a global perspective according to requirements, and an appropriate model should be selected to ensure that the bandwidth designed for QoS is smaller than the actual bandwidth used; for deploying QoS on complex and critical network nodes, it is recommended to pass the streaming test in the test environment , to verify the availability of the policy.

ØThe deployment of QoS should consider the traffic switching caused by link interruption. For example, the QoS deployed on link A should also be deployed on its backup link. Considering the actual traffic conditions, the QoS deployed on the backup link can be different from the QoS of the main link, but the general principle of ensuring critical and important services should not be changed.

ØThe network administrator should re-examine the QoS policy regularly, and review the behavior of all application systems with the application administrator on a regular basis, and adjust or increase or decrease the QoS policy according to the results of the review.

Ø Deploy the speed limit strategy on the network equipment in advance and formulate the operation toolbox. When there is a sudden large flow of data transmission in the network, it can be quickly put into the limit strategy through the toolbox to avoid network alarms.

QoS Configuration Example

ØHuawei router

l Entry restriction policy

// stream definition

acl name AAA


// stream classification, matching definition stream

traffic classifier AAA

 AAA

//Flow behavior, how much bandwidth is limited

traffic behavior AAA  

 xxxxx kbps

//Flow behavior, how much bandwidth is limited

traffic policy AAA

 AAA behavior AAA

//Link in interface call

interface x/x/x 

 AAA inbound

l Outbound QOS guarantee policy

// stream definition

acl name AAA advance


//Flow classification, matching defined flow, allowing multiple ACL flows to be matched

traffic classifier AAA

 AAA

//Flow behavior, mark DSCP

traffic behavior AAA  

 af42

// flow policy association

traffic policy IN-QUEUE  



classifier AAA behavior AAA

//Traffic inbound interface invokes traffic policy to mark DSCP value

interface

 IN-QUEUE

//Configure the traffic scheduling policy on the traffic outbound interface

interface x/x/x

port shaping

 af4 wfq weight 20

l HQoS hierarchical scheduling policy

// stream definition

acl name AAA


//Flow classification, matching defined flow, allowing multiple ACL flows to be matched

traffic classifier AAA  

 AAA

//Flow behavior, mark DSCP

traffic behavior AAA  

 ef

// flow policy association

traffic policy IN-QUEUE



classifier AAA behavior AAA

//Flow queue scheduling method

flow-queue BBB  


queue af4 wfq weight 30

//Configure actual link bandwidth and queue scheduling binding

qos-profile CCC   

 xxxx BBB

//The traffic inbound interface invokes the traffic policy and marks the traffic with the DSCP value

interface x/x/x 

traffic-policy IN-QUEUE inbound  

//If the flow involves traffic passing through other links after the classification of the incoming interface is completed, and then dispatching to the outgoing interface, it is necessary to configure simple traffic classification on the passing interface

interface x/x/x


// Configure the traffic scheduling policy on the outbound interface of the traffic, matching the scheduling policy of qos-profil

interface x/x/x

 CCC outbound

 xxx

ØCisco router

l CBWFQ and speed limit

//Define a class that matches acl-1 acl-2

class-map match-all class-1 

 acl-1

class-map match-all class-2

  match access-group name acl-2

//Define a class that matches the http protocol

class-map match-all class-3

  match protocol http

//Define a strategy, call class-1/2/3, guarantee and speed limit, and discard if the speed limit exceeds

policy-map CBWFQ

class class-1

  bandwidth

classclass-2

bandwidth 1000

class class-3

police cir 1500000

//policy policy in the outbound direction of the interface

interface x/x 

 service-policy output CBWFQ

ØJuniper

l  CBWFQ

//Set the maximum number of queues per port to 8 for the No. 1 board and No. 1 module

set chassis  fpc 1 pic 1

//Configure different address groups

set groups  group-1  firewall family inet filter <*> term <*> from source-address  xxxx/x

set groups  group-2 x.xxx/x 

//Map different forwarding categories to different queues

set class-of-service forwarding-classes class  class-1  queue-num  1

set class-of-service forwarding-classes class  class-2  queue-num  2

//Set the discarding priority and forwarding category of different address groups

set firewall family inet filter  filter-1  term-1  group-1

set firewall family inet filter  filter-1  term-1

set firewall family inet filter  filter-1  term-1  then forwarding-class

set firewall family inet filter  filter-1  term  term-1

set firewall family inet filter  filter-1  term-2  apply-groups  group-2

set firewall family inet filter  filter-1  term-2

set firewall family inet filter  filter-1  term-2  class-2

set firewall family inet filter  filter-1  term-2

//Apply filter-1 in the outgoing direction of the x/x/x sub-interface

set interfaces  unit  x  filter-1

//Create two scheduling templates, set guaranteed bandwidth and queue priority respectively

set class-of-service schedulers  scheduler-1  transmit-rate  2m

set class-of-service schedulers  scheduler-1

set class-of-service schedulers  scheduler-2  transmit-rate  3m

set class-of-service schedulers  scheduler-2

//Establish the mapping between the forwarding category and the scheduling template

set class-of-service scheduler-maps  map-1  forwarding-class  class-1  scheduler-1

set class-of-service scheduler-maps  map-1  class-2  scheduler-2

//Set the scheduling mapping of the interface in the service level

set class-of-service interfaces  x/x/x  x  map-1

//Set the interface traffic shaping rate in the service level

set class-of-service interfaces  x/x/x  x  20m