Problem solve Get help with specific problems with your technologies, process and projects.

Cisco's WRED

WRED can prevent an output queue from ever filling to capacity, which would result in packet loss for all incoming packets. Learn more about this QoS mechanism.

Whereas queuing provides congestion management for VoIP QoS, mechanisms such as WRED provide congestion avoidance. Specifically, WRED can prevent an output queue from ever filling to capacity, which would result in packet loss for all incoming packets. This article from Informit examines the need for and the configuration of WRED on Cisco routers.

Recall from your early studies of networking technology how Transport Control Protocol (TCP) windowing functions. A sender sends a single segment, and if the sender receives a successful acknowledgment from the receiver, it then sends two segments (that is, a "windows size" of 2). If those two segments were acknowledged successfully, the sender sends four segments, and so on, increasing the window size exponentially.

However, if one of the segments is dropped, the TCP flow goes into TCP slow start, where the window size is reduced to 1. The TCP flow then exponentially increases its window size until the window size reaches half of the window size when congestion originally occurred. At that point, the TCP flow's window size increases linearly.

TCP slow start is relevant to QoS, because when an interface's output queue is full, all newly arriving packets are discarded (that is, "tail dropped"), and all of those TCP flows simultaneously go into TCP slow start. Note that the process of multiple TCP flows simultaneously entering TCP slow start is called global synchronization or TCP synchronization. When TCP synchronization occurs, the link's bandwidth is underutilized, resulting in wasted bandwidth.

RED Basics

The purpose of Random Early Detection (RED) is to prevent TCP synchronization by randomly discarding packets as an interface's output queue begins to fill. How aggressively RED discards packets depends on the current queue depth.

The following three parameters influence when a newly arriving packet is discarded:

  • Minimum threshold
  • Maximum threshold
  • Mark Probability Denominator (MPD)

The minimum threshold specifies the number of packets in a queue before the queue considers discarding packets. The probability of discard increases until the queue depth reaches the maximum threshold. After the queue depth exceeds the maximum threshold, all other packets that attempt to enter the queue are discarded.

However, the probability of packet discard when the queue depth equals the maximum threshold is 1/(MPD). For example, if the mark probability denominator were set to 10, when the queue depth reached the maximum threshold, the probability of discard would be 1/10 (that is, a 10 percent chance of discard).

The minimum threshold, maximum threshold, and MPD comprise the RED profile. RED is most useful on router interfaces where congestion is likely. For example, a WAN interface might be a good candidate for RED.


Cisco does not support RED, but fortunately it supports something better: Weighted Random Early Detection (WRED). Unlike RED, WRED has a profile for each priority marking. For example, a packet with an IP Precedence value of 0 might have a minimum threshold of 20 packets, whereas a packet with an IP Precedence of 1 might have a minimum threshold of 25 packets. In this example, packets with an IP Precedence of 0 would start to be discarded before packets with an IP Precedence of 1.

Although WRED can be configured from interface-configuration mode or from virtual-circuit-configuration mode, this focuses on an MQC-based WRED configuration. To enable WRED and to specify the marking that WRED pays attention to (that is, IP Precedence or DSCP), issue the following policy-map-class configuration-mode command:

Router(config-pmap-c)#random-detect [dscp-based | prec-based]

If neither dscp-based nor prec-based is specified, WRED defaults to prec-based. After WRED is configured, the IOS assigns default minimum threshold, maximum threshold, and MPD values. However, you can alter those default parameters with the following commands:

Router(config-pmap-c)#random-detect precedence precedence_value 
minimum-threshold maximum-threshold mark-probability-denominator

(Used for prec-based WRED)

Router(config-pmap-c)#random-detect dscp dscp_value minimum-threshold
maximum-threshold mark-probability-denominator

(Used for dscp-based WRED)

For further examples of WRED configuration read more of this article at Informit.

This was last published in December 2004

Dig Deeper on VoIP QoS and Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.