Benefits of Using CBWFQ with Fair-Queue Statement in Cisco IOS

ciscocisco-iosqos

I mostly seeing configuration of QoS queues based on CBWFQ, witch is tripped off by shaping map. Something like below example.

policy-map test
 class test
  bandwidth remaining percent 20
  random-detect dscp-based
 class test2
  bandwidth remaining percent 20
  random-detect dscp-based
 class test3
  bandwidth remaining percent 20
  random-detect dscp-based
 class test4
  bandwidth remaining percent 20
  random-detect dscp-based
 class class-default
  bandwidth remaining percent 20
  random-detect dscp-based      
policy-map shape-test
 class class-default
  shape average xxx
  service-policy test

Of course it's configured on appropriated interface (out).

I know about simple variant of CBWFQ called WFQ. Where I don't have to specify classes (automatic creation of classes). Yea I also know that it's done by hash from header, and each class has weight… And so one…
Almost always, I see configuration of fair-queue on interface or simply, in the default class called 'class-default'. This default-class is configured on appropriate interfaces thanks to police-map. So both ways should has same result.

But, today I saw something that made me feel jittery. I saw something like CBWFQ with fair-queue statement in class-default. For better explain, example.

policy-map test
 class test
  bandwidth remaining percent 20
  random-detect dscp-based
 class test2
  bandwidth remaining percent 20
  random-detect dscp-based
 class test3
  bandwidth remaining percent 20
  random-detect dscp-based
 class test4
  bandwidth remaining percent 20
  random-detect dscp-based
 class class-default
  fair-queue
  queue-limit 1024 packets
policy-map shape-test
 class class-default
  shape average xxx
  service-policy test

Here my question starts… It means that the guy that configured class-default with 'fair-queue', 'queue-limit 1024 packets' made from CBWFQ normal WFQ? Same as we can configure it on interface? And just specified the WFQ classes fixedly, instead of automatically specification that Cisco devices does?

But why? It doesn't look like a standard solution, isn't it?
It is possible that the man did not know what he did…

Thank you for any answer, or links that could point me to understand it properly!

DANIEL

Best Answer

To summarize my comments:

The benefit of using CBWFQ (class based weighted fair queuing) with the fair-queue statement in the class-default queue (your second example):

...
 class class-default
  fair-queue
  queue-limit 1024 packets
...
  • Packets use WFQ (weighted fair queuing) for scheduling and are de-queued based on their calculated weight.

When using CBWFQ without the fair-queue statement in the class-default queue (your first example):

...
 class class-default
  bandwidth remaining percent 20
  random-detect dscp-based      
...
  • Packets are de-queued using the FIFO (first in first out) method.