|
|
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.
Flow-based WFQ provides the following benefits:
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.
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.
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.
This feature is supported on the following routers with a VIP2-40 card or better:
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.
In order to use DWFQ, Distributed CEF switching must be enabled on the interface. Refer to the Cisco Express Forwarding documentation for configuration information.
None
There are two forms of Distributed Weighted Fair Queuing (DWFQ):
The "Drop Policy" section described the drop policy used by both types.
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.
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.
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.
To configure DWFQ, perform one of the following mutually-exclusive tasks:
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.
To configure flow-based WFQ, perform the following tasks in interface configuration mode:
| Task | Command |
|---|---|
Enable flow-based WFQ. | fair-queue |
(Optional) Set the total number of buffered packets before some packets may be dropped. Below this limit, packets will not be dropped. | fair-queue aggregate-limit aggregate-packet |
(Optional) Set the maximum queue size for individual per-flow queues during periods of congestion. | fair-queue individual-limit individual-packet |
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.
To configure QoS-group-based WFQ, perform the following tasks in interface configuration mode:
| Task | Command |
|---|---|
Enable QoS-group-based WFQ | fair-queue qos-group |
For each QoS group, specify the percentage of the bandwidth to allocate to each class. | fair-queue qos-group number weight weight |
(Optional) Set the total number of buffered packets before some packets may be dropped. Below this limit, packets will not be dropped. | fair-queue aggregate-limit aggregate-packet |
(Optional) Set the maximum queue size for every per-flow queue during periods of congestion. | fair-queue individual-limit individual-packet |
(Optional) Set the maximum queue size for a specific QoS group queue during periods of congestion. | fair-queue qos-group number limit class-packet |
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.
To configure ToS-based WFQ, perform the following tasks in interface configuration mode:
| Task | Command |
|---|---|
Enable ToS-based WFQ | fair-queue tos-based |
(Optional) For each ToS class, specify the percentage of the bandwidth to allocate to each class. | fair-queue tos number weight weight |
(Optional) Set the total number of buffered packets before some packets may be dropped. Below this limit, packets will not be dropped. | fair-queue aggregate-limit aggregate-packet |
(Optional) Set the maximum queue size for every per-flow queue during periods of congestion. | fair-queue individual-limit individual-packet |
(Optional) Set the maximum queue size for a specific ToS queue during periods of congestion. | fair-queue tos number limit class-packet |
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.
This section contains the following examples:
The following example enables WFQ on the HSSI 0/0/0 interface:
interface Hssi0/0/0 description 45Mbps to R2 ip address 200.200.14.250 255.255.255.252 fair-queue
The following is sample output from the show interfaces fair-queue command for this configuration:
Router# show interfaces hssi 0/0/0 fair-queue
Hssi0/0/0 queue size 0
packets output 35, drops 0
WFQ: global queue limit 401, local queue limit 200
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/0 ip address 188.1.3.70 255.255.255.0 rate-limit output access-group rate-limit 6 155000000 2000000 8000000 conform-action set-qos-transmit 6 exceed-action drop rate-limit output access-group rate-limit 2 155000000 2000000 8000000 conform-action set-qos-transmit 2 exceed-action drop fair-queue qos-group fair-queue qos-group 2 weight 10 fair-queue qos-group 2 limit 27 fair-queue qos-group 6 weight 30 fair-queue qos-group 6 limit 27 ! access-list rate-limit 2 2 access-list rate-limit 6 6
Use the show interfaces fair-queue command to view WFQ statistics.
Router# show interfaces fair-queue
Hssi0/0/0 queue size 0
packets output 806232, drops 1
WFQ: aggregate queue limit 54, individual queue limit 27
max available buffers 54
Class 0: weight 60 limit 27 qsize 0 packets output 654 drops 0
Class 2: weight 10 limit 27 qsize 0 packets output 402789 drops 0
Class 6: weight 30 limit 27 qsize 0 packets output 402789 drops 1
The following example configures ToS-based WFQ using the default parameters:
Router# configure terminal
Router(config)# interface Hssi0/0/0
Router(config-if)# fair-queue tos
Router(config-if)# end
The 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/0 ip address 188.1.3.70 255.255.255.0 fair-queue tos fair-queue tos 1 weight 20 fair-queue tos 1 limit 27 fair-queue tos 2 weight 30 fair-queue tos 2 limit 27 fair-queue tos 3 weight 40 fair-queue tos 3 limit 27
Use the show interfaces fair-queue command to view WFQ statistics.
Router# show interfaces fair-queue
Hssi0/0/0 queue size 0
packets output 1417079, drops 2
WFQ: aggregate queue limit 54, individual queue limit 27
max available buffers 54
Class 0: weight 10 limit 27 qsize 0 packets output 1150 drops 0
Class 1: weight 20 limit 27 qsize 0 packets output 0 drops 0
Class 2: weight 30 limit 27 qsize 0 packets output 775482 drops 1
Class 3: weight 40 limit 27 qsize 0 packets output 0 drops 0
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.
To enable weighted fair queuing (WFQ), use the fair-queue interface configuration command. The no form of this command disables WFQ.
fair-queueThis command has no arguments or keywords.
Enabled on all interfaces less than 2 Mbps.
Interface configuration
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.
The following example enables WFQ on the HSSI 0/0/0 interface:
interface Hssi0/0/0 description 45Mbps to R2 ip address 200.200.14.250 255.255.255.252 fair-queue
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queue
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
aggregate-packets | Total number of buffered packets before some packets may be dropped. Below this limit, packets will not be dropped. |
The total number of packets allowed is based on the transmission rate of the interface and the available buffer space on the VIP.
Interface configuration
This command first appeared in Cisco IOS Release 11.1 CC.
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.
The following example sets the aggregate limit to 54 packets:
interface Fddi9/0/0 fair-queue tos fair-queue aggregate-limit 54
fair-queue
fair-queue individual-limit
fair-queue limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queue
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
individual-packet | Maximum number of packets allowed in each per flow or per class queue during periods of congestion. |
Half of the aggregate queue limit.
Interface configuration
This command first appeared in Cisco IOS Release 11.1 CC.
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.
The following example sets the individual queue limit to 27.
interface Fddi9/0/0 mac-address 0000.0c0c.2222 ip address 106.1.1.1 255.0.0.0 fair-queue tos fair-queue individual-limit 27
fair-queue
fair-queue aggregate-limit
fair-queue limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queue
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
qos-group number | Number of the QoS group, as assigned by a committed access rate (CAR) policy or BGP policy propagation. The value can range from 1 to 99. |
tos number | Two low-order IP precedence bits of the ToS field. |
class-packet | Maximum number of packets allowed in the queue for the class during periods of congestion. |
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.
Interface configuration
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.
The following example sets the individual queue limit for ToS group 3 to 20:
interface Fddi9/0/0 mac-address 0000.0c0c.2222 ip address 106.1.1.1 255.0.0.0 fair-queue tos fair-queue tos 3 limit 20
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queue
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-groupThis command has no arguments or keywords.
Disabled
Interface configuration
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.
The following example enables QoS-based DWFQ and allocates bandwidth for nine QoS groups (QoS groups 0 through 8):
interface Hssi0/0/0 description 45Mbps to R2 ip address 200.200.14.250 255.255.255.252 fair-queue qos-group fair-queue qos-group 1 weight 5 fair-queue qos-group 2 weight 5 fair-queue qos-group 3 weight 10 fair-queue qos-group 4 weight 10 fair-queue qos-group 5 weight 10 fair-queue qos-group 6 weight 15 fair-queue qos-group 7 weight 20 fair-queue qos-group 8 weight 29
fair-queue
fair-queue aggregate-limit
fair-queue individual-limit
fair-queue limit
fair-queue tos
fair-queue weight
show interfaces
show interfaces fair-queue
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 tosThis command has no arguments or keywords.
Disabled
Interface configuration
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.
The following example enables ToS-based DWFQ on the HSSI 0/0/0 interface.
interface Hssi0/0/0 description 45Mbps to R2 ip address 200.200.14.250 255.255.255.252 fair-queue fair-queue tos
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-queue
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
qos-group number | Number of the QoS group, as assigned by a committed access rate (CAR) policy or BGP policy propagation. The value can range from 1 to 99 |
tos number | 2 low order IP precedence bits of the ToS field. The value can range from 1 to 3. |
weight | Percentage of the output link bandwidth allocated to this class. The sum of weights for all classes cannot exceed 99. |
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.
Interface configuration
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:
For ToS-based WFQ, keep in mind the following:
The following example allocates bandwidth to different QoS groups. The remaining bandwidth (5%) is allocated to QoS group 0.
interface Fddi9/0/0 fair-queue qos-group fair-queue qos-group 1 weight 10 fair-queue qos-group 2 weight 15 fair-queue qos-group 3 weight 20 fair-queue qos-group 4 weight 20 fair-queue qos-group 5 weight 30
fair-queue qos-group
fair-queue tos
show interfaces
show interfaces fair-queue
type | (Optional) Interface type. |
slot | (Optional) Refer to the appropriate hardware manual for slot information. |
port-adapter | (Optional) Refer to the appropriate hardware manual for information about port adapter compatibility. |
port | (Optional) Refer to the appropriate hardware manual for port information. |
EXEC
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.
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/0
FastEthernet1/1/0 is up, line protocol is up
Hardware 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/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive not set, fdx, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 01:11:01, output hang never
Last clearing of "show interface" counters 01:12:31
Queueing strategy: VIP-based fair queuing
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
30 second input rate 0 bits/sec, 0 packets/sec
30 second output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast
0 input packets with dribble condition detected
1 packets output, 60 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffers copied, 0 interrupts, 0 failures
To display information about WFQ for an interface, use the show interfaces fair-queue EXEC command.
show interfaces [interface] fair-queue
interface | (Optional) Type and number of the interface. |
EXEC
This command first appeared in Cisco IOS Release 11.1 CC.
The following is sample output from the show interfaces fair-queue command:
Router# show interfaces fair-queue
Hssi0/0/0 queue size 0
packets output 1417079, drops 2
WFQ: aggregate queue limit 54, individual queue limit 27
max available buffers 54
Class 0: weight 10 limit 27 qsize 0 packets output 1150 drops 0
Class 1: weight 20 limit 27 qsize 0 packets output 0 drops 0
Class 2: weight 30 limit 27 qsize 0 packets output 775482 drops 1
Class 3: weight 40 limit 27 qsize 0 packets output 0 drops 0
Table 1 describes the fields shown in this display.
| Field | Description |
|---|---|
queue size | Current output queue size for this interface. |
packets output | Number of packets transmitted out this interface. |
drops | Number of packets dropped. |
aggregate queue limit | Aggregate limit, in number of packets. |
individual queue limit | Individual limit, in number of packets. |
max available buffers | Available buffer space allocated to aggregate queue limit, in number of packets. |
Class | QoS group or ToS class. |
weight | Percent of bandwidth allocated to this class during periods of congestion. |
limit | Queue limit for this class, in number of packets. |
qsize | Current size of the queue for this class. |
packets output | Number of packets in this class transmitted out the interface. |
drops | Number of packets in this class dropped. |
|
|