11-21-2019 05:02 PM
Hello guys,
i'am learning some courses about QoS for a project and i still dont understand the difference between the priority given to classes (AF4 or AF3 for example) and the bandwidth given with CB-WFQ on the egress.
A traffic that i gived for example a bandwidth of 512kb isn't prioritary then an other traffic that i gived 128kb ?
I just want a resume about how the priority of assured forwarding works, for that i'll give an example.
I have two types of traffic, video and SNMP, i gived video AF41 and 512kb of bandwidth, SNMP AF31 and 128kb of bandwidth.
In the case of congestion (caused by others traffics) i got finally just 512kb available on my egress, the video traffic will only pass then ? or what would happen ?
Thank you in advance,
Louey
11-23-2019 06:32 AM
Hello Louey,
If you have voice traffic, you need to use low latency queue, which is triggered using keyword priority, look at the below example:
class-map VOICE
match dscp ef
policy-map QOS
class VOICE
priority percent 20
priority percent will always reserve 20% of the interface bandwidth for voice traffic, you can specify the amount of bytes/second
now for the DSCP marking names, they are just names, EF: expedite forwarding, AF: assured forwarding, BE: best effort, etc.
you can match on whatever you want in class-map and upon the match you will do the action in policy-map, however engineers agreed on specific usage for those names, EF for voice, AF for important traffic, BE for unimportant traffic.
Beside low latency queue, CB-WFQ usually doesn't work as clearly as described and will compete for resources at the time of congestion, so if you have voice, you should use low latency queue.
11-23-2019 11:52 AM
11-23-2019 11:43 AM - edited 11-23-2019 12:00 PM
First, understand, ToS markings, alone, guarantee nothing. It's up to the transit device to examine the ToS marking and determine how it might treat traffic with one marking differently from another (which it may, or may not do).
Within the RFC that proposed DSCP markings, I recall (?) there are some recommendations. Such as, BE marked traffic is handled as named, i.e. best effort,, AFx1, AFx2 and AFx3 markings might have a difference in drop precedence such that AFx3 will not be dropped before AFx2 which will not be dropped before AFx1. Lastly, to align with the prior IP Precedence RFC, priority, high to low, will not be contrary to IP Precedence, i.e. CS1, AF1x will not have priority over CS4, AF4x. (NB: a later RFC, suggesting a "scavenger" class, using CS1, violates this.) However, assured forwarding really is a slightly different concept than IP Precedence, in that, one AF group doesn't really have "priority" over another AF group, it's more about insuring a level of service (an assurance) to the AF group. (NB: also AF avoids touching what was IP Precedence 6 and 7 as they were/are have network management implications.)
When it comes to CBWFQ, excluding the priority class(es), classes get "ratios" of bandwidth, to each other, based on their bandwidth allocation. So, for example, in your example of providing AF41 traffic 512 Kbps and AF31 traffic 128 Kbps of bandwidth, they will split available bandwidth 4:1. This assumes both are trying to use more bandwidth then is available.
Keeping in mind ratios is what's really important. Actually "obtaining" the bandwidth allocation, as defined, is only true if all (100%) the bandwidth has been defined in the policy-map, and all the classes are trying to use more than their allocation.
When you define a priority class (or classes) you define a queue that has priority over all other class queues. Since it does have this priority, it can "starve" other classes from obtaining any bandwidth. To avoid that, generally CBWFQ adds an implicit policer to the class. So, for example, if you define a priority class with 20% of the bandwidth, CBWFQ will drop traffic, in that class, when it exceeds 20% (but usually only when there's actual congestion - i.e. if less than 100% of the bandwidth is being used, priority class traffic can generally exceed its implicit bandwidth limit).
More specifically to your question:
"In the case of congestion (caused by others traffics) i got finally just 512kb available on my egress, the video traffic will only pass then ? or what would happen ?"
If you mean your logical interface only has 512 Kbps, CBWFQ should reject your policy defining an allocation of 512 Kbps and 128 Kbps.
If you mean (as you write), other traffic is using all but 512 Kbps, again, your AF41 and AF31 traffic would split bandwidth 4:1. However, CBWFQ always has a class-default. So the question is,, what bandwidth allocation has been set for that? Knowing that, we can determine how bandwidth will be allocated.
Let''s assume, bandwidth for class-default has been allocated 128 Kbps, and your link is only 768 Kbps. In that case, the allocation ratio would be 4:1:1. As such, if all 3 classes wanted more than their allocations, class-default would only obtain 128 Kbps, leaving 640 Kbps, not 512 Kbps. I.e. each of the other classes would obtain their full allocation guarantee.
If you have further questions, feel free to ask. Documentation on this can be a bit confusing, but once you really "understand" it, it's actually pretty simple.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide