Bookmarks

QoS — Quality of Service

A set of mechanisms that lets a network tell traffic types apart and treat them differently: some packets get priority, others are delayed or dropped sooner.

Also: quality of service, traffic quality of service

checked 9 Nov

All terms

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.

DSCPBehaviour (PHB)Typical role
46 (EF)Expedited Forwardingvoice: minimal loss, delay and jitter
34, 36, 38 (AF41–43)Assured Forwarding, class 4video conferencing
26, 28, 30 (AF31–33)Assured Forwarding, class 3streaming and on-demand video and audio
18, 20, 22 (AF21–23)Assured Forwarding, class 2low-latency data: client-server transactions
0 (Default)Defaulteverything 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

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • throughput

    QoS does not increase link capacity. It only decides whose packets go first and whose are slowed down or dropped.

In depth in the references

where the topic is covered in detail