- Read Me First
- Congestion Avoidance Overview
- IPv6 QoS: MQC WRED-Based Drop
- Configuring Weighted Random Early Detection
- Byte-Based Weighted Random Early Detection
- WRED Explicit Congestion Notification
- QoS Time-Based Thresholds for WRED and Queue Limit
- DiffServ Compliant WRED
- Shaping on Dialer Interfaces
Contents
- QoS Time-Based Thresholds for WRED and Queue Limit
- Finding Feature Information
- Prerequisites for QoS Time-Based Thresholds for WRED and Queue Limit
- Restrictions for QoS Time-Based Thresholds for WRED and Queue Limit
- Information About QoS Time-Based Thresholds for WRED and Queue Limit
- Benefits of QoS Time-Based Thresholds for WRED and Queue Limit
- Setting Thresholds by Using WRED
- Setting Thresholds by Using the queue-limit Command
- random-detect Commands with the Milliseconds Keyword
- Mixing Threshold Units of Measure
- How to Configure QoS Time-Based Thresholds for WRED and Queue Limit
- Enabling WRED and Using WRED to Specify Thresholds
- Using the queue-limit Command to Specify the Thresholds
- Attaching the Policy Map to an Interface in a QoS Time-Based Threshold for WRED Configuration
- Verifying the QoS Time-Based Thresholds for WRED and Queue Limit Configuration
- Troubleshooting Tips
- Configuration Examples for QoS Time-Based Thresholds for WRED and Queue Limit
- Example Using WRED to Set Thresholds
- Example Using the queue-limit Command to Set Thresholds
- Example Verifying the Configuration
- Example WRED Threshold Configuration Sample Output
- Example queue-limit command Threshold Configuration Sample Output
- Additional References
- Feature Information for QoS Time-Based Thresholds for WRED and Queue Limit
QoS Time-Based Thresholds for WRED and Queue Limit
The QoS Time-Based Thresholds for WRED and Queue Limit feature allows you to specify the Weighted Random Early Detection (WRED) minimum and maximum thresholds or the queue limit threshold in milliseconds (ms). Previously, these thresholds could only be specified in packets or bytes. Now, all three units of measure are available. Once the threshold limits are configured in a policy map, the policy map can be used on multiple interfaces, including those with different amounts of bandwidth.
- Finding Feature Information
- Prerequisites for QoS Time-Based Thresholds for WRED and Queue Limit
- Restrictions for QoS Time-Based Thresholds for WRED and Queue Limit
- Information About QoS Time-Based Thresholds for WRED and Queue Limit
- How to Configure QoS Time-Based Thresholds for WRED and Queue Limit
- Configuration Examples for QoS Time-Based Thresholds for WRED and Queue Limit
- Additional References
- Feature Information for QoS Time-Based Thresholds for WRED and Queue Limit
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for QoS Time-Based Thresholds for WRED and Queue Limit
Before configuring this feature, a traffic class must be configured and a policy map must exist. To create the traffic class (specifying the appropriate match criteria) and the policy map, use the modular quality of service (QoS) command-line interface (MQC).
Restrictions for QoS Time-Based Thresholds for WRED and Queue Limit
This feature allows you to specify either the WRED thresholds or the queue limit threshold in packets (the default unit of measure), bytes, or milliseconds (ms). However, these units cannot be mixed. That is, the unit of measure in the same class, in the same policy map, cannot be mixed. For example, if you specify the minimum threshold for a particular class in milliseconds, the maximum threshold for that class must also be in milliseconds.
Information About QoS Time-Based Thresholds for WRED and Queue Limit
- Benefits of QoS Time-Based Thresholds for WRED and Queue Limit
- Setting Thresholds by Using WRED
- Setting Thresholds by Using the queue-limit Command
- random-detect Commands with the Milliseconds Keyword
- Mixing Threshold Units of Measure
Benefits of QoS Time-Based Thresholds for WRED and Queue Limit
Queue Limit Thresholds Specified in Additional Units of Measure
Previously, the WRED thresholds and the queue limit thresholds could only be specified in packets or bytes. With this feature, the thresholds can be specified either in packets, bytes or milliseconds. These additional units of measure provide more flexibility and allow you to fine-tune your configuration.
Policy Maps Can be Reused as Needed on Multiple Interfaces
The WRED and queue limit thresholds are specified and configured in policy maps. Once the threshold limits are configured in a policy map, the policy map can be used on multiple interfaces, including those with different amounts of bandwidth. This is especially useful when the bandwidth for a class on given interface is being specified as a percentage of the total bandwidth available.
Setting Thresholds by Using WRED
WRED is a congestion avoidance mechanism. WRED combines the capabilities of the Random Early Detection (RED) algorithm with the IP precedence feature to provide for preferential traffic handling of higher priority packets. WRED can selectively discard lower priority traffic when the interface begins to get congested and provide differentiated performance characteristics for different classes of service.
WRED differs from other congestion avoidance techniques such as queueing strategies because it attempts to anticipate and avoid congestion rather than control congestion once it occurs.
WRED is enabled by using the random-detectcommand. Then the minimum threshold, maximum threshold, and mark probability denominator can be set to determine the treatment that packets receive by using the appropriate command. For example, the random-detect precedence command can be used to determine the thresholds for a specific IP precedence.
Setting Thresholds by Using the queue-limit Command
The queue-limitcommand allows you to specify or modify the maximum number of packets the queue can hold (that is, the threshold) for a class policy configured in a policy map. Packets belonging to a class are subject to the guaranteed bandwidth allocation and the queue limits that characterize the traffic class. With the queue-limit command, the threshold is the aggregate threshold for the entire class.
After a queue has reached its configured queue limit, enqueuing of additional packets to the traffic class causes tail drop or WRED (if configured) to take effect, depending on how the policy map is configured. (Tail drop is a means of avoiding congestion that treats all traffic equally and does not differentiate between classes of service.)
Queues fill during periods of congestion. When the output queue is full and tail drop is in effect, packets are dropped until the congestion is eliminated and the queue is no longer full).
Tail drop is used for distributed class-based weighted fair queueing (DCBWFQ) traffic classes unless you explicitly configure a service policy to use WRED to drop packets as a means of avoiding congestion. Note that if you use WRED instead of tail drop for one or more traffic classes making up a service policy, you must ensure that WRED is not configured for the interface to which you attach that service policy.
random-detect Commands with the Milliseconds Keyword
This feature allows you to specify the WRED minimum and maximum thresholds in milliseconds (ms). You can specify the threshold in milliseconds by using the ms keyword available with the random-detect commands listed in the table below.
Command |
Description |
---|---|
random-detect clp |
Configures the WRED parameters for a particular cell loss priority (CLP) value, or a particular CLP value for a class policy in a policy map. |
random-detect cos |
Configures the WRED parameters for a particular class of service (CoS) value, or a particular CoS value for a class policy in a policy map. |
random-detect discard-class |
Configures the WRED parameters for a particular discard-class, or a particular discard-class for a class policy in a policy map. |
random-detect dscp |
Configures the WRED parameters for a particular differentiated services code point (DSCP) value, or a particular DSCP value for a class policy in a policy map. |
random-detect precedence |
Configures WRED parameters for a particular IP precedence, or a particular IP precedence for a class policy in a policy map. |
Mixing Threshold Units of Measure
With this feature, the thresholds can be specified in packets (the default unit of measure), bytes, or milliseconds (ms). For instance, with WRED, you can specify the minimum threshold and the maximum threshold in packets, bytes, or milliseconds. However, the units cannot be mixed. For example, if you specify the minimum threshold in milliseconds, the maximum threshold must also be specified in milliseconds.
How to Configure QoS Time-Based Thresholds for WRED and Queue Limit
- Enabling WRED and Using WRED to Specify Thresholds
- Using the queue-limit Command to Specify the Thresholds
- Attaching the Policy Map to an Interface in a QoS Time-Based Threshold for WRED Configuration
- Verifying the QoS Time-Based Thresholds for WRED and Queue Limit Configuration
Enabling WRED and Using WRED to Specify Thresholds
1.
enable
2.
configure
terminal
3.
policy-map
policy-name
4.
class
{class-nameclass-default}
5. To continue with the configuration, you must either specify a bandwidth or enable traffic shaping. Choose one or the other.
6.
bandwidth
{bandwidth-kbps |
remaining
percent
percentage |
percent
percentage}
7.
shape
[average |
peak]
mean-rate [burst-size] [excess-burst-size]
8.
random-detect
9.
random-detect
precedence
{precedence |
rsvp}
min-threshold {bytes|
ms|
packets}
max-threshold{bytes |
ms|
packets} [mark-probability-denominator]
10.
exit
DETAILED STEPS
Using the queue-limit Command to Specify the Thresholds
1.
enable
2.
configure
terminal
3.
policy-map
policy-name
4.
class
{class-name
class-default}
5. To continue with the configuration, you must either specify a bandwidth (Using the queue-limit Command to Specify the Thresholds) or enable traffic shaping (Using the queue-limit Command to Specify the Thresholds). Choose one or the other.
6.
bandwidth
{bandwidth-kbps |
remaining
percent
percentage |
percent
percentage}
7.
8.
shape
[average |
peak]
mean-rate [[burst-size] [excess-burst-size]]
9.
queue-limit
number-of-packets
[bytes |
ms |
packets]
10.
exit
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example: Router> enable |
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example: Router# configure terminal |
Enters global configuration mode. |
Step 3 |
policy-map
policy-name
Example: Router(config)# policy-map policy1 |
Specifies the name of the policy map to be created. Enters policy-map configuration mode.
|
Step 4 |
class
{class-name
class-default}
Example: Router(config-pmap)# class class1 |
Specifies the class so that you can configure or modify its policy. Enters policy-map class configuration mode. |
Step 5 | To continue with the configuration, you must either specify a bandwidth (Using the queue-limit Command to Specify the Thresholds) or enable traffic shaping (Using the queue-limit Command to Specify the Thresholds). Choose one or the other. |
|
Step 6 |
bandwidth
{bandwidth-kbps |
remaining
percent
percentage |
percent
percentage}
Example: Router(config-pmap-c)# bandwidth percent 40 |
(Optional) Specifies or modifies the bandwidth allocated for a class belonging to a policy map. |
Step 7 |
|
|
Step 8 |
shape
[average |
peak]
mean-rate [[burst-size] [excess-burst-size]]
Example: Router(config-pmap-c)# shape average 51200 |
(Optional) Enables either average or peak rate traffic shaping. |
Step 9 |
queue-limit
number-of-packets
[bytes |
ms |
packets]
Example: Router(config-pmap-c)# queue-limit 200 ms |
Specifies or modifies the maximum number of packets the queue can hold (that is, the queue limit) for a class configured in a policy map. |
Step 10 |
exit
Example: Router(config-pmap-c)# exit |
(Optional) Exits policy-map class configuration mode. |
Attaching the Policy Map to an Interface in a QoS Time-Based Threshold for WRED Configuration
Note | Depending on the needs of your network, you may need to attach the policy map to a subinterface, an ATM PVC, a Frame Relay DLCI, or other type of interface. |
1.
enable
2.
configure
terminal
3.
interface
type
number
4.
pvc
[name]
vpi / vci
[ilmi |
qsaal |
smds]
5.
service-policy
{input|
output} policy-map-name
6.
exit
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable
Example: Router> enable |
Enables privileged EXEC mode. | ||
Step 2 |
configure
terminal
Example: Router# configure terminal |
Enters global configuration mode. | ||
Step 3 |
interface
type
number
Example: Router(config)# interface serial4/0 |
Configures an interface (or subinterface) type and enters interface configuration mode.
| ||
Step 4 |
pvc
[name]
vpi / vci
[ilmi |
qsaal |
smds]
Example: Router(config-if)# pvc cisco 0/16 ilmi |
(Optional) Creates or assigns a name to an ATM PVC and specifies the encapsulation type on an ATM PVC. Enters ATM VC configuration mode.
| ||
Step 5 |
service-policy
{input|
output} policy-map-name Example: Router(config-if)# service-policy output policy1 Example: |
Specifies the name of the policy map to be attached to the input or output direction of the interface.
| ||
Step 6 |
exit
Example: Router(config-if)# exit |
(Optional) Exits interface configuration mode. |
Verifying the QoS Time-Based Thresholds for WRED and Queue Limit Configuration
1.
enable
2.
show
policy-map
[policy-map]
3. and/or
4.
show
policy-map
interface
interface-name
5.
exit
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example: Router> enable |
Enables privileged EXEC mode.
|
Step 2 |
show
policy-map
[policy-map] Example: Router# show policy-map policy1 |
Displays all information about a class map, including the match criterion.
|
Step 3 | and/or |
|
Step 4 |
show
policy-map
interface
interface-name
Example: Router# show policy-map interface serial4/0 |
Displays the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific PVC on the interface.
|
Step 5 |
exit
Example: Router# exit |
(Optional) Exits privileged EXEC mode. |
Troubleshooting Tips
The commands in the "Verifying the Configuration" section allow you to verify that you achieved the intended configuration and that the feature is functioning correctly. If, after using the show commands listed above, you find that the configuration is not correct or the feature is not functioning as expected, perform these operations:
If the configuration is not the one you intended, complete the following steps:
Use the show running-config command and analyze the output of the command.
If the policy map does not appear in the output of the show running-config command, enable the logging console command.
Attach the policy map to the interface again.
If the packets are not being matched correctly (for example, the packet counters are not incrementing correctly), complete the following procedures:
Run the show policy-mapcommand and analyze the output of the command.
Run the show running-config command and analyze the output of the command.
Use the show policy-map interface command and analyze the output of the command. Check the the following findings: - If a policy map applies queueing, and the packets are matching the correct class, but you see unexpected results, compare the number of the packets in the queue with the number of the packets matched.
If the interface is congested, and only a small number of the packets are being matched, check the tuning of the transmission (tx) ring, and evaluate whether the queueing is happening on the tx ring. To do this, use the show controllers command, and look at the value of the tx count in the output of the command..
Configuration Examples for QoS Time-Based Thresholds for WRED and Queue Limit
- Example Using WRED to Set Thresholds
- Example Using the queue-limit Command to Set Thresholds
- Example Verifying the Configuration
- Example WRED Threshold Configuration Sample Output
- Example queue-limit command Threshold Configuration Sample Output
Example Using WRED to Set Thresholds
In the following example, WRED has been configured in the policy map called "policy1". In this WRED configuration, the bandwidth has been specified as a percentage (80%), and the minimum and maximum thresholds for IP precedence 2 are set to 512 milliseconds and 1020 milliseconds, respectively.
Router> enable Router# configure terminal Router(config)# policy-map policy1 Router(config-pmap)# class class1 Router(config-pmap-c)# bandwidth percent 80 Router(config-pmap-c)# random-detect Router(config-pmap-c)# random-detect precedence 2 512 ms 1020 ms Router(config-pmap-c)# exit Router(config-pmap)# exit Router(config)# interface s4/0 Router(config-if)# service-policy output policy1 Router(config-if)# end
Example Using the queue-limit Command to Set Thresholds
In the following example, a policy map called "policy2" has been configured. The policy2 policy map contains a class called "class1." The bandwidth for this class has been specified as a percentage (80%) and the queue-limit command has been used to set the threshold to 200 milliseconds.
Router> enable Router# configure terminal Router(config)# policy-map policy2 Router(config-pmap)# class class1 Router(config-pmap-c)# bandwidth percent 80 Router(config-pmap-c)# queue-limit 200 ms Router(config-pmap-c)# exit Router(config-pmap)# exit Router(config)# interface s4/0 Router(config-if)# service-policy output policy1 Router(config-if)# end
Example Verifying the Configuration
To verify that this feature is configured correctly, use either the show policy-mapcommand or the show policy-map interface command.
This section contains two sets of sample output from the show policy-map interface command and the show policy-map command--one set showing the output when WRED is used to configure the feature, one set showing the output when the queue-limitcommand is used to configure the feature.
Example WRED Threshold Configuration Sample Output
The following is sample output of the show policy-map command when WRED has been used to specify the thresholds. The words "time-based wred" indicates that the thresholds have been specified in milliseconds (ms).
Router# show policy-map Policy Map policy1 Class class1 bandwidth 80 (%) time-based wred, exponential weight 9 class min-threshold max-threshold mark-probability ---------------------------------------------------------- 0 - - 1/10 1 - - 1/10 2 512 1024 1/10 3 - - 1/10 4 - - 1/10 5 - - 1/10 6 - - 1/10 7 - - 1/10
The following is sample output of the show policy-map interface command when WRED has been used to specify the thresholds.
Router# show policy-map interface Ethernet2/0 Ethernet2/0 Service-policy output: policy1 (1100) Class-map: class1 (match-all) (1101/1) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: protocol ftp (1102) Queueing queue limit 16 ms/ 16000 bytes (queue depth/total drops/no-buffer drops) 0/0/0 (pkts queued/bytes queued) 0/0 bandwidth 80.00% (%) (8000 kbps) Exp-weight-constant: 9 (1/512) Mean queue depth: 0 ms/ 0 bytes class Transmitted Random drop Tail drop Minimum Maximum Mark pkts/bytes pkts/bytes pkts/bytes thresh thresh prob ms/bytes ms/bytes 0 0/0 0/0 0/0 4/4000 8/8000 1/10 1 0/0 0/0 0/0 4/4500 8/8000 1/10 2 0/0 0/0 0/0 512/512000 1024/1024000 1/10 3 0/0 0/0 0/0 5/5500 8/8000 1/10 4 0/0 0/0 0/0 6/6000 8/8000 1/10 5 0/0 0/0 0/0 6/6500 8/8000 1/10 6 0/0 0/0 0/0 7/7000 8/8000 1/10 7 0/0 0/0 0/0 7/7500 8/8000 1/10 Class-map: class-default (match-any) (1105/0) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any (1106) 0 packets, 0 bytes 5 minute rate 0 bps queue limit 64 packets (queue depth/total drops/no-buffer drops) 0/0/0 (pkts queued/bytes queued) 0/0
Formula for Converting the Threshold from Milliseconds to Bytes
When converting the threshold from milliseconds to bytes, the following formula is used:
milliseconds * (bandwidth configured for the class) / 8 = total number of bytes
For this example, the following numbers would be used in the formula:
512 ms * 8000 kbps / 8 = 512000 bytes
Note | Class1 has a bandwidth of 8000 kbps. |
Example queue-limit command Threshold Configuration Sample Output
The following is sample output of the show policy-map command when the queue-limit command has been used to specify the thresholds in milliseconds.
Router# show policy-map Policy Map policy1 Class class1 bandwidth 80 (%) queue-limit 200 ms
The following is sample output from the show policy-map interface command when the queue-limit command has been used to specify the thresholds.
Router# show policy-map interface Ethernet2/0 Service-policy output: policy1 (1070) Class-map: class1 (match-all) (1071/1) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: protocol ftp (1072) Queueing queue limit 200 ms/ 200000 bytes (queue depth/total drops/no-buffer drops) 0/0/0 (pkts queued/bytes queued) 0/0 bandwidth 80.00% (%) (8000 kbps) Class-map: class-default (match-any) (1075/0) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any (1076) 0 packets, 0 bytes 5 minute rate 0 bps queue limit 64 packets (queue depth/total drops/no-buffer drops) 0/0/0 (pkts queued/bytes queued) 0/0
Formula for Converting the Threshold from Milliseconds to Bytes
When converting the threshold from milliseconds to bytes, the following formula is used:
milliseconds * (bandwidth configured for the class)/ 8 = total number of bytes
For this example, the following numbers would be used in the formula:
200 ms * 8000 kbps / 8 = 200000 bytes
Note | Class1 has a bandwidth of 8000 kbps. |
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Quality of service (QoS) commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples |
Cisco IOS Quality of Service Solutions Command Reference |
Congestion avoidance mechanisms, including tail drop, RED and WRED |
Cisco IOS Quality of Service Solutions Configuration Guide |
Congestion management mechanisms, including CBWFQ, and DCBWFQ |
Cisco IOS Quality of Service Solutions Configuration Guide |
Byte-Based WRED |
Byte-Based Weight Random Early Detection module |
Standards
Standard |
Title |
---|---|
No new or modified standards are supported, and support for existing standards has not been modified. |
-- |
MIBs
MIB |
MIBs Link |
---|---|
No new or modified MIBs are supported, and support for existing MIBs has not been modified. |
To locate and download MIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFC |
Title |
---|---|
No new or modified RFCs are supported, and support for existing RFCs has not been modified. |
-- |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for QoS Time-Based Thresholds for WRED and Queue Limit
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
QoS Time-Based Thresholds for WRED and Queue Limit |
Cisco IOS XE Release 3.2S |
The QoS Time-Based Thresholds for WRED and Queue Limit feature allows you to specify the Weighted Random Early Detection (WRED) minimum and maximum thresholds or the queue limit threshold in milliseconds (ms). The following commands are introduced or modified: queue-limit, random-detect precedence, show policy-map, show policy-map interface. |