Guest

Cisco IOS Software Releases 12.0 S

QoS: Time-Based Thresholds for WRED and Queue Limit for the Cisco 12000 Series Router

  • Viewing Options

  • PDF (410.4 KB)
  • Feedback
QoS: Time-Based Thresholds for WRED and Queue Limit for the Cisco 12000 Series Router

Table Of Contents

QoS: Time-Based Thresholds for WRED and Queue Limit for the Cisco 12000 Series Router

Contents

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

Setting Thresholds by Using WRED

Setting Thresholds by Using the queue-limit Command

random-detect Commands with the Millisecond (ms) and
Microsecond (us) Keyword

How to Configure Time-Based Thresholds

Enabling WRED and Using WRED to Specify Thresholds

Using the queue-limit Command to Specify the Thresholds

Attaching the Policy Map to an Interface

Verifying the Configuration

Troubleshooting Tips

Configuration Examples for QoS: Time-Based WRED and
Queue Limit

Using WRED to Set Thresholds: Example

Using the queue-limit Command to Set Thresholds: Example

Verifying the Configuration: Example

WRED Threshold Configuration Sample Output

queue-limit command Threshold Configuration Sample Output

Calculating Absolute Byte Values of random-detect and queue-limit Queues

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

queue-limit

random-detect precedence

show policy-map

show policy-map interface


QoS: Time-Based Thresholds for WRED and Queue Limit for the Cisco 12000 Series Router


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 and the queue limit threshold in milliseconds (ms) or in microseconds (us). After 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.

Feature History for QoS: Time-Based Thresholds for WRED and Queue Limit

Release
Modification

12.0(28)S

This feature was introduced for the Cisco 12000 Series line cards with E3 and E4 forwarding engines.


Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

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 Time-Based Thresholds

Configuration Examples for QoS: Time-Based WRED and Queue Limit

Additional References

Command Reference

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

Minimum and maximum thresholds for a particular class must be configured in the same units (cells, packets, milliseconds, or microseconds). That is, the unit of measure in the same class, in the same policy map, cannot be different. 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

To configure the QoS: Time-Based Thresholds for WRED and Queue Limit feature, you should understand the following concepts:

Benefits

Setting Thresholds by Using WRED

Setting Thresholds by Using the queue-limit Command

random-detect Commands with the Millisecond (ms) and Microsecond (us) Keyword

How to Configure Time-Based Thresholds

Benefits

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, cells, milliseconds, or microseconds. 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 queuing strategies because it attempts to anticipate and avoid congestion rather than control congestion once it occurs.

WRED is enabled by using the random-detect command. 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.

For more information about WRED, refer to the "Congestion Avoidance" section of the Cisco IOS Quality of Service Solutions Configuration Guide.

Setting Thresholds by Using the queue-limit Command

The queue-limit command 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.

With this feature, you can now specify the queue limit as milliseconds (ms) or microseconds (us) of queue space. When the queue limit is specified in milliseconds or microseconds, it is internally converted to bytes by using the visible bandwidth that is available for the 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 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.


For more information about tail drop and DCBWFQ, refer to the "Congestion Management" section of the Cisco IOS Quality of Service Solutions Configuration Guide.

random-detect Commands with the Millisecond (ms) and
Microsecond (us) Keyword

This feature allows you to specify the WRED minimum and maximum thresholds in milliseconds (ms) or in microseconds (us). The ms and the us keywords of the random-detect precedence command specify milliseconds and microseconds, respectively. This command configures WRED parameters for a particular IP Precedence, or a particular IP Precedence for a class policy in a policy map.

For more information about these commands, see the "Command Reference" section of this document.

How to Configure Time-Based Thresholds

This section contains the following procedures:

Enabling WRED and Using WRED to Specify Thresholds (required)

Using the queue-limit Command to Specify the Thresholds (required)

Attaching the Policy Map to an Interface (required)

Verifying the Configuration (optional)

Enabling WRED and Using WRED to Specify Thresholds

This procedure allows you to set the WRED thresholds for traffic with a specific value, such as the IP precedence, differentiated services code point (DSCP), Resource Reservation Protocol (RSVP), discard-class, class of service (CoS), or cell loss priority (CLP).

To enable WRED and use it to specify the thresholds for user-defined categories of traffic, perform the following steps.

SUMMARY STEPS

1. enable

2. configure terminal

3. policy-map policy-name

4. class {class-name | class-default}

5. bandwidth {bandwidth-kbps | remaining percent percentage | percent percentage}

or

6. shape [average | peak] mean-rate [[burst-size] [excess-burst-size]]

7. random-detect

8. random-detect precedence {precedence | rsvp} minimum-threshold {cells | ms | packets | us} maximum-threshold {cells | ms | packets | us} [mark-probability-denominator]

9. exit

DETAILED STEPS

 
Command
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

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.

Enter the policy map name.

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.

Enter the class name or specify the default class (class-default).

 

To continue with the configuration, you must either specify a bandwidth (Step 5) or enable traffic shaping (Step 6). Choose one or the other.

Step 5 

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.

Enter the bandwidth to be set or modified.

 

or

Step 6 

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.

Specify either average or peak traffic shaping.

Step 7 

random-detect

Example:

Router(config-pmap-c)# random-detect

Enables WRED.

Step 8 

random-detect precedence {precedence | rsvp} minimum-threshold {cells | ms | packets | us} maximum-threshold {cells | ms | packets | us} [mark-probability-denominator]

Example:

Router(config-pmap-c)# random-detect precedence 2 4 ms 8 ms

Configures WRED parameters for a particular IP Precedence.

Specify the IP Precedence or RSVP value, and thresholds, as needed.

Note In this example, the WRED parameters were specified for traffic with a specific IP precedence value. Other values can be specified with other random-detect commands.

Step 9 

exit

Example:

Router(config-pmap-c)# exit

(Optional) Exits policy-map class configuration mode.

Using the queue-limit Command to Specify the Thresholds

The queue-limit command allows you to set the aggregate-level thresholds for an entire class. To specify the thresholds by using the queue-limit command, perform the following steps.

SUMMARY STEPS

1. enable

2. configure terminal

3. policy-map policy-name

4. class {class-name | class-default}

5. bandwidth {bandwidth-kbps | remaining percent percentage | percent percentage}

or

6. shape [average | peak] mean-rate [[burst-size] [excess-burst-size]]

7. queue-limit number-of-packets {cells | ms | packets | us}

8. exit

DETAILED STEPS

 
Command
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

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.

Enter policy map name.

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.

Enter the class name or specify the default class (class-default).

 

To continue with the configuration, you must either specify a bandwidth (Step 5) or enable traffic shaping (Step 6). Choose one or the other.

Step 5 

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.

Enter the bandwidth to be set or modified.

 

or

Step 6 

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.

Specify either average or peak traffic shaping.

Step 7 

queue-limit number-of-packets [cells | ms | packets | us]

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.

Enter the queue limit. The unit of measure can be cells, milliseconds, or packets or microseconds.

Step 8 

exit

Example:

Router(config-pmap-c)# exit

(Optional) Exits policy-map class configuration mode.

Attaching the Policy Map to an Interface

So far, you have specified the threshold in a policy map. The next step is to attach the policy map to an interface. Policy maps can be attached to either the input or output direction of the interface.


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.


To attach the policy map to an interface, perform the following steps.

SUMMARY STEPS

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 higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

interface type number

Example:

Router(config)# interface s4/0

Configures an interface or subinterface type and enters interface configuration mode.

Enter the interface type number.

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.

Note This step is required only if you are attaching the policy map to an ATM PVC. If you are not attaching the policy map to an ATM PVC, skip this step and proceed with Step 5.

Step 5 

service-policy {input | output} policy-map-name

Example:

Router(config-if)# service-policy output policy1


Specifies the name of the policy map to be attached to the input or output direction of the interface.

Note Policy maps can be configured on ingress or egress routers. They can also be attached in the input or output direction of an interface. The direction (input or output) and the router (ingress or egress) to which the policy map should be attached varies according your network configuration. When using the service-policy command to attach the policy map to an interface, be sure to choose the router and the interface direction that are appropriate for your network configuration.

Enter the policy map name.

Step 6 

exit

Example:

Router(config-if)# exit

(Optional) Exits interface configuration mode.

Verifying the Configuration

This task allows you to verify that you created the configuration you intended and that the feature is functioning correctly.

To verify the configuration, perform the following steps.

SUMMARY STEPS

1. enable

2. show policy-map [policy-map]

or

show policy-map interface interface-name

3. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

show policy-map [policy-map]

Example:

Router# show class-map class1

Displays all information about a class map, including the match criterion.

Enter the class map name.

 

or

 

show policy-map interface interface-name

Example:

Router# show policy-map interface s4/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.

Enter the interface name.

Step 3 

exit

Example:

Router# exit

(Optional) Exits 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 the operations that follow.

If the configuration is not the one you intended, complete the following procedures:

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-map command 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 WRED and
Queue Limit

This section provides the following configuration examples:

Using WRED to Set Thresholds: Example

Using the queue-limit Command to Set Thresholds: Example

Verifying the Configuration: Example

Calculating Absolute Byte Values of random-detect and queue-limit Queues

Using WRED to Set Thresholds: Example

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 class-default
Router(config-pmap-c)# bandwidth percent 80
Router(config-pmap-c)# random-detect
Router(config-pmap-c)# random-detect precedence 2 4 ms 8 ms 
Router(config-pmap-c)# exit 
Router(config-pmap)# exit 
Router(config)# interface serial8/0/0:0.1000
Router(config-subif)# service-policy output policy1
Router(config-subif)# end

Using the queue-limit Command to Set Thresholds: Example

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 class-default
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

Verifying the Configuration: Example

To verify that this feature is configured correctly, use either the show policy-map command 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 and one set showing the output when the queue-limit command is used to configure the feature.

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" indicate that the thresholds have been specified in milliseconds (ms).

Router# show policy-map
Policy Map policy1
Class class-default
      random-detect precedence-based
      random-detect precedence 2 4 ms 8 ms 
      bandwidth percent 80

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 Serial8/0/0:0.1000 

  Service-policy output: class1 (1142)

    Class-map: class-default (match-any) (1143/0)
      0 packets, 0 bytes
      30 second offered rate 0 bps, drop rate 0 bps
      Match: any  (1144)
        0 packets, 0 bytes
        30 second rate 0 bps
      
      queue limit 384 (packets)
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts queued/bytes queued) 0/0
        Exp-weight-constant: 9 (1/512)
        Mean queue depth: 0 bytes - time based threshold
        class     Transmitted   Random drop  Tail drop  Minimum  Maximum Mark
                  pkts/bytes    pkts/bytes   pkts/bytes thresh   thresh  prob
        0             0/0           0/0          0/0      24000   48000  1/10
        1             0/0           0/0          0/0      27000   48000  1/10
        2             0/0           0/0          0/0        768    1536  1/10
        3             0/0           0/0          0/0      33000   48000  1/10
        4             0/0           0/0          0/0      36000   48000  1/10
        5             0/0           0/0          0/0      39000   48000  1/10
        6             0/0           0/0          0/0      42000   48000  1/10
        7             0/0           0/0          0/0      45000   48000  1/10

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 class-default
      random-detect precedence-based
      random-detect precedence 2 4 ms 8 ms 44
      bandwidth percent 80
      queue-limit 200 ms

The following is sample output of 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

Calculating Absolute Byte Values of random-detect and queue-limit Queues

To calculate absolute queue limits, simply replace the word "Threshold" with "Queue-limit" in the following formulae:

Calculating the Threshold Value in Bytes when Milliseconds or Microseconds are Specified

Threshold_bytes = (threshold_value * ms) * (bandwidth_value * bits/sec) * byte/8bits * sec/1,000ms

Threshold_bytes = (threshold_value * us) * (bandwidth_value * bits/sec) * byte/8bits * sec/1,000,000us

Calculating the Threshold Value in Packets

Threshold_packets = Threshold_bytes * packets/256bytes

The constant value of bytes per packet is defined as 256.

Calculating the Threshold Value in Cells

Threshold_cells = Threshold_bytes * cells/53bytes

The constant value of bytes per cell is defined as 53.

Additional References

The following sections provide references related to the QoS: Time-Based Thresholds for WRED and Queue Limit feature.

Related Documents

Related Topic
Document Title

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, Release 12.3T

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 feature module, Cisco IOS Release 12.0(26)S


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFCs
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents only modified commands.

Modified Commands

queue-limit

random-detect precedence

show policy-map

show policy-map interface

queue-limit

To specify or modify the maximum number of packets the queue can hold for a class policy configured in a policy map, use the queue-limit command in policy-map class configuration mode. To remove the queue packet limit from a class, use the no form of this command.

queue-limit number [cells | ms | packets | us]

no queue-limit number [cells | ms | packets | us]

Syntax Description

number

A number specifying the maximum number of packets (the default unit of measure), bytes, or milliseconds (ms) that the queue for this class can accumulate. This can be used in conjunction with the optional bytes, ms, or packets keywords. If an optional keyword is not specified, packets will be used.

cells

(Optional) Indicates that the queue limit maximums (or threshold) is specified in cells for ATM interfaces.

ms

(Optional) Indicates that the queue limit maximum (or threshold) is specified in milliseconds (ms).

us

(Optional) Indicates that the queue limit maximum (or threshold) is specified in microseconds (us).

packets

(Optional) Indicates that the queue limit maximum (or threshold) is specified in packets.


Defaults

If an optional keyword is not specified, packets will be used.

The default value is based on available buffer memory. If sufficient buffer memory is available, the default queue-limit value is equal to the number of 250-byte packets that would lead to a latency of 500 milliseconds (ms) when the packets are delivered at the configured rate. For example, if two 250-byte packets are required to lead to a latency of 500 ms, the default number-of-packets value would be 2.

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE. Support for VIP-enabled Cisco 7500 series routers was added.

12.1(5)T

This command was implemented on the VIP-enabled Cisco 7500 series routers.

12.0(28)S

This command was integrated into Cisco IOS Release 12.0(28) S, and this command was modified to include three new keywords—cells, ms, and us.


Usage Guidelines

The queue-limit command is allowed only with other queueing features, such as weighted fair queueing (WFQ). WFQ creates a queue for every class for which a class map is defined. Packets satisfying the match criteria for a class accumulate in the queue reserved for the class until they are sent, which occurs when the queue is serviced by the fair queueing process. When the maximum packet threshold you defined for the class is reached, enqueueing of additional packets to the class queue causes tail drop or, if weighted random early detection (WRED) is configured for the class policy, packet drop to take effect.

Overriding Queue Limits Set by the Bandwidth Command

The bandwidth command can be used with the modular quality of service (QoS) command-line interface (MQC) to specify the bandwidth for a particular class. When used with the MQC, the bandwidth command uses a default queue limit for the class. This queue limit can be modified using the queue-limit command, thereby overriding the default set by the bandwidth command.


Note Using the queue-limit command to modify the default queue limit is especially important for higher-speed interfaces, to meet the minimum bandwidth guarantees required by the interface.


Specifying Queue Limit Thresholds in Various Units of Measure

The queue-limit command allows you specify or modify the maximum number of packets the queue can hold for a class configured in a policy map. This is the queue limit threshold.

With Cisco IOS Release 12.0(28)S, the maximum queue limit threshold can be specified in packets (the default unit of measure), cells, milliseconds (ms), or microseconds (us). However, the unit of measure cannot be mixed. For example, if you specify the minimum threshold in milliseconds, the maximum threshold must also be in milliseconds.


Note When the queue limit threshold is specified in milliseconds, the number of milliseconds is internally converted to bytes using the bandwidth available for the class.


Examples

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 

Related Commands

Command
Description

bandwidth (policy-map class)

Specifies or modifies the bandwidth allocated for a class belonging to a policy map.

class (policy-map)

Specifies the name of the class whose policy you want to create or change, and the default class (commonly known as the class-default class) before you configure its policy.

class class-default

Specifies the default traffic class whose bandwidth is to be configured or modified.

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.


random-detect precedence

To configure the weighted random early detection (WRED) parameters for a particular IP Precedence, use the random-detect precedence command in interface configuration mode. To configure WRED parameters for a particular IP Precedence for a class policy in a policy map, use the random-detect precedence command in policy-map class configuration mode. To return to the default for the IP precedence, use the no form of this command.

random-detect precedence {precedence | rsvp} minimum-threshold {cells | ms | packets | us} maximum-threshold {cells | ms | packets | us} [mark-probability-denominator]

no random-detect precedence dscp discard-class-based {precedence | dscp} minimum-threshold {cells | ms | packets | us} maximum-threshold {cells | ms | packets | us} [mark-probability-denominator]

Syntax Description

precedence

IP Precedence number. The value range is from 0 to 7. See Table 1 in the "Usage Guidelines" section of this command.

rsvp

Indicates Resource Reservation Protocol (RSVP) traffic.

minimum-threshold

Minimum threshold in number of packets. Valid values vary by platform. When the average queue length reaches the minimum threshold, WRED randomly drops some packets with the specified IP Precedence.

cells

Indicates that the threshold is specified in cells for ATM interfaces.

ms

Indicates that the threshold is specified in milliseconds (ms).

packets

Indicates that the threshold is specified in packets.

us

Indicates that the threshold is specified in microseconds (us).

maximum-threshold

Maximum threshold in number of packets, the default unit of measure. Valid values vary by platform. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified IP Precedence.

mark-probability-denominator

Denominator for the fraction of packets dropped when the average queue depth is at the maximum threshold. For example, if the denominator is 512, 1 out of every 512 packets is dropped when the average queue is at the maximum threshold. The value range is from 1 to 65,535.

ms

(Optional) Indicates that the mark probability denominator is specified in milliseconds (ms).


Defaults

For all precedences, the mark-probability-denominator default is 10; one out of every 10 packets is dropped at the maximum threshold. The maximum-threshold is based on the output buffering capacity and the transmission speed for the interface.

The default minimum-threshold depends on the precedence. The minimum-threshold for IP Precedence 0 corresponds to half of the maximum-threshold. The values for the remaining precedences fall between half the maximum-threshold and the maximum-threshold at evenly spaced intervals.

Table 1 lists the default minimum threshold value for each IP precedence.

Table 1 Default WRED and DWRED Minimum Threshold Values

IP Precedence
Minimum Threshold Value (Fraction of Maximum Threshold Value)

0

8/16

1

9/16

2

10/16

3

11/16

4

12/16

5

13/16

6

14/16

7

15/16


Command Modes

Interface configuration when used on an interface

Policy-map class configuration when used to specify a class policy in a policy map

Command History

Release
Modification

11.1 CC

This command was introduced.

12.0(5)T

This command was introduced in policy-map class configuration mode.

12.0(5)XE

This command was introduced for VIP-enabled Cisco 7500 series routers.

12.1(5)T

This command was introduced for VIP-enabled Cisco 7500 series routers.

12.0(26)S

This command was integrated into Cisco IOS Release 12.0(26)S. This command was modified to include the new bytes keyword.

12.0(28)S

This command was modified to include the new ms (milliseconds), and the us (microseconds) keywords for the Cisco 12000 Series line cards with the E3 and E4 forwarding engines.


Usage Guidelines

WRED is a congestion-avoidance mechanism that slows traffic by randomly dropping packets when congestion exists.

When you configure the random-detect precedence command on an interface, packets are given preferential treatment based on the IP Precedence of the packet. Before configuring the random-detect precedence command, configure the random-detect prec-based command.

If you want WRED to ignore the precedence when determining which packets to drop, enter this command with the same parameters for each precedence. Remember to use reasonable values for the minimum and maximum thresholds.


Note If you use the random-detect precedence command to adjust the treatment for different precedences within class policy, you must ensure that WRED is not configured for the interface to which you attach that service policy. Attaching a service policy configured to use WRED to an interface using the modular quality of service (QoS) command-line interface (CLI) (MQC) disables the previous WRED configuration on that interface.


Table 2 lists the default minimum threshold value for each IP Precedence.

Table 2 Default WRED and DWRED Minimum Threshold Values 

 
Minimum Threshold Value (Fraction of Maximum Threshold Value)
IP Precedence
WRED

0

9/18

1

10/18

2

11/18

3

12/18

4

13/18

5

14/18

6

15/18

7

16/18

RSVP

17/18



Note The default WRED parameter values are based on the best available data. We recommend that you do not change the parameters from their default values unless you have determined that your applications would benefit from the changed values.


Specifying Queue Limit Thresholds in Various Units

The random-detect precedence command allows you specify or modify the minimum threshold, the maximum threshold, and the mark probability denominator when you are enabling WRED.

With Cisco IOS Release 12.0(28)S, the minimum threshold and the maximum threshold can be specified in packets (the default unit of measure), cells, milliseconds (ms) or microseconds (us). However, the units of measure cannot be mixed. For example, if you specify the minimum threshold in milliseconds, the maximum threshold must also be in milliseconds.

Examples

In the following example, WRED has been enabled in the policy map called "policy." 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 prec-based

Router(config-pmap-c)# random-detect precedence 2 500 ms 1000 ms

Router(config-pmap-c)# exit

Related Commands

Command
Description

random-detect

Enables WRED

random-detect prec-based

Bases WRED on the precedence value of a packet.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map interface

Displays the configuration of all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.


show policy-map

To display the configuration of all classes for a specified service policy map or all classes for all existing policy maps, use the show policy-map command in EXEC mode.

show policy-map [policy-map]

Syntax Description

policy-map

(Optional) Name of the service policy map whose complete configuration is to be displayed.


Defaults

All existing policy map configurations are displayed.

Command Modes

EXEC

Command History

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was integrated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was integrated into Cisco IOS Release 12.1(1)E.

12.2(4)T

This command was modified for two-rate traffic policing to display burst parameters and associated actions.

12.2(8)T

The command was modified for the Policer Enhancement — Multiple Actions feature and the WRED — Explicit Congestion Notification (ECN) feature.

12.2(13)T

The following modifications were made:

The output was modified for the Percentage-Based Policing and Shaping feature.

This command was modified as part of the Modular QoS CLI (MQC) Unconditional Packet Discard feature. Traffic classes can now be configured to discard packets belonging to a specified class.

This command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.

12.2(15)T

This command was modified to support display of Frame Relay voice-adaptive traffic-shaping information.

12.0(26)S

This command was modified to support the display of byte-based WRED data.

12.0(28)S

This command output was modified to include milliseconds (ms) and microseconds (us) in the display.


Usage Guidelines

The show policy-map command displays the configuration of a service policy map created using the policy-map command. You can use the show policy-map command to display all class configurations comprising any existing service policy map, whether or not that service policy map has been attached to an interface.

Examples

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" indicate 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

Table 3 describes the significant fields shown in the display.

Table 3 show policy-map Field Descriptions — WRED Configured to Specify Thresholds

Field
Description

Policy Map

Name of policy map displayed.

Class

Name of class configured in policy map displayed.

time-based wred

Indicates that the threshold values are specified in milliseconds (ms).


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

Table 4 describes the significant fields shown in the display.

Table 4 show policy-map Field Descriptions 

Field
Description

Policy Map

Name of policy map displayed.

Class

Name of class configured in policy map displayed.

queue-limit 200 ms

Indicates that the queue limit is specified in milliseconds (ms)


Related Commands

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

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.


show policy-map interface

To display the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific permanent virtual circuit (PVC) on the interface, use the show policy-map interface command in EXEC mode.

show policy-map interface interface-name [vc [vpi/] vci] [dlci dlci] [input | output]

Syntax Description

interface-name

Name of the interface or subinterface whose policy configuration is to be displayed.

vc

(Optional) For ATM interfaces only, shows the policy configuration for a specified PVC. The name can be up to 16 characters long.

vpi/

(Optional) ATM network virtual path identifier (VPI) for this PVC. On the Cisco 7200 and 7500 series routers, this value ranges from 0 to 255. The absence of both the forward slash (/) and a vpi value defaults the vpi value to 0.

If this value is omitted, information for all virtual circuits (VCs) on the specified ATM interface or subinterface is displayed.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

vci

(Optional) ATM network virtual channel identifier (VCI) for this PVC. This value ranges from 0 to 1 less than the maximum value set for this interface by the atm vc-per-vp command. Typically, the lower values 0 to 31 are reserved for specific traffic (F4 Operation, Administration, and Maintenance [OAM], switched virtual circuit [SVC] signaling, Integrated Local Management Interface [ILMI], and so on) and should not be used.

The VCI is a 16-bit field in the header of the ATM cell. The VCI value is unique only on a single link, not throughout the ATM network, because it has local significance only.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

dlci

(Optional) Indicates a specific PVC for which policy configuration will be displayed.

dlci

(Optional) Specific data-link connection identifier (DLCI) number used on the interface. Policy configuration for the corresponding PVC will be displayed when a DLCI is specified.

input

(Optional) Indicates that the statistics for the attached input policy will be displayed.

output

(Optional) Indicates that the statistics for the attached output policy will be displayed.


Command Modes

EXEC

Command History

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was integrated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was integrated into Cisco IOS Release 12.1(1)E.

12.1(2)T

This command was modified to display information about the policy for all Frame Relay PVCs on the interface, or, if a DLCI is specified, the policy for that specific PVC. This command was also modified to display the total number of packets marked by the QoS set action.

12.1(3)T

This command was modified to display per-class accounting statistics.

12.2(4)T

This command was modified to display burst parameters and associated actions.

12.2(8)T

This command was modified to display the multiple actions configured for packets conforming to, exceeding, or violating a specific rate.

12.0(28)S

This command output was modified to include milliseconds (ms) and microseconds (us) in the display.


Usage Guidelines

The show policy-map interface command displays the configuration for classes on the specified interface or the specified PVC only if a service policy has been attached to the interface or the PVC.

Examples

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

Table 5 describes the significant fields shown in the display.

Table 5 show policy-map interface Field Descriptions1  — WRED Configured to Specify Thresholds

Field
Description

Service-policy output

Name of the output service policy applied to the specified interface or VC.

Class-map

Class of traffic being displayed. Output is displayed for each configured class in the policy. The choice for implementing class matches (for example, match-all or match-any) can also appear next to the traffic class.

packets and bytes

Number of packets (also shown in bytes) identified as belonging to the class of traffic being displayed.

offered rate

Rate, in kbps, of packets coming in to the class.

drop rate

Rate, in kbps, at which packets are dropped from the class. The drop rate is calculated by subtracting the number of successfully transmitted packets from the offered rate.

queue limit

The maximum number of bytes that can be in a traffic queue.

Mean queue depth

Average queue depth used to determine the random packet drop and the packet tail drop.

1 A number in parentheses may appear next to the service-policy output name, class-map name, and match criteria information. The number is for Cisco internal use only and can be disregarded.


The following is sample output of 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

Table 6 describes the significant fields shown in the display.

Table 6 show policy-map interface Field Descriptions1  

Field
Description

Service-policy output

Name of the output service policy applied to the specified interface or VC.

Class-map

Class of traffic being displayed. Output is displayed for each configured class in the policy. The choice for implementing class matches (for example, match-all or match-any) can also appear next to the traffic class.

packets and bytes

Number of packets (also shown in bytes) identified as belonging to the class of traffic being displayed.

offered rate

Rate, in kbps, of packets coming in to the class.

drop rate

Rate, in kbps, at which packets are dropped from the class. The drop rate is calculated by subtracting the number of successfully transmitted packets from the offered rate.

queue limit

The maximum number of bytes that can be in a traffic queue.

1 A number in parentheses may appear next to the service-policy output name, class-map name, and match criteria information. The number is for Cisco internal use only and can be disregarded.


Related Commands

Command
Description

show frame-relay pvc

Displays statistics about PVCs for Frame Relay interfaces.

show interfaces

Displays statistics for all interfaces configured on the router or access server.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.