1. Introduction
In Quality of Service (QoS), traffic is classified and prioritized to ensure better performance for critical applications. Two common packet marking mechanisms used in QoS are:
- IP Precedence (Legacy – 3 Bits)
- Differentiated Services Code Point (DSCP – 6 Bits)
These values are set in the Type of Service (ToS) byte in the IP header to indicate priority levels.
2. IP Precedence (Legacy)
- 3-bit field (values:
0-7) - Used in older networks (before DSCP)
- Higher values = Higher priority
| IP Precedence | Binary | Priority Level | Traffic Type |
|---|---|---|---|
| 7 | 111 | Highest | Network Control |
| 6 | 110 | High | Internetwork Control |
| 5 | 101 | Critical | VoIP, Video |
| 4 | 100 | High | Streaming Media |
| 3 | 011 | Medium | Transactional Traffic |
| 2 | 010 | Normal | Bulk Data |
| 1 | 001 | Low | Scavenger Traffic |
| 0 | 000 | Default | Best Effort |
š Example Configuration (Mark Traffic with IP Precedence 5 – VoIP):
class-map VOICE
match ip precedence 5
policy-map QOS-POLICY
class VOICE
priority 1000
3. Differentiated Services Code Point (DSCP)
- 6-bit field (values:
0-63) - More granular control than IP Precedence
- Backward-compatible with IP Precedence
DSCP Classes
DSCP values are divided into different categories:
1ļøā£ Expedited Forwarding (EF – High Priority)
| DSCP | Binary | Description |
|---|---|---|
| EF (46) | 101110 | VoIP, real-time apps |
š¢ EF (Expedited Forwarding) is used for low-latency traffic like VoIP.
2ļøā£ Assured Forwarding (AF – Prioritized Traffic)
Assured Forwarding (AF) provides four service classes (AF1-4) with three levels of drop probability (Low, Medium, High).
| AF Class | DSCP Value | Binary | Drop Probability |
|---|---|---|---|
| AF11 | 10 | 001010 | Low |
| AF12 | 12 | 001100 | Medium |
| AF13 | 14 | 001110 | High |
| AF21 | 18 | 010010 | Low |
| AF22 | 20 | 010100 | Medium |
| AF23 | 22 | 010110 | High |
| AF31 | 26 | 011010 | Low |
| AF32 | 28 | 011100 | Medium |
| AF33 | 30 | 011110 | High |
| AF41 | 34 | 100010 | Low |
| AF42 | 36 | 100100 | Medium |
| AF43 | 38 | 100110 | High |
šµ Example Use Case:
- AF41 is used for video streaming.
- AF31 is used for mission-critical applications.
3ļøā£ Default & Best Effort (Low Priority)
| DSCP | Binary | Description |
|---|---|---|
| CS0 (0) | 000000 | Best Effort (Default) |
| CS1 (8) | 001000 | Background Traffic |
š« CS0 (Best Effort) is used for general internet traffic without priority.
4. Mapping Between IP Precedence and DSCP
| IP Precedence | Equivalent DSCP |
|---|---|
| 0 | CS0 (0) |
| 1 | CS1 (8) |
| 2 | CS2 (16) |
| 3 | CS3 (24) |
| 4 | CS4 (32) |
| 5 | CS5 (40) |
| 6 | CS6 (48) |
| 7 | CS7 (56) |
5. Configuring DSCP on Cisco Devices
Marking Packets with DSCP
class-map MATCH-VOICE
match ip dscp 46
policy-map QOS-POLICY
class MATCH-VOICE
priority 1000
Trust DSCP on an Interface
conf t
interface GigabitEthernet1/0/1
mls qos trust dscp
exit
6. Summary
- IP Precedence (Legacy): 3-bit field (0-7), basic priority levels.
- DSCP (Modern QoS): 6-bit field (0-63), more flexibility.
- EF (46) for VoIP, AF41 for Video, CS0 for Best Effort.
Leave a comment