Understanding Basic Queuing

Cisco routers offer three basic queuing strategies:

  • Weighted fair queuing (WFQ)

  • Priority queuing (PQ)

  • Custom queuing (CQ)

WFQ raises the priority level of packets that are smaller above the priority level of large packets. This process tends to benefit traffic generated by applications where the user would notice a lag. An example is Telnet traffic. Telnet sends small TCP packets containing a single character. Once the packet is returned to the user, the character is placed on the screen. A user notices the delay if this placement does not happen quickly, and in many cases, productivity suffers. As of Cisco IOS version 11.3, WFQ is the default on serial interfaces up to 2.048Mbps, assuming the interface supports it.

PQ places traffic in groups according to the configured priority of the traffic in question. It is possible to place Internetwork Packet Exchange (IPX) traffic in a higher priority group than IP and vice versa. CQ is an extension of PQ. The administrator has more options available and can differentiate to a greater degree than with PQ.

Determining the Necessary Queuing Strategy

The first thing to determine when it comes to traffic queuing is what type of traffic deserves priority. This decision depends on the needs of the organization. Typically, any traffic generated by some sort of terminal or terminal emulator is a prime candidate to benefit from traffic queuing. These applications are susceptible to perceived delays from the user. In other cases, the administrator might decide that all IPX traffic has priority because it is mission-critical, whereas IP is not. What type of traffic the administrator determines is important has a big impact on the appropriate selection of a queuing strategy.

To determine which type of queuing is appropriate, administrators should ask themselves the following questions:

  1. Are the links congested? If not, no queuing strategy is necessary because traffic is not being delayed by bandwidth. If there is a delay, but the links are not congested, then the problem might be caused by upstream or downstream links. A router that isn't robust enough for the job at hand could also be the cause.

  2. Does the administrator require strict control over the order of traffic? If not, WFQ is the answer in most cases.

  3. Can all traffic handle a delay? If not, refer to the section on PQ. If so, see the section on CQ.

The following three sections describe each type of queuing in detail and provide an example.

WFQ

WFQ follows a modified "first in, first out" (FIFO) strategy. Normally, a router routes traffic based on the standard definition of FIFO, except on slow serial links. Unfortunately, this process often means that a router spends its time waiting for a large packet to finish arriving when a small packet is sitting there waiting its turn.

WFQ Concepts

The modified FIFO strategy tells the router to route the first packet that arrives completely. When a small packet and a large one head toward the router and they start arriving at close to the same time, the small packet finishes arriving long before the large packet. Rather than wait for the large packet to finish arriving, the router routes the small packet. Figure 12.1 shows an example.

Figure 12.1. WFQ

graphics/12fig01.gif

WFQ also breaks up streams of packets into conversations. Because packet streams can hog the available bandwidth, the router breaks up the stream and inserts other packets that need to be routed. An example of a packet stream is an FTP transfer. WFQ breaks up the megabytes associated with the download and allows time-sensitive traffic to be routed. The router can break up streams into several different types of conversations, including the following:

  • Source or destination MAC address

  • Source or destination network address

  • Source or destination port or socket address

  • Frame Relay data-link connection identifier (DLCI)

  • Quality-of-service (QoS) values

WFQ is enabled by default on all physical interfaces that have bandwidth of not more than 2,048Mbps and that do not use Synchronous Data Link Control (SDLC) Protocol; Point-to-Point Protocol (PPP) with compression; X.25; or Link Access Procedure, Balanced (LAPB) encapsulation. WFQ might not be enabled on interfaces that have these items configured.

WFQ Configuration

You use the fair-queue command to establish WFQ on an interface. In addition, this command sets a congestive-discard-threshold value. This value controls how many packets in a given conversation are queued before the router discards new packets. This setting is what helps alleviate the effects of packet streams. The following code illustrates how to configure WFQ, as well as provides a sample configuration statement:

 Router(config-if)#fair-queue congestive-discard-threshold-number    dynamic-queues reservable-queues Router(config-if)fair-queue 128 256 0 

If the congestive-discard-threshold-number is set to 128, up to 128 packets are placed in the queue for a given conversation. Once the 128 packet limit is reached, the router discards packets arriving for that conversation until the number of packets queued for that conversation falls below one-fourth of the value, in this case 32. The default value for the congestive-discard-threshold-number is 64. Its range is 1 through 512, inclusive.

The number of dynamic queues determines the number of ongoing conversations that don't require any special resource reservations. The minimum number is 16 with options doubling until a maximum of 4096. The default is a function of the bandwidth configured on the interface: a 64Kbps interface has a default of 16, and a 512Kbps interface has 256 queues by default.

The reservable queues are used for conversations that have some sort of bandwidth reservation attached to them, such as a Resource Reservation Protocol (RSVP) conversation. The available range is 0 through 1000 with a default of 0. If you are using RSVP but haven't specifically configured it on an WFQ interface, normal queues are used for reserved bandwidth traffic.

PQ

PQ allows the administrator to tell the router to send all packets of a certain type before moving on to other packets. For example, an administrator can configure PQ to send all Telnet traffic before sending any other type.

PQ Concepts

PQ consists of four queues where packets can be placed while waiting to be routed, as shown in Figure 12.2. These queues and their default packet sizes are

Figure 12.2. PQs

graphics/12fig02.gif

High

20 packets

Medium

40 packets

Normal

60 packets

Low

80 packets

The more important queues don't require as large a buffer because the router always services those queues before servicing lower queues. Once the High queue is empty, the router moves on to the lower queues. When the router examines a queue, it routes any packets whose times-to-live (TTLs) have not yet expired. The router then checks the High queue again and works its way down the list. If the High queue contains too much traffic, there is a risk that the router will not service the lower-level queues.

PQ Configuration

Once you decide to use PQ, you must decide what protocols go to what queues. More than one protocol may inhabit a queue, and you must assign a default queue to capture any traffic not specified. You do so via a priority list. You can configure a priority list by both interface and protocol: a single list might state that all TCP/IP traffic goes to the High queue, and all traffic coming in interface Ethernet 2 goes to the Medium queue. The following command strings, in order, show how to configure a priority list by protocol and by interface, followed by syntax explanations in Table 12.1 and value descriptions in Table 12.2:

 Router(config)#priority-list list-number protocol protocol-name    (high | medium | normal | low) queue-keyword keyword-value Router(config)#priority-list list-number interface interface-type    interface-number (high | medium | normal | low) 

Table 12.1. PQ Configuration

Parameter

Explanation

list-number

In IOS versions 11.2 and higher, any value from 1 to 16 inclusive. In IOS versions 11.1 and earlier, 1 through 10, inclusive.

protocol-name

aarp, arp, apollo, appletalk, bridge (transparent), clns, clns_es, clns_is, compressedtcp, cmns, decnet, decnet_node, decnet_router-l1, decnet_router-l2, ip, ipx, pad, rsrb, stun, vines, xns, or x25. Please note that with the decnet-router types, the last character is a number and the character preceding the number is a lowercase L.

queue-keyword and keyword_value

See Table 12.2.

interface-type

The type of interface, such as Ethernet or serial.

interface-number

The number of the specified interface.

Table 12.2. Queue Keywords and Values

Queue Keyword

Keyword Value

byte-count

gt, greater than, or lt, less than

list

An access list number

(tcp | udp) port

A port number or name

fragments

An IP only option, this assigns a value to fragmented IP packets

The following commands, in order, show how to specify which queue is the default, change the queue sizes, and attach the priority list to an interface. Each command is then explained in Table 12.3:

 Router(config)#priority-list list-number default (high | medium | normal | low) Router(config)#priority-list list-number queue-limit high-queue-limit    medium-queue-limit normal-queue-limit low-queue-limit Router(config-if)#priority-group list-number 

Table 12.3. Queue Sizes

Queue

Size

high-queue-limit

Number of datagrams you can store in the High queue. The default is 20.

medium-queue-limit

Number of datagrams you can store in the Medium queue. The default is 40.

normal-queue-limit

Number of datagrams you can store in the Normal queue. The default is 60.

low-queue-limit

Number of datagrams you can store in the Low queue. The default is 80.

Cisco put a lot of effort into making the default queue values efficient. Think carefully before changing the values. A change might leave lower queues not serviced as often or at all.

A PQ Example

The following is an example of a PQ configuration and interface application. The following command places all Telnet traffic into the High queue:

 Router(config)#priority-list 1 protocol ip high tcp 23 

The next command places all IP traffic allowed by access list 1 into the High queue:

 Router(config)#priority-list 1 protocol ip high list 1 

This command places all other IP traffic into the Medium queue:

 Router(config)#priority-list 1 protocol ip medium 

The next command places all non-IP traffic arriving from Serial 1 into the Normal queue. Previous statements already placed any IP traffic into queues:

 Router(config)#priority-list 1 interface serial 1 normal 

This command places all AppleTalk traffic into the Low queue:

 Router(config)#priority-list 1 protocol appletalk low 

The following line places all IPX traffic into the Low queue:

 Router(config)#priority-list 1 protocol ipx low 

The next line establishes the Low queue as the queue where all nonspecified traffic will go:

 Router(config)#priority-list 1 default low 

The next line changes the default settings for how many packets each queue can hold from 20 for the High, 40 for the Medium, 60 for the Normal, and 80 for the Low to 20 for the High, 50 for the Medium, 60 for the Normal, and 80 for the Low:

 Router(config)#priority-list 1 queue-limit 20 50 60 80 

This line is the access list referenced earlier:

 Router(config)#access-list 1 permit 192.168.72.6 

The following command moves from global configuration mode to interface configuration mode for Ethernet 0:

 Router(config)#interface Ethernet 0 

The next command applies the priority group to interface Ethernet 0:

 Router(config-if)#priority-group 1 

CQ

CQ allows the administrator to prioritize traffic so that important traffic is serviced more frequently. At the same time, this queuing strategy does not ignore certain protocols because it is too busy handling others. Whereas PQ handles all traffic in an upper queue before moving to a lower queue, CQ handles a certain amount of data in a given queue and then moves on to the next queue.

CQ Concepts

CQ allocates traffic to up to 16 queues via a queue list, 10 queues if using an IOS version prior to 11.0. The list chooses a queue for a packet according to the protocol, the interface the packet arrived from, the TCP/IP application the packet is for, and other characteristics.

When the router begins handling queued packets, it looks in the first queue available. The first queue, queue 0, handles router system traffic such as keepalives. Once the first queue is empty, certain rules take over. The first rule is that traffic is handled in a "round robin" fashion. Once the router is finished with a given queue, it moves on to the next. The CQ router does not start at the beginning as it does with PQ. The second rule is that the router is finished servicing a queue once it pulls a certain number of packets or a certain number of bytes out of that queue, regardless of whether more packets are waiting to be serviced.

CQ Configuration

The following commands show how to configure custom queuing based on protocol and interface and the details appear in Table 12.4:

 Router(config)#queue-list list-number protocol protocol-name queue-number    queue-keyword keyword-value Router(config)#queue-list list-number interface interface-type interface-number    queue-number 

Table 12.4. CQ Parameters

Parameter

Value

list-number

The number of the queue list from 1 to 16, as in PQ.

protocol-name

The name of the protocol, as in PQ.

queue-number

The number of the custom queue from 1 to 16. You do not have to configure them in any specific order, and you can leave gaps between queues.

queue-keyword keyword-value

gt (greater than), lt (less than), list, tcp or udp, and a port value.

interface-type

The name of the interface.

interface-number

The number of the interface.

The administrator must also assign a default queue for packets that are not covered by the queue list. The administrator can change the number of packets each queue will hold. Those commands follow, with explanations in Table 12.5:

 Router(config)#queue-list list-number default queue-number Router(config)#queue-list list-number queue queue-number limit limit-number 

Table 12.5. CQ Numbering and Sizes

Parameter

Value

list-number

The number of the queue list from 1 to 16.

queue-number

The number of the custom queue from 1 to 16.

limit-number

The maximum number of packets that a queue may hold at any one time. Values range from 0 through 32,767, inclusive, with a default value of 20.

The administrator can specify how long the router remains forwarding packets from any one queue. You do so by configuring how many bytes the router may forward before moving on to the next queue. Assuming that z queue contains more packets than the router is configured to forward at any one time, the router forwards enough packets to reach the configured limit, even if the last packet forces the router over that limit. Once it reaches the limit, the router moves on to the next queue.

When customizing how many packets the router may forward from any one queue, it is a good idea to pay attention to the packet size of the topology. If you configure the first queue for 2000 bytes and all remaining queues for 1500 bytes, Ethernet packets in the first queue will get twice the attention of Ethernet packets in any other queue. Ethernet packets are slightly larger than 1500 bytes. The router forwards one packet from each queue with a limit of 1500 bytes, but forwards two packets from the first queue.

Following is the command to configure how many bytes are transferred from each queue every time the router accesses that queue and the command to set the queue list on an interface. Table 12.6 explains the options that you can use here:

 Router(config)#queue-list list-number queue queue-number byte-count byte-count-number Router(config-if)#custom-queue-list list 

Table 12.6. CQ Throughput and Interface Application

Parameter

Value

list-number

The number of the queue list from 1 to 16.

queue-number

The number of the CQ from 1 to 16.

byte-count-number

The minimum number of bytes the router is to forward from a specific queue. The default for all queues is 1500 bytes.

list

The queue list number created to place packets in queues.

A CQ Example

This example shows how you can give Telnet traffic the highest priority, followed by other IP traffic and anything entering the router via interface Serial 1; AppleTalk, IPX, and all other traffic is considered less critical. It is important to note that when a packet fits more than one queue, it is placed in the queue with the higher priority.

The first command puts all Telnet (TCP port 23) traffic in queue 1:

 Router(config)#queue-list 1 protocol ip 1 tcp 23 

The next command places all other IP traffic in queue 2:

 Router(config)#queue-list 1 protocol ip 2 

This command puts all traffic that is not IP traffic, but is traffic arriving from Serial 0/1, in queue 3:

 Router(config)#queue-list 1 interface s0/1 3 

The following command puts all AppleTalk traffic in queue 4:

 Router(config)#queue-list 1 protocol appletalk 4 

This line puts all IPX traffic in queue 5:

 Router(config)#queue-list 1 protocol ipx 5 

The next line creates a default queue for all other traffic that the router might be configured to support:

 Router(config)#queue-list 1 default 6 

This command raises the number of packets that queue 1 can store from 20 to 40:

 Router(config)#queue-list 1 queue 1 limit 40 

The next command raises the number of bytes that the router can forward when handling queue 1 from 1,500 to 3,000:

 Router(config)#queue-list 1 queue 1 byte-count 3000 

The following line reduces the number of bytes that the router will forward for AppleTalk traffic in queue 5 from 1500 to 500. This setting can be useful if you do not want the router to spend much time forwarding many small packets for network informational purposes:

 Router(config)#queue-list 1 queue 5 byte-count 500 

The next line is a duplicate of the preceding line, affecting IPX packets in queue 6:

 Router(config)#queue-list 1 queue 6 byte-count 500 

The following line moves from global configuration mode to interface configuration mode for Ethernet 0/0:

 Router(config)#interface Ethernet 0/0 

This command applies the list to interface Ethernet 0:

 Router(config-if)#custom-queue-list 1 


CCNP BCRAN Remote Access Exam Cram 2 (Exam Cram 640 - XXX)
CCNP BCRAN Remote Access Exam Cram 2 (Exam Cram 640 - XXX)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net