4. Qos – MQC Configuration
In this video we’ll see implementing the quality of service by using in the modular qs cli. Now, if you remember in the basic class, previous class, we have seen some three different models we can use either we can use the best effort model or integrated services. We use something called differentiated model. Here in the differentiated model we are going to classify our traffic in different classes and then we are going to treat each and every class in a different way with a user defined priority or the user defined bandwidth guarantees. So let’s see how to configure the quality of service by using the new mqc feature. Now, the first step, whenever you implement the quality of service, we need to identify the traffic. Like we need to classify them, we need to identify the traffic before we exactly classify them.
Let’s say we have data traffic, we have a voice traffic as well as we have a data traffic. And in that we have some traffic is very high priority like voice or video traffic. We want to ensure that this traffic should be more prioritized than any other traffic. And then we have some other database traffic like sql or any other traffic. And also we have something called Http or ftp traffic. So we need to differentiate the traffic, identify them and divide them into classes. So we need to define them in different categories. So we are going to create something called class maps. So the first step is we need to identify the traffic and define and differentiate which traffic is high priority traffic, make them in one group and define which traffic is not really important or less important traffic. We can define them in different categories. So that’s the first step we need to do.
Now that can be done by using class maps here. Now, inside this modular qs cli we have three different steps we are going to do. So the first step is we are going to define a classmap and then we are going to apply the policy and finally applying that policy on that particular interface. Now, the first one is the classmap. Classmap is going to classify the traffic in different classes. That’s what we do here. And here we are going to define what traffic we care about nothing but what traffic is to match what kind of traffic. And to match the traffic we can either use an access list statements, either a standard acl or extend acls where we can match a specific source or a destination or tcp udp information and a specific service like www or it can be ftp traffic or it can be udp traffic, something like that.
Or we can also match the source interface as well. Now we have some different options. Let me just go to the command line to see how we exactly write the classmaps here. So here I got a router here and on the router command line we can go and configure. Now we can create a classmap with a command called classmap and some name. Let’s say ccna is a classmap name. If I use question mark here, you’ll find some options where we can match a specific traffic. So I can simply say match where we have some different options here where we can match any access group that is something but acls. Or we can match some layer to markings like cost value. We’ll talk about markings more in detail in the next section.
We can either match a destination address or some layer three markings called dscp values of Frame relay discard eligible debates. If you are using Frame lay interface even we can match an input interface. Input interface is something like you have two interfaces and you want to match all the traffic which is coming on F zero by zero and not on F zero by one. And also we can match a specific packet length as well, lacy packet length and matching protocol as well. When it’s a match protocol we can define a specific protocol like Http or any kind of protocol. We have a big list of protocols here. Now this classmap is going to differentiate the traffic where we are going to define a set of commands which says what traffic to match.
Okay, so we got some examples more in detail we’ll see with a small lab here. If we just get back to our lab, I got a small scenario documented here where we are going to define a policy on the router one which is going towards router two and we are going to match all the icmp traffic here. So all the icmp traffic going between router one lan and the router two lan, that is from ten dot network to two dot network. We are going to match that particular traffic and we are going to guarantee a specific amount of bandwidth like 128 KPPS is. The minimum bandwidth should be guaranteed in case if there is any condition. So let’s define this rule here. So the first thing, we are going to match the traffic by using a classmap here. Now let’s go and create the classmap.
So to match the traffic I’m going to create an access list here. The reason I’m using access list is because we need to specify the source and destination. So I’m going to add an acl 112 which is going to match my icmp traffic coming from ten dot one one going to 21 one which matches my icmp with echo and echo reply messages. So I’m going to write so it’s like a normal acl go reply messages. Now, once we match the traffic, the second statement says that we need to match the Http traffic. So let’s match the htp traffic with another acl. I’m going to say permit tcp from any source renderation equal to port number 18 so which is going to match my htp traffic.
So we didn’t write any class maps till now, as we want to specifically match the source and destination, we are going to write an acl here and then now we are going to create a classmap and in that class map I’m going to say icmp is the name of the classmap tia subname. And then you can use cushion mark here. Now here you can say Match. Now once you say Match you will find a lot of options here. Now, as per our scenario, we are going to match the icmp traffic which we define in the acl. So we need to use Access group, command Access group and defile the acl name. Now the acl name number we used here one, one, two that’s it. And we are going to create another classmap which is going to match my Http traffic.
So we are going to say classmap http three R and then we are going to say Match access group 120. That’s it. If you want to verify, we can use Showrun classmap. Now here you can see I have created a classmap, we are not using ccna classmap. Let me remove that no classmap ccna. You can always use Showrun classmap to verify that I’m matching a classmap which is going to match my Http traffic from ten dot to 20 dot network which I define in the acl 120. Sorry, acl 1120 represents my Http traffic, whereas acl 112 represents my htmp traffic. So the first step, whenever you you want to implement the quality of service, define a classmap. We have many options in that. Again, we are not getting into all the options here.
This lab, whatever we are using here, it is just a basic example to understand how the command line goes in general. Now, once we define a class map where we define what traffic has to be the classification of the traffic, we are going to classify the traffic in different class maps. Now generally we use either two or three different classifications. In my scenario I have created two classifications. One matches my icmb traffic, the other matches my Http traffic here. Now the next thing we need to define a policy map. Now inside the policy map we are going to tell what to do with that particular traffic. So whether you want to do something called policing.
Policing is a method where we can restrict the maximum amount of bandwidth they can use or we can define a bandwidth parameter like what is the guaranteed bandwidth the particular traffic can use, like icmp traffic or Http traffic. Or we can define some other parameters like shaping or any other options. So right now we are just using some basic example here. In my example I’m going to define that whatever the bandwidth matches, the first category should be guaranteed 128 KPPS and the second category of the bandwidth of the category that is Http traffic should be guaranteed 64 KPPS. So that’s what we are doing in the policy map. Now we need to create a policy map with a name policy map.
And then we need to match that category of the class and then we need to define what to do with that particular traffic. So let’s go to the command line and verify if you remember we have configured a class map which matches my Http traffic as well as my icmp traffic. Now the first thing we’ll create one policy map. It can be any policy map. So I’m going to say policy map ccie. And then we need to define the class. The first thing I’m going to call this icmp class map. And then if you use question mark here, you have multiple options here. We’ll get into more on this option later on. The first option here, the bandwidth is, the command is to define what is the guaranteed band width in case if there is any congestion, we can even define some priority or restrict some Q, limit some other congestion avoidance mechanisms.
We’ll talk about this later on. Anyway, so here we go with the bandwidth option where we are going to define a guaranteed bandwidth of 108 KPPS for icmb traffic and then we are going to define the second class. The other category we have created, created Http traffic and then we are going to define the guaranteed bandwidth of 64 KPPS for that. And then there is one more, one more class called class default, class default which matches all the remaining traffic. We are just leaving it blank. So which means it’s going to treat the normal forwarding for the class default. For verification we can use showrun policy map. Inside the policy map we have match whatever the traffic in the class icmp and the other class Http and whatever the matches we have done in the class.
In the icmp class it’s going to be guaranteed with a 128 kbps of bandwidth and inside the Http it will be guaranteed with 64 KB of bandwidth. And then the last thing is we need to apply that on the interface. So that’s the last step here. So class maps differentiate the traffic and the policy map is going to tell what to do with that particular traffic. And then finally we are going to apply something called service policy on the interface, whether on the outbound, whether it is leaving the interface or coming towards the interface. Now in my scenario I’m going to apply on the router one, leaving the interface s one by zero.
Okay, so let’s go to the router one command line and I’m going to apply this policy on the interface s one by zero. The command starts with service policy. Then you can say whether it is assign the policy on the inbound or outbound. So I’m going to apply when it leaves on the interface and then the policy name is cci. Now to further verify we can use show policy map. Like here you can see bandwidth, what we define and if you give showrun class policy map it will define the exact specific configuration of what we did and then we’ll try to generate some traffic which matches this. Before I generate, let me use some specific Show commands to verify Show policy map interface S one by zero.
Now here on on this command, when you give this command show policy map interface s one by zero. You can see on the interface what is the policy name applied, what is the class map and then what we define exactly, it matches the traffic inside the access group that is 112 and the bandwidth reserve is 128 kbps. And similar way for the STB traffic again bandwidth of 64 KB and then the classmap default is for all. So there’s no guaranteed bandwidth over there. Now let’s generate some traffic. To test it out, I’m going to generate some ping messages from around 20 ping messages from source ten one. And in this lab already I have configured ehrp, I think I didn’t configure the ehrp.
Let me quickly configure ehrp protocol to generate some traffic on this. Let’s go to the router two as well. I’m going to configure ehrp to provide the reachability from land to land. And now if I try to generate the traffic, I should see the neighbor ship. That is first thing I’m expecting. And if I try to generate the traffic ping, I should see the replies coming. So I’m going to generate some 20 packets. If you verify Show policy map interface S one by zero on the router one actually I configured that on the router one I’m generating again ping. Now here you can see, I should see some packets matched because it is matching this particular class.
Now similarly, if you have some real time traffic which is going based on Http, then probably it is going to match the second class. Similarly, if you have some real voice traffic going, you can even define a classification for that. Now probably in this video I have just given you some basic introduction on how the classification of the traffic is done and when we are implementing the quality of service and how the mqc configuration goes. Modular quiz command line, where we define a class map, where we are going to define or differentiate the traffic or to manage the traffic and then policy map is going to tell you what to do with that particular traffic. And then finally we are applying on the specific interface.