CCNA R&S version 3 Topics: QoS Traffic Markings

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in our last video we talked about different quality of service mechanisms and we said that one of the first things we wanted to do was to classify traffic we wanted to recognize traffic as being a certain type of traffic and then we want to mark that traffic and by marking traffic early on in its travel that saves us from having to do extensive reclassification later on the next route or the next switch it can very quickly very efficiently look at that marking and make a decision like a forwarding decision or a dropping decision based on that marking and in this video we're going to talk about those markings we could have markings that layer two we could have markings that layer three first let's consider our layer two markings this is a class of service marking that we have here layer two or a COS marking some people pronounce that a cause marking a cos and this is a three bit value and if we've got three bits at our disposal ask yourself how many possible COS values could we have well that's going to be two raised to the third power two because we have two possible binary values 0 and 1 and the third power because we have three bits that's going to give us eight possible combinations meaning that a COS value could take on any value in the range of 0 through 7 however a cisco says do not use six or seven those are reserved for network use so if we're setting something up where we want to mark our production traffic we should not go higher than a COS value of a five interestingly a Cisco IP Phone it automatically marks voice packets with AC u.s. value of a five it does that for us now these COS values what bits exactly are they altering well normally when we think of a COS value we think of a frame as it flows over a trunk we could do this over a dot1q trunk we could do this over an is L trunk now in modern networks we typically are going to be using a dot 1q trunks but for completions sake I wanted to show you how we do it with an ISL trunk as well with an 802 dot1q trunk we have four bytes that get added to our frame if we're tagging that frame we've got four bytes got tagged by its and tight control bytes and in those four bites we've got three bits in a field called the priority field and it's those three bits we use to set our COS value if we have an ISL trunk then there's a VLAN field and in that VLAN field we use three bits to give us our COS bits so over a truck is L or dot1q we have these three bits however it is possible to mark a layer two marking even coming out of a PC that doesn't have a trunk connection just coming out of a network interface card I know there are some network interface cards that can actually do a trunk but I'm talking about those I'm talking about a typical network interface card if that network interface card supports something called 802 dot 1 P or the P is for priority what this does is it looks a lot like a dot 1q trunk honestly if we look at one of those frames it adds on those four bytes like a dot 1q trunk does and the reason it adds on those four bytes is it wants to have this priority field so that we can have those three COS bits but here's the difference the VLAN ID contained in a dot one P marking is all zeros we're not saying it belongs to any VLAN we're leaving that set to all zeros but if you're Cisco Catalyst switch is configured for it and your PC supports it the network interface card in your PC sure you can mark layer two marking is coming out of your PC going into your Cisco Catalyst switch however there is a challenge think about what happens to layer 2 information when it tries to cross a router boundary think about MAC addresses for example what happens on an Ethernet network as an Ethernet frame travels through a router the source and destination MAC addresses get rewritten don't they the same thing happens with our COS values those values get rewritten to zeros that's right we've gone to all this trouble all this effort to set up appropriate cos values and then as soon as we cross through a router boundary they're back to zero again so what do we do well the good news is we can have layer 3 markings which do survive a router hop in fact many of our Cisco Catalyst switches as soon as we enable quality of service they will automatically sort of play an if-then game they'll say if your CEOs value is this at layer two then we're automatically going to set your layer three priority marking to some value and let's talk about those different layer three markings that we might have our layer three markings are going to be on our IP header and with IP version 4 there's a byte in the header that's called the toss byte the type of service byte there is a similar byte in an IP version 6 packets header call the traffic class byte and abide of course has eight bits and we're going to be able to use some bits in that byte to set a priority value every year is a really common way of setting a layer three priority marking was to use the three leftmost bits in that tossed byte and using those three leftmost bits it's a lot like cos we've got eight possible combinations and that value is called an IP precedence value 0 through 7 just like cos also just like cos Cisco says we should not use 6 or 7 those are reserved for network use that left us with only 6 usable values 0 through 5 and in some network designs we want to be more granular than that we want to have more levels of priority than just six levels so what do we do well the good news is we can use something besides IP precedents instead of using the three leftmost bits we can use the 6 leftmost bits and that's going to give us a dscp value dscp stands for differentiated services code point and by using 6 bits instead of 3 bits how many values does that give us well let's say you to raise to the power of 6 is 64 we're going to have values in the range of 0 through 63 64 different values for dscp however that's almost too many think about this let's say on my network that I declare that a value of 26 is awesome that's my favorite traffic type but on your network you might say 26 that's that's like dirt on my network there's not a relative level of priority that's the issue the good news is the IETF standards body came along and they pre-selected 21 of those 64 values and instead of having to remember a bunch of numbers they gave them names these names are called pH B's per hop behaviors and these 21 values have relative levels of priorities so if you and I both agree to use one of these pre-selected parot behaviors or a collection of parati havior x' then suddenly we do have relative levels of priority where we can have traffic traveling between our networks without getting confused about what's high priority and what's low priority in fact let's take a look at those 21 different values now each of those 21 values fall under one of four different categories here are those categories we've got default EF for expedited forwarding we have class selector and we have assured forwarding now let's talk about each of these beginning with default a default per hot behavior has a decimal value of zero so if we look at the six bits making up the dscp value yeah it's going to be all 0 so it's going to be zero zero zero zero zero zero now EF is what we should typically assign to our highest priority traffic like our voice over IP traffic traffic that's latency sensitive in fact good news our Cisco IP phones not only do they mark a COS value of five at layer two they also mark a layer three dscp value of EF for those voice packets coming out of the phone and the decimal equivalent of EF is 46 and when you're configuring your router or your switch you can enter either the name of EF or you can enter the number of 46 now it's really interesting the way the binary breaks down here the 46 in binary looks like this it looks like one zero one one one zero remember that IP precedence only took a look at the three leftmost bits in the tossed byte so here's a question for you what if this packet were intercepted by a router that only spoke IP precedents we sent it a DHCP marking but it only speaks IP precedence well it would look at the three leftmost bits in isolation if we looked at one zero one in isolation just those 3 bits what's the decimal equivalent five it's a five and we said that we did not want to have a value greater than five for any of our production traffic when it came to IP precedence so the IETF was very strategic in the way that they selected these values oh and also please keep in mind that the last digit is always zero for any of the ietf selected values all 21 of those values they're going to end in a zero if you look at the binary now class selector is designed to work in an environment where you might have IP precedence speaking routers because it is bit for bit backwards compatible with IP precedents for example let's say I had an IP precedence value of a3 even though I'm marking this with an IP precedence value of a3 what would that look like in binary if I looked at the six leftmost bits well IP precedence only marks the three leftmost bits and a3 would look like 0 1 1 but if I looked at the next 3 bits they would be all zeros wouldn't they well this value is class selector 3 we say hi selector 3 because the 3 is the IP precedence equivalent that you we say if we look at just these bits and isolation that's a 3 what is the decimal equivalent of this let's figure it out let's put a 1 and a 2 and a 4 and an 8 and a 16 and a 32 and let's add up all the columns that have a 1 under them so we've got a 16 plus an 8 that's 24 that's it so class selector 3 written as CS 3 that equals a decimal value of 24 and there are seven of these class selector values there is CS 1 all the way through CS 7 now there's not a CS 0 because that would be the same as default now there are 12 assured forwarding values in fact let me show you another graphic that breaks down those 12 values here we see those 12 different assured forwarding pirat behaviors we're going to assign a default pirat behavior to our best effort traffic we're going to sign an expedited forwarding prop behavior to things like voice things with really high priority very low latency needs but for the remainder of our traffic types maybe video maybe different types of data we're going to assign probably a class selector value or an assured forwarding value and notice that the assured forwarding values that we see here are written like this we had have a F for shirred forwarding and then we have a couple of numbers like two one as an example that's the way we write and assured forwarding value now let's take a look at this first number the two the two tells us the class of this assured forwarding value notice that we have four classes 1 2 3 4 what does the class mean the class is the IP precedence equivalent value in other words if I pack it with a value of a of 21 went into a router that only understood IP precedence that router would see this packet is having an IP precedence of two the first digit is the IP precedence equivalent value so what's the next digit the one or the two or the three well that is the drop probability in fact I'm going to explain even further later on in this video but when there is congestion occurring in our queue if we have weighted random early detection enabled WR IDI we talked about that just a bit in the prior video if weighted random early detection is enabled then to prevent that queue from filling up from filling to capacity we're going to start throwing away some of our packets and the higher the drop probability the more likely a packet is to be thrown away we're going to start throwing away things in this column high drop probability before we start throwing away things in this column with a medium drop probability and we're going to throw away packets with those markings before we ever start throwing away packets marked with a low drop probability and is the queue depth is the number of packets in that queue increases the probability of discard begins to increase and I'll show you a graph of that just in a few minutes but this is not intuitive check this out I'm going to just randomly pick some applications and assign them to different parappa Havers let's say that an a f11 I'm going to mark my telnet traffic with a f11 maybe a f3 one I'm going to mark my video with that maybe a f23 let's see what I'm going to mark with that maybe that's going to be my e-commerce traffic now here's the question if our queue is starting to fill up if it's getting congested who gets thrown away first is it going to be video is it going to be our e-commerce traffic is it going to be our telnet traffic actually it's going to be our e-commerce traffic not because this number of a f23 not because that number is greater than a f31 it's not 22 is less than 26 but it's in this column it's in this high drop probability column and that means that it is going to be discarded earlier than any of the numbers in the medium draw a probability column and that's going to be discarded before any of the numbers in the low drop probability I know that's not intuitive but here's the way it works I could have my super important traffic here with a F 43 but it's going to be discarded before my lowly telnet traffic over here simply because it's in that column now let's see how the binary works a F 21 if I say a F 2 1 the 2 we said is the IP precedence equivalent value so let's write that out those are three bits a 2 represented in three bits is going to be 0 1 0 the next two bits dictate this value if it's a 1 it's low drop probability if it's a 2 its medium drop probability if it's a 3 it's high drop probability now with 2 bits we can represent a 1 as 0 1 and we said for all of these ietf defined pirat behaviors the sixth bit is always always always going to be a zero so we'll put a 0 right there that's a F 21 in binary what is it in decimal I don't know let's see let's add our column headings 1 2 4 8 16 32 let's add up the columns that have a 1 under them we've got a 16 plus a 2 this is 18 so we could say that a F 21 is 18 and our router our switch it will take either the number or the name in fact you see right here this is the decimal equivalent for a F 21 now I want to make sure that you know how to do this conversion so let me give you a couple of exercise I want to make sure that you know how to convert between a prop behavior name and it's decimal equivalent let's take a look at a couple of examples I'll just make these up off the top of my head let's say I have an AF 41 that's the perab behavior my challenge to you is to tell me what is the decimal equivalent of that and you might want to pause the video and work through the math and then we'll come back and do it together all right did you come up with an answer let's go through it together remember the three leftmost bits make up a four if we represent a four with three binary bits that's going to look like one zero zero the next digit is going to be represented by two binary bits and a one is represented by a zero one and then we said the sixth bit in all of these ietf selected prop behaviors it's going to be a zero so there it is in binary now what is that in decimal let's make our column headings one two four eight sixteen thirty-two let's add it up thirty two plus two thirty four let's see if we can go in the opposite direction what if I said you've got a dscp value of a forty could you tell me what the parot behavior name is that corresponds to 40 if there is a parappa havior name that corresponds to 40 remember there are only twenty-one values out of those 64 that have names you might want to pause the video and see if you can figure out the corresponding perkupp behavior name for 40 okay let's walk through this together let's represent 40 and binary using six bits let's make our column headings we've got a 32 and a 16 and then 8 now for a 2 and a 1 I'm going to have a 1 here under 32 and then I'm going to have 0 under 16 a one under eight everything else is going to be a 0 let's see if this adds up 32 plus 8 yeah that's 40 so this is 40 in binary now what sort of peratt behavior is this well I'm noticing that the 3 rightmost bits here are all zeros this looks exactly like an IP precedence value doesn't it remember the parot behavior that was bit 4-bit perfectly backwards compatible with Ivy precedence yeah it was clie selector I think we're looking at a class selector value so the question is which one well the class selector value is going to have a name that comes from the IP precedence equivalent value which is the three leftmost pits what is 1 0 1 in binary if we look at those 3 bits in isolation what is that in decimal also 4 plus a 1 it's a 5 I think we're looking at a cs5 value and now that we've gone through a bit of the math I want to take just a few moments at the end of this video and explain what I was talking about specifically when I said that we had low medium and high drop probabilities with different assured forwarding pirat behaviors we mentioned earlier that an output interface can have a chunk of memory that it uses to store up packets and it's not able to send at the moment there's not enough being with well I can just put those packets temporarily hopefully very temporarily in this buffer or a queue however it's all by finite size it can only hold so many packets and we have some really ugly side effects when we fill to capacity and we start to overflow our queue we talked about this in the prior video remember my analogy with Spock from Star Trek to the Wrath of Khan well here's what we can do to prevent that queue from ever filling to capacity we call this congestion avoidance what we can do is use something called read random early detection well specifically we're going to use in the Cisco world weighted random early detection but to understand weighted random early detection let's first talk about the industry standard random early detection or read this is our output queue it's only going to hold so many packets and let's just make up a number let's say it'll hold 64 packets in the queue what we can do is set some thresholds we can say that the minimum threshold might be 20 20 packets and the maximum threshold might be 38 packets just making those numbers up what this read is going to do is say I'm not going to discard any traffic until I exceed this minimum threshold but once I exceed once my queue depth gets beyond this 20 then I'm going to introduce the possibility that occasionally randomly I'm going to throw away some traffic and the probability of discard is going to get greater and greater and greater until I hit this maximum threshold after that I'm definitely going to be throwing traffic away I'm not going to allow it to go over the maximum threshold so anybody over the maximum threshold they get discarded now what Cisco did is they enhanced this concept of random early detection by looking at the marking of our packets those Kleist selector markings those assured 40 markings EF default all those markings in Cisco IOS have default read profiles that's right they each have their own minimum threshold they each have their own maximum threshold they each have a parameter that's going to influence the probability of discard in fact that's why we had those three columns when we looked at those 12 assured forwarding values we had the low the medium high drop probability let me show you exactly what that meant we can visualize weighted random early detection like this here on the y-axis is our probability of discard the higher we go the more likely we are to throw away a packet along the x axis we have the average queue depth how deep is the queue getting and let's say that we have a minimum threshold of 25 packets for our high drop probability traffic let's say that we have a minimum threshold of 30 packets for our medium drop probability traffic and a minimum threshold of 35 for our low drop probability traffic now what's going to be high drop probability it's going to be a F 1 3 2 3 3 3 4 3 everything then Zana 3 is going to have that same high drop probability what's going to have the medium drop probability anything that ends in a to a of 1 - 2 - 3 - 4 - low drop probability that's going to be a F 1 1 2 1 3 1 4 1 and notice that the probability of discard is increasing as the queue depth gets deeper and deeper and once we cross this maximum threshold at which point the drop probability is 25% in our example once we exceed that maximum threshold suddenly we go up to a 100% probability of discard we're definitely going to throw traffic away if it exceeds that maximum threshold however just to wrap up this discussion I want to let you know about a way that we can hopefully prevent this aggressive discarding of traffic remember that we've got a toss bite we've got 8 bits and we're only using 6 of those bits to mark our dscp marking what if we did something else with those other two bits well we can do that it's called explicit congestion notification here's what we can do with those last two bits in the tossed byte bits 7 & 8 we're using the first 6 bits for dscp markings what we can do a 7 & 8 is to inform the other side to inform the other device that we're communicating with it I'm getting a little congested and I really rather not throw your traffic away but I will if you don't slow down so what ecn what explicit congestion notification does it's going to use these last two bits to say to the other side would you please slow down would you please voluntarily go slower so I don't have to discard packets coming from you here's the way it works both ends of this link need to be enabled before explicit congestion notification if they're not enabled then these lies to bits and the toss bite they're going to be sent to zeros the router is not going to be capable of doing ecn or it's not configured to do ECM if those bits are zeros if they're either set to 0 1 or 1 0 you can think of those synonymously that means yes I speak ecn I'm capable of doing ecn but I'm not currently experiencing congestion no need to slow down now if I do want the other side to slow down what I can do is set those last two bits in my toss byte to 1 1 and by doing that I'm asking them to voluntarily slow down to transmit to me less aggressively so my cue doesn't fill up and I don't have to start throwing things away that's a way that we could hopefully prevent weighted read from discarding packets that it would otherwise discard all right that is a very extensive look at a really important quality service concept just to sum up we said that we could do marking both at layer 2 and at layer 3 at layer 2 we had a class of service marking we could mark on a dot1q trunk we could mark on an ISL trunk or if our network interface card and our switch were configured for it we could do dot 1p marking we could set a layer to marking without even going over a trunk we talked about two different types of layer 3 markings IP precedence markings and dscp markings we said because of the granularity we get we prefer dscp markings and there are so many markings we typically don't use the numbers in the range of 0 through 63 we use one of the 21 pirat behavior values that the IETF standards body was kind enough to select for us and we went through some binary exercise he's seeing exactly what those numbers meant and finally we talked about how we were giving different levels of drop probability to different markings
Info
Channel: Kevin Wallace Training, LLC
Views: 51,748
Rating: undefined out of 5
Keywords: quality of service, qos, dscp, ip precedence, ccent, ccna, ccna certification, ccent certification, icnd1, icnd2, ccna 200-125, ccna 100-105, ccna 200-105, ccna training, ccna training video, ccna version 3, ccnav3, #kwtrain
Id: Di6l-yCYGWA
Channel Id: undefined
Length: 26min 25sec (1585 seconds)
Published: Tue Dec 13 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.