Reference Guide
Congestion avoidance
The weighted random early detection (WRED) congestion avoidance mechanism drops packets to prevent buering resources from being
consumed. Network trac is a mixture of packets of dierent trac types or ows, and the rate of some types of trac is greater than
others.
The packet buer resources (ingress and egress buers) are consumed by only one or a few types of trac, leaving no space for other
types. Apply WRED threshold values to a policy-map so that congured trac is prevented from consuming large amounts of BTM
resources.
Congure WRED parameters for a queue, a port, or global service pools and congure the minimum threshold drop rate using the
random-detect command. The minimum threshold is the allowed buer space for the specied trac—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 buer space is reduced to
below 2000 KB of the specied trac.
Explicit congestion notication
When you use explicit congestion notication (ECN) in conjunction with WRED, packets are marked instead of dropping them. Devices on
a network respond to congestion before a queue overows and packets drop, enabling improved queue management. You can congure
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-congurable weight factor is used. Use the random-detect weight weight-value command to congure the weight for
the WRED average queue size. The weight factor is set to zero by default.
Queue management
Queues share buer 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