How QoS Works

Quality of  Service(QOS)  Coming from:https://www.youtube.com/watch?v=9oFLCrVrQLQ

Uses two primary functions to handle traffic:

Classification and Queuing.

Classification is how traffic is identified and marked.



















Queues is high-performance memory buffers in the routers that hold data to be processed.
If the queues is not emptied due to higher priority traffic going first, they overflow and drop traffic.

Policies determine how traffic is classified, marked and queued.
Standard queuing mechanisms attempt to smooth out traffic bursts by making the best use of the entire link bandwidth.
Mechanisms known as policing and shaping limit the bandwidth utilized by specific types of traffic.
Routers may also provide congestion avoidance controls such as WRED or weighed random early discard.
Link specific fragmentation and compression.





First step in the QOS process is to identify the packets and marked them using layer 2 or layer 3 markings.
There are three commonly used classification methods, access control lists(IP address, ports, etc), application type(NBAR), switch port.
Once a packet is identified, it is typically marked near the source of the traffic flow allowing the packets to receive differentiated treatment.
Marking is typically done in the layer 3 IP header using the differentiated services code point(DSCP).
LAN implementations use the class of service(COS) field.









There are several types of queues built into the network devices.
Priority Queue(PQ)
Class-Based Weighed Fair Queuing(CBWFQ)

Priority queues are designed to use with packets that require low latency and low jitter treatment.
Class-Based Weighed Fair Queuing is designed for bulk and transactional traffic that are not as time loss or jitter sensitive.

Each queue can specify a reserve bandwidth that is guaranteed to be available to be used by that class.
Other settings such as queue depth can also be set.
For each instance there is a maximum reserve bandwidth limit that determine the percentage that individual queues can allocate up to that limit and usually defaults to 75 percent.
There are also mechanisms such as RTP and RSVP that can reserve bandwidth that must be accounted for per interface when assigning bandwidth to queues.

Congestion avoidance mechanisms such as Weighted Random Early Detection(WRED) can be used to drop packets as the queues fill up in order to throttle back TCP  based applications.

There are also settings for Class-Based queues that can reduce the possibility of congestion.
These settings use DSCP markings to determine the priority of packets to be drop before the queue becomes full.





Shaping

Shaping involves delaying packets that exceed a certain threshold. These packets are held in the queue until a later time when they can be sent out. This has the effect of smoothing out bursts but unlike policer shaping will attempt not to drop packets in the process. If there is congestion or a large amount of traffic however, the queues may overflow causing dropped packets.


Policing

Policing involves checking the flow rate of packets for a particular classification of flows to determines if it conforms to the specified rate settings. For example, a packet flow for a certain source could be set to not exceed 50 kbps. The policer will check to see if there is excess traffic and if excess traffic exists it can drop the packets in order to conform to that specified rate.
The policer can also specified threshold for exceeding as well as violating and can take actions that include marking down DSCP values rather than simply drop down the packet.
Mark down involves changing the DSCP values in the IP packet based on flow conditions which changes the priority of the packets as they traverse the network.










评论

此博客中的热门博文

openflow switch(I)

YANG Tools:YANG to Java Mapping

OpenDaylight架构简介