No need to apologize, that’s why we’re here… to answer questions!!
When such questions arise, always go back to the official list of exam topics published by Cisco. For the CCNP 350-401 ENCOR Exam the only topic that includes anything about QoS or precedence or DSCP or any related topic is 1.6:
However, Cisco’s exam blueprints are always accompanied by a disclaimer that indicates that related topics may be included in the exam that may not be explicitly listed in the topics list.
The truth is that it is not very likely that the content in this specific lesson will appear on the exam. However, because it is fundamental to understanding QoS, it’s a good idea to have at least a working knowledge of it.
AF31 is equal to 011 010. However, the value of 31 in the name AF31 does not come from the value of the bits, but from the class and drop probability. To understand this further, here’s the table once again, as in the lesson, but this time I’ve added row numbers:
AF11 is in class 1 and row 1 (low), therefore, it is AF11
AF12 is in class 1 and row 2 (medium), therefore, it is AF12
AF31 is in class 3 and row 1 (low), therefore, it is AF31
AF23 is in class 2 and row 3 (high), therefore, it is AF23
So the numbers in the AF notation denote class and drop probability.
I’m a bit confused by the answer here compared the what has been explained in this lesson.
my understanding : AF21, x=2 and y=1 so the math is 8 * 2 + 2 * 1 = 18 in decimal
and if we want to convert it directly from binary to decimal: AF21 = 010010 = 18 in decimal
so I 'm not sure how AF21 = 20 in decimal.
Please let me know if my understanding is incorrect.
Concerning your suggestion for a lesson on HQF, I suggest you visit the Member Ideas page below. There you can make your suggestion. You may find that others have suggested similar lessons, and you can add your voice to theirs.
First of all, keep in mind that IP precedence and DSCP values are those found within the appropriate field in the IP header. The 802.1Q priority field is part of the VLAN tag that is found in the Layer 2 Ethernet header. These tags are only present for frames traversing a trunk link. Each of these operates at a different layer of the OSI model.
Now both of these features can be used in QoS mechanisms. For example, the Class of Service or CoS can be derived from the 802.1Q priority field. The CoS can then be used to classify frames traversing a trunk. The frames arriving at a trunk port can then be queued and prioritized accordingly.
For the DSCP and IP precedence values, these can be used to classify and mark IP packets that can then subsequently be used by QoS mechanisms to ensure the correct prioritization.
Because DSCP/IP precedence and 802.1Q priorities are constructs that belong to different layers, and are applied and used separately, there is no direct relationship between them. However, it is possible to create a “cos-to-dscp” or a “dscp-to-cos” mapping that will allow an 802.1Q priority field to adopt the priorities indicated in the DSCP of the IP header or visa versa. You can either use a default mapping or create your own. More about this can be found in the following lesson:
I know the 1st 2 is from the class value (1st 3 bits) so 010 = 2 , then 010 will be 2 but converting to AF value we must ignore the 6th bit (i dont know why) so we use 01 = 1 then the AF value is 21
Converting to decimal i use the classic bin to dec 010010 mapping 32 16 8 4 2 1 0 so the bits mapping 16 and 2 are “ON” = 18
But i dont get the algebraic deduction of the “quick method” 8x + 2y , ive been thinking about it for several minutes and i cant get it … why the 8 as a multiplier for the first octal (class value) and the 2 as a multiplier for the 2nd octal (drop probability)
EDIT : I think i was tricked by the 1st octal, due the least significant bit isnt used , you choose the minimum least value you can get in this octal = 2, the 2nd octal however you use the 3 bits, and the min lst value is 8, if we had a 3rd octal the multiplier will be 64 x AF dec (hundred value position)… i don’t know if im right but i apologize because i guess this could be and off topic and not directly related to the QoS lesson.
Yes, you got it. Remember the structure of the DS field:
Classes range from 1 to 4 with the following possible values of the class bits:
Class 1: 001 (1 in decimal)
Class 2: 010 (2 in decimal)
Class 3: 011 (3 in decimal)
Class 4: 100 (4 in decimal)
Drop probability ranges from 1 to 3 with the three drop probability bits having these possible values:
Low: 010 (2 in decimal)
Medium: 100 (4 in decimal)
High: 110 (6 in decimal)
Now when the AF notation is used, we have AFXY, where X is the class and Y is the drop probability. However, the value used for X and Y is not intuitive. The values for X range from 1 to 4 which are the decimal values of the three-bit class field. However, the values for Y range from 1 to 3, where we use 1 for Low, 2 for Medium, and 3 for High. But these values are not the actual decimal values represented by the bits which we see to be 2, 4, and 6. And this is the reasoning behind the use of the number “2” in the formula.
As for the number 8, as you said, we use it because we use the three bits, and the minimum first value is indeed 8.
So the 8x + 2y formula works because the “y” value is not the value in decimal, but the value that corresponds to Low, Medium, and High in the AF notation. That’s why we need the “2” there. The final bit is always 0 as you can see from the table in the lesson.
Question about the Prioritization in AF classes:
Hello NetworkLessons Team,
Im a bit confused about the differences between different AF classes, for example AFxy over AFxy.
From the things I’ve read I know that first they shouldn’t be put in the same queue and second that there is no precedence over a class for example AF3y over AF2y (x = 3 or 2). But here’s the thing where I have problems understanding that. I don’t care about the y (drop probability) here atm cause I get that.
When looking at the 3 it means, that the bits 16+8 are set. So that is 24 (shortcut is 8x3). Now when doing this with a 2 its (8x2) = 16.
So when comparing those values to each other, from the decimals perspective 24 should be preferred cause its a higher value. For example with CoS a 5 is viewed “higher” then a 4 or a 3.
So for me it means, that if I would put those AF classes in the same queue…I would actually prefer AF3x over AF2x. Or is that not correct? And yes Im aware that we shouldn’t do that, but im curious.
The thing why im stumbling here is, the OCG says that the AF classes have no presedence over each other, but from a Decimals perspective they would. Or at least I think so, compared to the IPP or CoS values.
Every answer is appreciated!
Thanks in advance!
I basically think I figured it out.
Its just a recommendation of how to implement this. But in fact, its the choice of the Administrator.
The Administrator can do the policing like that AF22 is “better” than AF34 for example. It’s just that it would be against the “recommendation” in the standard. Basically the numbers don’t have any meaning unless the Administrator is giving them a meaning trought policing and other QoS mechanisms.
Yes, you got it! Assured Forwarding is simply a way of defining particular values within the DS field. Those values have recommended priorities, and in some devices, those recommended priorities are the default configuration, based on the related RFC. However, as an administrator, you can assign whatever meaning you want to each.
Remember the AF values are simply the markings that are assigned to particular packets. For QoS to operate, it must act upon those markings, and the QoS mechanisms that do so can be configured by the admin.
queues only exist when shaping, typically a parent qos policy-map shapping at CIR , then a child policy-map that has all queues. If we have 4 queues , 1 llq that is served inmediatly in case of congestion but configuring a limiit (policer), and then 3 queues passing through a scheduler, AF11, AF21, and AF31 because the first digit, AF31 (class 3) would have precedende over the other thow (AF11 and AF21) but you’ve said is a recomendation. In MQC if i want AF31 to have serving preference over AF21, how can i configure it ?
For my own understanding , one class = one queue (for ex AF11 would be only one queue) but it could have up to 3 drop values, it is also configurable ?
The values found within the ToS field of the IP header can be used for a whole series of QoS features. When used with queueing, such as WFQ, CBWFQ, and LLQ, these mechanisms tend to use the specific traffic classes by default. Some of these queues can be tweaked using MQC.
WFQ is an automatic method of traffic prioritization and does not depend upon MQC, it is essentially hard-wired. However, both CBWFQ and LLQ can be tweaked in the way they deal with each class/drop probability.
WIth CBWFQ using the class-map, you classify traffic, and with the policy-map, you can allocate specific bandwidth to that class using the bandwidth command. By setting up CBWFQ, you’re essentially overriding the default WFQ mechanism and defining your own queueing behavior. More info can be found here.
Similarly, you can adjust the behavior of an LLQ. Using MQC, you can assign any class to the priority queue and allocate a specific amount of bandwidth to it. The priority command creates a priority queue and assigns bandwidth to it. This means the designated class (whichever one you choose) will receive strict priority up to the defined bandwidth. Traffic exceeding the allocated bandwidth might be dropped if congestion occurs. More info on this can be found here.
Now beyond queuing, the ToS is used in other QoS mechanisms such as class-based marking, policing and shaping, congestion avoidance, and others, and all of these have mechanisms (via class maps, route maps, and others) through which you can granularly define how different ToS markings are interpreted and subsequently applied.
In the IP Precedence section, you had mentioned something like:
“With the old 5-bit type of service bits, you could flip some switches and have an IP packet that requested low delay and high throughput. With the “newer” 4-bit type of service bits, you have to choose one of the 5 options. Good thinking, but the type of service bits have never been really used…”
Can you tell me what the term “you could flip some switches” means?
Also can you explain why is it a problem when type of service bits 3 and 4 are set to a value of 1?
bit 3: 1= Low Delay
bit 4: 1= High Throughput.
Now, I might be wrong but I wanted to understand when Throughput is higher, the delay in forwarding a packer is lower? or am I confusing myself?
The term “you could flip some switches” that Rene used in the lesson is just a metaphorical way of saying “you could change some settings.” In this context, it refers to changing the value of the ToS bits in the IP header of a packet to request specific service characteristics. The point of the comment is that with the old way, you can actually create a scenario where you can set the priorities to have bits 3 and 4 set to 1, which is essentially an IP packet that requests low delay and high throughput.
The problem with setting both bit 3 and bit 4 to a value of 1 is that it might create a contradiction in the network. Low Delay and High Throughput are often seen as mutually exclusive in networking.
High throughput means that the network is trying to maximize the amount of data that can be sent over a given period of time, which might involve using techniques like buffering or packet scheduling that could introduce delays. On the other hand, low delay means that the network is trying to minimize the time it takes for a packet to travel from the source to the destination, which might involve bypassing these techniques and therefore reducing the overall throughput.
In an ideal scenario, high throughput would indeed mean low delay as more packets are being forwarded efficiently. However, in a real-world scenario, achieving high throughput might involve techniques that could potentially introduce delays. Hence, it’s generally considered a best practice to prioritize either throughput or delay, but not both. Does that make sense?