WEBVTT 0:00:02.900000 --> 0:00:07.480000 Hello and welcome to this video titled congestion management control with 0:00:07.480000 --> 0:00:09.740000 queuing and scheduling. 0:00:09.740000 --> 0:00:15.220000 In this video I'm going to define what queuing means and what scheduling 0:00:15.220000 --> 0:00:20.220000 means. We're going to talk about what is congestion management and why 0:00:20.220000 --> 0:00:25.100000 do we need it. And I'm just going to briefly show you some queuing and 0:00:25.100000 --> 0:00:28.700000 scheduling features just so you're familiar with the terminology of those 0:00:28.700000 --> 0:00:33.500000 features. So let's start with queuing. 0:00:33.500000 --> 0:00:36.380000 Let's define what queuing means. 0:00:36.380000 --> 0:00:40.720000 So in order to do this, let's just look at something here. 0:00:40.720000 --> 0:00:47.300000 So here is our egress interface. 0:00:47.300000 --> 0:00:50.080000 It's about to transmit stuff on the wire. 0:00:50.080000 --> 0:00:57.560000 So, and here this represents our memory buffers. 0:00:57.560000 --> 0:01:05.580000 And we know those memory buffers can be used by a whole bunch of things 0:01:05.580000 --> 0:01:09.660000 including ARP tables, routing tables. 0:01:09.660000 --> 0:01:13.320000 Basically it's whatever memory needs to be used in this router switch 0:01:13.320000 --> 0:01:14.860000 is used for that. 0:01:14.860000 --> 0:01:25.300000 Now, with these platforms we have things called transmit rings. 0:01:25.300000 --> 0:01:33.700000 What a transmit ring is is a certain preallocated number of buffers like 0:01:33.700000 --> 0:01:39.520000 maybe these ones right here. 0:01:39.520000 --> 0:01:44.440000 And as frames come in inbound or ingress interfaces and they get looked 0:01:44.440000 --> 0:01:48.660000 up and they have to go out this interface, let's say this is fast ethernet 0:01:48.660000 --> 0:01:54.600000 0 slash 1, they will be placed into these memory buffers here which are 0:01:54.600000 --> 0:01:56.140000 called the transmit ring. 0:01:56.140000 --> 0:02:01.700000 Now, if we never fill these up, okay, if this is as far as it gets and 0:02:01.700000 --> 0:02:07.260000 we don't go outside of that sort of purplish paint box right there, that 0:02:07.260000 --> 0:02:10.380000 means we can transmit at line rate. 0:02:10.380000 --> 0:02:14.960000 So any, as long as we don't fill up that box, we can go up to 100 million 0:02:14.960000 --> 0:02:16.020000 bits per second. 0:02:16.020000 --> 0:02:19.620000 So clearly there would be a lot more boxes that I've defined right here. 0:02:19.620000 --> 0:02:23.740000 But if packets are always allowed to go onto the transmit ring and they 0:02:23.740000 --> 0:02:28.060000 never exceed the transmit ring, there is no congestion. 0:02:28.060000 --> 0:02:30.180000 We're transmitting at line rate. 0:02:30.180000 --> 0:02:35.760000 Where problems occur is where packets are coming in so fast from our ingress 0:02:35.760000 --> 0:02:40.820000 interfaces that they're exceeding the amount of buffer space we have available 0:02:40.820000 --> 0:02:44.840000 or that we've allocated for the transmit ring. 0:02:44.840000 --> 0:02:50.680000 So in that particular case, then the CPU of the switch might say, okay, 0:02:50.680000 --> 0:02:58.100000 well, all of, or the router, router or switch, it might say all of these 0:02:58.100000 --> 0:02:59.060000 boxes are available. 0:02:59.060000 --> 0:03:03.520000 So this is here within this black square allocated to fast ethernet zero 0:03:03.520000 --> 0:03:08.920000 slash one. The ones that are in purple, that's my transmit ring. 0:03:08.920000 --> 0:03:14.500000 But if I go beyond that, I can still store stuff in here. 0:03:14.500000 --> 0:03:22.040000 Now, without quality of service, without QoS turned on, it's first in, 0:03:22.040000 --> 0:03:24.560000 first out. There's no priority. 0:03:24.560000 --> 0:03:27.320000 There's no way of differentiating the traffic. 0:03:27.320000 --> 0:03:29.520000 It's just first in, first out. 0:03:29.520000 --> 0:03:33.640000 This is a situation where we would want to use quality of service. 0:03:33.640000 --> 0:03:39.160000 Because by turning quality of service on, it doesn't affect how many of 0:03:39.160000 --> 0:03:42.600000 these boxes are allocated to that interface. 0:03:42.600000 --> 0:03:45.680000 But now we have control over those boxes. 0:03:45.680000 --> 0:03:50.880000 We as a network engineer or admin can say, okay, with quality of service, 0:03:50.880000 --> 0:03:56.840000 instead of looking to actually do anything about, now I can say, all right, 0:03:56.840000 --> 0:04:02.580000 I want these buffers right here, I want to have control over those, and 0:04:02.580000 --> 0:04:10.120000 that'll be my low priority queue. 0:04:10.120000 --> 0:04:23.820000 And I want maybe these ones right here to be my high priority queue. 0:04:23.820000 --> 0:04:29.900000 So, queuing is the act of doing this, of taking our memory buffers and 0:04:29.900000 --> 0:04:34.260000 giving us some control over it. 0:04:34.260000 --> 0:04:41.260000 So once we enable QoS, we start dealing with queuing. 0:04:41.260000 --> 0:04:47.720000 As this mentions, a single egress interface may have multiple associated 0:04:47.720000 --> 0:04:51.120000 queues differentiated by priority. 0:04:51.120000 --> 0:04:57.600000 Now, when we're talking about switching, switches, at least Cisco switches, 0:04:57.600000 --> 0:05:00.340000 most of what they do, especially when it comes to the world of quality 0:05:00.340000 --> 0:05:03.640000 of service, is done in hardware. 0:05:03.640000 --> 0:05:05.320000 Why is that relevant? 0:05:05.320000 --> 0:05:11.240000 Well, because on a switch, if I turn on QoS globally with a command, there's 0:05:11.240000 --> 0:05:15.460000 no way that depending up on what the module or the port is that's in that 0:05:15.460000 --> 0:05:19.960000 switch, it will have a predefined quantity of queues. 0:05:19.960000 --> 0:05:23.900000 In other words, I can't say, one thing I cannot do is I can't say, okay, 0:05:23.900000 --> 0:05:28.880000 you interface right here, I want to give you four queues, low, medium, 0:05:28.880000 --> 0:05:30.100000 high, medium, high. 0:05:30.100000 --> 0:05:32.480000 You interface over here, I'll just give you two queues. 0:05:32.480000 --> 0:05:34.280000 You will go over here, I'll give you eight queues. 0:05:34.280000 --> 0:05:35.380000 You can't do that. 0:05:35.380000 --> 0:05:39.400000 On a switch, because everything's done in hardware, that particular module 0:05:39.400000 --> 0:05:42.520000 will always come predefined with a certain amount of queues the moment 0:05:42.520000 --> 0:05:44.420000 you turn on QoS. 0:05:44.420000 --> 0:05:47.800000 So, this would be actually part of your buying, your purchasing decision, 0:05:47.800000 --> 0:05:51.080000 is if you know you're going to have to do QoS in your network, you might 0:05:51.080000 --> 0:05:54.100000 want to say, okay, I've got these two modules right here I could buy. 0:05:54.100000 --> 0:05:57.160000 They're both fast-heath and at line cards. 0:05:57.160000 --> 0:06:02.100000 But maybe this one right here, when I turn on QoS gives me four queues 0:06:02.100000 --> 0:06:07.760000 per port. This one over here gives me two queues per port. 0:06:07.760000 --> 0:06:11.060000 Well, the one with four queues is going to give you more flexibility, 0:06:11.060000 --> 0:06:13.640000 more things you can do within those four queues. 0:06:13.640000 --> 0:06:15.820000 So, that might be part of your buying decision. 0:06:15.820000 --> 0:06:20.240000 Now, if we're talking about a router, typically with routers, the queues 0:06:20.240000 --> 0:06:22.060000 are software-driven queues. 0:06:22.060000 --> 0:06:26.040000 They're created dynamically by the CPU and you have a lot more control. 0:06:26.040000 --> 0:06:29.160000 You actually could say something like, I want this port to have four queues 0:06:29.160000 --> 0:06:30.840000 and this port to have seven. 0:06:30.840000 --> 0:06:34.060000 I want this queuing here to be based on DSCP. 0:06:34.060000 --> 0:06:37.260000 I want this queuing method over here based on IP precedence. 0:06:37.260000 --> 0:06:39.080000 You have a lot more flexibility. 0:06:39.080000 --> 0:06:42.800000 So, that's sort of in summary what this bullet point is saying is that 0:06:42.800000 --> 0:06:46.980000 an interface could have one queue, two queues, eight queues. 0:06:46.980000 --> 0:06:49.660000 It all depends on is it a router or switch? 0:06:49.660000 --> 0:06:51.060000 What have you configured? 0:06:51.060000 --> 0:06:54.000000 What have you not configured? 0:06:54.000000 --> 0:06:59.380000 So, when we talk about QoS queuing features, we're talking about features 0:06:59.380000 --> 0:07:02.680000 that are designed to give you control over those queues. 0:07:02.680000 --> 0:07:06.480000 If it's a router, it'll give you control over how many queues you can 0:07:06.480000 --> 0:07:10.960000 have and how to direct frames into those queues. 0:07:10.960000 --> 0:07:14.260000 In other words, do you want your low priority queue, you know, what's 0:07:14.260000 --> 0:07:15.520000 going to go in there? 0:07:15.520000 --> 0:07:17.340000 You get to choose that. 0:07:17.340000 --> 0:07:20.620000 You can say, okay, well, certain IP precedence values will go in there 0:07:20.620000 --> 0:07:25.460000 or certain DSCP values will go in there or maybe it's based on applications. 0:07:25.460000 --> 0:07:28.260000 Maybe HTTP traffic will go in there. 0:07:28.260000 --> 0:07:31.600000 QoS features give you that flexibility. 0:07:31.600000 --> 0:07:35.800000 Some QoS features when it comes to queuing also allow you to configure 0:07:35.800000 --> 0:07:40.340000 preemptive drops of traffic to always make sure that there's room in that 0:07:40.340000 --> 0:07:43.100000 queue for the higher priority stuff. 0:07:43.100000 --> 0:07:45.220000 So, that's what queuing is. 0:07:45.220000 --> 0:07:49.980000 So, when we talk about a QoS feature that is a queuing feature, it's either 0:07:49.980000 --> 0:07:55.140000 creating the quantity of queues I want per port, if one of my router, 0:07:55.140000 --> 0:08:02.460000 I can do that, and or determining what traffic will go into those queues. 0:08:02.460000 --> 0:08:06.780000 That's queuing. All right, so let's imagine for a moment we've already 0:08:06.780000 --> 0:08:09.680000 done that. So, we've already figured, okay, for this one interface right 0:08:09.680000 --> 0:08:13.620000 here, I've already determined there's going to be four queues, low, medium, 0:08:13.620000 --> 0:08:17.840000 high, critical, and I've already determined that certain IP precedence 0:08:17.840000 --> 0:08:20.840000 or DSCP values will go into each one of those. 0:08:20.840000 --> 0:08:22.160000 I'm done with that. 0:08:22.160000 --> 0:08:25.960000 Okay, now, imagine for a moment that each one of those queues has stuff 0:08:25.960000 --> 0:08:29.540000 in it. Each one of those queues is fairly full of things. 0:08:29.540000 --> 0:08:32.580000 So, the next thing we have to determine is scheduling. 0:08:32.580000 --> 0:08:34.660000 So, what is the scheduler? 0:08:34.660000 --> 0:08:39.040000 The scheduler is the feature responsible for pulling packets out of those 0:08:39.040000 --> 0:08:42.540000 queues and putting them on the wire. 0:08:42.540000 --> 0:08:48.680000 So, QoS scheduling features modify or affect that behavior. 0:08:48.680000 --> 0:08:52.440000 So, some QoS scheduling features would give you the ability to say, okay, 0:08:52.440000 --> 0:08:57.940000 on the low priority queue, I want to service that for like 15% of the 0:08:57.940000 --> 0:09:02.580000 total time, then pause, move on to the medium priority queue for maybe 0:09:02.580000 --> 0:09:04.740000 another 20% of the time. 0:09:04.740000 --> 0:09:09.660000 Pause, or you might, another scheduling feature might say, okay, well, 0:09:09.660000 --> 0:09:14.380000 I'm going to pull 20 packets out of the low priority queue. 0:09:14.380000 --> 0:09:17.640000 Then I'm done, if there's some left in there, I'm going to, I'm done, 0:09:17.640000 --> 0:09:23.280000 I'm going to move 20 packets out of the low priority queue. 0:09:23.280000 --> 0:09:27.320000 So, you can see scheduling is all about how do I service the queue? 0:09:27.320000 --> 0:09:31.960000 How do I deal with what's in there right now and get it on the wire and 0:09:31.960000 --> 0:09:36.940000 how do I equally spend my time among the various queues that exist? 0:09:36.940000 --> 0:09:42.540000 Now, on switches, queuing and scheduling, a lot of times are completely 0:09:42.540000 --> 0:09:43.740000 separate features. 0:09:43.740000 --> 0:09:47.260000 You can figure one feature to do the queuing part of it, another feature 0:09:47.260000 --> 0:09:50.220000 to do the scheduling part of it, okay. 0:09:50.220000 --> 0:09:54.440000 Other times on switches and routers, one feature will do it all. 0:09:54.440000 --> 0:09:57.860000 Queuing and scheduling will be built into the feature, and on one line 0:09:57.860000 --> 0:10:02.560000 of command, you'll have to do both your queuing and your scheduling stuff. 0:10:02.560000 --> 0:10:07.180000 So, if you've ever learned about traffic shaping, either in this video 0:10:07.180000 --> 0:10:11.580000 series or another video series or just through reading, traffic shaping 0:10:11.580000 --> 0:10:15.120000 would be an example of a scheduling function, right? 0:10:15.120000 --> 0:10:20.040000 Traffic shaping does not dictate how many queues an interface has. 0:10:20.040000 --> 0:10:25.440000 Traffic shaping does not dictate what type of traffic goes into a particular 0:10:25.440000 --> 0:10:29.860000 queue. Traffic shaping deals with a queue that's already got stuff in 0:10:29.860000 --> 0:10:34.520000 it and how fast we're going to play it out onto the wire and cap it at 0:10:34.520000 --> 0:10:38.340000 a certain rate. So, traffic shaping would be a scheduling function of 0:10:38.340000 --> 0:10:43.620000 queuing. So, we had to first sort of define the differences between queuing 0:10:43.620000 --> 0:10:48.300000 and scheduling before we talk about congestion management at a high level, 0:10:48.300000 --> 0:10:51.700000 because this wouldn't make much sense to you if you didn't know what queuing 0:10:51.700000 --> 0:10:53.280000 and scheduling are. 0:10:53.280000 --> 0:10:57.240000 So, congestion management is all about how do we deal with those queues? 0:10:57.240000 --> 0:11:01.740000 Because remember, if I'm not congested, everything's going on my transmit 0:11:01.740000 --> 0:11:06.260000 ring. Those few memory cells are reserved for my transmit ring, everything's 0:11:06.260000 --> 0:11:10.240000 going in there, and I don't need any additional buffer space. 0:11:10.240000 --> 0:11:13.040000 So, congestion management is dealing with, okay, when I do need additional 0:11:13.040000 --> 0:11:17.360000 buffer space, let me get some control over that. 0:11:17.360000 --> 0:11:21.880000 So, various features we have could help us to define how many queues we're 0:11:21.880000 --> 0:11:26.240000 going to have, what packets are going to go into those queues based on 0:11:26.240000 --> 0:11:31.560000 classification, maybe selectively dropping them once they get in there 0:11:31.560000 --> 0:11:35.920000 to leave room for higher priority traffic, and the scheduling of those 0:11:35.920000 --> 0:11:42.740000 packets. So, why do we need congestion management? 0:11:42.740000 --> 0:11:43.860000 Why do we need these features? 0:11:43.860000 --> 0:11:47.240000 Well, because by default, like I drew on the whiteboard there, everything 0:11:47.240000 --> 0:11:48.980000 is first in, first out. 0:11:48.980000 --> 0:11:52.260000 If you don't turn on QoS, if you don't have any congestion management, 0:11:52.260000 --> 0:11:56.860000 then you have no control over what's going to be dropped if something 0:11:56.860000 --> 0:11:58.420000 needs to be dropped. 0:11:58.420000 --> 0:12:01.660000 You have no control over what's going to be delayed and held back in a 0:12:01.660000 --> 0:12:05.760000 queue. If something needs to be delayed. 0:12:05.760000 --> 0:12:11.540000 So, first in, first out is a bad thing when we're talking about congestion, 0:12:11.540000 --> 0:12:15.340000 because that means no control. 0:12:15.340000 --> 0:12:19.420000 Incoming bursts can cause congestion of queues. 0:12:19.420000 --> 0:12:27.020000 All right, and just to finish this up here, I'm not going to go into the 0:12:27.020000 --> 0:12:30.140000 differences of these, but I just want to give you a real quick look here 0:12:30.140000 --> 0:12:35.540000 at some terms. So, if you ever see these terms right here, so FIFO, that 0:12:35.540000 --> 0:12:40.240000 stands for FIFO, or first in, first out, we now know that's bad. 0:12:40.240000 --> 0:12:46.800000 If you see weighted fair queuing or WFQ, low latency queuing, or class 0:12:46.800000 --> 0:12:49.400000 based weighted fair queuing. 0:12:49.400000 --> 0:12:51.240000 These are all methods of queuing. 0:12:51.240000 --> 0:12:55.060000 These are all features that either let you determine how many queues are 0:12:55.060000 --> 0:12:57.540000 going to be available per port. 0:12:57.540000 --> 0:13:03.500000 And, or let you determine what data will be allowed into each of those 0:13:03.500000 --> 0:13:09.220000 queues. As far as scheduling features are concerned, there's round robin. 0:13:09.220000 --> 0:13:12.340000 Round robin just simply means, okay, I'm going to pull one packet from 0:13:12.340000 --> 0:13:14.560000 each queue, and then I'm going to move back again. 0:13:14.560000 --> 0:13:16.980000 So, all the queues are basically treated equally. 0:13:16.980000 --> 0:13:20.620000 So, there's really no QOS when we're talking about round robin. 0:13:20.620000 --> 0:13:23.380000 There is weighted round robin. 0:13:23.380000 --> 0:13:26.680000 I say, okay, each queue is given a certain weight value. 0:13:26.680000 --> 0:13:30.600000 The higher the weight, the longer I stay on that queue pulling traffic 0:13:30.600000 --> 0:13:35.500000 from it. There is low latency queuing. 0:13:35.500000 --> 0:13:38.940000 Low latency queuing means typically that I've got one queue that's like 0:13:38.940000 --> 0:13:40.680000 a strict priority queue. 0:13:40.680000 --> 0:13:45.020000 I'm going to empty that queue out first before I look at anybody else. 0:13:45.020000 --> 0:13:47.000000 So, as long as there's something in the low priority queue, I'm going 0:13:47.000000 --> 0:13:50.900000 to empty it out, and then I'll move on to the other queues and deal with 0:13:50.900000 --> 0:13:56.160000 them. And then there's class -based weighted fear queuing. 0:13:56.160000 --> 0:13:59.840000 So, notice that both low latency queuing and class-based weight fear queuing 0:13:59.840000 --> 0:14:01.960000 fall into both categories. 0:14:01.960000 --> 0:14:06.040000 Those are both, they both have elements of queuing from a QOS perspective 0:14:06.040000 --> 0:14:10.020000 as well as scheduling from a QOS perspective. 0:14:10.020000 --> 0:14:14.640000 So, that concludes this video on congestion management with particular 0:14:14.640000 --> 0:14:17.960000 emphasis on queuing and scheduling. 0:14:17.960000 --> 0:14:18.700000 Thank you for watching.