Configuring Weighted Fair Queuing (WFQ)

Configuring Weighted Fair Queuing (WFQ)

Figure 4-3 shows a flowchart for the configuration that follows, which shows how to configure Weighted Fair Queuing.

Figure 4-3. Weighted Fair Queuing


Note

Weighted Fair Queuing is a flow-based algorithm. Arriving packets are classified into flows, and each flow is assigned to a FIFO queue. A flow can be identified based on the following information taken from the IP header and the TCP or UDP headers:

  • Source IP address

  • Destination IP address

  • Protocol number

  • Type of Service (ToS) field

  • Source TCP/UDP port number

  • Destination TCP/UDP port number

These parameters are then used to generate a hash that is used as the index of the queue—if the packet is the first of a new flow, it is assigned a new queue; if the packet hash matches an existing hash, the packet is assigned to that flow queue.


Note

WFQ has a hold queue for all packets of all flows. If a new packet arrives and the hold queue is full, the arriving packet is dropped and older packets remain in the queue; this is known as tail drop.


Note

Fair Queuing (FQ) is the default queuing strategy for interfaces less than 2.048 Mbps. First-In-First-Out (FIFO) is the default queuing strategy for interfaces more than 2.048 Mbps.


Router(config)# interface serial 0/0/0 Moves to interface configuration mode.
Router(config-if)# fair-queue Assigns FQ to this interface.
NOTE: The fair-queue command enables WFQ on interfaces where it is not enabled by default or on interfaces where it was previously disabled.
NOTE: The number of automatic dynamic queues for Weighted Fair Queuing and Class-Based Weighted Fair Queuing is a function of interface bandwidth. Discard thresholds, the number of reserved queues and/or dynamic queues, can be optionally specified.
Router(config-if)# fair-queue 128 32 50 Configures Weighted Fair Queuing with a Congestive Discard threshold of 128 packets, 32 dynamic conversation queues, and 50 reservable conversation queues.


Note

The congestive discard threshold must be a power of 2 in the range from 16 to 4096. The default is 64. When a conversation reaches this threshold, new message packets are discarded.

The number of dynamic queues used for best-effort conversations can be 16, 32, 64, 128, 256, 512, 1024, 2048, or 4096.

The number of reservable queues used for reserved conversations can range from 0 to 1000. The default is 0. Reservable queues are used for interfaces configured for features such as RSVP.