There are cases and networks that we must ensure that traffic will reach the destination. Sensitive applications like telephony and video conferences need to reach the destination without any impact during the trip from source to the destination. However, this trip is not always smooth. There are limitations to force us to use QoS.
Why do you need QoS?
- Bandwidth limitation
- Latency
- Jitter
- Packet loss
There are different models that we can use to enforce Quality of Service in our network.There are three models to use :
- Best Effort – not much to say! No QoS…
- IntServ
- DiffServ
IntServ – Integrated Services
IntServ is an end-to-end model. Using this model, it signals the network to reserve an amount of bandwidth based on the requirements that are set. This reserved bandwidth cannot be used by any other traffic. IntServ uses RSVP ( Resource Reservation Protocol ) to allocate resources through the network.
In this model, each node in the path, needs to create an RSVP path state for each flow, which makes it hard to use and maintain for large networks with millions of flows.
Process:
Each sender sends an RSVP PATH message, containing the SRC/DST IPs and the needed bandwidth. The receiver replies with the RESV message containing. In this message, in each hop, the destination is the IP from the hop obtained by the RSVP PATH message and the bandwidth is reserved.
DiffServ – Differentiated Services
DiffServ is a hop-by-hop model. This means that the policies are independent in each device. It creates classes with different levels of services and marks the traffic in the appropriate class.
So it uses classification and marking techniques.
Classification:
Classification is a QoS mechanism that classifies traffic based on descriptors. Some descriptors are:
- Layer 2 : 802.1Q/q Cos
- Layer 2,5 : MPLS EXP bit
- Layer 3: IPP, DSCP
- Layer 7: NBAR2
Marking:
Marking is a QoS mechanism that marks a field in a packet with a traffic descriptor and separates similarly marked packets from others and applies QoS on them.Some descriptors are:
- Layer 2: 802.1Q/q Cos
- Layer 2,5: MPLS EXP bit
- Layer 3: IPP, DSCP
Layer 2 Marking: CoS (Class of Service)
Inside the 802.1Q header, a field used for CoS exists (TCI) It uses a priority code point (PCP) to allocate priority to the traffic. It has 8 values ( 0 – 7 ) with 7 being the highest. However, because it is L2 information inside the trunk header, the header is removed in non-trunked ports or in L3 networks. For this reason, marking should be also applied at a higher level, e.g. L3 so routers can see this information.
Priority Value | Type |
0 | Background |
1 | Best Effort |
2 | Excellent Effort |
3 | Critical Application |
4 | Video with <100ms latency |
5 | Voice with <10 ms latency |
6 | Internetwork |
7 | Network Control |
Layer 3 Marking: ToS (Type of Service)
In the IP packet, inside the ToS field, the first 3 bits are used for the IPP (IP precedence). The IPP values match the CoS values, but values 6 and 7 are reserved.
Later, a newer standard was created and it is backward compatible with IPP. The DSCP field is 8 bits. It allows 64 different classes and has per-hop behavior ( PHB).
PHB are listed in the table below:
CS ( IPP values) | Higher value is treated faster |
DF (Default Forwarding) | Best effort |
AF (Assured Forwarding) | Guaranteed bandwidth |
EF (Expedited Forwarding) | Low Delay |
AF – Assured Forwarding
It assures bandwidth in each AF class. The AF classes are in the format AFxy where x is the binary value and y is the drop probability. There are four classes and there is no differential treatment between them. The classes are:
- AF1
- AF2
- AF3
- AF4
There are three drop probabilities with values 1-3 with value 3 is more probable to drop than 2 and 2 more probable to be dropped than 1.
So each class has 3 drop probabilities, eg:
- AF11
- AF12
- AF13
Congestion avoidance algorithms are used like RED and WRED ( see article). If a queueing mechanism is used, like CBWFQ, then sort congestion can be handled.
EF – Expedited Forwarding:
EF is backward compatible with IPP 5 and uses the DSCP 46 value. It ensures minimum departure rate and the lowest delay. Mainly it is used for real-time sensitive traffic. Also, it has mechanisms to prevent starvation by policing the traffic.
Layer 2,5: MPLS EXP bit
This is used inside the MPLS network in order to offer QoS without overwriting the customers’ QoS values. It uses 3 bits inside the MPLS header and copies the IPP bits or the 3 most significant bits from the DSCP value.
Layer 7: NBAR2
The Cisco NBAR2 is used to recognize applications and protocols in Layer 7.
DISCLAIMER: This article is part of the larger collection of articles regarding the journey towards becoming a CCIE (so it is Cisco based). By no means, this is something official. It is just what I understand from the networking world. I write this in order to be able to explain them better and learn the content. I hope you may find something useful and easy to understand. Please contact me if something is not correct, or needs more work.