Weighted Random Early Detection (WRED) in QoS

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:

๐Ÿ”น WRED Drop Logic:

Queue StatusBehavior
Queue < Min ThresholdNo drops โœ…
Queue between Min & MaxRandom drops based on priority ๐ŸŽฒ
Queue > Max ThresholdAll new packets dropped (Tail Drop) ๐Ÿšซ

๐Ÿ“Œ Higher-priority traffic has higher thresholds, reducing drop probability.


3. WRED vs. Tail Drop

FeatureWREDTail Drop
Packet Drop BehaviorGradual, based on queue depthDrops all packets when full
Effect on TCPPrevents global TCP synchronizationCauses synchronization issues
QoS DifferentiationPrioritizes important trafficNo 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:


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:


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

ScenarioConfiguration
Enable WRED on an interfacerandom-detect
Prioritize traffic based on IP Precedencerandom-detect precedence X min max
Prioritize traffic based on DSCPrandom-detect dscp-based
Class-Based WREDpolicy-map WRED-POLICY + random-detect dscp-based
Verify WRED settingsshow interfaces random-detect

๐Ÿš€ WRED improves congestion management by preventing queue overflows and TCP synchronization issues!

renjithbs Avatar

Posted by

Leave a comment