Which queuing algorithm classifies traffic into different flows based on packet header addressing?
Last time we looked at First-In First-Out queue management, in this blog we'll explore the next queue mechanism on our list: Weighted Fair Queuing (WFQ). WFQ is a flow-based queuing algorithm used in Quality of Service (QoS) that does two things simultaneously: It schedules interactive traffic to the front of the queue to reduce response time, and it fairly shares the remaining bandwidth between high bandwidth flows. A stream of packets within a single session of a single application is known as flow or conversation. WFQ is a flow-based method that sends packets over the network and ensures packet transmission efficiency which is critical to the interactive traffic. This method automatically stabilizes network congestion between individual packet transmission flows. There are three types of WFQ: Show
The WFQ method has the advantage of being fast, reliable and easy to implement. WFQ follows these main criteria:
Although bandwidth is allocated fairly among all flows, unfairness is reinstated by giving proportionately more bandwidth to flows with higher IP precedence or lower weight. WFQ has to classify individual flows using the following information taken from the IP/TCP/UDP headers. These parameters are used as input for a hash algorithm that produces a fixed length number that is used as the index of the queue.
There is a fixed number of per flow queues, and the hash algorithm translates flow parameters into a queue number. The number of dynamically allocated queues is based on the interface bandwidth configuration and can be configured in a range between 16 and 4096 in multiples of 2. Here is a list of default dynamic queues based on bandwidth. WFQ Insertion and Drop Policy WFQ uses two methods to drop packets, Early and Aggressive dropping. Early dropping is when the congestion discard threshold is reached and aggressive dropping is when the hold-queue out limit is reached. WFQ always drops packets of the most aggressive flows and uses the following two parameters to affect the way WFQ drops packets. In this example, N is the number of packets in the WFQ system when the N-th packet arrives.
WFQ Scheduling For scheduling purposes, in WFQ the length of the queue is not measured in packets but in the time it would take to transmit all the packets in the queue. WFQ adapts the number of flows and allocates equal amounts of bandwidth to each flow. Small packet flows which are usually interactive flows (voice and video) typically receive better service because they do not need a lot of bandwidth. They do need and receive low delay because smaller packets have a lower finish time. Finish time is the sum of the current time and the time it takes to transmit the packet. Current time is zero if there are no packets in the queue. The first packet into this queue will have a finish time of current time + transmission time. For example: Current time = 0ms (no packets in the queue) First packet = 100ms to transmit this packet Finish time = 0 + 100ms = 100ms Packet two comes into the queue Current time = 100ms 2nd Packet = 20ms to transmit this packet Finish Time = 100ms + 20ms = 120ms WFQ will place the packets into the hardware queue based on the finish time lowest to highest. The last piece is to use the finish time and the IP precedence to introduce the weight into the calculation of which queues will be serviced in which order. The calculation to add weight is finish time divided by IP Precedence plus one (to prevent division by zero). In Cisco routers this calculation is done differently to decrease the load on the routers CPU. The Cisco router uses the packet size instead of the transmission time as they are proportional to each other. In addition, the packet size is not divided by IP Precedence; instead the packet size is multiplied by a fixed value (one value for each IP Precedence value). This is done because division is a CPU intensive operation in comparison to multiplication. Pros and Cons of WFQ Pro
Con
WFQ Configuration WFQ is enabled by default on all interfaces that have a default bandwidth of less than 2Mbps. Use the fair-queue command to enable WFQ on interfaces that do not have WFQ enabled. Router(config-if)# [cdt [dynamic-queues [reservable-queues]]]Congestive discard threshold (CDT) – Optional
Dynamic-queues - Optional
Reservable-queues - Optional • Number of reservable queues if the RSVP feature is configures on the interface, with values of 0 to 1000 Router(config-if)# hold-queue max-limit outHold-queue Max (HQO)
In most cases the hold-queue limit will never be reached because the CDT will start dropping the most aggressive conversations. WFQ Show Commands Output Queue
Conversations
Show queue displays the packets inside a queue for a particular interface
Summary This blog discussed Weighted Fair Queuing, the next blog in this QoS series will discuss Class Based WFQ and Low Latency queuing (LLQ). Author: Paul Stryer References
Which algorithm is based on queuing technique?The Stochastic Fairness Queuing (SFQ) algorithm is a simpler and less accurate implementation of the FQ algorithms and requires less calculations. SFQ ensures that each flow has the opportunity to transmit an equal amount of data and takes into account data packet sizes [338]. Class-Based Queuing (CBQ).
Which queuing algorithm applies priority or weights to identify traffic and classify it?Weighted Fair Queuing
Flow-based and class-based WFQ applies priority (or weights) to identified traffic to classify traffic into conversations and to determine how much bandwidth each conversation is allowed relative to other conversations.
Which method is used in queues for flow control on network?FIFO with tail drop, as the simplest of all queuing algorithms, is the most widely used in Internet routers at the time of writing. This simple approach to queuing pushes all responsibility for congestion control and resource allocation out to the edges of the network.
What queuing method ensures all packets are transmitted in the same order they are received?The FIFO scheduling discipline (also known as First-Come-First-Served - FCFS) selects packets for link transmission in the same order in which they arrived at the output link queue.
|