Table Of Contents
Distributed Weighted Fair Queuing
Distributed Weighted Fair Queuing
Feature Summary
Flow-based weighted fair queuing (WFQ) controls the ratio of transmission bandwidth allocation among different traffic flows during periods of congestion. Class-based WFQ allocates transmission bandwidth among different traffic flows or QoS groups during periods of congestion.
The Distributed Weighted Fair Queuing (DWFQ) feature uses the VIP rather than the RSP to perform the queuing; therefore, it requires a Cisco 7500 series router or Cisco 7000 series router with RSP7000.
The Release 11.1 CC version of DWFQ differs from the previously existing RSP-based version of WFQ. This document describes only the Release 11.1 CC version of DWFQ. Refer to the Cisco IOS Release 11.3 Configuration Fundamentals Configuration Guide and Configuration Fundamentals Command Reference for information on the RSP version of WFQ.
Benefits
Flow-based WFQ provides the following benefits:
•
All flows are allocated equal bandwidth.
•
Well-behaved hosts are protected from badly behaved hosts.
WFQ provides absolute allocation of bandwidth in unequal amounts based on traffic requirements.
DWFQ uses the VIP to provide a faster implementation of WFQ than the RSP implementation.
List of Terms
Distributed WFQ (DWFQ)—An implementation of WFQ. DWFQ performs all of the functions of WFQ, but all of the processing takes place on the VIP.
Versatile Interface Processor (VIP)—Interface card used by Cisco 7500 series and Cisco 7000 series with RSP7000 routers.
weighted fair queuing (WFQ)—A scheduling mechanism that controls transmission bandwidth allocation.
Restrictions
Use WFQ with IP traffic. All non-IP traffic is treated as a single flow and, therefore, placed in the same queue.
DWFQ can be configured on interfaces, but not subinterfaces.
DWFQ is not supported with the ATM encapsulations AAL5-MUX and AAL5-NLPID.
DWFQ is not supported on Fast EtherChannel or Tunnel interfaces.
DWFQ cannot be configured on the same interface as RSP-based priority queuing, custom queuing, or weighted fair queuing.
Platforms
This feature is supported on the following routers with a VIP2-40 card or better:
•
Cisco 7000 series with RSP7000
•
Cisco 7500 series
A VIP2-50 card is strongly recommended when the aggregate line rate of the port adapters on the VIP is greater than DS-3. A VIP2-50 card is required for OC-3 rates.
Prerequisites
In order to use DWFQ, Distributed CEF switching must be enabled on the interface. Refer to the Cisco Express Forwarding documentation for configuration information.
Supported MIBs and RFCs
None
Functional Description
There are two forms of Distributed Weighted Fair Queuing (DWFQ):
The "Drop Policy" section described the drop policy used by both types.
Flow-based WFQ
With flow-based WFQ, packets are classified by flow. Packets with the same source IP address, destination IP address, source TCP or UDP port, destination TCP or UDP port, protocol, and type of service (ToS) field belong to the same flow.
Each flow corresponds to a separate output queue. When a packet is assigned to a flow, it is placed in the queue for that flow. During periods of congestion, WFQ allocates an equal share of the bandwidth to each active queue.
Flow-based WFQ is also called fair queuing (FQ) because all flows are equally weighted.
Class-Based WFQ
In class-based WFQ, packets are assigned to different queues based on their QoS group or the IP precedence in the ToS field.
QoS groups allow you to customize your QoS policy. A QoS group is an internal classification of packets used by the router to determine how packets are treated by certain QoS features, such as WFQ and CAR. Use a CAR policy or QoS Policy Propagation via BGP to assign packets to QoS groups.
If you want to classify packets based only on the 2 low-order IP precedence bits, use ToS-based WFQ.
Specify a weight for each class. In periods of congestion, each group is allocated a percentage of the output bandwidth equal to the weight of the class. For example, if a class is assigned a weight of 50, packets from this class will allocated at least 50 percent of the outgoing bandwidth during periods of congestion. When the interface is not congested, queues can use any available bandwidth.
Drop Policy
WFQ keeps track of the number of packets in each queue and the total number of packets in all queues.
When the total number of packets is below the aggregate limit, queues can buffer more packets than the individual queue limit.
When the total number of packets reaches the aggregate limit, the interface starts enforcing the individual queue limits. Any new packets that arrive for a queue that is over its individual queue limit are dropped. Packets that are already in the queue will not be dropped, even if the queue is over the individual limit.
In some cases, the total number of packets in all queues put together may exceed the aggregate limit.
Configuration Tasks
To configure DWFQ, perform one of the following mutually-exclusive tasks:
•
Configure QoS-Group-Based WFQ
If you enable flow-based WFQ and then enable class-based WFQ (either QoS-group based or ToS-based), class-based WFQ will replace flow-based WFQ.
If you enable class-based WFQ and then want to switch to flow-based WFQ, you must disable class-based WFQ using the no fair-queue class-based command before enabling flow-based WFQ.
If you enable one type of class-based WFQ and then enable the other type, the second type will replace the first.
To monitor WFQ, use the show interfaces and show interfaces fair-queue commands.
Configure Flow-Based WFQ
To configure flow-based WFQ, perform the following tasks in interface configuration mode:
In general, you should not change the aggregate or individual limit value from the default. Use these commands only if you have determined that you would benefit from using different values, based on your particular situation.
Configure QoS-Group-Based WFQ
To configure QoS-group-based WFQ, perform the following tasks in interface configuration mode:
In general, you should not change the aggregate, individual, or class limit value from the default. Use these commands only if you have determined that you would benefit from using different values, based on your particular situation.
Configure ToS-Based WFQ
To configure ToS-based WFQ, perform the following tasks in interface configuration mode:
In general, you should not change the aggregate, individual, or class limit value from the default. Use these commands only if you have determined that you would benefit from using different values, based on your particular situation.
Configuration Example
This section contains the following examples:
Flow-Based WFQ Example
The following example enables WFQ on the HSSI 0/0/0 interface:
interface Hssi0/0/0description 45Mbps to R2ip address 200.200.14.250 255.255.255.252fair-queueThe following is sample output from the show interfaces fair-queue command for this configuration:
Router# show interfaces hssi 0/0/0 fair-queueHssi0/0/0 queue size 0packets output 35, drops 0WFQ: global queue limit 401, local queue limit 200QoS-Group-Based WFQ Example
The following example configures WFQ. CAR policies are used to assign packets with an IP precedence of 2 to QoS group 2, and packets with IP precedence 6 are assigned to QoS group 6.
interface Hssi0/0/0ip address 188.1.3.70 255.255.255.0rate-limit output access-group rate-limit 6 155000000 2000000 8000000 conform-action set-qos-transmit 6 exceed-action droprate-limit output access-group rate-limit 2 155000000 2000000 8000000 conform-action set-qos-transmit 2 exceed-action dropfair-queue qos-groupfair-queue qos-group 2 weight 10fair-queue qos-group 2 limit 27fair-queue qos-group 6 weight 30fair-queue qos-group 6 limit 27!access-list rate-limit 2 2access-list rate-limit 6 6Use the show interfaces fair-queue command to view WFQ statistics.
Router# show interfaces fair-queueHssi0/0/0 queue size 0packets output 806232, drops 1WFQ: aggregate queue limit 54, individual queue limit 27max available buffers 54Class 0: weight 60 limit 27 qsize 0 packets output 654 drops 0Class 2: weight 10 limit 27 qsize 0 packets output 402789 drops 0Class 6: weight 30 limit 27 qsize 0 packets output 402789 drops 1ToS-Based WFQ Example
The following example configures ToS-based WFQ using the default parameters:
Router# configure terminalRouter(config)# interface Hssi0/0/0Router(config-if)# fair-queue tosRouter(config-if)# endThe following is output of the show running-config command for the Hssi0/0/0 interface. Notice that the router automatically adds the default weights and limits for the ToS classes to the configuration.
interface Hssi0/0/0ip address 188.1.3.70 255.255.255.0fair-queue tosfair-queue tos 1 weight 20fair-queue tos 1 limit 27fair-queue tos 2 weight 30fair-queue tos 2 limit 27fair-queue tos 3 weight 40fair-queue tos 3 limit 27Use the show interfaces fair-queue command to view WFQ statistics.
Router# show interfaces fair-queueHssi0/0/0 queue size 0packets output 1417079, drops 2WFQ: aggregate queue limit 54, individual queue limit 27max available buffers 54Class 0: weight 10 limit 27 qsize 0 packets output 1150 drops 0Class 1: weight 20 limit 27 qsize 0 packets output 0 drops 0Class 2: weight 30 limit 27 qsize 0 packets output 775482 drops 1Class 3: weight 40 limit 27 qsize 0 packets output 0 drops 0Command Reference
This section documents new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 11.1 command references or the Cisco Express Forwarding feature documentation.
fair-queue
To enable weighted fair queuing (WFQ), use the fair-queue interface configuration command. The no form of this command disables WFQ.
fair-queue
no fair-queueSyntax Description
This command has no arguments or keywords.
Default
Enabled on all interfaces less than 2 Mbps.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
The command enables WFQ. If you enable this command for an interface on a VIP2-40 or better card, this command enables Distributed WFQ (DWFQ). Otherwise, this command enables RSP-based WFQ.
With WFQ, packets are classified by flow. Packets with the same source IP address, destination IP address, source TCP or UDP port, destination TCP or UDP port, protocol, and type of service (ToS) field belong to the same flow.
WFQ allocates an equal share of the bandwidth to each flow. Flow-based WFQ is also called fair queuing (FQ) because all flows are equally weighted.
Example
The following example enables WFQ on the HSSI 0/0/0 interface:
interface Hssi0/0/0description 45Mbps to R2ip address 200.200.14.250 255.255.255.252fair-queueRelated Commands
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queuefair-queue aggregate-limit
To set the maximum number of packets in all queues combined for DWFQ, use the fair-queue aggregate-limit interface configuration command. The no form of this command returns the value to the default.
fair-queue aggregate-limit aggregate-packets
no fair-queue aggregate-limitSyntax Description
aggregate-packets
Total number of buffered packets before some packets may be dropped. Below this limit, packets will not be dropped.
Default
The total number of packets allowed is based on the transmission rate of the interface and the available buffer space on the VIP.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Note
In general, you should not change this value from the default. Use this command only if you have determined that you would benefit from using a different value, based on your particular situation.
WFQ keeps track of the number of packets in each queue and the total number of packets in all queues.
When the total number of packets is below the aggregate limit, queues can buffer more packets than the individual queue limit.
When the total number of packets reaches the aggregate limit, the interface starts enforcing the individual queue limits. Any new packets that arrive for a queue that is over its individual queue limit are dropped. Packets that are already in the queue will not be dropped, even if the queue is over the individual limit.
In some cases, the total number of packets in all queues put together may exceed the aggregate limit.
Example
The following example sets the aggregate limit to 54 packets:
interface Fddi9/0/0fair-queue tosfair-queue aggregate-limit 54Related Commands
fair-queue
fair-queue individual-limit
fair-queue limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queuefair-queue individual-limit
To set the maximum individual queue depth for DWFQ, use the fair-queue individual-limit interface configuration command. The no form of this command returns the value to the default.
fair-queue individual-limit individual-packet
no fair-queue individual-limitSyntax Description
individual-packet
Maximum number of packets allowed in each per flow or per class queue during periods of congestion.
Default
Half of the aggregate queue limit.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Note
In general, you should not change this value from the default. Use this command only if you have determined that you would benefit from using a different value, based on your particular situation.
WFQ keeps track of the number of packets in each queue and the total number of packets in all queues.
When the total number of packets is below the aggregate limit, queues can buffer more packets than the individual queue limit.
When the total number of packets reaches the aggregate limit, the interface starts enforcing the individual queue limits. Any new packets that arrive for a queue that is over its individual queue limit are dropped. Packets that are already in the queue will not be dropped, even if the queue is over the individual limit.
In some cases, the total number of packets in all queues put together may exceed the aggregate limit.
Example
The following example sets the individual queue limit to 27.
interface Fddi9/0/0mac-address 0000.0c0c.2222ip address 106.1.1.1 255.0.0.0fair-queue tosfair-queue individual-limit 27Related Commands
fair-queue
fair-queue aggregate-limit
fair-queue limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queuefair-queue limit
To set the maximum queue depth for a specific DWFQ class, use the fair-queue limit interface configuration command. The no form of this command returns the value to the default.
fair-queue {qos-group number | tos number} limit class-packet
no fair-queue {qos-group number | tos number} limit class-packetSyntax Description
Default
The individual queue depth, as specified by the fair-queue individual-limit command. If the fair-queue individual-limit command is not configured, the default is half of the aggregate queue limit.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Use this command to specify the number queue depth for a particular class for class-based DWFQ. This command overrides the global individual limit specified by the fair-queue individual-limit command.
Note
In general, you should not change this value from the default. Use this command only if you have determined that you would benefit from using a different value, based on your particular situation.
Example
The following example sets the individual queue limit for ToS group 3 to 20:
interface Fddi9/0/0mac-address 0000.0c0c.2222ip address 106.1.1.1 255.0.0.0fair-queue tosfair-queue tos 3 limit 20Related Commands
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queuefair-queue qos-group
To enable WFQ and classify packets based on the internal QoS-group number, use the fair-queue qos-group interface configuration command. The no form of this command disables QoS-group-based WFQ.
fair-queue qos-group
no fair-queue qos-groupSyntax Description
This command has no arguments or keywords.
Default
Disabled
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Use this command to enable qos-group-based WFQ, a type of class-based WFQ. Class-based WFQ overrides flow-based WFQ. Therefore, this command overrides the fair-queue command.
When this command is enables, packets are assigned to different queues based on their QoS group. A QoS group is an internal classification of packets used by the router to determine how packets are treated by certain QoS features, such as WFQ and CAR. Use a CAR policy or the QoS Policy Propagation via BGP feature to assign packets to QoS groups.
Specify a weight for each class. In periods of congestion, each group is allocated a percentage of the output bandwidth equal to the weight of the class. For example, if a class is assigned a weight of 50, packets from this class are allocated at least 50 percent of the outgoing bandwidth during periods of congestion.
Example
The following example enables QoS-based DWFQ and allocates bandwidth for nine QoS groups (QoS groups 0 through 8):
interface Hssi0/0/0description 45Mbps to R2ip address 200.200.14.250 255.255.255.252fair-queue qos-groupfair-queue qos-group 1 weight 5fair-queue qos-group 2 weight 5fair-queue qos-group 3 weight 10fair-queue qos-group 4 weight 10fair-queue qos-group 5 weight 10fair-queue qos-group 6 weight 15fair-queue qos-group 7 weight 20fair-queue qos-group 8 weight 29Related Commands
fair-queue
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue limit
fair-queue tos
fair-queue weight
show interfaces
show interfaces fair-queuefair-queue tos
To enable DWFQ and classify packets using the ToS field of packets, use the fair-queue tos interface configuration command. The no form of this command disables ToS-based DWFQ.
fair-queue tos
no fair-queue tosSyntax Description
This command has no arguments or keywords.
Default
Disabled
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Use this command to enable ToS-based WFQ, a type of class-based WFQ. Class-based WFQ overrides flow-based WFQ. Therefore, this command overrides the fair-queue command.
When this command is enabled, packets are assigned to different queues based on the two low-order IP precedence bits in the ToS field of the packet header.
In periods of congestion, each group is allocated a percentage of the output bandwidth equal to the weight of the class. For example, if a class is assigned a weight of 50, packets from this class are allocated at least 50 percent of the outgoing bandwidth during periods of congestion.
By default, class 0 is assigned a weight of 10; class 1 is assigned a weight of 20; class 2 is assigned a weight of 30; and class 3 is assigned a weight of 40.
If you wish to change the weights, use the fair-queue weight command.
Example
The following example enables ToS-based DWFQ on the HSSI 0/0/0 interface.
interface Hssi0/0/0description 45Mbps to R2ip address 200.200.14.250 255.255.255.252fair-queuefair-queue tosRelated Commands
fair-queue
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue limit
fair-queue qos-group
fair-queue weight
show interfaces
show interfaces fair-queuefair-queue weight
To assign a weight to a class for DWFQ, use the fair-queue weight interface configuration command. The no form of this command unallocates the bandwidth for the class.
fair-queue {qos-group number | tos number} weight weight
no fair-queue {qos-group number | tos number} weight weightSyntax Description
Default
For QoS WFQ, unallocated bandwidth is assigned to QoS group 0.
For ToS-based WFQ, class 0 is assigned a weight of 10; class 1 is assigned a weight of 20; class 2 is assigned a weight of 30; and class 3 is assigned a weight of 40.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Use this command to allocate percentages of bandwidth for specific DWFQ classes. You must also enable class-based WFQ on the interface with either the fair-queue qos-group or fair-queue tos command.
Enter this command once for every class to allocate bandwidth to the class.
For QoS-group-based WFQ, packets that are not assigned to any QoS groups are assigned to QoS group 0. When assigning weights to QoS group class, keep in mind the following:
•
One percent of the available bandwidth is automatically allocated to QoS group 0.
•
The total weight for all the other QoS groups combined cannot exceed 99.
•
Any unallocated bandwidth is assigned to QoS group 0.
For ToS-based WFQ, keep in mind the following:
•
One percent of the available bandwidth is automatically allocated to ToS class 0.
•
The total weight for all the other ToS classes combined cannot exceed 99.
•
Any unallocated bandwidth is assigned to ToS class 0.
Example
The following example allocates bandwidth to different QoS groups. The remaining bandwidth (5%) is allocated to QoS group 0.
interface Fddi9/0/0fair-queue qos-groupfair-queue qos-group 1 weight 10fair-queue qos-group 2 weight 15fair-queue qos-group 3 weight 20fair-queue qos-group 4 weight 20fair-queue qos-group 5 weight 30Related Commands
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queueshow interfaces
Use the show interfaces EXEC command to display statistics for all interfaces. The resulting output varies depending on the network for which an interface has been configured.
show interfaces [type slot/port-adapter/port] (for ports on VIP cards in the Cisco 7500 series
routers)Syntax Description
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
The show interfaces command displays statistics for the network interfaces.
The output of the show interfaces command varies based on the interface type and configuration. This document describes the output related to the DWFQ feature. Refer to the Cisco IOS Release 11.1 command references for a complete description of the entire output.
Sample Display for DWFQ
The following is sample output from the show interfaces command when DWFQ is enabled on an interface. Notice that the queueing strategy is listed as "VIP-based fair queuing."
Router# show interfaces FastEthernet1/1/0FastEthernet1/1/0 is up, line protocol is upHardware is cyBus FastEthernet Interface, address is 0007.f618.4448 (bia 00e0)Description: pkt input i/f for WRL tests (to pagent)Internet address is 80.0.2.70/24MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255Encapsulation ARPA, loopback not set, keepalive not set, fdx, 100BaseTX/FXARP type: ARPA, ARP Timeout 04:00:00Last input never, output 01:11:01, output hang neverLast clearing of "show interface" counters 01:12:31Queueing strategy: VIP-based fair queuingOutput queue 0/40, 0 drops; input queue 0/75, 0 drops30 second input rate 0 bits/sec, 0 packets/sec30 second output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 watchdog, 0 multicast0 input packets with dribble condition detected1 packets output, 60 bytes, 0 underruns0 output errors, 0 collisions, 0 interface resets0 babbles, 0 late collision, 0 deferred0 lost carrier, 0 no carrier0 output buffers copied, 0 interrupts, 0 failuresshow interfaces fair-queue
To display information about WFQ for an interface, use the show interfaces fair-queue EXEC command.
show interfaces [interface] fair-queue
Syntax Description
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
Sample Display
The following is sample output from the show interfaces fair-queue command:
Router# show interfaces fair-queueHssi0/0/0 queue size 0packets output 1417079, drops 2WFQ: aggregate queue limit 54, individual queue limit 27max available buffers 54Class 0: weight 10 limit 27 qsize 0 packets output 1150 drops 0Class 1: weight 20 limit 27 qsize 0 packets output 0 drops 0Class 2: weight 30 limit 27 qsize 0 packets output 775482 drops 1Class 3: weight 40 limit 27 qsize 0 packets output 0 drops 0describes the fields shown in this display.
