Reference Guide

Congestion avoidance
The weighted random early detection (WRED) congestion avoidance mechanism drops packets to prevent buering resources from being
consumed. Network trac is a mixture of packets of dierent trac types or ows, and the rate of some types of trac is greater than
others.
The packet buer resources (ingress and egress buers) are consumed by only one or a few types of trac, leaving no space for other
types. Apply WRED threshold values to a policy-map so that congured trac is prevented from consuming large amounts of BTM
resources.
Congure WRED parameters for a queue, a port, or global service pools and congure the minimum threshold drop rate using the
random-detect command. The minimum threshold is the allowed buer space for the specied trac—for example, 1000 KB on
egress. If the 1000 KB is consumed, packets drop randomly at an exponential rate until the maximum threshold is reached—this is the
early detection” part of WRED.
Before queuing the packet, OS10 assigns a color (also called drop precedence or DP)—yellow, red, or green—to each packet using the
random-detect color command based on the packet’s DSCP value. DSCP is a 6-bit eld and OS10 uses the rst three bits (LSB) of
this eld (DP) to determine the drop precedence. The last three bits of the DSCP eld are the drop precedence bits.
If the maximum threshold (for example 2000 KB) is reached, all incoming packets are dropped until the used buer space is reduced to
below 2000 KB of the specied trac.
Explicit congestion notication
When you use explicit congestion notication (ECN) in conjunction with WRED, packets are marked instead of dropping them. Devices on
a network respond to congestion before a queue overows and packets drop, enabling improved queue management. You can congure
ECN using the random-detect ecncommand.
When a packet reaches the device with ECN enabled for WRED, the average queue size is computed. To measure the average queue size,
a user-congurable weight factor is used. Use the random-detect weight weight-value command to congure the weight for
the WRED average queue size. The weight factor is set to zero by default.
Queue management
Queues share buer memory space.
All packets in a queue are transmitted, until the queue size reaches a minimum threshold. When the queue size reaches that minimum
threshold, the system starts discarding packets with a certain probability. The probability of discard increases until the queue depth reaches
Quality of service
563