7

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

  • 1
    The benefit of using CBWFQ with the fair-queue statement in the class-default queue (your second example) is packets are de-queued based on their calculated weight as you mentioned. When using CBWFQ without the fair-queue statement (your first example) packets are de-queued using the FIFO (first in first out) method on a physical interface. – one.time Dec 9 '14 at 20:14
  • 1
    I thought that CBWFQ's user defined classes are automatically behaving as WFQ on steroids. So if I understand right. CBWFQ can created up to 64 queues, one for each user defined class (with default FIFO method). And I can specify (only?) for class-default something like: "Hey men, your queue will behave as WFQ insted of FIFO!" And class-default says... "Alright, My queue will behave as FWQ, so for my traffic I will create another classes according to some CISCO algorithm." Am I right? :D – Daniel Blazek Dec 10 '14 at 7:28
  • 1
    You got it. CBWFQ uses FIFO for queuing within defined classes and the class-default queue, or if the fair-queue statement is used, the class-default queue uses WFQ (on most platforms). – one.time Dec 11 '14 at 3:33
4

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.
  • 1
    And this only applies when class-default is serviced by the queueing mechanism. – cpt_fink Dec 23 '14 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.