Link capacity is finite, and when a link is congested and there are no rules, everything suffers: video calls stutter and so do background update downloads. QoS introduces those rules. Traffic is classified, marked and served by class, so that delay-sensitive voice and video go first and bulk transfers give way.
How packets are marked
In IPv4 the priority is written into six bits of the byte formerly called Type of Service; in IPv6 it goes into the Traffic Class field. These six bits are called the DSCP (Differentiated Services Code Point): 64 values, each requesting a behaviour from every node on the path, known as per-hop behaviour. Traffic is usually marked at the network edge, on the first router or host, as the Differentiated Services architecture in RFC 2475 requires. Deeper in the network, simply reading the DSCP field is enough, and operators also carry classes over into MPLS labels.
| DSCP | Behaviour (PHB) | Typical role |
|---|---|---|
46 (EF) | Expedited Forwarding | voice: minimal loss, delay and jitter |
34, 36, 38 (AF41–43) | Assured Forwarding, class 4 | video conferencing |
26, 28, 30 (AF31–33) | Assured Forwarding, class 3 | streaming and on-demand video and audio |
18, 20, 22 (AF21–23) | Assured Forwarding, class 2 | low-latency data: client-server transactions |
0 (Default) | Default | everything else: best effort by default |
The second digit in an AF name sets the drop precedence during congestion: for example, AF41 (DSCP 34) loses packets last, AF43 (38) first. RFC 2474 does not prescribe which DSCP to assign to which application; RFC 4594 gives typical recommendations, but the final decision rests with the network.
What is done with classes
- classification and marking: the device decides which class a flow belongs to, based on address, port, interface or VLAN tag
- queuing and scheduling: each class has its own queue; voice is served first and the remaining traffic gets what is left
- shaping: smooths a flow to the agreed rate by delaying excess packets
- policing: packets above the agreed profile are not delayed but dropped or re-marked to a lower class
There is another approach, Integrated Services: the RSVP protocol reserves bandwidth for each flow and keeps state on every node along the path. On high-speed links that state becomes too large, so the class-based Differentiated Services of RFC 2475 won out on the internet: RFC 2474 describes the DSCP field, and RFC 2597 and RFC 3246 describe the AF and EF classes.
Where it is used
QoS is configured on routers and switches in corporate networks, on WAN and SD-WAN links, in cellular networks and in Wi-Fi: the Wi-Fi Alliance certifies WMM, which gives voice and video priority over other traffic. The term QoS also has another meaning: based on requests and limits, Kubernetes assigns each Pod to a quality-of-service class (Guaranteed, Burstable or BestEffort). That is node resource management, not network traffic priority.
Sources
the term is written from these pages- RFC 2474 — Definition of the Differentiated Services Field (DS Field)rfc-editor.org/rfc/rfc2474(opens in a new tab)
- RFC 2475 — An Architecture for Differentiated Servicesrfc-editor.org/rfc/rfc2475(opens in a new tab)
- RFC 4594 — Configuration Guidelines for DiffServ Service Classesrfc-editor.org/rfc/rfc4594(opens in a new tab)
Verified 9 Nov