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
- 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.
- 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.
- 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.
- SIGTRAN (M3UA) Ensures that higher-layer SS7 messages (e.g., ISUP, SCCP) receive appropriate QoS treatment to support the reliable operation of telephony services.
- SIGTRAN (SUA) Provides QoS for SCCP messages, which are used for routing, mobility management, and other critical signaling functions.
- DIAMETER (AAA) Ensures that AAA requests and responses receive moderate priority, avoiding delays in user authentication and service authorization.
- DIAMETER (ACCG) Provides a lower priority for accounting messages, as they are generally less time-sensitive compared to authentication and authorization messages.
- 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 name | DS FieldBinary | DS Field Decimal | DS Hex | TOS Precedence(dec) | ToS Hexadecimal | ToS Decimal | ToS Binary | iptables ToS name | Service Class Name |
| DF / CS0 | 000 000 | 0 | 0x00 | 0 | 0x00 | 0 | 0000 0000 | Normal-Service | Standard |
| none | – | – | – | 0 | 0x02 | 2 | 0000 0010 | Minimize-Cost | |
| none | 000 001 | 1 | 0x01 | 0 | 0x04 | 4 | 0000 0100 | Maximize-Reliability | |
| LE | 000 001 | 1 | 0x01 | 0 | 0x04 | 4 | 0000 0100 | Lower-Effort | |
| none | 000 010 | 2 | 0x02 | 0 | 0x08 | 8 | 0000 1000 | Maximize-Throughput | |
| none | 000 100 | 4 | 0x04 | 0 | 0x10 | 16 | 0001 0000 | Minimize-Delay | |
| CS1 | 001 000 | 8 | 0x08 | 1 | 0x20 | 32 | 0000 1000 | Low-Priority Data | |
| AF11 | 001 010 | 10 | 0x0a | 1 | 0x28 | 40 | 0010 1000 | High-Throughput Data | |
| AF12 | 001 100 | 12 | 0x0c | 1 | 0x30 | 48 | 0011 0000 | High-Throughput Data | |
| AF13 | 001 110 | 14 | 0x0e | 1 | 0x38 | 56 | 0011 1000 | High-Throughput Data | |
| CS2 | 010 000 | 16 | 0x10 | 2 | 0x40 | 64 | 0100 0000 | OAM | |
| AF21 | 010 010 | 18 | 0x12 | 2 | 0x48 | 72 | 0100 1000 | Low-Latency Data | |
| AF22 | 010 100 | 20 | 0x14 | 2 | 0x50 | 80 | 0101 0000 | Low-Latency Data | |
| AF23 | 010 110 | 22 | 0x16 | 2 | 0x58 | 88 | 0101 1000 | Low-Latency Data | |
| CS3 | 011 000 | 24 | 0x18 | 3 | 0x60 | 96 | 0110 0000 | Broadcast Video | |
| AF31 | 011 010 | 26 | 0x1a | 3 | 0x68 | 104 | 0110 1000 | Multimedia Streaming | |
| AF32 | 011 100 | 28 | 0x1c | 3 | 0x70 | 112 | 0111 0000 | Multimedia Streaming | |
| AF33 | 011 110 | 30 | 0x1e | 3 | 0x78 | 120 | 0111 1000 | Multimedia Streaming | |
| CS4 | 100 000 | 32 | 0x20 | 4 | 0x80 | 128 | 1000 0000 | Real-Time Interactive | |
| AF41 | 100 010 | 34 | 0x22 | 4 | 0x88 | 136 | 1000 1000 | MultimediaConferencing | |
| AF42 | 100 100 | 36 | 0x24 | 4 | 0x90 | 144 | 1001 0000 | MultimediaConferencing | |
| AF43 | 100 110 | 38 | 0x26 | 4 | 0x98 | 152 | 1001 1000 | MultimediaConferencing | |
| CS5 | 101 000 | 40 | 0x28 | 5 | 0xa0 | 160 | 1010 0000 | Signaling (IP Telephony, etc) | |
| voice-admit | 101 100 | 44 | 0x2c | 5 | 0xb0 | 176 | 1011 0000 | ||
| EF | 101 110 | 46 | 0x2e | 5 | 0xb8 | 184 | 1011 1000 | Telephony | |
| CS6 | 110 000 | 48 | 0x30 | 6 | 0xc0 | 192 | 1100 0000 | Network RoutingControl | |
| CS7 | 111 000 | 56 | 0x38 | 7 | 0xe0 | 224 | 1110 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
