Queuing is a mechanism that prioritizes one type of network traffic over other types.
|
This is done by reordering the packets that constitute the traffic.
|
Queuing is useful over congested serial lines.
|
But it can be slow since it requires buffering in the router.
|
It is a good idea to establish a corporate queuing policy to decide which traffic on a congested line gets through first.
|
You can configure the Cisco IOS software to support the following types of queuing strategy:

• priority queuing
|
• custom queuing
|
• weighted fair queuing
|
You can configure priority, custom, and weighted fair queuing on a Cisco router, but you can assign only one queue type to an interface.
@@
The primary distinction between priority and custom queuing is that custom queuing guarantees some level of service to all traffic.
|
Priority queuing guarantees that one type of traffic will get through at the expense of all others.
|
When there is a limited amount of bandwidth available, priority queuing consumes most, if not all, of the available bandwidth when it delivers the critical traffic.
|
Priority queuing makes maximum use of low-bandwidth links for a few selected protocols.
|
When more bandwidth is available, custom queuing shares equitably between the different traffic types.
|
So custom queuing ensures that each traffic type gets to use some portion of the link.
|
Custom queuing is more flexible than priority queuing.
|
But priority queuing is more powerful when you need to prioritize a mission-critical protocol.
|
Weighted fair queuing provides traffic priority management that automatically sorts among individual traffic streams.
|
You do not need to define access lists first.
|
There are two categories of data streams in weighted fair queuing:

• high bandwidth sessions
|
• low bandwidth sessions
|
Low bandwidth traffic has effective priority over high bandwidth traffic.
|
The high bandwidth traffic shares the transmission service proportionally according to assigned weights.
@@
You use priority queuing to prioritize datagrams traveling on an interface.
|
So you can set priorities on the type of traffic passing through the network.
|
Packets are classified according to several criteria, including protocol and subprotocol type.
|
They are then queued on one of four output queues:

• high
• medium
• normal
• low
|
When the router is ready to transmit a packet, it scans the priority queues.
|
This is done in order, from highest to lowest, until the highest priority packet is found.
|
After the highest priority packet is transmitted, the router checks the priority queues again.
|
If a priority queue fills up, packets are dropped, and the router does not process them.
|
For IP, quench indications are sent to the original transmitter to notify it about the dropped packets.
|
With priority queuing, the high-priority queue is always emptied before the medium-priority queue, and so on.
|
Priority queuing is appropriate for cases where the WAN links are congested from time to time.
|
If the WAN links are never congested, priority queuing is probably unnecessary.
@@
You can establish queuing priorities based on the protocol type.
|
To do this you use the Priority-List Protocol command, which has the following syntax:

  priority-list £Blist-number£b
    protocol £Bprotocol-name£b
    {high|medium|normal|low}
    £Bqueue-keyword£b £Bkeyword-value£b
|
The £Blist-number£b is a value between 1 and 10 that identifies the priority list.
|
The £Bprotocol-name£b specifies protocols such as AppleTalk, CLNS, DECnet, IP, IPX, Banyan Vines, or X.25.
|
Here we are primarily concerned with IP traffic.
|
In the example shown here you can see the priority list number and the type of protocol.
|
The queue priority level is high.
|
Other optional keywords that you can use with the Queue command include Byte-Count, TCP Service and port number assignments.
|
In this example you can see a protocol keyword, TCP, and an associated port number.
|
This refers to Telnet traffic.
@@
You use the Priority-List Interface command to set the priority of traffic arriving on an interface.
|
The command's syntax is

  priority-list £Blist-number£b
    interface £Binterface-type£b
    £Binterface-number£b
    {high|medium|normal|low}

where £Binterface-type£b and £Binterface-number£b specify the name of the interface with incoming packets.
|
In the example shown here, packets arriving on Serial 1 are given high priority.
|
You use the Priority-List Default command to assign previously unassigned traffic to a queue.
|
The syntax for the Priority-List Default command is

  priority-list £Blist-number£b
    default
    {high|medium|normal|low}
|
In this example, the default priority level is low.
|
You use the Priority-List Queue-Limit command to define the maximum number of packets in each priority queue.
|
<F>The syntax for this command is

  priority-list £Blist-number£b
    queue-limit £Bhigh-limit
    medium-limit normal-limit
    low-limit£b
|
In the example shown here, the high limit of datagrams is 15.
|
The medium and normal limits are both 20.
|
And the low limit is 30.
|
You can assign a priority list number to an interface using the Priority-Group command.
|
You can assign only one list per interface.
|
The syntax of the Priority-Group command is

  priority-group £Blist-number£b
|
In this example, Serial 1 has a priority queue.
|
IP Telnet traffic and traffic from source network 172.16.0.0, as specified by access list number 1, enter the high queue.
|
This allows the IP and Telnet traffic to be transmitted on the serial 1 interface ahead of other traffic, even if IP and Telnet traffic don't arrive at the router first.
@@
Custom queuing prioritizes traffic in a different way from priority queuing.
|
Custom queuing assigns different amounts of queue space to each protocol and handles the queues in round-robin fashion.
|
So a particular protocol may be prioritized by assigning it more queue space.
|
But the protocol will never monopolize the entire bandwidth and so there is no risk of losing lower priority packets.
|
Custom queuing is particularly important for time-sensitive protocols, such as those associated with SNA.
|
When custom queuing is enabled on an interface, the system maintains 17 output queues for that interface.
|
You can specify queues 1 through 16.
|
For queue numbers 1 through 16 the system cycles through the queues sequentially.
|
So packets in the current queue are delivered before the system moves on to the next.
@@
A configurable byte count is associated with each output queue.
|
This byte count specifies how many bytes of data from the current queue the system should deliver before it moves on to the next queue.
|
When a particular queue is being processed, the router sends packets until the number of bytes sent exceeds the queue byte count.
|
Or it will stop when the queue is empty.
|
Queue number 0 is a system queue.
|
The system uses queue 0 for high-priority packets, such as keepalives.
|
It is emptied before any of the other queues.
|
You cannot configure other traffic to use this queue.
@@
You can establish queuing priorities based on the protocol type.
|
To do this you use the Queue-List Protocol command, which has the following syntax:

  queue-list £Blist-number£b
    protocol £Bprotocol-name£b
    £Bqueue-number£b
    £Bqueue-keyword£b £Bkeyword-value£b
|
The £Blist-number£b is a value between 1 and 16 that identifies the queue list.
|
The £Bprotocol-name£b specifies protocols such as AppleTalk, CLNS, DECnet, IP, IPX, Banyan Vines, or X.25.
|
In the example shown here you can see the queue list number and the type of protocol.
|
The £Bqueue-number£b, which may be between 1 and 16, in this example is one.
|
Queue keywords provide additional options including byte-count, TCP service, and port number assignments.
|
In this example you can see a protocol keyword, £BTCP£b, and associated port number.
@@
You use the Queue-List Interface command to set the priority of all traffic arriving on an interface.
|
The command's syntax is

  queue-list £Blist-number£b
    interface £Binterface-type£b
    £Binterface-number£b
    £Bqueue-number£b

where £Binterface-type£b and £Binterface-number£b specify the name of the interface with incoming packets.
|
In the example shown here, packets arriving on Serial 1 get more bandwidth.
|
You use the Queue-List Default command to specify the queue to which traffic not previously specified will be assigned.
|
The syntax for the Queue-List Default command is

  queue-list £Blist-number£b
    default £Bqueue-number£b
|
In this example, the default queue is set to queue number five on list one.
|
You use the Queue-List Queue command to limit the length of a particular queue.
|
The syntax for the command is

  queue-list £Blist-number£b queue
    £Bqueue-number£b
    limit £Blimit-number£b

where £Blist-number£b and £Bqueue-number£b identify the numbers of the queue list and queue.
|
The £Blimit-number£b parameter defines the maximum number of packets that may be in the queue at any one time.
|
The £Blimit-number£b parameter can have a range from 0 to 32767.

The default value is 20.
@@
You use the Queue-List Queue Byte-Count command to define the maximum byte count transferred from the specified queue.
|
The syntax for this command is

  queue-list £Blist-number£b
    queue £Bqueue-number£b
    byte-count
    £Bbyte-count-number£b
|
£BList-number£b and £Bqueue-number£b identify the numbers of the queue list and queue.
|
£BByte-count-number£b specifies the maximum number of bytes that the system allows to be delivered from the specified queue during a particular cycle.
|
The default byte count is 1500.
|
In the example shown here, the queue list number is one.
|
The queue number is also one.
|
And the byte count is 4554.
|
You can assign a queue list to an interface using the Custom-Queue-List command.
|
You can assign only one list per interface.
|
The syntax of the Custom-Queue-List command is

  custom-queue-list £Blist-number£b

where £Blist-number£b indicates the number of the queue list (between 1 and 16) made available to control the interface's bandwidth.
|
In this example, the Custom-Queue-List command is used to assign queue list 1 to the serial 1 interface.
|
Different kinds of IP packets are assigned to queues 1 and 2.
|
Queue 1 is assigned a maximum of 4554 bytes.
|
And the default queue is queue number 5.
@@
<F>Cisco's implementation of weighted fair queuing divides traffic into conversations based on packet header addressing.
|
A conversation is a series of messages that makes up a continuous data stream.
|
A queuing weight is assigned to each conversation based on bandwidth requirements and other variables.
|
A conversation index determines whether traffic represents low-volume or high-volume conversations.
|
The switching logic within the Cisco IOS determines the selection of the data path through the router.
|
Fair queuing is based on delivering messages across a serial link in a timely fashion.
|
As the packets are switched through the router, they arrive in a precise order at the outgoing interface.
|
The exact order of the packets is determined by the arrival of the first bit in each packet.
|
As the packets arrive, the fair queue algorithm sorts them into messages that are part of a conversation.
|
The packets are placed in a holding queue before transmission.
|
The transmission routine sorts the conversation queues "fairly" to determine the order in which messages will be handled.
|
The order of removal of messages from each queue is determined by the value of the last bit in the last packet.
|
So the order of removal is determined when a message ends, rather than when it begins.
|
File transfers cause high-volume conversations.
|
Other application tasks are monitored by the user and are time-sensitive.
|
But they do not require a lot of bandwidth.
|
For example, interactive users create low-volume conversations.
|
The challenge for the queuing method is to provide the responsiveness required by the interactive user and still move lots of data to satisfy the file transfer.
@@
You use the Fair-Queue command to manually enable fair queuing on an interface.
|
The syntax for the command is

  fair-queue £Bcongestive-discard-threshold-number£b

where the £Bcongestive-discard-threshold-number£b parameter has a value between 1 and 512 (default 64).
|
This defines a congestion threshold above which messages for high volume traffic will no longer be enqueued.
|
Weighted fair queuing is enabled by default on serial links with the proper encapsulation type and which operate at E1 speeds or less.
|
The congestive discard policy applies only to high-volume conversations that have more than one message in the queue.
|
The discard policy tries to control conversations that would monopolize the link.
|
The policy is invoked when

• the total number of messages 
  on all queues is greater than 
  the threshold, or
|
• the number of messages in a 
  single queue is greater than 
  one quarter of the threshold
|
New messages for high-bandwidth conversations are discarded once the congestive-messages threshold (either as set, or its default value) is exceeded.
|
However, low-bandwidth conversations, including control-message conversations, continue to enqueue data.
|
So the fair queue may occasionally contain more messages than are specified by the threshold number.
@@
In the example shown here, Frame Relay encapsulation is set on interface serial 1.
|
The congestive-discard threshold is set to 64 for fair weighted queuing.
|
And the interface is configured to operate at a 56 Kbps link speed.
|
You can monitor queue operation by using Cisco IOS commands to display information about input and output queues.
|
You use the Show Interface command to display the status of the port and whether or not queuing is enabled.
|
The syntax for the command is

  show interface £Binterface-name£b
|
In the example shown here, fair queuing is enabled by default on the Serial 0 interface.
|
But priority queuing is enabled on Serial 1.
|
You use the Show Queue command to display detailed queuing information for a given interface.
|
The syntax for the command is

  show queue £Binterface-name£b
|
In this example, queuing information is displayed for the Serial 1 interface.
|
You use the Show Queuing command to display detailed information about all interfaces where queuing is enabled.
|
The command's syntax is

  show queuing
|
In the example shown here, you can see fair and priority queuing details displayed for the relevant interfaces.
|
Custom queuing has not been configured here.
@@
