QoS
Synchronized Transcript
74 cues indexed • Click dialogue or words to jumpWelcome to Jeremy’s IT Lab. This is a free, complete course for the CCNA. If you like these videos, please subscribe to follow along with the series.
Also, please like and leave a comment, and share the video to help spread this free series of videos. Thanks for your help. Also, remember to sign up via the link in the description to get all of the lab files for this course, so you can try it out yourself in packet tracer.
If you want more labs like these, I highly recommend picking up Boson’s NetSim for the CCNA. It’s a network simulator with tons of guided labs covering all of the topics you need to know for the CCNA.
Click the link in the video description to check it out. In this lab we’ll do some basic QoS configurations on R1. The design and configuration of QoS isn’t actually a CCNA exam topic, so you don’t have to worry about remembering these configurations for now.
But I think doing some basic configurations in a lab will help you understand how QoS works, so let’s do it. In this network we have PC1 connected to R1 via SW1.
On the other side there is SRV1 connected to R2 via SW2. Although I’ve only shown 1 PC, let’s say there are many more connected to R1 and the network is getting congested.
So, we will configure QoS on R1 to ensure the more important traffic receives high-priority treatment. We will mark HTTPS traffic as AF31 and ensure that it gets a minimum of 10% bandwidth in a priority queue.
We will mark HTTP traffic as AF32 and ensure that it gets a minimum of 10% bandwidth, but it will not be in a priority queue. We will mark ICMP traffic as CS2 and ensure that it gets a minimum of 5% bandwidth.
Now, the actual QoS design of a network depends entirely on the network. Which traffic needs to be prioritized, how much bandwidth it needs, etc, varies greatly.
These values I selected are honestly just random values so I can show you the basic configuration commands. Giving HTTPS traffic a priority queue, for example, is probably not so common.
Usually priority queues are used for voice traffic. Anyway, after configuring the QoS rules we will apply them to traffic being forwarded out of R1’s G0/0/0 interface.
So, when R1 forwards traffic out of G0/0/0 to R2, it will be prioritized according to our configurations. Now, once the traffic reaches R2 that’s a different story.
Even if R1 marks the packets as high priority, unless R2 is also configured to treat those packets as high priority, it will treat them all equally.
In the CCNA exam topics, it is stated that you must be able to explain the PHB, per-hop behavior, of QoS. Well, this is the per hop behavior.
We configure QoS on R1 and it will prioritize certain types of traffic over the hop to R2, but then how R2 prioritizes traffic over the next hop depends on the configuration of R2.
You can’t just configure one router to prioritize voice traffic and then expect the rest of the network to also prioritize it. You have to configure QoS all across the network, wherever it’s needed.
Okay, I just wanted to make that clear since I didn’t clearly explain the per-hop behavior of QoS in the lecture videos. To show you the basic QoS configurations, though, we’ll just configure R1.
Before configuration, though, let me show you the default markings of traffic being forwarded from R1. I’ll go on PC1. First, let me try to ping jeremysitlab.com.
PING jeremysitlab.com. So, PC1 will send a DNS query to its DNS server, which is SRV1 at 10.0.0.100, and then it will learn the IP address of jeremysitlab.com, which in this case is also 10.0.0.100,
and then PC1 will ping SRV1. As you can see, the pings work. Now let’s switch to simulation mode, and ping again. PING jeremysitlab.com.
In reality PC1 should store the IP address of jeremysitlab.com in its DNS cache, but it seems that doesn’t work in packet tracer, so it sends the DNS query again.
Anyway, lets go to the point where the ICMP packet is at R1. And now let’s check that packet, and click on outbound PDU details.
So, this is the state of the packet as it is going to be forwarded by R1. Notice the DSCP field is written as hexadecimal 00. Technically, two hexadecimal digits is 8 bits, but really the DSCP field is just 6 bits.
And in packet tracer, the ECN field isn’t displayed. Anyway, since the field is displayed in hexadecimal here we’ll have to do some conversions later when we check the markings, but for now just notice that the DSCP field isn’t marked, it’s 0, default forwarding.
This is how PCs send their traffic by default, and the switches and routers won’t add any markings by default. For time’s sake I won’t show you HTTP and HTTPS now, but they would also have a DSCP value of 0.
Okay, now let’s configure QoS, I’ll go on R1. ENABLE. CONF T. So, there are three main steps to configure QoS.
First, you have to identify the traffic. In order to give special treatment for certain kinds of traffic, you have tell the router what kinds of traffic you want to give that special treatment to.
To identify traffic in a Cisco IOS QoS configuration, we use class maps. The command is CLASS-MAP. I will call this first class map HTTPS_MAP, since we will use it to match HTTPS traffic.
Then I will enter MATCH PROTOCOL HTTPS. And that’s it. So, this class map can be used to identify HTTPS traffic, and now I’ll exit out.
Let’s make another class map. CLASS-MAP HTTP_MAP. I’ll use this to match HTTP traffic.
MATCH PROTOCOL HTTP. EXIT. And one more, we’ll match ICMP traffic. CLASS-MAP ICMP_MAP.
MATCH PROTOCOL ICMP. EXIT. Okay, let’s check those class maps. DO SHOW RUN | SECTION CLASS-MAP.
There are the three class maps I configured. Notice that, although I only typed CLASS-MAP HTTPS_MAP, CLASS-MAP HTTP_MAP, and CLASS-MAP ICMP_MAP, the default mode of MATCH-ALL was applied.
This means that, to match this class map, traffic has to match all of the MATCH statements in that class map. In this case, each class map only has one MATCH statement, so it doesn’t matter, but if there are multiple match statements you can also use MATCH-ANY mode, which means traffic will match that class map even
if it matches only one of the MATCH statements in the class map. So you could, for example, make a class map with two match statements, MATCH PROTOCOL HTTPS and MATCH PROTOCOL HTTP.
In that case, if a packet is either an HTTPS packet or an HTTP packet, it would match that class map. Anyway, let’s move on.
So, that’s the first step of QoS configuration. Identify the kinds of traffic you want to apply special treatment to. Next, we have to specify what kind of treatment we want to give to each kind of traffic.
To do that we use policy maps. The command is POLICY-MAP, and I’ll name it G0/0/0_OUT, since we will later apply this policy map outbound on the G0/0/0 interface.
Then I’ll use CLASS, followed by the name of one of the class maps I just configured, HTTPS_MAP. Okay, now we can tell R1 what to do with traffic that matches this class map.
First, SET IP DSCP AF31. So, it will mark any HTTPS packets with a DSCP value of AF31.
Then, we’ll give HTTPS a priority queue with at least 10% of the links bandwidth during periods of congestion.
PRIORITY PERCENT 10. Okay, that’s all for the HTTPS class. EXIT. Now for HTTP traffic.
CLASS HTTP_MAP. SET IP DSCP AF32. And now we’ll give it a minimum bandwidth of 10% during times of congestion, but it won’t be a priority queue.
BANDWIDTH PERCENT 10. EXIT. Finally, ICMP. CLASS ICMP_MAP. SET IP DSCP CS2.
And we’ll give it 5% of bandwidth. BANDWIDTH PERCENT 5. EXIT, and EXIT again. Okay let’s check that configuration.
DO SHOW RUNNING-CONFIG | SECTION POLICY-MAP. So, here’s how this QoS configuration works. We haven’t actually applied it outbound on G0/0/0 yet, but after we do it will check all traffic that is to be forwarded out of G0/0/0.
If its an HTTPS packet, it will mark it as DSCP AF31, and give it a priority queue with at least 10% of the link’s bandwidth.
If it’s an HTTP packet it will mark it as DSCP AF32 and give it a queue with at least 10% of the link’s bandwidth. If it’s ICMP traffic it will mark the packet as DSCP CS2 and give it a queue with at least 5% of the link’s bandwidth.
All other traffic, not matching any of these, will not be marked and will be forwarded without any special QoS treatment. Okay, finally let’s apply this policy map using a service policy.
INTERFACE G0/0/0. SERVICE-POLICY OUTPUT,and then the policy map’s name, G0/0/0_OUT. That’s it, our QoS configuration is complete.
END. SHOW RUNNING-CONFIG. For review, here are the class maps, identifying the types of traffic we want to match.
Below them is the policy map, which sets the actions we want to take on the traffic matched in the class maps. Finally, I used a service policy to apply the policy map outbound on G0/0/0.
Now let’s send some traffic from PC1 to SRV1 and check the markings. Let me switch to simulation mode. First, I’ll ping SRV1.
If I use the name jeremysitlab.com it’ll send a DNS request first, so I’ll just use the IP address. PING 10.0.0.100.
Let’s bring the packet to R1, and then check. In the inbound PDU details tab, the DSCP marking is 0, but if we check outbound, which is the state of the packet as it is forwarded by R1, the marking is now hexadecimal
1 0. Let me open up this document to show the calculations. So, we marked it as CS2, and here’s the binary, 010 000, which is 16 in decimal.
In hexadecimal that is 1 0, so that’s why we see 1 0 in the DSCP field in packet tracer. Okay, now let’s send some HTTP traffic from PC1 to SRV1.
I’ll return to realtime mode, then I’ll exit out of the command prompt, and then click on web browser. I’ll enter the URL here, HTTP://10.0.0.100.
Now, let me switch back to simulation mode. Now I’ll hit GO in the browser. Okay, let’s bring the packet to R1, and then check again.
Inbound PDU details, the marking is 0. Outbound, and it’s 1c. Okay we marked it as AF32, let’s check the math.
Here it is in binary, 011 100. That’s 28 in decimal, 16+8+4, which is 1c in hexadecimal, and that’s what’s displayed in packet tracer.
Okay, I’ll return to realtime mode. Finally let’s send some HTTPS traffic. I’ll go back to the web browser, and add an S after HTTP.
Then I’ll switch back to simulation mode and hit GO in the browser. Bring the packet to R1, and let’s check. So, inbound PDU details, the DSCP marking is 0.
But outbound, R1 has marked it as DSCP 1A, which should be AF31. Let’s check the math. So, here’s AF31 in binary, 011 010.
That’s 26 in decimal, 16 + 8 + 2. Convert that to hexadecimal and you get 1A, and that’s what was displayed in packet tracer.
Okay, in this lab we took a look at QoS configuration. Once again, you don’t need to know this for the CCNA exam, but hopefully it was helpful to see some basic QoS configurations.
Class maps identify traffic, policy maps specify what actions to take on that traffic, and service policies apply the policy maps to interfaces.
That’s all for this lab. Usually, we’d take a look at a lab in Boson NetSim next, but since QoS configuration isn’t a CCNA exam topic there are no QoS labs in NetSim for CCNA.
Plus, I think this lab video has been long enough, so that’s all for now. Before finishing today’s video I want to thank my JCNP-level channel members.
To join, please click the ‘Join’ button under the video. Thank you to Khoa, Justin, Christopher, Sam, Anton, Tebogo, Samil, Anand, Pavel, Abraham, Serge, Njoku, Viktor, Roger, Raj, Kenneth, Seamus, Brandon, Marcel, Kone, Donald, C Mohd, Gustavo, Prakaash,
Nasir, Erlison, Marko, Daming, Ed, John, Funnydart, Velvijaykum, Mark, Yousif, Boson Software, Devin, Yonatan, and Vance. Sorry if I pronounced your name incorrectly, but thank you so much for your support.
This is the list of JCNP-level members at the time of recording by the way, April 29th 2021. If you signed up recently and your name isn’t on here don’t worry, you’ll be in future videos.
Thank you for watching. Please subscribe to the channel, like the video, leave a comment, and share the video with anyone else studying for the CCNA. If you want to leave a tip, check the links in the description.
I'm also a Brave verified publisher and accept BAT, or Basic Attention Token, tips via the Brave browser. That's all for now.