# CBWFQ/LLQ Bandwidth allocation question, please help

Hello,

After reading multiple document, I have left with many question marks in my head. Can you please help to clarify?

I know by default total bandwidth is 75% for all the class defined in the policy map including voice and data (i.e including the bandwidth from LLQ). So here is the example:

Say we stay with the default so 25% belongs to default class and say we have a T1 serial so bandwidth is 1536 on the interface.

Now, 25% of 1536 is 384k. So we are left with 1152k to work with for all the voice and AFxx I assume. Say we have 128k for voice in LLQ. So that left with 1024k for all the AFxx class to use and I assume I just have one AF41 to use all the bandwidth

policy-map test

class EF

set ip dscp ef

priority 128

class AF41

set ip dscp af41

bandwidth 1024

class class-default

So i assume that will be the policy-map. If I want to define the exact above via bandwidth percent, will it be like this?

policy-map test

class EF

set ip dscp ef

priority 128

class AF41

set ip dscp af41

bandwidth percent 67

class class-default

So I am using bandwidth percent so it is the absolute percent to the interface so 1024k of 1536 will be 66.7%. So the default class still will be 25% with 384k, correct? The voice is 8.3% so when I add LLQ + AF41 + BE = 8.3+66.7+25=100% of 1536.

How about if i use bandwidth remaining percent? how would that change?

policy-map test

class EF

set ip dscp ef

priority 128

class AF41

set ip dscp af41

bandwidth remaining percent 73

class class-default

why 73? if the remaining percent is relative term to the bandwidth left after LLQ. Then we have 1536-128=1408 left for AF41 and Default class. So 1024k/1408k = 72.7% while the same 384k Default will be 27.2% in the bandwidth remaining percent perspective.

So is it correct that Default class is 25% in bandwidth percent (absolute) and it is 27.2% under bandwidth remaining percent with 128k LLQ?

So when I use bandwidth percent, when I add up the percent value of AF41 + Default is not equal to 100%. It will be 100% if I add LLQ + AF41 + Default.

but when I use bandwidth remaining percent, then the % value will be 100% when I add AF41 + Default because it is relative term of the remaining bandwidth after LLQ. So 73%+27% in AF41+BE under bandwidth remaining = 100% of 1408k.

**Correct Answer**by Joseph W. Doherty about

*8 years 2 months*ago

Got it.

From what you describe, I believe you would be much better using an explict bandwidth rather than percentages since this avoids both the original calculations and helps avoid confusion for anyone looking at it later. I.e., if CIR for AF31 is 1024 on a T1, then define its bandwidth as 1024 and insure either there's no significant volume of traffic in class-default FQ (on most platforms) or define an explict bandwidth for class-default.

I also advise, if possible, to avoid changing max-reserve since this type of the change often seems to lead to unpleasant surprises latter on.

With the cautions out of the way, I believe you calculate remaining percent as follows:

Total remaining percent is max-reserve % of link less LLQ allocations.

e.g.

using your 90% max, that allows (about) 1382 (1536 * .9) to be defined (Not "So 90% of 1536 will be 1331k." - unless my calculator is wrong). Subtract out all LLQ allocations, in your case 128, which leaves 1254. 1024 is (about) 82% of this, and that would be the value you want for AF31 remaining percent. The remaining 18% can be allocated as you chose, such a 9% for AF32 and class-default.