Table Of Contents
Information About Configuring Queue Depth
Setting the Depth of a Traffic Class Queue
Verifying the Depth of the Traffic Class Queue
Configuration Examples for Configuring Queue Depth
Setting the Queue Size: Example
Verifying the Queue Size: Example
Feature Information for Configuring Queue Depth
Configurable Queue Depth
First Published: June 30, 2008Last Updated: June 30, 2008This feature allows you to configure (resize) the depth of the packet queues on your network. That is, you can set the maximum number (depth) of packets that a class queue can hold, which in turn controls when the router drops packets. Configuring the depth of the packet queues helps alleviate packet queue congestion.
Finding Feature Information in This Module
Your Cisco IOS software release may not support all of the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for Configuring Queue Depth" section.
Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•Information About Configuring Queue Depth
•Configuration Examples for Configuring Queue Depth
•Feature Information for Configuring Queue Depth
Information About Configuring Queue Depth
Before configuring queue depth, you should understand the following concept:
Queue Limit
Each queue has a limit on the number of packets that the router can place into the queue. This limit, referred to as the depth, is a user-configurable limit. During periods of high traffic, a queue fills with packets waiting for transmission. When a queue reaches its queue limit and becomes full, by default, the router drops packets until the queue is no longer full.
Table 1 describes the queuing limits for the various processor cards.
When a packet queue temporarily experiences congestion, increasing the depth of the queue using the queue-limit command reduces the number of packets dropped. However, setting the queue limit to a high value might reduce the number of packet buffers available to other interfaces.
The queue limit applies to each buddy queue on links with:
•At least 500 Mbps (PRE1)
•1 Gbps (PRE2)
Note The PRE3 does not use buddy queues.
If you do not specify a queue limit, the router calculates the default buffer size for each class queue as follows:
•Class queues with weighted random early detection (WRED)—The router uses the default queue limit of two times the largest WRED maximum threshold value, rounded to the nearest power of 2.
Note For Cisco IOS Release 12.2(15)BX and Release 12.2(16)BX, the router does not round the value to the nearest power of 2.
•Class queues without WRED—The router has buffers for up to 50 milliseconds of 256-byte packets (PRE2) or 250-byte packets (PRE3) at line rate, but not less than 32 packets (PRE2) or 16 packets (PRE3).
•Priority queues without WRED—The router has buffers for up to 25 milliseconds of 80-byte packets at line rate, but not less than 32 packets (PRE2) or 16 packets (PRE3).
How to Configure Queue Depth
This section contains the following tasks:
•Setting the Depth of a Traffic Class Queue (required)
•Verifying the Depth of the Traffic Class Queue (optional)
Setting the Depth of a Traffic Class Queue
Setting the depth of a traffic class queue controls when the router drops packets (for example, using tail drop). To set the size of a class queue (that is, to configure the maximum number of packets that a class queue can hold), complete the following steps.
Queue-Limit Default Behavior
The following describes the default behavior of the queue-limit command for class queues with and without weighted random early detection (WRED):
•Class queues with weighted random early detection (WRED)—The router uses the default queue limit of two times the largest WRED maximum threshold value, rounded to the nearest power of 2.
Note For Cisco IOS Release 12.2(15)BX and Release 12.2(16)BX, the router does not round the value to the nearest power of 2.
•Priority queues and class queues without WRED—The router has buffers for up to 50 milliseconds of 256-byte packets at line rate, but not less than 32 packets.
Prerequisites
The traffic classes, class maps, and policy maps must exist. To create traffic classes, class maps, and policy maps, use the Modular Quality of Service (QoS) Command-Line Interface (CLI) (MQC). For information about using the MQC, see the "Applying QoS Features Using the MQC" module.
SUMMARY STEPS
1. enable
2. configure terminal
3. policy-map policy-map-name
4. class class-map-name
5. bandwidth {bandwidth-kbps | percent percent}
6. queue-limit number-of-packets
7. end
DETAILED STEPS
Command or Action PurposeStep 1
enable
Example:Router> enable
Enables 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-map-name
Example:Router(config)# policy-map Policy1
Specifies the name of the policy map and enters policy-map configuration mode.
•Enter the policy map name. Names can be a maximum of 40 alphanumeric characters.
Step 4
class class-map-name
Example:Router(config-pmap)# class Class1
Assigns the traffic class you specify to the policy map. Enters policy-map class configuration mode.
•Enter the name of a previously configured class map. This is the traffic class for which you want to enable QoS features.
Step 5
bandwidth {bandwidth-kbps | percent percent}
Example:Router(config-pmap-c)# bandwidth 3000
Specifies the amount of bandwidth (in kbps or as a percentage of available bandwidth) to be assigned to the class.
•Enter the amount of bandwidth. The amount of bandwidth configured should be large enough to also accommodate Layer 2 overhead.
Step 6
queue-limit number-of-packets
Example:Router(config-pmap-c)# queue-limit 32
Specifies or modifies the maximum number of packets that the queue can hold for this class.
•Enter the maximum number of packets as applicable. See the "Queue Limit" section.
Note If you do not specify number-of-packets, by default, the router uses the values described in the "Queue-Limit Default Behavior" section.
Step 7
end
Example:Router(config-pmap-c)# end
(Optional) Exits policy-map class mode.
Verifying the Depth of the Traffic Class Queue
To verify the depth of the traffic class queue (and to determine whether the packets are being managed as anticipated), perform the following steps.
SUMMARY STEPS
1. enable
2. show policy-map interface type number
3. exit
DETAILED STEPS
Configuration Examples for Configuring Queue Depth
This section provides the following configuration examples:
•Setting the Queue Size: Example
•Verifying the Queue Size: Example
Setting the Queue Size: Example
The following example shows how to create a policy map named Policy1 that contains two classes named Class1 and Class2. The Class1 configuration enable a specific bandwidth allocation and specifies the maximum number of packets that can be queued for the class. Because Class1 limits the number of packets that can be held in the queue to 32, the router uses tail drop to drop packets when that limit is reached. Class2 enables bandwidth allocation only.
Router(config)# policy-map Policy1Router(config-pmap)# class Class1Router(config-pmap-c)# bandwidth 3000Router(config-pmap-c)# queue-limit 32Router(config-pmap-c)# exitRouter(config-pmap)# class Class2Router(config-pmap-c)# bandwidth 2000Router(config-pmap-c)# endVerifying the Queue Size: Example
Use the show policy-map interface command to display traffic statistics for the class maps, policy maps, and traffic queues on your network.
The following is sample output for the show policy-map interface command. In this example, the policy map named Traffic-5-PR is attached to serial interface 1/0/0 and includes three traffic classes. The Voice-5-PR class has a configured queue limit of 32 packets with 0 packets dropped. The Gold-5-PR class also indicates that no packets dropped. The Silver-5-PR class has a configured queue limit of 64 packets with 0 packets dropped.
Router# show policy-map interface serial 1/0/0
Serial1/0/0Service-policy output: Traffic-Parent (1051)Class-map: class-default (match-any) (1068/0)2064335 packets, 120273127 bytes5 minute offered rate 1000 bps, drop rate 0 bpsMatch: any (1069)126970 packets, 3982597 bytes5 minute rate 0 bpsShape : 6000 kbpsService-policy : Traffic-5-PR (1052)Class-map: Voice-5-PR (match-all) (1053/1)82310 packets, 4938600 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: ip precedence 5 (1054)Output queue: 0/32; 82310/4938600 packets/bytes output, 0 dropsAbsolute priorityQueue-limit: 32 packetsPolice:304000 bps, 1536 limit, 0 extended limitconformed 82312 packets, 4938720 bytes; action: transmitexceeded 0 packets, 0 bytes; action: dropviolated 0 packets, 0 bytes; action: dropClass-map: Gold-5-PR (match-any) (1058/2)1125476 packets, 67528560 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: ip precedence 3 4 (1059)1125476 packets, 67528560 bytes5 minute rate 0 bpsOutput queue: 0/128; 1125503/67530180 packets/bytes output, 0 dropsBandwidth : 188 kbps (Weight 3)Class-map: Silver-5-PR (match-any) (1061/3)697908 packets, 41874480 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: ip precedence 0 1 2 (1062)697908 packets, 41874480 bytes5 minute rate 0 bpsOutput queue: 0/64; 697919/41875140 packets/bytes output, 0 dropsBandwidth : 71 kbps (Weight 1)Random-detect (precedence-based):Exponential weight: 9 (1/512)Current average queue length: 0 packets-------------------------------------------------Min Max Prob Rand-Drops Tail-Drops-------------------------------------------------0 16 32 1/10 0 01 18 32 1/10 0 02 20 32 1/10 0 03 22 32 1/10 0 04 24 32 1/10 0 05 26 32 1/10 0 06 28 32 1/10 0 07 30 32 1/10 0 0Queue-limit: 64 packetsClass-map: class-default (match-any) (1066/0)158641 packets, 5931487 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any (1067)158641 packets, 5931487 bytes5 minute rate 0 bpsOutput queue: 0/128; 31672/1695625 packets/bytes output, 0 dropsAdditional References
The following sections provide references related to configuring queue depth.
Related Documents
Standards
Standard TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
RFC TitleNo new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
—
Technical Assistance
Command Reference
The following commands are introduced or modified in the feature or features documented in this module. For information about these commands, see the Cisco IOS Quality of Service Solutions Command Reference at http://www.cisco.com/en/US/docs/ios/qos/command/reference/qos_book.html. For information about all Cisco IOS commands, use the Command Lookup Tool at http://tools.cisco.com/Support/CLILookup or the Cisco IOS Master Command List, All Releases, at http://www.cisco.com/en/US/docs/ios/mcl/allreleasemcl/all_book.html.
•queue-limit
Feature Information for Configuring Queue Depth
Table 2 lists the release history for this feature.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note Table 2 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
CCDE, CCENT, Cisco Eos, Cisco Lumin, Cisco Nexus, Cisco StadiumVision, Cisco TelePresence, Cisco WebEx, the Cisco logo, DCE, and Welcome to the Human Network are trademarks; Changing the Way We Work, Live, Play, and Learn and Cisco Store are service marks; and Access Registrar, Aironet, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, EtherFast, EtherSwitch, Event Center, Fast Step, Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient, IOS, iPhone, iQuick Study, IronPort, the IronPort logo, LightStream, Linksys, MediaTone, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, Network Registrar, PCNow, PIX, PowerPanels, ProConnect, ScriptShare, SenderBase, SMARTnet, Spectrum Expert, StackWise, The Fastest Way to Increase Your Internet Quotient, TransPath, WebEx, and the WebEx logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0809R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2008 Cisco Systems, Inc. All rights reserved.