Browse Definitions :

differentiated services (DiffServ or DS)

What is differentiated services (DiffServ or DS)?

Differentiated services (DiffServ or DS) is a class of service (CoS) model to specify and control IP network traffic by class. The goal is to ensure that certain types of traffic that require a relatively uninterrupted flow of data get precedence over other kinds of traffic. One example is voice traffic.

DiffServ is one of the most advanced network solutions for managing network traffic in terms of CoS. It aims to divide traffic into multiple classes and treat them differently. Such classification and differentiation are especially useful when there is a shortage of networking resources. DiffServ operates at Layer 3 -- the network layer -- of the Open Systems Interconnection model.

Unlike earlier mechanisms, such as 802.1p tagging and type of service (ToS), DiffServ avoids simple priority tagging of packets. Instead, it uses more complex policy or rule statements to determine how to forward a given packet. DiffServ and CoS provide a way to control traffic that is both more flexible and scalable than the quality of service (QoS) approach.

In the DiffServ model, for a given set of packet travel rules, a packet is given one of 64 possible forwarding behaviors. These behaviors are known as per-hop behaviors (PHBs). Thus, the primary goal of DiffServ and its differentiated services code point (DSCP), or DiffServ code point, is to determine the PHB that defines the packet forwarding procedure of each node.

diagram illustrating how a differentiated service (DiffServ) works
The differentiated services model specifies and controls IP network traffic by class with the goal of ensuring that traffic that requires a fairly uninterrupted data flow has precedence over other types of traffic.

DiffServ code point

The DSCP is a six-bit field in the IP header. It is a part of the eight-bit ToS field inside the IP header and specifies the PHB for a given flow of packets.

Differentiated Services Code Point diagram
Example of the six-bit field in an IP header called the differentiated services (DiffServ) code point.

The DSCP value can range from 0 to 63. The field is used to mark a packet to ensure that each device in the network handles it correctly without having to individually evaluate packet contents for each packet. Once a packet is marked, it can be treated differently from other packets based on admin-defined QoS policies. Consequently, a particular packet can be queued, another can be dropped, etc.

In the IP header, the DSCP field is superseded by the IP precedence value and the ToS field. Like DSCP, these fields are also used to mark traffic to influence PHB in the network.

Per-hop behavior in DiffServ

In a network, the forwarding treatment of a packet is determined by DSCP. PHB defines each node's packet forwarding treatment. When the PHB is defined by the DiffServ protocol, the traffic classes can be grouped in different ways, including the following:

  • Expedited Forwarding (EF) group. Traffic with specific QoS requirements.
  • Assured Forwarding (AF) group. Composed of traffic classes AF1, AF2, AF3 and AF4, each with its associated value -- AF1 is given the highest priority and then dropped to the lowest priority class when switching networks.
  • Best Effort (BE) group. QoS levels not assured and the network not sensitive to metrics like latency and packet loss.

DSCP of value 000000 denotes that the packets receive BE treatment. AF PHBs are intended for better than BE services, like virtual private networks. EF PHBs are meant for real-time services that typically have well-defined and stringent requirements for latency, packet loss, jitter, etc.

DiffServ defines the DS fields and PHBs. However, it is the responsibility of the edge routers (ERs) to classify, police and shape packets; specify these rules in the service-level agreement (SLA); and decide how many classes of service to provide. If more than one domain is involved, there may be an SLA between them, which determines if the DS field of a packet is re-marked.

typical corporate edge router deployment diagram
DiffServ may define differentiated service fields and per-hop behaviors, but edge routers classify, police and shape packets; denote rules in the SLAs; and decide the number of classes of services to deliver.

DiffServ domain

The scope of the DiffServ protocol is identified by the DiffServ domain. This domain is composed of two types of nodes. The first is edge routers, which are located at the borders of the domain. ERs execute several important functions:

  • Assign the DSCP value to each packet as per the QoS information provided by the incoming network.
  • Horizontally map the DiffServ and the QoS protocol inside the incoming domain.
  • Assign the same DSCP values to all traffic flows with similar QoS requirements.

Apart from ERs, the DiffServ domain also includes core routers (CR). Unlike ERs, CRs are located inside the domain, and their role is to forward the packets with different policies as per their DSCP values, while ensuring that flows with the same DSCP value are treated the same inside the domain.

Advantages and disadvantages of DiffServ

The DiffServ architecture is useful where there is a need to provide prioritized service mechanisms without requiring routers to maintain connection-level information. Services are prioritized by marking IP packets with DSCPs located in the IP header. Routers along the way prioritize packet processing and forwarding based on the DSCP value for different types of services.

Another advantage of DiffServ is that, unlike Resource Reservation Protocol (RSVP), it does not have to maintain a soft state. Therefore, it does not have to periodically refresh each reserved node to recover from errors or to automatically adapt to network changes. This enables DSCP to avoid the connection-level scalability issue that is common with RSVP.

DiffServ is also scalable because resources are allocated in the granularity of class, and the amount of state information is proportional to the number of classes, not the number of flows. Additionally, DiffServ can simplify network operations because sophisticated operations -- classification, marking, policing and shaping -- are only needed at the network's edge.

One disadvantage of DiffServ is that it does not provide performance guarantee. Also, it is usually effective only when the amount of high-priority traffic, e.g., voice or other real-time services, is small. Finally, in some cases, end users may not be able to perceive the performance difference, say, from BE to AF or EF.

Learn how to check for high network utilization.

This was last updated in May 2023

Continue Reading About differentiated services (DiffServ or DS)

  • DNS attack

    A DNS attack is an exploit in which an attacker takes advantage of vulnerabilities in the domain name system.

  • malware

    Malware, or malicious software, is any program or file that's intentionally harmful to a computer, network or server.

  • cloud security

    Cloud security, also known as 'cloud computing security,' is a set of policies, practices and controls deployed to protect ...

  • data collection

    Data collection is the process of gathering data for use in business decision-making, strategic planning, research and other ...

  • chief trust officer

    A chief trust officer (CTrO) in the IT industry is an executive job title given to the person responsible for building confidence...

  • green IT (green information technology)

    Green IT (green information technology) is the practice of creating and using environmentally sustainable computing resources.

  • diversity, equity and inclusion (DEI)

    Diversity, equity and inclusion is a term used to describe policies and programs that promote the representation and ...

  • ADP Mobile Solutions

    ADP Mobile Solutions is a self-service mobile app that enables employees to access work records such as pay, schedules, timecards...

  • director of employee engagement

    Director of employee engagement is one of the job titles for a human resources (HR) manager who is responsible for an ...

Customer Experience
  • digital marketing

    Digital marketing is the promotion and marketing of goods and services to consumers through digital channels and electronic ...

  • contact center schedule adherence

    Contact center schedule adherence is a standard metric used in business contact centers to determine whether contact center ...

  • customer retention

    Customer retention is a metric that measures customer loyalty, or an organization's ability to retain customers over time.