Drop Profiles
Drop profiles control the dropping behavior of a set of egress queues. They define the range within the queue where RED operates, the maximum percentage of packets to drop, and sensitivity to bursts of packets. WRED is an extension to RED that allows you to assign different RED drop profiles to each color of traffic.
The purpose of RED and WRED is to signal end-to-end protocols, such as TCP, that the router is becoming congested along a particular egress path. The intent is to trigger TCP congestion avoidance in a random set of TCP flows before congestion becomes severe and causes tail dropping on a large number of flows. Tail dropping can lead to TCP slow-starts, and tail dropping on a large number of flows results in global synchronization.
By default, tail dropping occurs when the length of a queue exceeds a threshold. Drop profiles allow you to employ active queue management by specifying RED/WRED parameters to be applied to an egress queue.
Congestion of an egress queue occurs when the rate of traffic destined for the queue exceeds the rate of traffic draining from the queue; the queue fills to its limit, and any further traffic destined to it must be discarded until there is room in the queue. RED and WRED monitor average queue length over time to detect incipient congestion.
You can combine drop profiles and queue profiles within a queue rule of a QoS profile to specify up to 256 unique queuing behaviors within the router. You can then associate these queuing behaviors in any combination with any of the egress queues.
How RED Works
The scheduler maintains an average queue length for each queue configured for RED. When a packet is enqueued, the current queue length is weighted into the average queue length based on the average-length exponent in the drop profile.
- Small exponent values weight the current queue length heavily, so the average queue length is more responsive to transient bursts.
- Large exponent values weight the current queue length lightly, so the average queue length is less responsive to bursts.
When the average queue length exceeds the minimum threshold, RED begins randomly dropping packets. As the average queue length increases toward the maximum threshold, RED drops packets with increasing frequency, up to the maximum drop probability. When the average queue length exceeds the maximum drop threshold, all packets are dropped. Figure 4 shows this behavior.
![]()
Configuring RED
To configure RED, perform the following steps:
- Create a drop profile and enter Drop Profile Configuration mode.
host1(config)#drop-profile internetDropProfilehost1(config-drop-profile)#- Set the average-length exponent.
host1(config-drop-profile)#average-length-exponent 9- (Optional) Set the minimum and maximum threshold for committed traffic.
host1(config-drop-profile)#committed-threshold percent 30 90 4- (Optional) Set the minimum and maximum threshold for conformed traffic.
host1(config-drop-profile)#conformed-threshold percent 25 90 5- (Optional) Set the minimum and maximum threshold for exceeded traffic.
host1(config-drop-profile)#exceeded-threshold percent 20 90 6average-length-exponent
- Use to set the average-length exponent, which specifies the exponent used to weight the average queue length over time, controlling WRED responsiveness.
- Specifying an average-length exponent enables the RED average queue length computation.
- A higher value smooths out the average and slows WRED reaction to congestion and decongestion, accommodating short bursts without dropping. Too large a value can smooth the average to the point that WRED does not react at all.
- A lower value speeds up WRED reaction. Too low a value can cause overreaction to short bursts, dropping packets unnecessarily.
- Example
host1(config-drop-profile)#average-length-exponent 5Use the no version to negate the average-length exponent. committed-threshold
conformed-threshold
exceeded-threshold
- Use to specify the minimum and maximum queue thresholds and maximum drop probability for WRED.
- You can express thresholds as either percentages of maximum queue size by including the keyword percent, or as absolute byte values by omitting the keyword.
- The thresholds specify a linear relationship between average queue length and drop probability.
- Example
host1(config-drop-profile#committed-threshold percent 10 20 30Use the no version to remove the threshold. drop-profile
host1(config)#drop-profile dp1host1(config-drop-profile)#Use the no version to remove the drop profile. RED Configuration Examples
This section describes how to configure the RED average queue length computation, configure RED for colored traffic, and configure RED so that packets are dropped without regard to color.
Configuring Average Queue Length
To enable calculation of average queue length, create a drop profile with a nonzero average-length exponent, reference the drop profile within a QoS profile, and attach the QoS profile to an interface. The following drop profile enables the average queue length calculation, but does not initiate RED dropping behavior:
host1(config)#drop-profile averageOnlyhost1(config-drop-profile)#average-length-exponent 10Configuring Thresholds
You can specify different dropping behavior for committed (green), conformed (yellow), and exceeded (red) packets by specifying a minimum queue threshold, maximum queue threshold, and maximum drop probability for each color of traffic.
By default, conformed threshold and exceeded threshold take the same values as the committed threshold. Therefore, if you specify only a committed threshold, conformed and exceeded traffic is treated like committed traffic. Similarly, if you specify a conformed threshold without an exceeded threshold, exceeded traffic is treated like committed traffic.
The following drop profiles result in identical behavior:
host1(config)#drop-profile colorblind1host1(config-drop-profile)#committed-threshold percent 30 90 5host1(config-drop-profile)#exithost1(config)#drop-profile colorblind2host1(config-drop-profile)#committed-threshold percent 30 90 5host1(config-drop-profile)#conformed-threshold percent 30 90 5host1(config-drop-profile)#exithost1(config)#drop-profile colorblind3host1(config-drop-profile)#committed-threshold percent 30 90 5host1(config-drop-profile)#conformed-threshold percent 30 90 5host1(config-drop-profile)#exceeded-threshold percent 30 90 5Configuring Color-Blind RED
You can configure RED so that packets are dropped without regard to color. To do so, you combine a drop profile that has a committed threshold configured with a queue profile that specifies the same queue length for committed, conformed, and exceeded packets, as shown in Figure 5.
![]()
In the following example, the drop profile and queue profile combine to specify the following:
- When the average queue length is between 30 percent full (30 KB) and 90 percent full (90 KB), up to 5 percent of the packets are randomly dropped regardless of their color.
- When the average queue length is greater than 90 percent, all packets are dropped regardless of color.
host1(config)#drop-profile nocolorhost1(config-drop-profile)#committed-threshold percent 30 90 5host1(config-drop-profile)#exithost1(config)#queue-profile colorlesshost1(config-queue)#committed-length 100000 100000host1(config-queue)#conformed-fraction 100host1(config-queue)#exceeded-fraction 100To achieve the same drop treatment for each color, you can specify color-blind RED in combination with a color-sensitive queue profile, as shown in Figure 6.
![]()
In the example below, the drop profile and queue profile combine to specify the following:
- When the average queue length is between 30 percent full (30 KB) and 90 percent full (90 KB), up to 5 percent of the packets are dropped randomly. In this case, the maximum queue length is 100 KB for green packets, 50 KB for yellow packets, and 25 KB for red packets. Therefore, the router randomly drops:
- Red packets when the average queue length is between 7.5 KB and 22.5 KB
- Yellow packets when the average queue length is between 15 KB and 45 KB
- Green packets when the average queue length is between 30 KB and 90 KB
- When the average queue length is greater than 90 percent of the maximum queue length, all packets are dropped. Therefore, the router drops:
- Red packets when the average queue length is greater than 22.5 KB
- Yellow packets when the average queue length is greater than 45 KB
- Green packets when the average queue length is greater than 90 KB
host1(config)#drop-profile colorblindRedhost1(config-drop-profile)#committed-threshold percent 30 90 5host1(config-drop-profile)#exithost1(config)#queue-profile colorSensitivehost1(config-queue)#committed-length 100000 100000How WRED Works
WRED is an extension of RED that allows you to assign different RED drop thresholds to each color of traffic. The router assigns a color to each packet. Committed means green, conformed means yellow, and exceeded means red. When the queue fills above the exceeded threshold, the router drops red packets, but still queues yellow and green packets. When the queue fills above the conformed drop threshold, the router queues only green packets.
Configuring WRED
You configure WRED by creating a drop profile using the same steps in Configuring RED. The main difference between RED and WRED is that WRED deals with different colored packets.
As previously discussed, you can configure E-series RED by using a subset of its QoS capabilities.
WRED Configuration Examples
This section shows how to configure different treatment of colored packets, different drop behavior for each queue, RED and dynamic queue thresholds, and average queue lengths for WRED.
Configuring Different Treatment of Colored Packets
Figure 7 shows a WRED drop profile that yields progressively more aggressive drop treatment for each color. Exceeded traffic is dropped over a wider range and with greater maximum drop probability than conformed or committed traffic. Conformed traffic is dropped over a wider range and with greater maximum drop probability than committed traffic.
The commands to configure this example are:
host1(config)#drop-profile wredColoredhost1(config-drop-profile)#committed-threshold percent 30 90 3host1(config-drop-profile)#conformed-threshold percent 25 90 5host1(config-drop-profile)#exceeded-threshold percent 20 90 10
![]()
Defining Different Drop Behavior for Each Traffic Class
You can define different dropping behaviors for each traffic class in the router. By doing so, you can assign less aggressive drop profiles to higher-priority queues and more aggressive drop profiles to lower-priority queues. Figure 8 shows an example that classifies packets into one of four traffic classes. Each traffic class has a different queueing behavior, drop treatment, and scheduler treatment.
![]()
RED and Dynamic Queue Thresholds
RED typically operates on fixed-size queues, and you can configure the router to use fixed-size queues. However, by default, the router employs dynamic queue thresholds to provide a good balance between sharing the egress buffer memory between queues and protecting an individual queue's claim on its fair share of the egress memory. Fixed-size queues become problematic as the number of configured queues scales into the thousands, because allocating disjointed partitions of buffer memory to each queue means the allocations become quite small, and most likely not all queues are simultaneously active.
In general, you use queues as follows:
- Fixed-size queues on core routers and core-facing interfaces where the number of queues is relatively small (tens or hundreds, but not thousands).
- Dynamic queues on edge-facing interfaces where the number of queues is relatively large (thousands).
As shown in Figure 9, queue lengths extend to oversubscribe memory when aggregate memory utilization is low, and contract to strictly partition memory when memory utilization is high. Dynamic thresholding enforces fairness when free buffers are scarce and promotes sharing when buffers are plentiful. Dynamic queue thresholds are discussed in Queue Profiles. Figure 9 illustrates WRED behavior with dynamic queue thresholding.
To configure WRED to run on queues whose limits dynamically expand and contract, use the percent keyword when you configure thresholds in a drop profile. For example:
host1(config)#drop-profile internetDropProfilehost1(config-drop-profile)#average-length-exponent 9host1(config-drop-profile)#committed-threshold percent 30 90 4host1(config-drop-profile)#conformed-threshold percent 25 90 5host1(config-drop-profile)#exceeded-threshold percent 20 90 6
![]()