cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2154
Views
0
Helpful
3
Replies

QoS: how Diffserv priority class (AF4,3,2,1) works really ?

Louey
Level 1
Level 1

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

3 Replies 3

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.

 

Some expansion on what Ezzeldee wrote:

"priority percent will always reserve 20% of the interface bandwidth for voice traffic, you can specify the amount of bytes/second"

CBWFQ doesn't "reserve" in the sense that the bandwidth is unavailable if otherwise not being used. For example, if VoIP was only using 10%, the other 10% would be available to other traffic.

Also defining bandwidth allocations in bytes/second is (I recall?) limited to the "newer" IOS versions. (Also, BTW, bandwidth allocations are often "better' defined as percentages.)

Also, also, using a priority class for VoIP traffic is generally only critical for its "bearer" component. Its control component doesn't really need the service guarantees provided by a priority class (although often it's in the priority class too).

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

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:

Review Cisco Networking products for a $25 gift card