fair-queue [congestive-discard-threshold [dynamic-queues [reservable-queues]]]

no fair-queue

Syntax Description:


(Optional) Number of messages allowed in each queue. The default is 64 messages, and a new threshold must be a power of 2 in the range 16 to 4096. When a conversation reaches this threshold, new message packets are discarded.


(Optional) Number of dynamic queues used for best-effort conversations (that is, a normal conversation not requiring any special network services). Values are 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096. The default is 256.


(Optional) Number of reservable queues used for reserved conversations in the range 0 to 1000. The default is 0. Reservable queues are used for interfaces configured for features such as Resource Reservation Protocol (RSVP).

Command Description:

To enable weighted fair queueing (WFQ) for an interface, use the fair-queue interface configuration command. To disable weighted fair queueing for an interface, use the no form of this command. This command enables WFQ. With WFQ, packets are classified by flow. For example, packets with the same source IP address, destination IP address, source TCP or UDP port, destination TCP or UDP port, and protocol belong to the same flow; see the table below for a full list of protocols and traffic stream discrimination fields.

When enabled for an interface, WFQ provides traffic priority management that automatically sorts among individual traffic streams without requiring that you first define access lists. Enabling WFQ requires use of this command only.

When WFQ is enabled for an interface, new messages for high-bandwidth traffic streams are discarded after the configured or default congestive discard threshold has been met. However, low-bandwidth conversations, which include control message conversations, continue to enqueue data. As a result, the fair queue may occasionally contain more messages than its configured threshold number specifies.

WFQ uses a traffic data stream discrimination registry service to determine which traffic stream a message belongs to. For each forwarding protocol, Table shows the attributes of a message that are used to classify traffic into data streams.

Fair queueing is enabled by default for physical interfaces whose bandwidth is less than or equal to 2.048 Mbps and that do not use the following: X.25 and Synchronous Data Link Control (SDLC) encapsulations; Link Access Procedure, Balanced (LAPB); tunnels; loopbacks; dialer; bridges; or virtual interfaces. Fair queueing is not an option for these protocols. However, if custom queueing or priority queueing is enabled for a qualifying link, it overrides fair queueing, effectively disabling it. Additionally, fair queueing is automatically disabled if you enable the autonomous or silicon switching engine mechanisms.

Table: Weighted Fair Queueing
Traffic Stream Discrimination Fields

Forwarder Fields Used



  • Source net, node, socket
  • Destination net, node, socket
  • Type




  • Source NSAP
  • Destination NSAP




  • Source address
  • Destination address


Frame Relay switching


  • DLCI value




  • ToS
  • IP protocol
  • Source IP address (if message is not fragmented)
  • Destination IP address (if message is not fragmented)
  • Source TCP/UDP port
  • Destination TCP/UDP port


Transparent bridging


  • Unicast: source MAC, destination MAC
  • Ethertype SAP/SNAP multicast: destination MAC address


Source-route bridging


  • Unicast: source MAC, destination MAC
  • SAP/SNAP multicast: destination MAC address




  • Source network/host
  • Destination network/host
  • Level 2 protocol




  • Source network/host/socket
  • Destination network/host/socket
  • Level 2 protocol




  • Source/destination network/host/socket
  • Level 2 protocol


Novell NetWare


  • Source/destination network/host/socket
  • Level 2 protocol


All others (default)


  • Control protocols (one queue per protocol)


It is important to note that IP precedence, congestion in Frame Relay switching, and discard eligibility flags affect the weights used for queueing.

IP precedence, which is set by the host or by policy maps, is a number in the range of 0 to 7. Data streams of precedence number are weighted so that they are given an effective bit rate of number+1 times as fast as a data stream of precedence 0, which is normal.

In Frame Relay switching, message flags for forward explicit congestion notification (FECN), backward explicit congestion notification (BECN), and discard eligibility (DE) message flags cause the algorithm to select weights that effectively impose reduced queue priority, providing the application with "slow down" feedback and sorting traffic, giving the best service to applications within their committed information rate (CIR).

Fair queueing is supported for all LAN and line (WAN) protocols except X.25, including LAPB and SDLC.


The following example enables use of WFQ on serial interface 0, with a congestive threshold of 300. This threshold means that messages will be discarded from the queueing system only when 300 or more messages have been queued and the message is in a data stream that has more than one message in the queue. The transmit queue limit is set to 2, based on the 384-kilobit (Kb) line set by the bandwidth command:

Router(config)#interface serial 0
Router(config-if)#bandwidth 384
Router(config-if)#fair-queue 300

Unspecified parameters take the default values.

The following example requests a fair queue with a congestive discard threshold of 64 messages, 512 dynamic queues, and 18 RSVP queues:

Router(config)#interface Serial 3/0
Router(config-if)#ip unnumbered Ethernet 0/0
Router(config-if)#fair-queue 64 512 18


Related Commands:
priority-list default
show interfaces
show queueing

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)