Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

WRR Queueing question

Reading up on WRR, and don't understand the final remark in this text:


Switch(config)# interface gigabitethernet0/1

Switch(config-if)# wrr-queue random-detect max-threshold 1 50 100

Switch(config-if)# wrr-queue random-detect max-threshold 2 70 100

Switch(config-if)# wrr-queue random-detect max-threshold 3 50 100

Switch(config-if)# wrr-queue random-detect max-threshold 4 70 100

Switch(config-if)# exit

Switch(config)# interface gigabitethernet0/2

Switch(config-if)# mls qos trust dscp

Switch(config-if)# wrr-queue dscp-map 1 0 8 16 24 32 40 48 56

Switch(config-if)# wrr-queue dscp-map 2 10 20 30 40 50 60

As a result of this configuration, when the queues 1 and 3 are filled above 50 percent, packets with DSCPs 0, 8, 16, 24, 32, 40, 48, and 56 are randomly dropped. The same packets are randomly dropped when queues 2 and 4 are filled above 70 percent. When the second threshold (100 percent) is exceeded, all queues randomly drop packets with DSCPs 10, 20, 30, 40, 50, and 60.


Could someone explain why "all queues randomly drop packets with DSCPs 10, 20, 30, 40, 50, and 60" ?



Re: WRR Queueing question

Referring to the doc. link from you.


Cisco's implementation of Random Early Detection (RED), called Weighted Random Early Detection (WRED), differs from other congestion-avoidance techniques because it attempts to anticipate and avoid congestion, rather than controlling congestion when it occurs.

WRED takes advantage of the Transmission Control Protocol (TCP) congestion control to try to control the average queue size by indicating to end hosts when they should temporarily stop sending packets. By randomly dropping packets before periods of high congestion, it tells the packet source to decrease its transmission rate. Assuming the packet source is using TCP, WRED tells it to decrease its transmission rate until all the packets reach their destination, meaning that the congestion is cleared.

WRED reduces the chances of tail drop by selectively dropping packets when the output interface begins to show signs of congestion. By dropping some packets early rather than waiting until the queue is full, WRED avoids dropping large numbers of packets at once. Thus, WRED allows the transmission line to be fully used at all times. WRED also drops more packets from large users than small. Therefore, sources that generate the most traffic are more likely to be slowed down versus sources that generate little traffic.

You can enable WRED and configure the two threshold percentages assigned to the four egress queues on a Gigabit-capable Ethernet port by using the wrr-queue random-detect max-threshold interface configuration command. Each threshold percentage represents where WRED starts to randomly drop packets. After a threshold is exceeded, WRED randomly begins to drop packets assigned to this threshold. As the queue limit is approached, WRED continues to drop more and more packets. When the queue limit is reached, WRED drops all packets assigned to the threshold. By default, WRED is disabled.

You modify the DSCP-to-threshold map to determine which DSCPs are mapped to which threshold ID by using the wrr-queue dscp-map interface configuration command. By default, all DSCPs are mapped to threshold 1, and when this threshold is exceeded, all the packets are randomly dropped.

If you use WRED thresholds, you cannot use tail drop, and vice versa. If WRED is disabled, tail drop is automatically enabled with the previous configuration (or the default if it was not previously configured).


You assign two drop thresholds to each queue, map DSCPs to the thresholds through the DSCP-to-threshold map, and enable either tail drop or WRED on the interface. The queue size, drop thresholds, tail-drop or WRED algorithm, and the DSCP-to-threshold map work together to determine when and which packets are dropped when the thresholds are exceeded. You configure the drop percentage thresholds by using either the wrr-queue threshold interface configuration command for tail drop or the wrr-queue random-detect max-threshold interface configuration command for WRED; in either case, you map DSCP values to the thresholds (DSCP-to-threshold map) by using the wrr-queue dscp-map interface configuration command.

It does drop the packets randomly if reach the threshold and congestion. What area you do not undetstand ?

Community Member

Re: WRR Queueing question

Hi Jack,

I do understand that wred will eventually drop packets from all queues. What I don't understand is why the router will drop packets with dscps 10 20 30 40 50 60 from queues 3 and 4 when that has not been configured.

Like was done for queue 2 for example. Why does it not drop packets will any dscp value from 3 and 4 when the interface is congested?


CreatePlease to create content