WFQ - More Information

Unanswered Question
Dec 15th, 2008
User Badges:

I want to understand some thing about WFQ. Find below the statement about the WFQ.

" WFQ allows you to give low volume traffic, such as telnet session priority over high volume traffic, such as FTP session"

As per my understanding WFQ uses single queue per flow. But How does it know to what session it need to provide the priority. Does it has the intelligent to detemine based on the protocol ( may using NBAR) or Uses the DSCP value or etc ?

If it DSCP then is it must to classify the traffic and mark the DSCP value for the above statement to be true.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Jon Marshall Mon, 12/15/2008 - 03:36
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

WFQ is a lot simpler than that. It can use IP precedence in it's calculations but lets assume that both telnet and FTP have the same IP precedence.

Telnet packets tend to be small whereas FTP packets tend to be large. So with FIFO queuing if a couple of large FTP packets are first in they will be sent out first. This will delay sending out any telnet packets ie. the telnet packets can only be sent after the FTP packets have been transmitted.

What WFQ does is to take into account the size of the packet as well and without going into the algorithm details (altho we can if you want) a packet with the same IP precedence but a smaller size will end up with a smaller sequence number. This sequence number is used when the router transmits the packet and the smaller sequence number is transmitted before the larger one.

So in answer to your question "But How does it know to what session it need to provide the priority", WFQ doesn't understand which application is in use ie. telnet/ftp etc..

If you wanted to you give a better IP precedence to telnet than FTP but you don't have to.


ragulan_dms Mon, 12/15/2008 - 03:49
User Badges:

Thanks for the very quick Reply.

So Lower Queue ID has the higher weight for the transmission in the WFQ implementation.

Thanks a lot for the clarification.

Joseph W. Doherty Mon, 12/15/2008 - 04:55
User Badges:
  • Super Bronze, 10000 points or more

"WFQ allows you to give low volume traffic, such as telnet session priority over high volume traffic, such as FTP session"

I've seen that statement too, but I'm not sure Cisco's WFQ implementation actually does so. At least in the sense the flow is prioritized.

Assuming IP Precedence values are the same, what I believe WFQ does might better be explained in this Wiki article:

In other words, what FQ does is insure each flow obtains a "fair" demand upon bandwidth although each doesn't always obtain the same amount of bandwidth nor all the bandwidth the flow might want.

Often, in the situation of telnet vs. FTP, the telnet flow obtains all the bandwidth it demands, the FTP obtains the same share that the telnet flow demanded and any excess available bandwidth that's available. This isn't really the same thing as providing telnet flow priority over FTP flow.

You asked about NBAR and DSCP. Original WFQ doesn't use either although it does change flow weight based on IP Precedence (which is also the first 3 bits of DSCP). This Cisco WFQ reference,, describes the interaction of number of flows and IP Precedence values for their bandwidth allocation of a link. Notice there's no mention of packet size or protocol.

Where packet size does impact sequencing of packets, assuming a telnet packets are 100 bytes and FTP 1500, "equal" sharing of bandwidth (just the two flows; same IP Precedence) would be to transmit 15 telnet packets for every FTP packet. If more than 15 telnet packets were in the queue and more than 1 FTP packet, you might say some of the individual telnet packets are transmitted or prioritized before FTP packets, but the telnet flow itself isn't.


I noticed, I believe, that Cisco routers appear to mark their telnet packets with IP Precedence 6. Assuming FTP only has a BE marking, WFQ would provide a larger proportion of bandwidth to such marked telnet packets vs. FTP BE packets.

For true flow priority, not just different proportions of bandwidth, you need something like PQ or LLQ within CBWFQ.

ragulan_dms Wed, 12/17/2008 - 00:29
User Badges:

Thanks for the information.

Regarding the CBWFQ, We define classes. Then there will be equivalent number of software queues automatically created. Based on the configured bandwidth, weight will be given to each class or queues.

Now I want to confirm one thing. Within one class the traffic is treated on FIFO or WFQ (ie all the session with in one class will be treated fairly)


Joseph W. Doherty Wed, 12/17/2008 - 04:02
User Badges:
  • Super Bronze, 10000 points or more

Within CBWFQ, most platforms only support FIFO within a class except for class-default which supports FQ (although I believe its actually WFQ on some platforms). Some platforms do support FQ within any class. For those, FQ might be truly FQ within the class and not WFQ.

CBWFQ weights the class FIFO queue about the same way original WFQ weigths flows (i.e. class based WFQ).

On those platforms that only support FQ within class-default, each flow in that class competes with other explicit class flows (which can disrupt minimum bandwidths for other defined classes, I believe).

You might want to examine the section "Understand Platform Differences" within Although this whitepaper is in reference to ATM, I believe CBWFQ scheduler works as described on other interfaces.

ragulan_dms Wed, 12/17/2008 - 18:59
User Badges:

Thanks for the clarifications.

If it is software based queues, then It suppose to be independent of Hardware platform. Isn't it ?

I will go through the link you have mentioned for better understanding.


Joseph W. Doherty Thu, 12/18/2008 - 04:05
User Badges:
  • Super Bronze, 10000 points or more

"If it is software based queues, then It suppose to be independent of Hardware platform. Isn't it ? "

Yes and no. What the device will support in software is often dependent on hardware. This is why FQ is common across software based routers but not on L3 switches, or why 7500s and some other hardware cards (e.g. 6500/7600 FlexWAN) offer QoS features beyond the basic QoS offered by the platform.


This Discussion