Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
DQOS Exam Certification Guide - Cisco press.pdf
12.7 Mб

248 Chapter 4: Congestion Management

Summary of Queuing Concepts

For the remainder of this chapter, queuing tools are compared based on the six general points listed in this section. Figure 4-7 outlines these points in the same sequence that each point is listed in the upcoming sections on each queuing tool.

Figure 4-7 Six Comparison Points for IOS Queuing Tools



3) Maximum Number of Queues



4) Maximum Queue Length



6) Scheduler Logic

1) Classification

2) Drop Decision

5) Scheduling Inside Queue




TX Queue/Ring


Which packet should


I take next?






Scheduling gets the most attention when network engineers choose which queuing tool to use for a particular application. However, the other components of queuing are important as well. If the classification part of a queuing tool cannot classify the traffic as defined in the QoS policy for the network, for instance, either the policy must be changed or another tool must be used. For instance, PQ and CQ cannot take direct advantage of network-based application recognition (NBAR), but CBWFQ and LLQ can. In addition, some queuing tools allow a drop policy for each queue, which becomes particularly important when voice and video compete with data traffic in a converged network.

Queuing Tools

Cisco IOS provides a large variety of different queuing tools. Some of the queuing tools have been available for quite some time, whereas others have only become available in recent releases. Some of the tools may not be popular to implement because one queuing tool may provide a better solution than another queuing tool. However, all the queuing tools mentioned in this chapter are covered on one of the current Cisco QoS exams; therefore, we cover them in this book.

The following sections of this book include coverage of First-In, First-Out Queuing (FIFO); Priority Queuing (PQ); Custom Queuing (CQ); Weighted Fair Queuing (WFQ); Class-Based WFQ (CBWFQ); Low Latency Queuing (LLQ); and IP RTP Priority.

Queuing Tools 249

FIFO Queuing

NOTE This section covers FIFO Queuing, which like TX Queues, is not currently covered on the DQOS 9E0-601 exam. This section does cover some useful information for all people interested in QoS. Therefore, for you DQOS exam takers, you might choose to just focus on the concepts about FIFO, and not worry about memorization or configuration. And as always, check the websites listed in the Introduction for any news about changes to the exams.

The first reason that a router or switch needs output queues is to hold a packet while waiting for the interface to become available for sending the packet. Whereas the other queuing tools in this chapter also perform other functions, like reordering packets, FIFO Queuing just provides a means to hold packets while they are waiting to exit an interface.

FIFO Queuing does not need the two most interesting features of the other queuing tools, namely classification and scheduling. FIFO Queuing uses a single queue for the interface. Because there is only one queue, there is no need for classification to decide the queue into which the packet should be placed. Also there is no need for scheduling logic to pick which queue from which to take the next packet. The only really interesting part of FIFO Queuing is the queue length, which is configurable, and how the queue length affects delay and loss.

FIFO Queuing uses tail drop to decide when to drop or enqueue packets. If you configure a longer FIFO queue, more packets can be in the queue, which means that the queue will be less likely to fill. If the queue is less likely to fill, fewer packets will be dropped. However, with a longer queue, packets may experience more delay and jitter. With a shorter queue, less delay occurs, but the single FIFO queue fills more quickly, which in turn causes more tail drops of new packets. These facts are true for any queuing method, including FIFO.

Figure 4-8 outlines simple FIFO Queuing. R1 uses FIFO Queuing on the interface connected to R2. The only decision required when configuring FIFO Queuing is whether to change the length of the queue.

Figure 4-8 Simple FIFO Queuing



Output Queue

Should I drop










the packet?














250 Chapter 4: Congestion Management

Remember to consider two steps when configuring FIFO Queuing. First, configuring FIFO Queuing actually requires you to turn off all other types of queuing, as opposed to just configuring FIFO Queuing. Cisco IOS uses WFQ as the default queuing method on serial interfaces running at E1 speeds and slower. However, IOS does not supply a command to enable FIFO Queuing; to enable FIFO Queuing, you must first disable WFQ by using the no fair-queue interface subcommand. If other queuing tools have been explicitly configured, you should also disable these. Just by removing all other queuing configuration from an interface, you have enabled FIFO!

The second FIFO configuration step that you might consider is to override the default queue length. To do so, use the hold-queue x out interface subcommand to reset the length of the queue.

Example 4-2 shows a sample FIFO Queuing configuration.

Example 4-2 FIFO Queuing Configuration

R3#conf t

Enter configuration commands, one per line. End with CNTL/Z. R3(config)#int s 0/0

R3(config-if)#no fair-queue R3(config-if)#^Z

R3#sh int s 0/0

Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial

Description: connected to FRS port S0. Single PVC to R1. MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,

reliability 255/255, txload 1/255, rxload 1/255 Encapsulation FRAME-RELAY, loopback not set Keepalive set (10 sec)

LMI enq sent 80, LMI stat recvd 73, LMI upd recvd 0, DTE LMI up LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0

LMI DLCI 1023 LMI type is CISCO frame relay DTE

Broadcast queue 0/64, broadcasts sent/dropped 171/2, interface broadcasts 155 Last input 00:00:02, output 00:00:03, output hang never

Last clearing of "show interface" counters 00:13:48

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo

Output queue :0/40 (size/max)

30 second input rate 0 bits/sec, 0 packets/sec

30 second output rate 0 bits/sec, 0 packets/sec

235 packets input, 14654 bytes, 0 no buffer

Received 0 broadcasts, 0 runts, 0 giants, 0 throttles

2 input errors, 0 CRC, 2 frame, 0 overrun, 0 ignored, 0 abort 264 packets output, 15881 bytes, 0 underruns

0 output errors, 0 collisions, 6 interface resets

0 output buffer failures, 0 output buffers swapped out

10 carrier transitions

DCD=up DSR=up DTR=up RTS=up CTS=up


Queuing Tools 251

Example 4-2 FIFO Queuing Configuration (Continued)

R3#conf t

Enter configuration commands, one per line. End with CNTL/Z. R3(config)#int s 0/0

R3(config-if)#hold-queue 50 out



R3#sh int s 0/0

Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial

!Lines omitted for brevity Queueing strategy: fifo Output queue :0/50 (size/max)

!Line omitted for brevity

Example 4-2 shows FIFO Queuing being configured by removing the default WFQ configuration with the no fair-queue command. The show interface command lists the fact that FIFO Queuing is used, and the output queue has 40 entries maximum. After configuring the output queue to hold 50 packets with the hold-queue 50 out command, the show interface output still lists FIFO Queuing, but now with a maximum queue size of 50.

FIFO Queuing is pretty basic, but it does provide a useful function: It provides the basic queuing function of holding packets until the interface is no longer busy.

Priority Queuing

Priority Queuing’s most distinctive feature is its scheduler. PQ schedules traffic such that the higher-priority queues always get serviced, with the side effect of starving the lower-priority queues. With a maximum of four queues, called High, Medium, Normal, and Low, the complete logic of the scheduler can be easily represented, as is shown in Figure 4-9.

As seen in Figure 4-9, if the High queue always has a packet waiting, the scheduler will always take the packets in the High queue. If the High queue does not have a packet waiting, but the Medium queue does, one packet is taken from the Medium queue—and then the process always starts over at the High queue. The Low queue only gets serviced if the High, Medium, and Normal queues do not have any packets waiting.

The PQ scheduler has some obvious benefits and drawbacks. Packets in the High queue can claim 100 percent of the link bandwidth, with minimal delay, and minimal jitter. The lower queues suffer, however. In fact, when congested, packets in the lower queues take significantly longer to be serviced than under lighter loads. In fact, when the link is congested, user applications may stop working if their packets are placed into lower-priority queues.

252 Chapter 4: Congestion Management

Figure 4-9 PQ Scheduling Logic


High Packets in Yes

This Queue?




Packets in Yes

This Queue?



Normal Packets in Yes

This Queue?



Low Packets in Yes

This Queue?

Wait Until TX

Ring Has More


Put Packet in

TX Ring

Most of the rest of the details about PQ can be easily understood. PQ classifies packets based on the content of the packet headers. It uses a maximum of four queues, as mentioned earlier. The only drop policy is tail drop—in other words, after classifying the packet, if the appropriate queue is full, the packet is dropped. The length of each queue, which of course affects packet loss and delay, can be changed—in fact, PQ can set the queue length to a value of zero, which means the queue length is infinite. (Infinite really means that when the router runs out of memory, the packet cannot be queued; however, you have worse problems than queuing a packet if the router is out of memory!) Figure 4-10 summarizes these key features of PQ.

The figure represents the internals of a router, after the routing decision has identified the output interface for the packet. The following list describes each component of the queuing process, with the numbers in the list matching the numbers in the figure.




















Queuing Tools
























Figure 4-10 PQ Features























2) Drop Decision
















3) Maximum Number of Queues
















4) Maximum Queue Length









1) Classification

5) Scheduling Inside Queue

6) Scheduler Logic






































Tail Drop





Always service












































































4 Queues Max





highest queue



TX Queue/Ring







































that has a packet



































Unlimited Length


































































































-Extended ACL










































-Source Interface



Defaults per Queue:








-Packet Length

























Drop Policy: Tail Drop (Only Option)






-TCP and UDP Ports



Queue Sizes: 20, 40, 60, 80 (High, Medium, Normal, Low)





1PQ can classify packets using access-control lists (ACLs) for most Layer 3 protocols, matching anything allowed by any of the types of ACLs. PQ can also directly match, without using an ACL, the incoming interface, packet length, and TCP and UDP port numbers.

2Tail drop is the only available drop policy.

3Four queues maximum

4Maximum queue length can be set to zero, which means the queue has theoretically infinite length. Defaults are 20, 40, 60, and 80 packets for High, Medium, Normal, and Low queues, respectively.

5Inside a queue, PQ uses FIFO logic.

6When scheduling among the queues, PQ always services the highest-priority queue.

Independent of the process leading up to placing the packet into the queue, the scheduler continually reacts when the TX Ring empties a packet out the interface, implying that there is now more room in the TX Ring/TX Queue for another packet. When the TX Ring frees space, the PQ scheduler then performs the logic described in Figure 4-9, taking a packet from the highestpriority queue that has a packet waiting. The PQ scheduler moves the packet to the TX Ring, for later transmission on the interface.