QoS, or quality of service is a very large subject. What is QoS and why is it needed? QoS is the ability to provide different priority to different applications, users, or data flows, or to guarantee a certain level of performance to a data flow. Why is it needed? The root cause for QoS is resource contention. When multiple flows are sharing the same link, or multiple applications, and each application has its own requirements, contention results in queueing. Packets may be delayed or dropped. The effective flow throughput decreases. Delay and/or jitter may exceed the thresholds.
The possible solutions are: 1. the best solution is to avoid contention, and don’t over provision, but that is not always possible. 2. The next best solution is QoS. With QoS, the network congestion is controlled. The delay/loss/jitter and throughput are controlled. It alleviates temporary congestion.
QoS models are as follows:
The QoS model defines the contention management approach. There are two types:
- Integrated Services
- Differential Services
Integrated Service Model:
RFC 1633 is the “Integrated Services In The Internet Architecture”
What is integrated Services, or “intserv”?
It is a connection oriented model.
Every flow has an explicit reservation end to end.
It does not scale well because the network must maintain too much state.
The intserv use case is mpls te (traffic engineering)
Good RFCs to read on IntServ are:
- RFC 2205 – Resource ReSerVation Protocol (RSVP)
- RFC 3209 RSVP-TE: Extensions to RSVP for LSP Tunnels
Differential Services QoS Model or “Diffserv”:
- It’s a connectionless model
- Traffic is grouped in classes
- QoS behavior is defined by the traffic’s class
- It’s called per hop behavior, or phb
- Diffserv is the focus for CCIE.
Classification and Marking
In order for diffserv to work properly, traffic must be placed in the correct classes, in other words, “classification”. Traffic classification normally occurs at the network ingress edge. It’s typically a manual process we must enforce. Classification can be encoded inside the packet itself.
Classification Types
Classification and marking can take place at multiple places. Layer 2 classification is class of service or “COS”. It is in the 802.1q ethernet header. Layer 3 classification is type of service or “TOS”, and ip precedence and differential services code point, or “DSCP”.
- ip precedence is the old way for type of service(ToS)
- DSCP is the new way for type of service(ToS)
- DSCP is backward compatible with ip precedence
TOS byte is xxx|xxx|xx
The first 3 bits is ip precedence. The first 6 bits is dscp, although the 6th bit is never used. The last 2 bits are ECN, (early congestion notification.
Tcp and udp ports are the upper layers. Network based application recognition, or nbar, is used for deep packet inspection (dpi), to classify at layer 4.
QoS tools are used to implement QoS models. Many tools rely on correct QoS classification and marking. There are different tools for the network edge and the network core. The tools fall into 3 main categories. 1. Admission Control Techniques, 2. Congestion Management Techniques, and 3. Congestion Avoidance Techniques. Admission Control is divided into 2 types, 1. Traffic Policing and 2. Traffic Shaping. Basically, Traffic Policing is used to normalize outbound traffic flows and Traffic Shaping is used to normalize outbound traffic flows. Policing is characterized by dropping traffic over the provisioned rate, and Shaping is characterized by queueing for later.