- Introduced by
- IETF DiffServ Working Group
- Year
- 1998
- Type
- QoS architecture
- Family
- Quality of Service
What does it do?
DiffServ is a QoS architecture that provides class-based service differentiation in IP networks without keeping per-flow state in the core.
The IETF introduced it in 1998. Edge routers mark each packet with a Differentiated Services Code Point (DSCP) in the IP header, and routers map that marking to a per-hop behaviour (PHB). Unlike IntServ, which reserves resources for each flow, DiffServ treats traffic in aggregate by class and is used in ISP and enterprise networks.
The intuition behind the method
Networks carry traffic with different quality-of-service needs: video streams are sensitive to delay, file transfers depend on throughput, and voice calls are sensitive to jitter. DiffServ groups traffic into a small number of classes and treats each class differently. The example labels used here (Premium, Standard and Best Effort) are illustrative local names. In the standard PHB naming, Premium is commonly carried by EF, Standard by an AF class, and Best Effort by BE. Edge routers mark each packet with a 6-bit DSCP value, and interior routers act on that marking alone. The PHB applied to a class can include priority queuing, bandwidth allocation, or a drop preference. Because interior routers keep no per-flow state, the work they do does not grow with the number of flows in the way per-flow reservation does.
History
The IETF standardised DiffServ in 1998 as a scalable alternative to IntServ. The architecture was defined in the RFC cited as Blake et al. (1998), and Nichols, Jacobson and Zhang proposed a two-bit variant in the RFC cited as Nichols et al. (1999). Many networks still operate mainly as single-class Best Effort, and the cross-domain configuration effort described under limitations is one obstacle to wider deployment.
When to use it
Choose DiffServ when many flows must be grouped into a small number of classes that need relative priority, and when one administrative domain can control marking at its edges and configure PHBs consistently. It suits ISP and enterprise networks that need to protect voice or business-critical traffic during congestion. Do not choose DiffServ when an application needs an absolute rate or delay bound for an individual flow, such as a 1 Mbps video stream; use IntServ with admission control or traffic engineering for that case. It is also a poor fit when the path crosses domains that do not honour each other's markings, because the guarantee then depends on the cooperation of every domain.
Limitations and considerations
- The treatment is relative: Premium traffic is served ahead of Best Effort, but no absolute rate or delay is guaranteed.
- The meaning of a DSCP is local to each domain, so the same marking can receive different treatment in another network.
- Consistent configuration is required across domains, which makes deployment complex.
- Under congestion, higher classes gain service at the expense of lower classes.
- Senders have an incentive to mark traffic at a higher class unless the network polices the markings.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Interior routers keep no per-flow state, so their state does not grow with the number of flows.
- Classification and marking are done only at the network edge, and interior routers act on the DSCP alone.
- PHBs such as priority queuing, bandwidth allocation and drop precedence can be tuned for each class.
- The marking uses an ordinary field in the IP header, so no separate signalling protocol is needed to carry the class.
Applications
- ISP class-based prioritisation: giving video streaming and VoIP priority over background traffic
- Enterprise QoS: giving priority to business-critical applications and limiting bulk file sharing
- VoIP networks: the EF PHB is used to keep voice packet latency low
- Video delivery: the AF PHB uses drop precedence to differentiate stream classes
How it works
How it works
Incoming traffic is sorted into service classes according to application, destination, or the service-level agreement that applies to it.
Traffic conditioning is applied at the network edge. Metering measures the traffic rate, shaping delays excess traffic, and marking sets the DSCP on each packet. The committed rate is enforced with a token bucket: tokens accrue at the committed rate r up to a bucket depth b, and a packet conforms when enough tokens are available to cover it. Packets that do not conform are either delayed (shaping) or dropped or re-marked (policing).
Routers read the DSCP value of each conditioned packet, a 6-bit value from 0 to 63. The value identifies the service class and, for some classes, the drop precedence.
Interior routers select a PHB from the DSCP alone, applying priority queuing, bandwidth allocation, or a drop probability for each class. They do not maintain per-flow state.
Each router in a domain that honours the DSCP treats the packet according to its PHB. A domain that rewrites or ignores the marking breaks the chain, so the outcome depends on every domain on the path. Where the chain holds and the network is congested, Premium traffic typically sees lower delay and loss than Best Effort traffic. To check that a PHB is working, measure one-way delay, loss and jitter for each DSCP class at each measurement point, and compare each class against its own service-level target and against Best Effort under the same load. Read the results as relative, because the architecture gives no absolute bound.
Common pitfalls
- Accepting DSCP markings from untrusted sources; markings should be re-set at the domain boundary.
- Allocating too much traffic to the Premium class; once most traffic is Premium, the class no longer differentiates service.
- Monitoring only aggregate throughput; delay, loss and jitter should be measured per class, or degradation in one class can go unnoticed.
- Assuming a marking survives end to end; a provider may ignore or rewrite the DSCP at its boundary.
Frequently asked questions
What is a PHB (Per-Hop-Behavior)?
A PHB is the treatment a packet receives at a single router, determined by its DSCP marking. Common PHBs are EF (Expedited Forwarding, for low latency), AF (Assured Forwarding, for rate with drop precedence) and BE (Best Effort, the default treatment).
How is DSCP different from TOS?
Both use the 8-bit IP Type of Service byte. DSCP redefines that byte so that its upper 6 bits carry the service class; the remaining 2 bits are not part of the DSCP and are used for other purposes such as explicit congestion notification. The older ToS scheme is legacy and is still used by some routers.
Can DiffServ guarantee latency?
No. DiffServ provides relative prioritisation, so Premium traffic is served ahead of Best Effort, but it does not give an absolute latency bound. For absolute guarantees, use IntServ with admission control or traffic engineering.
What does traffic shaping do in DiffServ?
Traffic shaping delays (buffers) excess traffic so that its rate stays within the committed rate, for example 10 Mbps. Unlike traffic policing, which typically drops or re-marks excess packets, shaping reduces burstiness without loss. It is usually implemented with a token bucket.
Related methods
Sources
Blake, S., Black, D., Carlson, M., et al. (1998). An Architecture for Differentiated Services. RFC 2475.
Open publication referenceNichols, K., Jacobson, V., & Zhang, L. (1999). A Two-bit Differentiated Services Architecture for the Internet. RFC 2638.
Open publication reference