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 3.
![]()
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 4.
![]()
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 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 100000