QoS Overview | Cisco CCNA 200-301

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] [Music] [Music] there must be constant different [Music] and welcome everybody holy cow it's great to have you here um it is Sunday CCNA Sunday I'm Keith Barker if you're new to this channel oh my gosh so glad to have you we do live streams periodically at least once a week sometimes three and our focus today is gonna be on the concept of QoS quality of service and also stay tuned after the this live stream will cut off formally save that for YouTube for later ingestion and then ingestion for later consumption and then we'll stick around for those of you who are in the live stream and we'll have some Q&A after 4:00 yesterday we stayed for quite a while I had a great time so we'll do that afterwards all right our focus today and also have a new camera that I'm testing out so um I always like learning always continuing to try to improve and do better so I've got a new camera right there and I'm still dialing in the lights and I think the secret every day if we just make small steps in the right direction we can be very successful and get to our goals I just talking to Jeff Kish who's a dual cci a great guy he streams and he's gamer I was amazing anyway I was chatting with him and he said that what he does which is a great strategy he says Keith I just list like 5 or 10 things that I want to do or accomplish or get done and then I'll just tackle like one or two of those every week or when I have an opportunity and he's going in the right direction so whether it's a certification or getting better at something just take the steps and it's okay to make mistakes because you make mistakes they're not life-threatening hopefully and then you can continue going on in your journey alright our focus today is QoS quality of service it is certainly a topic on the blueprint for Cisco certification for CCNA and so let's go to a whiteboard and talk about a couple problems and then we'll talk about some solutions for it and the objectives also I want to point out that the objectives for this live stream in this recording are two basic things and have my nose to keep us on track number one I'd like us to identify what is the problem with some apps as they communicate over a network for example email is an application that we can use this sends email back and forth things like these like we're doing live streams that's certainly an application if we're having a to a phone call over an IP network that's certainly another application of the network so what are some of the problems that come up with those and then how do we solve those those are the two things I like to tackle in this and focusing on QoS as one of those solutions so let me grab a pen and here it is here we go then all right so let's imagine we've got a user and I'm gonna put Gus at this computer right here Gus is what a creek you know what I just enjoy meeting so many people and occasionally occasionally there's just just people that you meet where I don't know there's just so authentic and real and nice and that's why I want this channel to be all about is about people helping other people so Gus I'm using you in this example as a tribute to say thank you way to go all right so here's Gus at this computer and Gus is gonna communicate with device over here in the branch office so we'll put I'm gonna put in here hello James James is in the queue James James is in the house all right so this is James and Gus and they are gonna have some communication over the network and let's imagine it's file sharing great so we're do file sharing between Gus's computer and James now if we're using file sharing if we were to draw inside of Gus's computer here if we were to take a look at the protocol stack so this is the tcp/ip protocol stack at the application layer up here Gus is now hmm I wonder I wonder what your application Gus is going to use for the file transfer we could do it via HTTP there's options for that with that protocol or we could use a protocol called FTP File Transfer Protocol so that's an option let's use that option so if we're using FTP Gus has a james has a server over here or some software running on his computer acting as an FTP server all right sounds great and then it has an FTP client and he is going to transfer a file from his computer or to James computer whoever had the branch office now we'll talk about this connectivity in here in a second so if we're using FTP FTP is an example of an application layer service so at the application layer of the protocol stack the application Air Services FTP and the the software this is important the software that that Gus is using at this computer is a program that is using the FTP application layer service so maybe he has a secure FTP or some other application and he he points to Gus's r2 James machine and he says send this file and at the application layer it would use the FTP application there's Services of the network and then the network next layer is the transport layer output over here to make it consistent so the transport layer FTP is an application layer service that uses TCP at layer 4 so if we were to take a look at a protocol analyzer it would show us that TCP is being used at layer 4 and then at layer 3 which is the network layer we're gonna have IP information so from Gus's perspective say Gus is at 10.16 0.10 hopefully it's okay I guess and James you're gonna be over here at put you in a different subnet let's put you on so let's say so this last 24 and let's say James is over here at 10.16 dot 1.0 I'm sorry you can't have zero for your last octet if it's a 24-bit address so will will give you dot two and we'll say slash 24 so what that means if we are going to dissect that that means that Gus is on the network 10 16 zero based on this mask and public service announcement join us first the subnet Saturdays and they're all about IP addressing all right now that said let's go ahead and continue here so Gus is on the 10 16 0 Network his host ID is 10 and James is up here on the 10 16 one network based on this mask and his host addresses dot 2 on that network fantastic so Gus and James have each other's IR Gus has James IP address maybe got that from DNS DNS is a great option to disk the lair to address are the HP address behind the name or maybe we used something internal or maybe just Gus just knew that IP address' and so in the IP packet Gus is gonna put his source IP address in the IP header and James destination IP address in the IP header before he sends the packet now next we are on let me change that color just make it consistent here next before Gus sends that packet on the network he also needs to make sure he includes layer 2 information and that's the data link layer so this is layer 2 that's layer 3 so layer 2 is all about layer 2 addresses and so since Gus is on an Ethernet network over here Gus is going to include the source gusset let's see here Gus source MAC address and so that source MAC address would be put into the frame and he would put the destination MAC address and this is where it gets tricky because inside of this layer 2 frame now I know there's many of you in the in this in the live stream right now which I'm very grateful for by the way who already know the answer to this question so if you would chat it in I will take a peek over that what would Gus insert as the destination layer I said Gus this computer what would he insert as the destination layer 2 MAC address in the frame so at IP it's gonna be the layer 3 address of Gus destination is gonna be the layer 3 address of James but what is Gus going to use as a destination layer to address for the MAC address and I'm gonna pause just for a moment there's a little teeny bit of a buffer like maybe five to eight seconds between the time I speak and by the time it shows up on your screens and so then there's also response back so my question is what is the layer 2 address oh right all right HK and Michael and Karthik and Rob oh I'm having a moment here cuz you're spot-on all those comments are saying yeah the layer 2 destination address is going to be Gus's default gateway to get off that local segment and that's spot on layer 2 addresses are only in that VLAN and so Gus did this essence computer said okay I need to send this packet layer three packet to a device on a different network so if we look at the topology Gus is on Network Ten 16-0 he knows that he's trying to reach ten sixteen one at different Network and as a result he needs to send it to his default gateway for forwarding and so Gus is gonna add the layer to address of his default gateway and I love it that many of you said yeah and they actually told what was it so if this is gig zero zero on r1 the layer two decision MAC addresses can be that interfaces MAC address okay now for bonus points for bonus points how in the world does Gus if he doesn't already if this computer doesn't already know it how does Gus's computer know what the layer to address is of gig zero zero on router one his default gateway how does he learn that it's a good question because all these pieces have to work for it actually to send traffic on the network and as I'm looking at the responses come in you're right once again the way that Gus's computer would learn about that layer to address is a R P the address resolution protocol spot yeah so Gus's computer if it doesn't already have it in the ARP cache will do a ARP request saying hey I'm looking for the guy who owns this IP address maybe that's top one and please send me your layer two drafts router one responds back and then Gus includes that in his future frames and he's gonna forward order James fantastic alright so and then finally Gus sends this traffic out on the network now all that activity all the thinking takes milliseconds now a millisecond is one one thousandth of a second just so there's doesn't think a lot of time but it does take a little bit of time so Gus's computer takes all that information and then mmm start spitting them out on the network into the switch then the switch based on the layer 2 addresses does make some forwarding decision which would forward the frames address to the default gateway to the default gateway r1 would look at that say hey this is my layer to address it would D encapsulate it open it up look at the layer 3 destination address and say oh that's not me but I'm a router and I'm enabled for routing it was Lucas routing table make a forwarding decision how do I round it in the direction that it needs to go and then it would rien capsulate at layer two based on where it need to send it and then send it on its way so in this topology right here router one would actually rien cap slate at layer two with the next layer to destination address being the firewall then the firewall would make the next layer to address be this router router two and then router two would encapsulate that appropriately for the serial link or if it's going over the internet go that way so maybe we have a VPN going this way or a serial connection maybe it's point-to-point or maybe it's frame relay stop the check it's not going to be frame relay and this is like 20 years ago so we'll just forget I said that so a serial connection of some type or Internet bill you know appropriately encapsulate that frame and send it on its way okay fantastic so what's the problem Keith what what is the challenge here that could happen well with a file transfer application like FTP does Gus you know just discuss really care if it takes two or three seconds or four seconds or five seconds because if there's congestion on the network meaning there's a bottleneck somewhere maybe at the router or the firewall or even the switch you know if something gets if push comes to shove and there's some some some congestion FTP is TCP based so if it's TCP based at layer 4 that means it's sending acknowledgments and verifying data got there and if something is missed it'll try again pretty robust and I don't think anyone would notice if there was a delay of a second or two or four seconds even for an FTP file to be sent if there was congestion somewhere in the network however that story changes if we have a situation where we have Gus now talking over to James but now we're using and I'm gonna go ahead and clear this off we know is we know it's Gus we know it's James we know the layers but the problem is now what if Gus and James are using voice over IP and this is one of our goals of this session is to you know identify some applications some uses of our network switch if we have a lot of latency or variable latency or problems where it's not going to work out well so here we have Gus on computer - James is up here in the branch office as they communicate back and forth I'm guessing and it's a reasonable guess that when they're talking to each other and maybe they're focusing on hey I'm focusing on the new ccnp I'm gonna be studying that or hey I'm focusing on I know they're having a nice chat and it gave me video so video and voice or video chat or voice chat either way they'd like it to be relatively timely so if Gus says hi how are you doing good yeah I'm good Gus how are you doing and then if there's huge delays sometimes people are going to talk on top of each other unintentionally so my wife and I have had that challenge with certain voice applications and I just said we're gonna get solutions so that when we're not physically in the same location we can use a solution that doesn't have a lot of latency and so that we aren't going to accidentally talk over each other because there's a big gap but the other person didn't really intend that gap people can talk over each other so anyway we're two of helping your relationships thrive you never want to talk over each other and you don't want to accidentally talk over each other because of a latency issue with a voice over IP application all right so continuing our discussion here if we have no congestion in the network meaning router one says life is good i sap packets that come in i forward them and the firewall says life is good I have packets coming i forward them the router says to says I get back as I forward them the switch says I frames that come and I forward him there's not really a problem and so these network devices have the concept of a line now I want to get when I say lying I want you to think of like a line at the bank I'm not a fan of lines in fact if I go to an amusement park I will usually strategically do the research and find out when is the least busy time and then I'll go then so like for okay Disney World it's like in the first week or two first two weeks of February and it's all you know people have done the research and you get the data and then you go at those times because I don't enjoy a line I just don't know there's an exception that sometimes lines are cool because like if I go to death here in Las Vegas there's usually a big line for buying your admission pass to get in and there's some fascinating people in the audience are in the end in the queue in the line and so sometimes lines are good but generally speaking from a network perspective if there's a line of traffic that needs to be sent and it can't be sent because they're just not enough bandwidth to send it somebody's gonna go ahead and suffer and so what they call this line you know like in Europe uh Simona one of our trainers at CBT she's great oh my gosh she has the best words she's just she she's so fun to listen to if you're ever studying Microsoft or anything that she's teaching for that matter it could be a project man anything she's just a blast she's just a fantastic trainer but what she'll call a line she'll call the q qu e ue so yeah I got in the key with the bank or I got the key so all these network devices have a cue and that cue looks something like this so let's imagine that this is the traffic coming in and this is the interface that the traffic is going to be sent out of so the router or switch the router gets the packet makes a decision REE packet eise's it or puts the new frame on it and and forwards it out so there's two parts of this there's a hardware part of the cue and there's also a software part so if packets come in just just imagine that we're you know going to a grocery store or an amusement park and they have this huge line this huge space for a line but there's no line so you just basically walk through and you get sense so the thing about QoS is that if there's no congestion if there's no contention for the bandwidth that's available your routers not gonna stick around and say you know I'm just gonna make that wait for a while if there's no if there's only like 10 megabits per second of traffic coming in and there's a hundred megabits available your router or switch or firewalls can send it so the thing about quality of service that we're going to use to identify to fix a problem with like a voice over IP conversation being held up or slowed down it really only comes into play if we have congestion on our net if there's a problem with a bottle or a bottle neck and with voice over IP or other real-time applications what do you do because of a phone call over a voice over IP is not going to be very good if we're dropping packets if we have lots of latency and so the thing with key OS the problem is that some applications can't tolerate and beast and survive bad latency or intermittent latency so to solve that we're gonna use QoS and that was that's two of our objectives one of those what are some applications and problems of why we'd want this and the second is how do we solve it the answer is QoS my parents my dad's 90 now still doing great my mom is in her 80s they are well I don't give you the backstory on that but um they taught me in my youth about being fair and honest I am very grateful for that discussion and that example they set in my young life growing up about doing you know doing the right thing and treating people fairly you know people treating people equally in computer networks that goes out the window because in computer networks if you and I know that hey there's some bottlenecks in our network some congestion and we know that there's some voice over IP traffic or other critical trafficked it just has to go through we need to have to have some mechanism of preferring that traffic and telling the router or the firewall or the switch to go ahead and say you know what if you ever see this traffic coming in so first of all I have to identify the traffic and then if you ever see this traffic coming in you know that big queue you have that's all full and people are having to wait to be sent go ahead and just take that traffic and maybe move to the beginning of the queue or I like going to amusement park when it's crowded and you had like one of those Fast Pass are you just like whoo there's big line but I'm going to the front that's what it's like or we could make a separate line just for that type of traffic so imagine an amusement park with a long line for normal traffic normal normal people that's not right a long line for non-critical traffic non-critical I can't say non-critical people because that's that's not real non-critical traffic and then a shorter line that's just for special traffic and then if you're that special traffic you get in that special line that special queue and then it goes very very quickly and that's the concept of QoS it's differentiating traffic and giving some traffic higher or better priority than other traffic on your network last night I went to last night was great I went to a play with my wife in Las Vegas there's a lot of small theaters that do really amazing plays with grapey anyway I went to a play it was fantastic then after that my wife Deena had a friend from California her her her partner is uh he's that one of the lead guitars for a tribute band not the Red Hot Chili Peppers but a tribute band called the red knot Chili Peppers and so and part of that we went in we got there like 10 o'clock and then she oh then she the DEA's friend found us gave us these badges that got us backstage and so we went backstage it was it was great but they just didn't let anybody backstage you have to have that badge that marking that classification that you're okay to go backstage and I got preferential treatment because of houdina knew hey there's a lot of fun so the the concept of qos is that if there's congestion because there's no congestion we just send everything in life is good but if there's congestion or bottlenecks on the network QoS makes sure that it we've identified traffic that's more important and then we treat it differently that's it that's what the deal about QoS is now there's several different ways of doing QoS and I think we want to talk about a few of those because it'd be important to be aware of it so let's go ahead and let me get out my drawing tool again and let's let's talk about the basics of let's do first in first out first in first out is a strategy let's pick on a router one for this whole example first in first out simply tells the router hey you get a packet in send it right to make a routing decision send it but if there is some congestion here's the cue so at the top end we have this hardware part and then we have software q and so if there's congestion basically start stacking up the Q and then the first ones who got into the Q are the first ones who get out that's it that's how first-in-first-out works we're not really differentiating any type of services we're simply saying yep I got packets in I'm gonna go ahead and send them out so if we need to change the rules for that another option that we have besides first in first out is called priority queuing let me get my notes if I put these in a specific order priority PR IOR I tu I yes I can talk and write at the same time so with priority queues let's think of three different queues I'll put another one here and I'm here so these are all queues let's imagine these are all going to end up going to the same exit interface we'll call that egress because that's how we spell exit and Sysco all right so that's the outbound or exit interface that we have three cubes will use a b and c so with priority queuing it's terrible actually all by itself is the worst and here's why it's the worst we identify certain types of traffic and let's imagine that voice over IP is identified as our high priority traffic and we put we assign it to this qqa and then we do gaming traffic and if we're a game where we assign that to QB and then everything else we assign to QC so this involves identifying the traffic first you know what type of traffic is it we'll take a look at how to do that with access control lists or network based application recognition and some other methods but we've identified the traffic we then assign it to a queue and with priority queuing oh my gosh check this out it's so unfair priority queuing says all I'm gonna do is work on QA and I've got a feeling I can be good that way - QA yeah so basically this queue right here queue which tell the voice over IP traffic again gets all the treatment gets all the throughput well what about the other queues okay so the other queues if if there's nothing in QA at all the initial queue the the prior the first queue it then says okay there's nothing in this top queue I'm gonna take a peek at the second one looks at the second one starts to move some traffic and once it's done it goes back to QA and then it moves any traffic there and then if there's nothing there again or if it finishes it then looks at QB and then if there's nothing there that looks at QA and then QP if there's nothing there then so basically QC has a really good opportunity of being starved meaning the CPU and the router has no interest in really serving QC unless unless QA and QB which are higher priorities are empty so we're not going to use priority queuing by itself because we can starve out other types of traffic but it certainly has something to be aware of because it is a type of queuing so another type of queuing and I'm gonna clear off the screen and we'll we'll redo a couple of these another type of so we have first-in first-out then we have priority which we just discussed another one is W F Q weighted fair queuing and I like this I like weighted fair queuing weighted fair queuing goes something like this I know there's a lot of traffic coming in says router one and if I have the ability to forward everything there's no congestion I'm gonna just send everything as it comes in pack it in send it out no problem but if there comes a point when I have so much coming in that I can't possibly send it all you know exactly as it comes in I'm gonna go ahead with weighted fair queuing is I'm going to identify flows of traffic moves of traffic now what is the flow of traffic a flow of traffic is like a session let's say you into a website and during that session between you and that website and what you know I have multiple sessions but in one of those sessions with that website you're gonna have your source IP address destination IP address TCP ports you know certain source ports certain destination ports for that flow for that session and so the router with weighted fair queuing says okay I'm going to treat that as one flow of traffic so maybe Goss and James have a session between them for their file transfer protocol and maybe they have another session for their voice over IP and maybe then Gus has another session going out to CNN or another website or whatever you know whatever sessions he has in place and the router if there's congestion and weighted fair queuing is on wfq it will say I'm going to I've identified each of these flows of traffic and I'm just gonna give them all equal bandwidth so it would give your voice over IP call you know that session the same amount of bandwidth as it would for Gus's session out to CNN as it would for the FTP transfer session so I think it's fair that's why they call it weighted fair queuing every it flows are identified dynamically just based on the IP addresses and TCP information and port numbers or UDP or whatever it is layer four and then it's if he says okay I've got 15 sessions all going on I'm just going to give them equal bandwidth per session and and that's good because if somebody's doing a huge FTP transfer and something else is doing a quick little DNS request which is very teeny weighted fair queuing is going to give that little guy you know equal time in that whole flow of traffic so it won't be starved out so we're not starving it anymore that's weighted fair queuing however the problem the problem with weighted fair queuing is if Gus and James are having a voice over IP conversation and they're doing a file transfer the voice over IP if there's just not enough bandwidth at router one it may cause a problem with excessive latency on the voice over IP call and as a result the voice over IP call even though the Cisco routers being fair it might have a problem with the fact that the voice over IP call is not getting everything it needs so to solve that we have another option here and that is called CB wfq and what that stands for is class based weighted fair queuing so think of it like this it's weighted fair queuing which is great but we're also going to add the opportunity to create a special class and queue so let's call this huncles y'all special so special I gotta have some attention that's why I didn't take a career in singing because I can't see alright so we have a special queue and then we have everything else all the other normals and so we can do with class based weighted fair queuing is we can identify some traffic like voice over IP traffic and assign the voice traffic to that special queue and then we use how do I say this gently we can just be a little bit more generous regarding bandwidth for that special queue so instead of weighted fair queuing every Flo gets exactly the same amount of bandwidth we can say you know what for this special queue we want to give it a little bit more or a lot more bandwidth and then for everything else you identify as Flo's go ahead and be equal with whatever's left based on those guys so we're being more fair but we're able to prioritize just a teeny bit well actually quite a bit that special cute so that's class-based weighted fair queuing so when you think of class-based like certain classes of traffic certain identified traffic is going to get into that queue and as a result they are going to have some preferential treatment at least here on router one as their traffic goes through the network all right there's one more I'd like to chat with you well there's actually a couple more if there's one more I like to talk about now is they l.l.c I'll see Keith you've been working with some limited liability companies may be but this is llq which stands for low latency queuing and here's what low latency queuing is low latency queuing takes class space weighted fair queuing and adds the ability for us to go ahead and add priority queuing to it so remember back here priority queuing where we said okay this queue goes first no matter what no matter what no matter what and then the other queues well low latency queueing is taking the class based weighted fair queuing where we have special classes and being fair to everything else and we have the ability to be more strict and give one of those queues priority which means that that queue could possibly starve out everybody else I mean if we're saying this one queue with low latency queueing has a certain amount of bandwidth and priority in everything else it's possible that all the other flows don't get any attention so in addition to low latency queuing there's also limits we can put in place and the concept of limit is referred to as policing so policing or police or policing the traffic says okay this is the priority queue up to this point so up to 1 megabits per second or 5 megabits per second so we're we're not just saying yeah this queue is the most important queue no matter what we're saying this queue is getting special treatment you want to take care of first up to a limit and then after that limit of submit it can go ahead and work with the others so that's that's kind of like a good progression of of queuing so first-in first-out no really no prioritization priority queuing one queue gets all the attention and then if there's nothing there it'll take a look at the other queues weighted fair queuing individual sessions every flow gets equal treatment so an FTP session a voice-over-ip session and a telnet session or SSH all gets equal treatment and then a little bit of prioritization for a certain class of traffic is class-based weighted fair queuing or it gets a little more oomph and preference and everything else is then treated equal and then low latency queueing is adding the priority factor with limits with policing to a specific queue and then treating everything else like weighted fair queuing so that's the progression of queuing let's talk about a couple other things I want to mention regarding queuing oh yeah yeah yeah um regarding all these mechanisms of queuing this is referred to as diff I'll put that in a different color make it a little stand out a little more let's go for this guy you ever do as differentiated services or as his friends column diffserv and differentiated services simply means that when a device that has QoS implemented gets traffic and if there's congestion I mean there's it can't send it out as fast as it as the queue is building up the diffserv says on this specific device go ahead and use the queuing mechanism based on how it's been configured and differentiated services is an example of per hop so our a per hop behavior let me explain why that might be really important to understand let's say Bob is a deny Bob is Gus I guess so Gus is here James is up here and they're having some kind of a session between them and Gus sends is traffic router one says happy happy no congestion here no need to delay anybody or prioritize anybody or put something at the beginning of the queue because I've got bandwidth and it sends it that's because this is gig this gig zero zero and this is a gig 0/1 so no bottleneck here and then the firewall gets it and this could be a very numbered amount of firewalls could be the firepower threat defense appliance it could be an older AAS I shouldn't say older it could be adapted to adaptive security appliance and the the firewall if it may have congestion now if it has congestion here all the quality of service that we put here on router one if we don't have those same policies about identifying which traffic to prioritize and then making preferential treatments on it if the firewall doesn't have those same kind of rules we could have congestion here and as a result what we prioritized on the router wouldn't be prioritized on the firewall there are separate devices and so we need to also make sure we implement the policy here for QoS so let's imagine that this firewall has been configured so we've done three and there's three basic things we need to do with QoS one is identify the traffic to be treated special that's called classification the second is we need to go ahead is to mark that traffic put labels on it so that every other network knows is special I mean if we have let me get an example of cups all right pack a day packet be these packets are coming into a router or a firewall how does it know which one is supposed to be prioritized so a key element is identifying the traffic they should be prioritized and also marking it by putting labels on it so we could have this labeled as high priority traffic or super important traffic and we use bits in the IP header to do that and they're called dscp markings but we put markings on this packet saying hey this is marking a and this is marking B and that way when the firewall or router gets a say oh I've got congestion here's my policy I'm putting this one first and then this one later or based on the policy that we have set so the elements are identifying the traffic having the correct markings in the IP headers or in layer two trunking on the layer two headers with cos and then having a policy that says on each of the devices okay if there's congestion here's one supposed to do I'm supposed to put this type of traffic in this queue or I'm supposed to prioritize this traffic and then send it out ahead of other traffic like an FTP transfer that may not care about that much about the flow not be interrupted by the flow alright so going back to this so we have the firewall with QoS now if the router is going to take off the internet here for a second we have this slower link here there's bound to be congestion here if we have high-speed Internet gigabit and all the way in our internal network and then we have this serial this represents this lightning bolt represents a serial connection if this is like you know 1.5 4 megabits per second which would be an example of a t1 type of speed there could be a lot of congestion here so we'd also need to make sure we implement the quality of service here on router 2 and it should be the same policy and that's why it's referred to as per hop behavior with differentiated services because we need to make sure all the routers and switches and firewalls agree on identifying what type of traffic which could be based on their markings which is a great way to do it we could have for example this Swit this router as traffic comes in from Bob we could have this router in charge of marking the traffic and so as Bob as Gus's sorry Gus as Gus's voice over IP traffic comes in it can be classified as voice over IP with certain markings and as Gus's FTP session comes in this router could mark that traffic as a different different bits in the IP header for the purposes of prioritization on the other devices so we'd want to classify the traffic mark it and then train all the devices to behave certain way if we're going to kill us when they see that traffic if there's congestion so let's talk about for a moment something called the mq c so mq c is an acronym that we may see from time to time is stands for the modular quality of service command-line interface and it basically is a great way of thinking about the implementation of the three elements that we need to do with quality of service and it uses three elements nothing right here class maps and what class maps you might say well Keith was a class map do for a living a class map is used to identify traffic so here on router one is that traffic is coming in Gus is traffic if it's based on if it's voiceover IP traffic a class map could identify okay based on the ports and protocols and so forth or the VLAN it came in on it could identify that as a certain type of class of traffic and then it could go ahead and actually mark that traffic so the class map is used to identify the traffic then we have a thing called a policy map so the class map is saying okay identify the traffic the policy map says what to do to that traffic so the actions could include things like put this in a certain queue or the action could be add these markings or the action could be add these markings to the IP header for the benefit of the rest of the network so they can look at those markings and put it in a certain queue like M class-based weighted fair queuing or low see queuing to put it in the queue that's appropriate for that type of traffic so the class maps identify maps on the traffic the policies map say what to do as an action item when they see that traffic and then the third element which is really important too is to go ahead and apply it and that's applied with a service policy so the pawl the service policy somebody says where to do it so if we had a class map and a policy map so what traffic to look for what to do with that traffic and then where to apply it on the router one we could say we want to apply this inbound on gig zero zero and that would be example of how we apply it with the service policy so they'll see the three main elements of the modular quality the modular QoS command-line interface now one of the one of the realities is that I learned about oh maybe 20 years ago regarding QoS and by that I had a really good opportunity to brush up on this to teach it today so thank you for the request for QoS was that implementing this consistently across an enterprise at the command line is a near impossible task because you have to have first of all plan like ok how are we going to mark these packets at layer 3 and you know what markings are we going to use and there's a whole laundry list of types of assured forwarding markings we can use by messing with the bits and then after that's done implementing that policy across your whole network all your devices and that's where network automation comes in and that's where software-defined networking is going to be very helpful because we can identify policies of how we want certain types of traffic to be treated and instead of going to the command line interface with class maps and and and policy maps and then service policies with api's and scripts and the command center we can say here's what we want to have happen and then we can just rein that in let me write it down on the entire network topology it also can report to us so it's important understand the basics of the options that we have I also want to make sure you're clear that in a production environment doing this device by device by device is not it's no longer practical or realistic because the per pop behavior says we need to make sure rhe device agrees that we agree on the markings that we're gonna use we agree on the type of quality of service we're gonna use everywhere so if you miss if you miss one place like if we just forgot to do router 2 and we implemented class-based weighted fair queuing and we forgot to do router to Gus's call as he talks to James over here is his voice over IP traffic this is gonna be a huge bottleneck and if there's not enough bandwidth to go around and he's using the default of first in first out or even waited waited or weighted fair queuing it's very possible that Gus's and James phone call there voice over IP session is going to not be acceptable because of the slow connectivity here relatively slow connectivity if there's contention on the link alright let's talk about two more concepts and then we'll close off the stream and then I'll stick around for Q&A so let me go ahead and clear this off and the last two things I like to chat about is prevention so how do we how do we prevent congestion on the network a few options come to mind one we just tell everybody hey just stop using the network not likely also we could ask our users politely please don't use these applications probably if we don't enforce it with technical controls probably not gonna happen so quality of service is important if we want to make sure that applications like peer-to-peer file-sharing and gaming or so forth if that's not our production networks core purpose we might want to set up priority queuing or QoS so that we're giving a little bit of bandwidth to those other applications but making sure that our core applications whatever our company's doing is getting the bandwidth that they need so what if we've done all that and we have a problem with still too much congestion and we'd like to prevent it and the way we can do that is with a process called W R II D which stands for weighted random early detection and this is referred to as congestion avoidance this is where we're taking proactive steps things are getting busy we want to stop it or slow that busyness down before it becomes a problem and everybody has a degradation of service and it's based on how TCP operates so when Gus and James are communicating in the tcp/ip protocol stack if they're using TCP at layer 4 so they might be using HTTP or FTP or HTTP or any other application layer service that's using TCP TCP uses a window size and in that window size it it does this like Gus and James are chatting and are having a conversation with their FTP application or whatever it is and as they're sending segments of data at layer 4 there's going to be periodic acknowledgments so Gus sends a segment and James says hey I got it thanks and they're tracking all those with relative sequence numbers and then Gus says you know that went so good maybe I could send two segments or three segments or a quantity of segments before I get an acknowledgment and so you said two or three or four set them over and then James could just send one response that's an option and then if there's a Miss they can communicate that and pick up where they left off but that's referred to as a sliding window so that window how many segments or how much data can be sent before an acknowledgement is more efficient because what's more efficient doing this segment acknowledgement segment acknowledgement or ten segments one acknowledgment saying yep got all of them continue on so there's a sliding window that goes up and down that causes a problem or can cause a problem if we have a whole bunch of devices that are all communicating and there starts to be congestion on the net we're going to use this line right here as bad so that's the bad line so as more and more devices are talking and the window sizes are getting bigger and they're sending more and more data it gets bad and then unfortunately everything above the line if there's a queue here's the queue so here's the hardware portion here's the software portion traffic's going in this way going out that way what happens if the cube totally fills up so it's just G Jiji uh let's talk about that what do you do with the bank well or an amusement park if they have a line for a hundred people and you show up and there's no there's no line lit there's no room left now at an amusement park they probably just wrap you around the Matterhorn right just keep walking to the parking lot you'll get in that line eventually but in a queue for a Cisco device once that queue is full and there's more traffic that shows up that needs to get sent it's called a tail drop which is bad news tail drop simply says yeah not only are you not getting in the queue but I'm gonna even forget you ever existed tail drop and that's when the queue is full and there's no more room in the queue and the router says I would love to process you and put you in line but there's no more room in my software queue there's no more room in the line so to prevent that from happening and that would be what's happening right here help I didn't read so this is where we have tail drops because the router can't processes anymore and then what happens when we have these tail drops Gus and James and all the other people that are communicating a little less there Gus and James who are communicating their computers in the background say well we're missing segments and they'll start decreasing their window sizes they'll slow down and so the traffic on the network goes like this as it slows down and then as things go better they go up once again we have some drops because of the congestion and then we have the network that settles down it goes like this and then one more time just to make it nice and symmetrical so that's just repeats that's a sawtooth pattern that we can see now I want to point out this space right here this represents bandwidth that could be available so the whole network slowing down because there was all these problems in congestion and if we want to solve that how do we solve that the answer is a little bit not difficult but it's a little bit you know unfair so here's how we're going to do it we are going to identify traffic that if we start to get to the top where we're starting how serious congestion we're going to identify some TC P traffic that we can kill so imagine that we're getting to the top near the top of the threshold and we want to use this feature called weighted random early weighted random early detection and what it'll do it'll say okay great I see these new packets coming in their new TCP packets and based on identifying certain types of traffic like oh that's a TCP packet for an FTP session versus that's a TCP packet based on another real-time application based on what we specified it'll go ahead and take a look at FTL use FTP as an example it'll take a look at all the FTP traffic is trying to come in and then randomly drop them so even if there's like a little bit of room in the queue left it'll is this somebody say well I'm so close to my threshold I'm gonna just randomly pick FTP traffic TCP segments and so in the IP packet it points to TCP and at layer 4 it points to the layer 4 protocol that's how it sees it and it just starts dropping them no queue for you no queue for you no queue for you so it just drops them randomly so we're not killing just one session we're just randomly interrupting the flow for many FTP sessions because that's the protocol that can survive it and no one's gonna really care at the same time we never hit that maximum so it's beautiful because that we never get to a point where everybody all the TCP sessions that are now you have huge window sizes all have to go start shrinking the ones that are important and have big window sizes can continue the ones that we're less important traffic they'll recover they'll be fine and then they can start you know reestablishing their smaller window sizes because they have some drop packets and that's how we can prevent some congestion for TCP related traffic with that technique called weighted random early detection so that's how that works all right I wanna share one more with you and then then we'll close it off the other end grab my pen I'm going to clear the screen once more and the last one I'd like to chat with you about is shaping and I will use a different color for that and for shaping let's talk about router 2 for a moment let's imagine router 2 has a connection to a service provider it's not too hard to imagine because it's right here so as R 2 is connecting and maybe we'll just get rid of the serial link and maybe router 2 is peering with the service provider and in the background so he has the Ethernet connection in the background the internet service provider could be using a number of things including MPLS with traffic engineering or whatever they lighted in the background is transparent to the user to forward that traffic up to the branch office so from our perspective here we'd have router to connect to the service provider in the internet the branch off is connected to the service provider and/or the Internet and then they could have logical connectivity between them maybe we have a VPN there over this Internet okay so the thing I want to point out was is this if this is a 10 megabit link 10 megabits per second actually you know what we're not using 10 megabits too much anymore let me clear that off let's make it extreme let's say this is a gigabit interface so that's gig 1/1 that we're connecting into the service providers termination point so we've got a physical interface gigabit but the service provider is only giving us 5 megabits per second that's what we're paying for so what happens if we try to send more than 5 megabits of throughput on this interface the answer is it's not gonna work for very long we might have some bursts that are capable and so forth but it's not going to be very good or if the service provider may say well if you go over the threshold for a period of time a matter of seconds or minutes or hours or they are averaging it we're gonna go ahead and charge you more charge you a premium so what will keep you on router 2 is we can use the concept of shaping now shaping simply says to the router listen I know I know you've got this huge interface right gigabit and you just like send all this data down you could you have the ability I'm giving you full credit for that however on the other side it's not prepared to have you send all that at that throughput meaning that much data being sent in packets and if you do who's gonna cost us money so either way whether they can't receive it that fast or they're gonna charge us through the nose for it pay through the nose for it anyway we want to go ahead and bring that down so shaping is the concept with and this isn't the QoS family of saying dear mr. router on that exit interface gig 1 1 what we want you to do is when traffic comes up go ahead and have the queue but as you send it out we are going to have you slow down so basically saying slow down and send that traffic out and then in that queue for traffic shaping you can also specify all the bells and whistles with details regarding who gets to send traffic who doesn't get to send traffic but the idea with traffic shaping is we're not dropping or killing packets that are trying to be sent we're just smoothing them out making them slower the literal packet isn't slower I mean this packets travel over a wire at the speed of light times 0.8 but anyway so the initial packets themselves boom boo-boom they're not really slower but the the throughput will be slower because we're using traffic shipping and that's the concept of traffic shaping in the old days I'm gonna mention it twice now but the in the old days when we had frame relay we had a hub sight and spoke sights and they were you know we had datalink connection identifiers and these PVCs permit virtual circuits we might have a headquarter sight that had a hub the hub sight where I had t1 speeds and then each remote site had 64 kilobits per second I don't know old-school and that's where it came really important to make sure that the headquarter site with traffic shaping wasn't just gonna try to send all the data at once down to these little spokes because they would not be able to handle it hence the idea about traffic shaping all right let me just check my list and see if I covered everything that I intended to do in this discussion about an overview of quality of service with Cisco all right ok we want to take a look at the problems that could come up with networks where there's congestion great so there's no congestion no problem we just send it so adding bandwidth everywhere is great but not always possible or practical and really it's the weakest link in the chain that's going to cause our problems so the problems are application suffer because of bad QoS and the solution is to implement quality of service quality of service is differentiated treatment of traffic and there's three basic sap three basic aspects to it number one identify the traffic like oh this is voice traffic or this is FTP traffic or this is a scavenger class of traffic maybe it's all the stuff that you really don't care about too much but you want to identify it and then secondly we're gonna go ahead and specify what we want to do with it now the you know that could be prioritizing it or for at the edge of the networking beep adding the marks get the IP header information for other devices benefits they can look for those marks and then for that traffic based on queuing that you specified and then third is to tell the network in every device that that traffic goes through and including the layer and layer two it's referred to as class of service marking but anywhere you want that prioritization or that certain treatment you need to implant across your network so that's how it's done and then I've talked about the modular qoi damn cues the mqc with class maps policy maps and service policies and then we mentioned it's per hop behavior so every router or every device in the path needs to be aware of this game look for the markings on the packets or layer to look for the COS markings in the 802 that will queue headers and then act appropriately and then we mentioned priority queuing which is giving everything you got to one queue and if there's anything left then look at the other queues not good by itself weighted fair queuing we talked about then class-based weighted fair queuing which gives a little bit of priority and a little more benefit to one class of traffic and then it's fair for our rails and then low latency queuing which is adding the priority element within class-based weighted fair queuing for that traffic that absolutely must be able to be sent when it shows up at the router and we also can put limits in place with policing so that we don't have a situation where even though we're using some priority options inside of our class-based weighted fair queuing that one queue isn't going to starve out a rails and that's done with policing on top of the actual queue and that's called low latency queuing then we took a look at shaping and weighted random early detection so um those are all the pieces I wanted to talk about today I appreciate you joining me for the live stream on an overview of key OS our next two streams are coming up it is Sunday today so our next one is on Wednesday we'll have another couple on Saturday and Sunday I'll put those in the social awesome recorded for you in them in the associated playlist as well so for every who's in the live stream right now which wow it's like wow that's a lot of people over 100 fantastic for ever using the live cue in the live stream right now um stick around for like two minutes because after I play this closing music I would love to stick around and hang out and chat and answer any questions that I can that you might have that you want to put in the in the Q&A so thank you very very much I appreciate you being here and I'll see you my friends in the very next video thank you [Music]
Info
Channel: Keith Barker
Views: 28,772
Rating: 4.9250274 out of 5
Keywords: qos cisco configuration, QoS Cisco, qos cisco router, qos cisco ccna, qos cisco tutorial, qos, cisco, ccna, 200-301 ccna, 200-301 cisco, 200-301 study, 200-301 exam, 200-301, 200-301 ccna certification, ccna training, cisco ccna, ccna 200-301
Id: hIVx_0qStGM
Channel Id: undefined
Length: 60min 36sec (3636 seconds)
Published: Sun Feb 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.