Flow-based WFQ classifies traffic according to flows, or packets that have identical source and destination addresses, source and destination TCP or UDP ports, and protocols. In other words, a flow consists of a specific type of traffic to and from a pair of hosts .
Class-based WFQ (CBWFQ) classifies traffic according to class map definitions. It is used with the Modular QoS CLI. This type of WFQ is described in Section 10-1.
WFQ is enabled by default on serial interfaces with E1 (2.048 Mbps) speeds or lower, on interfaces using Multilink PPP (MLP), and on serial interfaces not running LAPB, X.25, or SDLC.
WFQ is IP Precedence-aware. Higher Precedence values receive more efficient queuing.
WFQ works with RSVP to prepare traffic for the reserved flows.
WFQ works with Frame Relay congestion management and notification mechanisms (DE, BECN, and FECN) to adjust the traffic in a flow when congestion is occurring.
Distributed WFQ (DWFQ) can be used on routers with VIP-based interface processors.
Enable WFQ on an interface:
(interface) fair-queue [ congestive-discard-threshold [ dynamic-queues [ reservable-queues ]]]
WFQ can be configured using congestive-discard-threshold, a threshold for new packets in each queue (16 to 4096 packets; the default is 64). When a queue reaches the threshold, new packets are discarded. For "best-effort" traffic, the number of dynamic queues can be given as dynamic-queues (valid values are 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096 ). The number of queues set aside for reserved queuing (RSVP, for example) is given by reservable-queues (0 to 1000; the default is 0).
(Optional) Use QoS group or ToS-based DWFQ.
Enable DWFQ:
(interface) fair-queue { qos-group tos }
Traffic is classified and queued according to QoS groups ( qos-group ), locally significant numbers , or type of service ( tos ).
Set the bandwidth percentage per group:
(interface) fair-queue { qos-group group tos tos } weight percentage
During congestion, the QoS group (1 to 99) or the ToS number (0 to 3) is given percentage (1 to 100) of the available bandwidth. By default, ToS 0 is set to 10, ToS 1 is 20, ToS 2 is 30, and ToS 3 is 40.
(Optional) Set the total number of packets in all DWFQ queues:
(interface) fair-queue aggregate-limit packets
The packets variable represents the setting for the total number of packets that are queued before dropping occurs.
(Optional) Set the total number of packets in individual queues:
(interface) fair-queue individual-limit packets
The packets variable represents the setting for the maximum number of packets in individual per-flow queues.
(Optional) Use a strict priority queue for RTP voice traffic:
(interface) ip rtp priority starting-rtp-port port-range bandwidth
IP RTP voice traffic can be assigned to a strict priority queue that is serviced before any other queue on the interface. RTP packets are identified by their UDP port numbers, given as the lowest UDP port for RTP (starting-rtp-port) and the number of ports used in the RTP range (port-range). The guaranteed bandwidth is also specified, in Kbps.
Allocate enough bandwidth for all simultaneous calls that will be supported. The priority queue automatically takes RTP compression into account, so you only need to consider the compressed call bandwidth and any Layer 2 headers.
(Optional) Use a priority queue for Frame Relay.
Define a Frame Relay map class:
(global) map-class frame-relay map-class-name
(Optional) Use a strict priority queue for RTP voice traffic:
(map-class) frame-relay ip rtp priority starting-rtp-port port-range bandwidth
IP RTP voice traffic can be assigned to a strict priority queue that is serviced before any other queue on the interface. RTP packets are identified by their UDP port numbers, given as the lowest UDP port for RTP (starting-rtp-port) and the number of ports used in the RTP range (port-range). The guaranteed bandwidth is also specified, in Kbps.
(Optional) Use a strict priority queue for a single PVC:
(map-class) frame-relay interface-queue priority { high medium normal low }
-OR-
(interface) frame-relay interface-queue priority { high-limit medium-limit normal-limit low-limit }
The strict priority queue can be assigned to either a Frame Relay map class or an interface. For a map class, the priority queue is assigned a priority level: high, medium, normal, or low. For a PVC on an interface, the size of each queue level must be given (the defaults are high, 20 packets; medium, 40 packets; normal, 60 packets; low, 80 packets).
Apply the map class to an interface:
(interface) frame-relay class map-class-name
-OR-
(interface) frame-relay interface-dlci dlci (interface-dlci) class map-class-name
The map class can be applied to all PVCs on a major interface or subinterface with the frame-relay class command. Otherwise, the map class can be applied to a single PVC on an interface (a single DLCI) with the class command.
WFQ is configured on serial 0 with the default thresholds and the number of queues. A strict priority queue is also configured on serial 0 to handle the IP RTP traffic. That traffic is defined as using UDP ports 16384 through 32767 (16384+16383), receiving at least 50 kbps of the bandwidth.
Interface serial 8/1/1 has ToS-based WFQ configured. The bandwidth weights or percentages for each ToS value have been specified, to override the defaults. ToS 1 gets 10% of the bandwidth, ToS 2 gets 20%, and ToS 3 gets 30%.
interface serial 8/0/0 ip address 192.168.14.7 255.255.255.0 fair-queue ip rtp priority 16384 16383 50 interface serial 8/1/1 ip address 192.168.15.7 255.255.255.0 fair-queue tos fair-queue tos 1 weight 10 fair-queue tos 2 weight 20 fair-queue tos 3 weight 30