1. Introduction
Weighted Random Early Detection (WRED) is a congestion avoidance QoS mechanism that randomly drops packets before the queue is full, helping to prevent global TCP synchronization and optimize network performance.
๐ Key Benefits of WRED:
โ
Prevents queue tail drops, reducing congestion
โ
Improves TCP traffic performance
โ
Differentiates traffic by priority levels
โ
Works best in TCP-based networks
2. How WRED Works
WRED monitors queue depth and randomly drops packets based on:
- Queue occupancy (how full the queue is)
- Packet marking (DSCP/IP Precedence)
- Minimum and maximum drop thresholds
๐น WRED Drop Logic:
| Queue Status | Behavior |
|---|---|
| Queue < Min Threshold | No drops โ |
| Queue between Min & Max | Random drops based on priority ๐ฒ |
| Queue > Max Threshold | All new packets dropped (Tail Drop) ๐ซ |
๐ Higher-priority traffic has higher thresholds, reducing drop probability.
3. WRED vs. Tail Drop
| Feature | WRED | Tail Drop |
|---|---|---|
| Packet Drop Behavior | Gradual, based on queue depth | Drops all packets when full |
| Effect on TCP | Prevents global TCP synchronization | Causes synchronization issues |
| QoS Differentiation | Prioritizes important traffic | No differentiation |
4. Configuring WRED on a Cisco Router
A. Basic WRED Configuration
To enable WRED on an interface:
interface GigabitEthernet1/0/1
random-detect
๐ This applies default WRED settings, treating all traffic equally.
B. WRED with IP Precedence-Based Drop Probabilities
To prioritize higher-priority traffic:
interface GigabitEthernet1/0/1
random-detect precedence 3 20 40
random-detect precedence 5 30 60
๐ Explanation:
- Precedence 3 packets โ Start dropping at 20% queue, full drop at 40%.
- Precedence 5 packets โ Start dropping at 30%, full drop at 60%.
- Higher precedence = Less chance of being dropped.
C. WRED with DSCP-Based Drop Probabilities
To configure WRED based on DSCP values:
interface GigabitEthernet1/0/1
random-detect dscp-based
Then, define DSCP drop thresholds:
- DSCP 10 (low priority) โ Drops start at 20%, full drop at 50% queue depth.
- DSCP 46 (VoIP, high priority) โ Drops start at 40%, full drop at 70%.
D. WRED with Class-Based QoS
1๏ธโฃ Define a Traffic Class:
class-map MATCH-VIDEO
match ip dscp af41
2๏ธโฃ Create a Policy with WRED:
policy-map WRED-POLICY
class MATCH-VIDEO
random-detect dscp-based
3๏ธโฃ Apply Policy to an Interface:
interface GigabitEthernet1/0/1
service-policy output WRED-POLICY
๐ Now, WRED is applied only to DSCP AF41 traffic!
5. Verifying WRED
โ Check WRED settings on an interface:
show interfaces GigabitEthernet1/0/1 random-detect
โ Monitor packet drops with WRED:
show policy-map interface GigabitEthernet1/0/1
6. Summary
| Scenario | Configuration |
|---|---|
| Enable WRED on an interface | random-detect |
| Prioritize traffic based on IP Precedence | random-detect precedence X min max |
| Prioritize traffic based on DSCP | random-detect dscp-based |
| Class-Based WRED | policy-map WRED-POLICY + random-detect dscp-based |
| Verify WRED settings | show interfaces random-detect |
๐ WRED improves congestion management by preventing queue overflows and TCP synchronization issues!
Leave a comment