Weighted random early detection
Weighted random early detection (WRED) is a queue management algorithm with congestion avoidance capabilities. It is an extension to random early detection (RED) where a single queue may have several different queue thresholds. Each queue threshold is associated to a particular traffic class.
For example, a queue may have lower thresholds for lower priority packet. A queue buildup will cause the lower priority packets to be dropped, hence protecting the higher priority packets in the same queue. In this way quality of service prioritization is made possible for important packets from a pool of packets using the same buffer.
It is more likely that standard traffic will be dropped instead of higher prioritized traffic.
On Cisco switches WRED is restricted to
- TCP/IP traffic. Only this kind of traffic indicates congestion to the sender to enable a reduction of the transmission rate.
Non-IP traffic will be dropped more often than TCP/IP traffic because it is treated with the lowest possible precedence.
Functional Description 
WRED proceeds in this order when a packet arrives:
- Calculation of the average queue size.
- The arriving packet is queued only if the average queue size is below the minimum queue threshold.
- Depending on the packet drop probability the packet is either dropped or queued if the average queue size is between the minimum and maximum queue threshold.
- The packet is automatically dropped if the average queue size is greater than the maximum threshold.
Calculation of average queue size 
The average queue size depends on the previous average as well as the current size of the queue. The calculation formula is avg = (old_avg * (1-2^(-n))) + (current_queue_size * 2^(-n)), n is the user-configurable exponential weight factor. The previous average will be more important for high values of n. Peaks and Lows in queue length will be smoothed by a high value. Low values of n allows the average queue size to stay close to the current queue size.
|This computer networking article is a stub. You can help Wikipedia by expanding it.|