cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3217
Views
38
Helpful
35
Replies

CBWFQ/LLQ Bandwidth allocation question, please help

blackladyJR
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

35 Replies 35

marikakis
Level 7
Level 7

Hello,

The class-default gets 25% of configured bandwidth (using 'bandwidth' command) by default in both cases.

When you use the 'percent' option, all bandwidth values of all other classes can sum up to the 75% of configured bandwidth. The 75% includes any bandwidth assigned to any LLQ. So, to find out how much you can assign to non-LLQ classes you subtract the LLQ bandwidth from the 0.75*bandwidth, and what is left can be assigned to other classes. The percentages for those non-LLQ classes are expressed as a percent of the 'bandwidth' setting of the interface. But, because you subtract LLQ assignment, the percents configured can only sum up to 75% of total bandwidth only in the case where you have no LLQs.

Because the above described calculations are a bit of a headache, the 'remaining percent' can act as a pain killer. When you use the 'remaining percent' option you say 'OK, class-default you can get your default. And you LLQ, you can get your guarantee. Whetever remained I won't calculate it. I will just say what percent of the remaining bandwidth can be assigned to the rest of the classes'. This means that now we are considering percentages not of the configured bandwidth, but of the remaining, after we subtract class-default and LLQ. Because those are percentages of the remaining bandwidth, the percentage values can add up to 100%, but 100% of the remaining bandwidth (not the total bandwidth available).

This basically means that you should have also subtracted class-default (not only LLQ) to find out how much the remaining bandwidth actually is. Also, note that when we say that class-default gets 25% by default, we mean 25% of the total configured bandwidth.

Kind Regards,

M.

Hello,

Thank you for your reply. So if I understand you correctly, the remaining percent command does not include Default class value. So 100% is just all the AFxx.

To use my original example to clarify,

we have Interface at 1536k, using cisco default 75% rule. LLQ=128. 1024k=AF41, 384k=Default, my policy-map should be like this:

policy-map test

class EF

set ip dscp ef

priority 128

class AF41

set ip dscp af41

bandwidth remaining percent 100

class class-default

Is this correct? So the Default class does not participate in the bandwidth remaining percent value at all where 100 is correct to use instead of 73.

I can't find anywhere in the website to mention the remaining percent exclude the default class. It clearly states excluding the LLQ though.

thank again,

Joyce

Hello,

Yes, this is correct and has an inherent simplicity. I read this on the Cisco QOS exam certification guide while I was preparing to take the QOS exam. This book can help you (with the examples contained therin) clarify many QOS-related issues that are not explained very well in other places.

You are right that excluding class-default is not explicitly mentioned. It is rather implied. I mean, with the 'percent' option you subtract class-default from total bandwidth and the remaining 75% includes LLQ bandwidth. The 'remaining percent' option further excludes the LLQ (that's the new thing), so we are clean to go and calculate bandwidth assignments for other classes without requiring to think about LLQ and class-default.

Kind Regards,

M.

BTW:

I think a bigger advantage of using remaining percent, less chance the policy failing on an interface if someone changes max reserved.

Also, on newer IOSs, you can use a percentage for LLQ's priority statement. (Also newer IOSs support CBWFQ percentage based shapers/policiers within classes, too.)

Hi Maria,

Thank you very much. May I have the name of the book that you mentioned that has good QoS examples?

From our discussion, bandwidth remaining percent is only applicable to the AFxx class that excludes LLQ and Default. However, when I am configuring the default class, it has the bandwidth remaining percent "available" as the command to enter. So would this be odd then if this is not supposed to apply to the default class but yet the command is available?

Hi Joyce,

I am not sure. This might be a hardware/interface specific issue (QOS is sometimes very hardware specific despite the abstractions). I am thinking this because I recall reading somewhere that the max-reserved-bandwidth command (which is to blame for the 75%-25% rule) is not supported in some cases (I think it was frame-relay). What you mentioned would make sense in the case where no bandwidth is implicitly assigned to class-default.

Joseph, thanks for participating and good point you made. I hope you or somebody else can go further with this case, because I have to get prepared for my Networkers in Barcelona trip and I am running out of time :-)

Kind Regards,

Maria

[Edit] p.s. I forgot to say about the book:

"Cisco QOS Exam Certification Guide", Second Edition, by Wendel Odom and Michael J.Cavanaugh

The class-default is a special case. When you explicitly define bandwidth it behaves much as the other classes do.

Maria first post's statement "The class-default gets 25% of configured bandwidth (using 'bandwidth' command) by default in both cases. " is a bit misleading, it's a bit more complex. From Cisco (http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfconmg_ps1835_TSD_Products_Configuration_Guide_Chapter.html):

"The sum of all bandwidth allocation on an interface cannot exceed 75 percent of the total available interface bandwidth. The remaining 25 percent is used for other overhead, including Layer 2 overhead, routing traffic, and best-effort traffic. Bandwidth for the CBWFQ class-default class, for instance, is taken from the remaining 25 percent. However, under aggressive circumstances in which you want to configure more than 75 percent of the interface bandwidth to classes, you can override the 75 percent maximum sum allocated to all classes or flows using the max-reserved-bandwidth command. If you want to override the default 75 percent, exercise caution and ensure that you allow enough remaining bandwidth to support best-effort and control traffic, and Layer 2 overhead. "

Although it addresses ATM interfaces, you might also want to read this whitepaper: http://www.cisco.com/en/US/tech/tk39/tk48/technologies_tech_note09186a00800fe2c1.shtml

In the foregoing paper, take special note on how class-default FQ is scheduled on most platforms (which is why I believe using FQ with non-LLQ classes on those platforms doesn't preserve those class's minimum bandwidth guarantees).

Hi Joe,

Hm...now I am back to step one. In fact, I have read those two document prior posting the original question.

So I am now confused about whether I should include or exclude Default class in the bandwidth remaining percent of the 100% calculation.

So is 73 correct or 100 correct in this scenario:

Interface 1536, cisco default 75%, LLQ 128k, AF41 use all available which is 1024k, Default class 384k (which is 25% of 1536).

So in my policy-map, should the AF41 class be defined with bandwidth remaining percent 73 or 100?

And you have mentioned class-default is special case and different when it explicit define bandwidth. Can you explain the difference when it explicit define bandwidth vs not explicit define bandwidth using my scenario bandwidth value above?

thank you so much for your assistance.

Joyce

"So in my policy-map, should the AF41 class be defined with bandwidth remaining percent 73 or 100? "

100% (if using remaining)

"And you have mentioned class-default is special case and different when it explicit define bandwidth. Can you explain the difference when it explicit define bandwidth vs not explicit define bandwidth using my scenario bandwidth value above?"

If you define class-default with an explict bandwidth, you would treat it as aother class.

From other posts of mine (made today and tested on a 2811 running 12.4):

With default max reserved:

policies that should be "legal":

policy-map x

class x

bandwidth percent 75

or

policy-map x

class x

bandwidth percent 75

class class-default

or

policy-map x

class x

bandwidth percent 75

class class-default

fair-queue

or

policy-map x

class x

bandwidth percent 74

class class-default

bandwidth percent 1

or

policy-map x

class class-default

bandwidth percent 75

or

policy-map x

class x

bandwidth percent 1

class class-default

bandwidth percent 74

The prior all use percentages, but hopefully they show how the bandwidth can be partitioned between classes especially when using class-default in different ways. Remaining percents (not tested) should, I believe, all classes can sum to 100 rather then max reserved (default 75%). Router should not accept policy that oversubscribes bandwidth reservation regardless of whether they're explict in Kbps, or percentages.

Hi Joe,

Thank you for your help. I still have a little bit not sure.

For bandwidth remaining percent, the bandwidth remaining needs to add up to be 100% (excluding both LLQ and Default).

So Scenario A:

policy-map x

class ef

priority 128

class af41

bandwidth remaining percent 100

class class-default

So is it correct that my default class has 384kbps in above configuration? i.e. 1536k interface value, 128k LLQ, 25% of 1536k = 384k.

So My LLQ = 128k, my AF41 = 1024k, my Default = 384k

Question:

1. is above correct?

2. If somehow I want to explicit define default class bandwidth, what should I use?

choice: a) bandwidth 384?

b) bandwidth percent 25?

c) bandwidth remaining percent (not valid)?

Is 2(a) and 2(b) are both correct? Or will both are not possible that we can't mix and match that we already use "remaining" in AF41 so we can't use 2(a) or 2(b) in the default class? Is 2(c) an invalid choice (i.e. default class should never configured with bandwidth remaining percent since it is excluded from this command calculation?

Scenario B:

If I want to use bandwidth percent, should it look like this?

policy-map x

class ef

priority 128

class af41

bandwidth percent 66

class class-default

OR

policy-map x

class ef

priority 128

class af41

bandwidth percent 66

class class-default

bandwidth percent 25

Will these two policies produce the same kbps? (ie. af41 = 1024k, default = 384k)?

From your above one of the policy:

policy-map x

class x

bandwidth percent 74

class class-default

bandwidth percent 1

I don't understand this one, as if we defined default class with 1 percent. Then where is the 25% go? will that means the default class gets 26% (25+1)? This policy map assumes there is no LLQ, just one class and one default class.

thank you so much again for all your help.

Joyce

"For bandwidth remaining percent, the bandwidth remaining needs to add up to be 100% (excluding both LLQ and Default)."

Needs, no, but the sum of all classes using remaining percent can not exceed 100%.

(Scenario A) "So is it correct that my default class has 384kbps in above configuration? i.e. 1536k interface value, 128k LLQ, 25% of 1536k = 384k."

I don't believe that's correct for two reasons. First, class-default without an explict bandwidth statement counts on the bandwidth that's been set aside by max-reserved (default 25%). Unsure, and perhaps unlikely, this means the class class-default is guaranteed that bandwidth. Second, FQ within class-default precludes, I believe, class bandwidth guarantees except for LLQ.

(Scenario B) "Will these two policies produce the same kbps? (ie. af41 = 1024k, default = 384k)? "

No, they are very different I beleive. First, when you use an explicit bandwidth statement with class-default it becomes FIFO. Second, I believe it now allocates its bandwidth statement within the same context as other explicit class bandwidth assignments.

"I don't understand this one, as if we defined default class with 1 percent. Then where is the 25% go? will that means the default class gets 26% (25+1)? This policy map assumes there is no LLQ, just one class and one default class. "

The (default) set aside 25% bandwidth is available to both class x and class class-default, and, I believe, other CBWFQ internal queues. (If you look at queue conversation numbers for CBWFQ, you'll find not all are assigned to user defined classes or, I believe, class-default FQ queues.)

Joe,

First of all, very appreaciate all your help and I will sure rate on your post :)

Sorry for taking so long to reply because I was so confused and trying to digest your answers and went to read more before reply.

I think I have a wrong understanding all along, now that after reading your most recent post, here are my questions to see if these are correct?

I try to post all my questions and it runs our of character, so I split the message in two:

Under Cisco standard 75% rule as our assumption:

1. If I don't explicit define "bandwidth" in default class, then there will be 25% of the interface reserved for routing overhead + "default class" to use.

So if we use the same e.g. T1 = interface, 128k = voice.

policy-map x

class ef

priority 128

class af41

bandwidth 1024

class class-default

fair-queue

So for not explicit define bandwidth in default class, then we should have 25% x 1536 = 384k for default class.

so that's how we leave with 1024k for AF41 to use. (1536k - 384k - 128k = 1024k).

Is this correct?

2. Now if I explicit define bandwidth for default class, does that mean now I no longer have that 25% for default class anymore. Still staying at cisco default 75%, does that mean now if I want to explicit define bandwidth for default class, then I need to use part of the 1024k that was previously all for AF41, now it needs to share with default class?

policy-map x

class ef

priority 128

class af41

bandwidth 640

class class-default

bandwidth 384

So that means my AF41 only has 640k left if I still want to have default class to have 384k. That means there is that 25% hidden 384k is now used for routing overhead ONLY. The default class no longer can tap into that 25% to use but instead tap into the AF41 bandwidth to split it.

Is this correct?

3. If #2 is correct, that mean if I ever want to explicit define default class, then I should change the cisco default and change it to like 95%, so just leave 5% of those routing overhead. So in our e.g , now it becomes:

1536 x 0.95 = 1460

voice = 128

so AF41 + Default = 1460 - 128 = 1332

So if I still give 384k to Default, then my AF41 now has 948k instead of 640k in case #2 and instead of 1024k in case #1.

Is this correct?

Question 4 is a separate message....

#1 yes (or at least that's my understanding)

#2 yes, class af41 and class-default would split the reservable 75% (1024), and 25% is still set aside, but, no, it's not just for routing overhead.  The 25% could be used by class af41 or class-default if not otherwise being used.  (Normal class bandwidths insure a minimum they don't cap.)

#3 no, because again, other classes can usually use available bandwidth.  For instance given:

policy-map x

class ef

priority 128

class af41

bandwidth 8

class class-default

bandwidth 8

And still assuming a T-1, any class could use the whole link's bandwidth if it's available.

Second half of the message starting question 4....

4. If #3 is correct, then how do I configure the policy to reflect to above value in CASE #3 e.g. by trying all 3 methods?

4a) policy-map x

class ef

priority 128

class af41

bandwidth 948

class class-default

bandwidth 384

4b) policy-map x

class ef

priority 128

class af41

bandwidth percent 62

class class-default

bandwidth percent 25

(Note: 62% = 948/1536 and 128k voice is equivalent to 8% 128/1536. So when we add them together we get 8%+62%+25% = 95% which is the max reserved bandwidth) so 5% is the overhead that we don't see in the policy.

4c) policy-map x

class ef

priority 128

class af41

bandwidth remaining percent 71

class class-default

bandwidth remaining percent 29

(note: Case #4 is when we want to explicit define bandwidth for default class and also changes max reserved to 95%.

I remembered Maria says "bandwidth remaining percent exludes LLQ and default", will this statement only true when we don't explicit define bandwidth for default class?

that means if I am explicit to define default class to give 384k to that class, then will 4C be correct as 384k/1332k = 29%.

1332k = (1536k X 0.95) - LLQ 128 = 1332k

So 1332k is the remaining bandwidth for both AF41 and Default to use when we "explicit" define default class.

So in this case AF41 + Default = 100% if I want 948k AF41 and 384k Default so 71% and 29%.

is this correct?

4d) Now if we don't explicit define default, and if I have the max reserve still set to 95%, then that means my default now will NOT be 384k anymore, it will be that 5% along with routing overhead.

So that means the entire 1332k is available for AF41 now.

so the policy will be:

policy-map x

class ef

priority 128

class af41

bandwidth remaining percent 100

class class-default

fair-queue

So this 4d), if I define this way with max reserved 95%, will I yield 1332k for AF41 and 5% of 1536 for default class + routing overhead?

I think I have all possible scenario to try to understand the way to configure via all 3 methods and also whether we explicit or not explicit define bandwidth for default class.

I hope all the above is correct but if you find anything that is wrong, please let me know.

Again,

Very appreciated all your time to spend with me.

Thanks a lot,

Joyce

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco