| [ LiB ] |
If the network is congested, the need for queuing arises. There are four main types of queuing:
First-in, first-out (FIFO) queuing Traffic is not prioritized or classified. Packets are transmitted in the order in which they were received.
Weighted Fair Queuing (WFQ) An automated method that divides bandwidth fairly among the different types of traffic based on weight.
Priority queuing (PQ) A strict method in which high-priority packets always get priority over lower-priority traffic.
Custom queuing (CQ) With CQ, bandwidth can be proportionally assigned to the different types of traffic.
The last three methods are covered in this chapter.
WFQ is an automated mechanism that provides an equitable distribution of bandwidth to all network protocols. It helps ensure that available bandwidth is shared by all the protocols and that low-volume traffic is not detrimentally affected by higher-volume traffic consuming a large portion of the bandwidth.
Flow-based WFQ classifies traffic into flows based on certain characteristics in the packet header. These characteristics can include source and destination IP or MAC addresses, protocol, source and destination port numbers, and type of service (ToS) values.
These flows are then classified as either low-volume or high-volume. By definition, the WFQ algorithm gives low-volume flows preferential treatment over high-volume flows. After the low-volume flows have been sent, high-volume flows share the remaining bandwidth. This method ensures that low-bandwidth conversations, which make up the majority of traffic, are serviced in a timely manner.
NOTE
WFQ is the default queuing mechanism for all physical interfaces whose bandwidth is E1 and lower. T1 links (1.544 Mbps) are popular in the United States, and E1 links (2.048 Mbps) are widely used in other parts of the world, including Europe.
The WFQ process is illustrated in Figure 11-1.

Each packet's virtual time of delivery determines the order in which it is transmitted. This ensures that smaller packets are given preference, as demonstrated by Packet 3's being the first packet sent in Figure 11-1.
High-volume applications often generate series of packets of associated data. These are called packet trains. Packet trains can consume large amounts of bandwidth and starve lower-volume traffic in a FIFO queuing environment. WFQ provides an automatic, elegant solution to this problem.
Although WFQ might work well in a lot of environments, there are some caveats. For instance, it is not supported on interfaces that do tunneling or encryption. Also, certain interfaces such as ATM do not support WFQ.
Priority queuing is a mechanism that strictly enforces priority as the criterion for selecting which packets to send first on an interface. This method ensures that high-priority traffic is not delayed by less-important traffic.
When using priority queuing, you create four traffic queues:
High
Medium
Normal
Low
Then you configure a set of filters to allow the router to place traffic in these four queues. These filters can be based on traffic characteristics such as protocol or TCP port number.
After the traffic is placed in the queues, the high-priority queue is always emptied before the medium-priority queue, and so on. This process is repeated every time a packet needs to be sent. This ensures that time-sensitive or mission-critical traffic is always given precedence over other traffic. However, note that medium-priority or low-priority packets are not serviced while packets are in the high-priority queue.
This process is illustrated in Figure 11-2.

Priority queuing gives the network administrator the most control over which traffic gets forwarded. This is because the administrator defines the traffic filters. These filters, also called priority lists, assign traffic to the four queues.
Although priority queuing offers the most control over what traffic is transmitted first, it also requires some degree of manual configuration. Traffic prioritization and queue size are two things that the administrator needs to configure. This kind of static configuration cannot respond to a dynamic environment.
It should also be noted that although priority queuing is a good method of ensuring absolute priority for mission-critical traffic, there is a danger that lower-priority traffic could be drowned out. In a worst-case scenario, high-priority traffic could consume 100 percent of the bandwidth, and lower-priority traffic might not even be sent. Care should be taken that this does not happen.
Custom queuing is a method that lets the network administrator guarantee bandwidth by giving queue space to each protocol. This overcomes a potential priority queuing problem in which lower-priority traffic languishes if higher-priority traffic needs to be sent.
Custom queuing has 16 queues to which you can assign traffic. You can define a set of traffic filters called custom queue lists to determine which protocol you want to place in a particular queue. You can also define how many bytes to transmit from each queue.
The queues are then serviced in round-robin fashion, with the specified number of bytes sent each time. As noted, you can set this byte count value. However, custom queuing does not fragment a packet to fit a queue's byte count. When the byte count has been reached, or when no more traffic needs to be sent, the next queue is serviced.
This process is described in Figure 11-3.

Custom queuing can ensure that no one protocol starves others out of bandwidth. Also, if a particular protocol doesn't use the bandwidth allocated to it, the bandwidth can be dynamically used by other protocols.
However, like priority queuing, custom queuing requires some manual configuration. The byte count value for each queue has to be carefully selected so that the desired results are achieved. Also, because custom queuing configuration is static, it cannot adapt to a changing environment.
| [ LiB ] |