DSCP

Differentiated Services Code Point (DSCP) is a field in the Internet Protocol (IP) header used to classify and manage network traffic. DSCP is part of the Differentiated Services (DiffServ) architecture, which aims to provide different levels of service quality to network traffic. DSCP is a critical component of the Differentiated Services (DiffServ) architecture, enabling networks to provide differentiated levels of service quality to various types of traffic. By marking packets with appropriate DSCP values and applying corresponding PHBs, networks can manage traffic more effectively, ensuring that critical applications receive the necessary performance levels.
Internet Protocol (IP) network packets include a byte in the IP header that specifies the type of service and priority of the packet. This single byte serves for both Type of Service (ToS) classifications and Differentiated Services Code Point (DSCP) values.

The ToS byte was introduced in 1981, while the DSCP byte was defined in December 1998. Although both use the same byte in the IP packet header, they interpret this byte differently depending on the context. Essentially, they share the same field but assign different meanings to it based on the specific classification system being used.

Here’s a detailed explanation:

What is DSCP?

DSCP Field: The DSCP field is a 6-bit value within the IP header’s 8-bit Differentiated Services (DS) field. The remaining 2 bits are currently unused.

Purpose: DSCP is used to indicate the priority and handling requirements of a packet. It helps routers and switches make forwarding and queuing decisions based on the specified service level.

How Does DSCP really work?

Classification: Network traffic is classified based on the DSCP value in the packet header. Each DSCP value corresponds to a specific Per-Hop Behavior (PHB), which dictates how routers and switches handle the packet.
Marking: Network devices such as routers and switches can mark packets with the appropriate DSCP value according to the configured policies.
Forwarding: Routers and switches read the DSCP value and apply the corresponding PHB, which can include prioritization, bandwidth allocation, queuing, and dropping policies.

DSCP Values and Classes

DSCP Values: The 6-bit DSCP field can represent 64 different values (0-63). These values are grouped into classes:
Class Selector PHBs: DSCP values 0, 8, 16, 24, 32, 40, 48, 56 are backward compatible with the IP precedence field.
Class Expedited Forwarding (EF): DSCP value 46 (101110) is used for low-loss, low-latency traffic like voice and video.
Class Assured Forwarding (AF): DSCP values are divided into four classes (AF1x, AF2x, AF3x, AF4x), each with three drop precedences (x = 1, 2, 3). For example, AF31 (011010) and AF32 (011100).

Benefits of Using DSCP

Quality of Service (QoS): DSCP allows for the implementation of QoS policies, ensuring that high-priority traffic (e.g., VoIP, video conferencing) receives the necessary bandwidth and low latency.
Traffic Management: By classifying and managing traffic, networks can avoid congestion, improve performance, and provide a better user experience.
Scalability: DiffServ, with DSCP, is scalable because it classifies traffic at the network edge, reducing the complexity and processing burden on core network devices.

Example Usage
  1. VoIP Traffic: Packets from a VoIP application might be marked with DSCP value 46 (EF) to ensure they receive priority treatment across the network, minimizing latency and packet loss.
  2. Standard Data Traffic: Normal data packets might use a lower DSCP value (e.g., 0 for Best Effort), receiving standard forwarding treatment without special prioritization.
  3. SIGTRAN (M2PA) Prioritizes SS7 signaling messages to ensure low latency and low packet loss, which are essential for maintaining the integrity and performance of signaling.
  4. SIGTRAN (M3UA) Ensures that higher-layer SS7 messages (e.g., ISUP, SCCP) receive appropriate QoS treatment to support the reliable operation of telephony services.
  5. SIGTRAN (SUA) Provides QoS for SCCP messages, which are used for routing, mobility management, and other critical signaling functions.
  6. DIAMETER (AAA) Ensures that AAA requests and responses receive moderate priority, avoiding delays in user authentication and service authorization.
  7. DIAMETER (ACCG) Provides a lower priority for accounting messages, as they are generally less time-sensitive compared to authentication and authorization messages.
  8. DIAMETER (PCC) Ensures that PCC messages, which are crucial for managing QoS policies and charging, receive higher priority to maintain the quality and billing accuracy of services.

DSCP, DiffServ and hexadecimal ToS values

DSCP nameDS FieldBinaryDS Field DecimalDS HexTOS Precedence(dec)ToS HexadecimalToS DecimalToS Binaryiptables ToS nameService Class Name
DF / CS0000 00000x0000x0000000 0000Normal-ServiceStandard
none00x0220000 0010Minimize-Cost
none000 00110x0100x0440000 0100Maximize-Reliability
LE000 00110x0100x0440000 0100Lower-Effort
none000 01020x0200x0880000 1000Maximize-Throughput
none000 10040x0400x10160001 0000Minimize-Delay
CS1001 00080x0810x20320000 1000Low-Priority Data
AF11001 010100x0a10x28400010 1000High-Throughput Data
AF12001 100120x0c10x30480011 0000High-Throughput Data
AF13001 110140x0e10x38560011 1000High-Throughput Data
CS2010 000160x1020x40640100 0000OAM
AF21010 010180x1220x48720100 1000Low-Latency Data
AF22010 100200x1420x50800101 0000Low-Latency Data
AF23010 110220x1620x58880101 1000Low-Latency Data
CS3011 000240x1830x60960110 0000Broadcast Video
AF31011 010260x1a30x681040110 1000Multimedia Streaming
AF32011 100280x1c30x701120111 0000Multimedia Streaming
AF33011 110300x1e30x781200111 1000Multimedia Streaming
CS4100 000320x2040x801281000 0000Real-Time Interactive
AF41100 010340x2240x881361000 1000MultimediaConferencing
AF42100 100360x2440x901441001 0000MultimediaConferencing
AF43100 110380x2640x981521001 1000MultimediaConferencing
CS5101 000400x2850xa01601010 0000Signaling (IP Telephony, etc)
voice-admit101 100440x2c50xb01761011 0000
EF101 110460x2e50xb81841011 1000Telephony
CS6110 000480x3060xc01921100 0000Network RoutingControl
CS7111 000560x3870xe02241110 0000“Reserved”

Protocol details can be found on IETF standard RFC8837: Differentiated Services Code Point (DSCP) Packet Markings for WebRTC QoS
See also:
https://tucny.com/Home/dscp-tos
https://linuxreviews.org/Type_of_Service_(ToS)_and_DSCP_Values