Differentiated Services
Differentiated Services
This article is about communication networks. For be defined to offer, for example, low-loss or low-latency.
the design pattern for business applications, see DiffServ operates on the principle of traffic classifica-
Differentiated service (design pattern).
tion, where each data packet is placed into a limited num-
ber of traffic classes, rather than differentiating network
Differentiated services or DiffServ is a computer net- traffic based on the requirements of an individual flow.
working architecture that specifies a simple, scalable and Each router on the network is configured to differenti-
coarse-grained mechanism for classifying and managing ate traffic based on its class. Each traffic class can be
network traffic and providing quality of service (QoS) on managed differently, ensuring preferential treatment for
modern IP networks. DiffServ can, for example, be used higher-priority traffic on the network. The premise of
to provide low-latency to critical network traffic such as Diffserv is that complicated functions such as packet clas-
voice or streaming media while providing simple best- sification and policing can be carried out at the edge of the
effort service to non-critical services such as web traffic network by edge routers who then mark the packet to re-
or file transfers. ceive a particular type of per-hop behavior. Core router
DiffServ uses a 6-bit differentiated services code point functionality can then be kept simple. No classification
(DSCP) in the 8-bit differentiated services field (DS and policing is required. Such routers simply apply PHB
field) in the IP header for packet classification purposes. treatment to packets based on the marking. PHB treat-
The DS field and ECN field replace the outdated IPv4 ment is achieved by core routers using a combination of
TOS field.[1] scheduling policy and queue management policy.
While DiffServ does recommend a standardized set of
traffic classes,[2] the DiffServ architecture does not incor-
porate predetermined judgements of what types of traffic
1 Background should be given priority treatment. DiffServ simply pro-
vides a framework to allow classification and differenti-
Since modern data networks carry many different types ated treatment. The standard traffic classes (discussed
of services, including voice, video, streaming music, web below) serve to simplify interoperability between differ-
pages and email, many of the proposed QoS mechanisms ent networks and different vendors’ equipment.
that allowed these services to co-exist were both com-
plex and failed to scale to meet the demands of the public
Internet. In December 1998, the IETF published RFC
2474 - Definition of the Differentiated services field (DS 3 DiffServ domain
field) in the IPv4 and IPv6 headers, which replaced the
IPv4 TOS field with the DS field. In the DS field, a A group of routers that implement common, administra-
range of eight values (Class Selectors) is used for back- tively defined DiffServ policies are referred to as a Diff-
ward compatibility with the IP precedence specification Serv domain.
in the former TOS field. Today, DiffServ has largely sup-
planted TOS and other layer-3 QoS mechanisms, such as
integrated services (IntServ), as the primary architecture
routers use to provide different levels of service.
4 Classification and marking
Network traffic entering a DiffServ domain is subjected
to classification and conditioning. Traffic may be clas-
2 Traffic management mechanisms sified by many different parameters, such as source ad-
dress, destination address or traffic type and assigned to
DiffServ is a coarse-grained, class-based mechanism for a specific traffic class. Traffic classifiers may honor any
traffic management. In contrast, IntServ is a fine-grained, DiffServ markings in received packets or may elect to ig-
flow-based mechanism. DiffServ relies on a mechanism nore or override those markings. Because network opera-
to classify and mark packets as belonging to a specific tors want tight control over volumes and type of traffic in
class. DiffServ-aware routers implement per-hop behav- a given class, it is very rare that the network honors mark-
iors (PHBs), which define the packet-forwarding proper- ings at the ingress to the DiffServ domain. Traffic in each
ties associated with a class of traffic. Different PHBs may class may be further conditioned by subjecting the traffic
1
2 4 CLASSIFICATION AND MARKING
to rate limiters, traffic policers or shapers.[3] Expedited Forwarding PHB. However Voice Admit traf-
The Per-Hop Behavior is determined by the DS field fic is also admitted by the network using a Call Admission
of the IP header. The DS field contains a 6-bit Control (CAC) procedure. The recommended DSCP for
Differentiated Services Code Point (DSCP) value.[4] voice admit is 101100B (44 or 2CH).
Explicit Congestion Notification (ECN) occupies the
least-significant 2 bits of the IPv4 Type of Service field 4.4 Assured Forwarding
(TOS) and IPv6 Traffic Class field (TC).[5][6][7]
In theory, a network could have up to 64 (i.e. 26 ) differ- The IETF defines the Assured Forwarding behavior in
ent traffic classes using different DSCPs. The DiffServ RFC 2597 and RFC 3260. Assured forwarding allows
RFCs recommend, but do not require, certain encodings. the operator to provide assurance of delivery as long as
This gives a network operator great flexibility in defining the traffic does not exceed some subscribed rate. Traffic
traffic classes. In practice, however, most networks use that exceeds the subscription rate faces a higher probabil-
the following commonly defined Per-Hop Behaviors: ity of being dropped if congestion occurs.
The AF behavior group defines four separate AF classes
• Default PHB—which is typically best-effort traffic where all have the same priority. Within each class, pack-
ets are given a drop precedence (high, medium or low,
• Expedited Forwarding (EF) PHB—dedicated to where higher precedence means more dropping). The
low-loss, low-latency traffic combination of classes and drop precedence yields twelve
separate DSCP encodings from AF11 through AF43 (see
• Assured Forwarding (AF) PHB—gives assurance of table).
delivery under prescribed conditions
Some measure of priority and proportional fairness is de-
• Class Selector PHBs—which maintain backward fined between traffic in different classes. Should conges-
compatibility with the IP Precedence field. tion occur between classes, the traffic in the higher class
is given priority. Rather than using strict priority queu-
ing, more balanced queue servicing algorithms such as
4.1 Default Forwarding fair queuing or weighted fair queuing (WFQ) are likely
to be used. If congestion occurs within a class, the pack-
A Default PHB (a.k.a. Default Forwarding (DF) PHB[8] ) ets with the higher drop precedence are discarded first.
is the only required behavior. Essentially, any traffic To prevent issues associated with tail drop, more sophis-
that does not meet the requirements of any of the other ticated drop selection algorithms such as random early
defined classes is placed in the default PHB. Typically, detection (RED) are often used.
the default PHB has best-effort forwarding characteris-
tics. The recommended DSCP for the default PHB is
000000B (0). 4.5 Class Selector
Prior to DiffServ, IPv4 networks could use the Prece-
4.2 Expedited Forwarding dence field in the TOS byte of the IPv4 header to mark
priority traffic. The TOS octet and IP precedence were
The IETF defines Expedited Forwarding behavior in RFC not widely used. The IETF agreed to reuse the TOS octet
3246. The EF PHB has the characteristics of low delay, as the DS field for DiffServ networks. In order to main-
low loss and low jitter. These characteristics are suitable tain backward compatibility with network devices that
for voice, video and other realtime services. EF traffic still use the Precedence field, DiffServ defines the Class
is often given strict priority queuing above all other traf- Selector PHB.
fic classes. Because an overload of EF traffic will cause The Class Selector code points are of the form 'xxx000'.
queuing delays and affect the jitter and delay tolerances The first three bits are the IP precedence bits. Each IP
within the class, EF traffic is often strictly controlled precedence value can be mapped into a DiffServ class.
through admission control, policing and other mecha- CS0 equals to IP precedence 0, CS1 to IP precedence 1,
nisms. Typical networks will limit EF traffic to no more and so on. If a packet is received from a non-DiffServ
than 30%—and often much less—of the capacity of a aware router that used IP precedence markings, the Diff-
link . The recommended DSCP for expedited forward- Serv router can still understand the encoding as a Class
ing is 101110B (46 or 2EH). Selector code point.
• RFC 2597—Assured forwarding PHB group [6] Worldwide. “Implementing Quality of Service Policies
with DSCP”. Cisco. Retrieved 2010-10-16.
• RFC 2983—Differentiated services and tunnels
[7] Filtering DSCP
• RFC 3086—Definition of differentiated services per
domain behaviors and rules for their specification [8] RFC 4594
4 11 EXTERNAL LINKS
10 Further reading
• John Evans; Clarence Filsfils (2007). Deploying
IP and MPLS QoS for Multiservice Networks: The-
ory and Practice. Morgan Kaufmann. ISBN 0-12-
370549-5.
• Kalevi Kilkki (1999). Differentiated services for the
Internet. Macmillan Technical Publishing. ISBN 1-
57870-132-5.
11 External links
• IETF DiffServ Working Group page
12.2 Images