26 Nov 2020
Quality of Service (QoS) allows devices such as Routers and Switches to prioritise traffic over others when congestion occurs.
Where is QoS required?
Source of Delay
Delay | Description |
---|---|
Code delay | The fixed amount of time it takes to compress data at the source before transmitting to the first internetworking device, usually a switch. |
Packetization delay | The fixed time it takes to encapsulate a packet with all the necessary header information. |
Queuing delay | The variable amount of time a frame or packet waits to be transmitted on the link. |
Serialization delay | The fixed amount of time it takes to transmit a frame onto the wire. |
Propagation delay | The variable amount of time it takes for the frame to travel between the source and destination. |
De-jitter delay | The fixed amount of time it takes to buffer a flow of packets and then send them out in evenly spaced intervals. |
Jitter is the variation in the delay of received packets.
To compensate for the effects of jitter, a mechanism called a playout delay buffer is used. The playout delay buffer receives and buffers voice packets and then retransmits them in a steady stream with the jitter removed.
Voice vs Video
Voice
One-Way Requirement
Video
One-Way Requirement
Data traffic can consume a large portion of network capacity due to some TCP applications but is insensitive to jitter and packet loss.
First In, First Out (FIFO) - No QoS
Weighted Fair Queuing (WFQ) - Automatic classification (no configuration)
Class Based Weighted Fair Queuing (CBWFQ) - User-defined classes
Low Latency Queuing (LLQ) - Strict Priority Queue
Best-effort Model
Integrated Services (IntServ)
Differentiated Services (DiffServ)
Note: Modern networks primarily use the DiffServ model. However, due to the increasing volumes of delay- and jitter-sensitive traffic, IntServ and RSVP are sometimes co-deployed.
Packet loss is usually the result of congestion on an interface.
The following approaches can prevent drops in sensitive applications:
There are three categories of QoS tools
Methods of classifying
QoS Tools | Layer | Marking Field | Width in Bits |
---|---|---|---|
Ethernet (802.1Q, 802.1p) | 2 | Class of Service (CoS) | 3 |
802.11 (Wi-Fi) | 2 | Wi-Fi Traffic Identifier (TID) | 3 |
MPLS | 2 | Experimental (EXP) | 3 |
IPv4 and IPv6 | 3 | IP Precedence (IPP) | 3 |
IPv4 and IPv6 | 3 | Differentiated Services Code Point (DSCP) | 6 |
Differentiated Services Code Point (DSCP) supersedes IP Precedence (IPP).
Marking should be done as close to the source device as possible. This establishes the trust boundary.
Congestion Avoidance
Cisco IOS includes Weighted Random Early Detection (WRED) as a possible congestion avoidance solution.
WRED provides buffer management for TCP before buffers are exhausted and tail drops occur.
There is no congestion avoidance for UDP based traffic such as voice, methods such as queuing and compression help to reduce, even prevent UDP packet loss.
Shaping vs Policing
Shaping is an outbound concept in contrast, policing is applied to inbound traffic on an interface.
Shaping implies the existence of a queue and of sufficient memory to buffer delayed packets, while policing does not.
Shaping requires a scheduling function for later transmission. Scheduling function allows you to organize the shaping queue into different queues. Examples of scheduling functions are CBWFQ and LLQ.
Shape and police traffic flows as close to their sources as possible.