CB-WFQ misconceptions
Reading various documents describing Class-Based Weighted-Fair-Queueing (CB-WFQ) one gets the impression that the following configuration …
class-map match-all High
match access-group name High
!
policy-map WAN
class High
bandwidth percent 50
!
interface Serial0/1/0
bandwidth 256
service-policy output WAN
!
ip access-list extended High
permit ip any host 10.0.3.1
permit ip host 10.0.3.1 any
… allocates 128 kbps to the traffic to/from IP host 10.0.3.1 and distributes the remaining 128 kbps fairly between conversations in the default class.
I am overly familiar with weighted fair queuing (I was developing QoS training for Cisco when WFQ just left the drawing board) and was thus always wondering how they manage to implement that behavior with WFQ structures. A comment made by Petr Lapukhov re-triggered my curiosity and prompted me to do some actual lab tests.
The answer is simple: CB-WFQ does not work as advertised.
To prove this claim, I’ve started two parallel TTCP sessions: one to IP address 10.0.3.1, the other to IP address 10.0.3.2. This is what show policy-map interface command displayed after a minute:
a1#show policy-map int ser 0/1/0
Serial0/1/0
Service-policy output: WAN
Class-map: High (match-all)
5996 packets, 3424386 bytes
30 second offered rate 200000 bps, drop rate 0 bps
Match: access-group name High
Queueing
Output Queue: Conversation 73
Bandwidth 50 (%)
Bandwidth 128 (kbps)Max Threshold 64 (packets)
(pkts matched/bytes matched) 5981/3421234
(depth/total drops/no-buffer drops) 4/0/0
Class-map: class-default (match-any)
516 packets, 270445 bytes
30 second offered rate 6000 bps, drop rate 0 bps
Match: any
The printout clearly demonstrates that the TCP session in the High class got way more than its allocated share while the TCP session in the class-default got 30 times less bandwidth.
Conclusion
The conversations in the class-default are treated as low-priority conversations and get significantly less bandwidth than other traffic classes.
class Others
bandwidth percent 50
!
policy-map WAN
class High
bandwidth percent 50
class Others
bandwidth percent 50
ip access-list extended Others
permit ip any any
Regards,
Erik
I think that you can do the following now:
policy mypolicy
class Aclass
bandwidth percent 50
fair-queue
class class-default
bandwidth percent 50
fair-queue
But the results and comment helped me to for my exam.
Thanks Ivan
So on 12.4(22)T onwards, CBWFQ has kind of inbuilt policer (somewhat like LLQ)
12.4(22)T onwards support Hierarchical Queueing Framework (HQF) feature.. In HQF images, flow-based fair-queues, configurable in both user-defined classes and class default with fair-queue, are scheduled equally (instead of by Weight). By default, the class-default class receives a minimum of 1% of the interface or parent shape bandwidth. It is also possible to explicitly configure the bandwidth CLI in class default.
few more details/results given on my blog -
http://eminent-ccie.blogspot.com/2009/09/qos-congestion-management-demystified.html
http://eminent-ccie.blogspot.com/2009/11/cbwfq-and-llq-revisited.html
cheers
Swap
#19804
My explanation was -
ON HFQ images i.e. 12.4(22)T and onwards, class "with bandwidth" keyword have an inbuilt-policer applied
and the class "without bandwidth" have implicit bandwidth reservation..
yes they are totally different as both are polar points and apply to different classes...
anything missed? you'll like to elaborate.
Thanks.
P.S: i'm lost in my empirical labs based on your MPLS architecture stuff for SP lab :)
Mike
On the other hand, "priority" command will absolutely cut-off at the configured bandwidth but that makes it LLQ. 8-)
...However if you ran 2 simultaneous TCP sessions during your test, after a few "moments", shouldn't the behavior of TCP (slow start, round trip time measurement, congestion window, and all the stuff like that... I'm not an TCP expert ;) ) equal balance the throughput of both TCP sessions?
Can't go past any QoS discussion :) Here is the summary of the "research" i did back in days on CBWFQ (classic)
http://blog.internetworkexpert.com/2008/08/17/insights-on-cbwfq/
Back then i tried to do some "reverse engineering" on CBWFQ, to show how exactly it adapts the classif WFQ weighting formula. Right now i'm trying to come with a similar writeup on HQF, though it significantly tougher - they hide all "implementation-dependent" details now.
As it can be seen, CBWFQ really treats class-default "poorly", even with fair-queue enabled. Cisco never clarified that misconcept, and I personally had some real-life issues with it :)
Now as mentioned earlier, Cisco made a code change to the ISR/7200 QoS code starting in 12.4.20T finishing in 12.4.22T. This code change eliminated the WFQ option in the class-default and now allows for FQ to be enable in any non-priority class in conjunction with the bandwidth command. This change makes the queuing behavior more like the 7500, flexwan and SIP200. :-D
I agree with your "lesson learned", it's just another way of saying what I did. I was simply pointing out that the "common wisdom" on how CB-WFQ works (and what the default behavior is) is plain wrong, so I don't understand precisly why it seems you're somewhat cross with me.
As for HQF: if you browsed through the list of "related posts" (just below the article text), you'd find links to the HQF tests I did (and if you had read them, you'd have discovered I adore HQF).
About the depth which is 4...what is the reference on the output why you mentioned it is congested?
Thanks a lot