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)

  • local area network (LAN)

    A local area network (LAN) is a group of computers and peripheral devices that are connected together within a distinct ...

  • TCP/IP

    TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect ...

  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • project scope

    Project scope is the part of project planning that involves determining and documenting a list of specific project goals, ...

  • core competencies

    For any organization, its core competencies refer to the capabilities, knowledge, skills and resources that constitute its '...

  • recruitment management system (RMS)

    A recruitment management system (RMS) is a set of tools designed to manage the employee recruiting and hiring process. It might ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

  • HR service delivery

    HR service delivery is a term used to explain how an organization's human resources department offers services to and interacts ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...