QoS (Part 1)
Synchronized Transcript
149 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. In this video I will introduce Quality of Service, QoS.
QoS is used to give priority to certain types of network traffic to minimize things like delay and packet loss. QoS is mentioned in exam topic 4.7.
However, that’s not the only thing we’ll cover in this video. I will also introduce PoE, Power over Ethernet. PoE allows devices to receive electric power over an Ethernet cable, instead of requiring a separate power cable.
I will also introduce voice VLANs, which is a topic I didn’t mention in the VLAN section of the course. Although these topics aren’t directly related to QoS, they are related to the topic of IP phones, Voice over IP.
QoS is often used to prioritize Voice over IP traffic from IP phones to ensure the audio quality is acceptable. So, that’s why I’ve decided to fit these two additional topics into this video.
They are small topics on the CCNA, so we can cover them quickly. Here’s what we’ll cover. First up, I’ll give a very brief introduction to IP phones as well as the concept of voice VLANs.
IP phones are telephones which send audio data in IP packets over IP networks, such as the Internet. Then I’ll introduce Power over Ethernet, PoE, which is commonly used to provide electric power to IP phones over an Ethernet cable, as opposed to using a separate power cable.
Finally I’ll get to the main topic, an intro to quality of service, QoS. I will introduce the basics of QoS and how it works, and then in the next video we’ll look at some more details.
Watch until the end of the video for a bonus question from Boson Software’s ExSim for CCNA, the best practice exams for the CCNA.
So first let’s cover IP phones. Traditional phones operate over the public switched telephone network, PSTN. Sometimes this is called POTS, plain old telephone service.
IP phones, on the other hand, use VoIP, Voice over IP, technologies to enable phone calls over an IP network, such as the Internet.
Audio data is encapsulated in IP packets and sent over the network. Here’s an example of a Cisco IP phone. Cisco IP phones are used by many enterprises all over the world, although of course there are other vendors that make and sell IP phones.
IP phones are connected to a switch just like any other end host. So, you could do something like this. A PC and an IP phone at each desk, each connected to its own switch port.
This kind of design works and is an option, but there is a much better and more common approach to connecting these devices to a switch. IP phones have an internal 3-port switch.
1 port is the uplink, which connects to the external switch. 1 port is the downlink which connects to the PC. And 1 port connects internally to the phone itself.
Let me demonstrate. So, we have a PC, an IP phone, and a regular network switch. However, within the IP phone there is a small internal switch with three ports.
One of these is used to connect to the switch with an Ethernet cable. One connects to the PC, again with an Ethernet cable. And the last one connects internally to the phone itself.
This one is internal, you don’t actually have to take an Ethernet cable and connect it. So, why is this setup better? It allows the PC and the IP phone to share a single switch port.
Traffic from the PC passes through the IP phone to the switch like this. Traffic from the IP phone itself can also go to the switch.
So, with the same amount of devices we can use half the number of switchports, meaning we need less switches, so we don’t have to spend as much money buying switches.
Note that it is recommended to separate voice traffic, which is traffic from the IP phone, and data traffic, which is traffic from the PC, by placing them in separate VLANs.
I’ll mention this again later, but when configuring quality of service, we want to be able to specify the traffic from the IP phones and give it a higher priority than the regular data traffic.
So, we can place them in separate VLANs by configuring a ‘voice VLAN’. When we do that, traffic from the PC will be untagged, but traffic from the IP phone will be tagged with a VLAN ID.
So, how can we configure a switchport to enable this? Remember, the PC and the IP phone will use different VLANs. It’s actually quite simple to configure, you only need one additional command compared to configuring a regular access port.
Here’s the configuration. I enter interface config mode for g0/0, configure it as an access port, assign it to access vlan 10, and here’s the new command.
SWITCHPORT VOICE VLAN 11. With this configuration, PC1 will send its traffic untagged, as normal. Remember, another name for an access port is an ‘untagged’ port.
Usually they only send and receive untagged traffic. However, SW1 will use CDP, Cisco Discovery Protocol, to tell PH1 to tag PH1’s traffic in VLAN 11.
So, this access port is now accepting traffic from multiple VLANs. What kind of interface usually carries traffic from multiple VLANs?
It’s a trunk port. So, is G0/0 a trunk port? We configured SWITCHPORT MODE ACCESS, not TRUNK. So, let’s check what kind of port it actually is.
I used SHOW INTERFACES G0/0 SWITCHPORT. Here we can see the access VLAN of 10. And here’s the voice VLAN of 11. But up here, we can see that both the administrative mode and the operational mode are static access.
So, even though it carries traffic from two VLANs, 10 and 11, G0/0 is not considered a trunk port. It is considered an access port.
Let’s take a look at another command to confirm that. I used SHOW INTERFACES TRUNK and nothing was displayed, telling us that G0/0 is not a trunk port.
Now, even if the interface is an access port, you can do SHOW INTERFACES, the interface name, and then TRUNK. That’s what I did here. Notice that the status is not-trunking, again telling us that this isn’t considered a trunk.
Now, you might notice that it says ‘Vlans allowed on trunk’ here, but it always says that in this command, even if its not a trunk.
So, looking back a few slides, instead of using an individual switchport for each PC and each IP phone, we can take these three PCs and connect them to the IP phones.
Instead of using six switchports, we are now using only three. We configure SWITCHPORT ACCESS VLAN 10 for the PCs, sometimes called a data VLAN.
And we configure SWITCHPORT VOICE VLAN 11 for the IP phones. Okay, so that allows us to use fewer switchports. But there’s something else we need to connect to for an IP phone to work.
Of course, being an electronic device, IP phones require electricity. That means we need to plug them into a wall socket or some other power outlet to get electricity.
Or, perhaps there’s a better solution that doesn’t require an extra power outlet. And there is such a solution, it is called Power over Ethernet, or PoE.
So, let’s get into PoE, Power over Ethernet. PoE allows Power Sourcing Equipment, PSE, to provide electric power to powered devices, PDs, over an Ethernet cable.
Typically the PSE is a switch and the PDs are IP phones, IP cameras, wireless access points, etc. To clarify, this is the same Ethernet cable that is used to transmit data.
You don’t need a separate cable. One cable is used to provide power and to transmit data. The PSE, the switch, receives AC power from the outlet, coverts it to DC power, and supplies that DC power to the PDs, for example IP phones.
Here’s an example. A switch is connected to a wall outlet, it is the PSE, power sourcing equipment. Three IP phones are PDs, powered devices.
The outlet provides AC power, but electronic devices use DC power. The switch converts the AC power to DC and provides it to the IP phones.
These same Ethernet cables are also used to transmit data. But you have to be careful about providing electrical current to devices.
Too much electrical current can harm electrical devices. So, PoE has a process to determine if a connected device needs power, and how much power it needs if it does.
This is a major simplification, but basically when a device is connected to a PoE-enabled switch port, the PSE sends low power signals, monitors the response, and determines how much power the PD needs.
These first signals are very weak to ensure that the PSE doesn’t give too much power to the connected device, causing it harm. If the connected device needs power, the PSE supplies power to allow the PD to boot.
Then the PSE continues monitoring the PD and supplying power as needed, but again not too much power. There is a feature called power policing which prevents a PD from taking too much power.
Now, PoE configuration isn’t a CCNA exam topic, but let me demonstrate just a few commands for power policing. POWER INLINE POLICE, configured on an interface, configures power policing with the default settings.
It will disable the port and send a Syslog message if a PD draws too much power. This is equivalent to the command POWER INLINE POLICE ACTION ERR-DISABLE.
Both of these commands are the default for power policing and have the same effect. The interface will be put in an ‘error-disabled’ state and then it can be re-enabled by issuing the SHUTDOWN command followed by NO SHUTDOWN.
Okay, so that’s one option for power policing on an interface. POWER INLINE POLICE or POWER INLINE POLICE ACTION ERR-DISABLE, same thing.
Here’s another option. POWER INLINE POLICE ACTION LOG does not shut down the interface if the PD draws too much power.
It will simply restart the interface and send a Syslog message. So, because the interface restarts, the connected PD will lose power and then restart as well.
Then it will re-negotiate its power needs. Let me show you those commands in the CLI. On SW1’s G0/0 interface, I issued the command POWER INLINE POLICE.
Then I used the command SHOW POWER INLINE POLICE G0/0. First of all, here you can see how much power the switch is currently providing and how much capacity it has.
But here’s what I really want to show you. Even though I didn’t specify ACTION ERR-DISABLE in the command, you can see that the default action is err-disable.
Okay, this time I issued the command POWER INLINE POLICE ACTION LOG. I did SHOW POWER INLINE POLICE G0/0, and this time you can see the action is only log, the interface won’t be err-disabled if the connected PD draws too much power.
Power policing is one aspect of PoE that you should be aware of for the CCNA. Just be aware of its purpose, preventing PDs from drawing too much power.
Okay, let’s move on. Here are some standards of PoE. Actually, PoE originally wasn’t PoE, it was Cisco Inline Power, ILP.
As has happened multiple times, for example with CDP and LLDP, Cisco invented the technology first for its devices, and then it was standardized after.
Cisco ILP offers 7 watts of power per port from the PSE, and 2 wire pairs provide that power. Remember early in the course, how Ethernet and FastEthernet only used 4 of the 8 wires in an Ethernet cable to transmit data?
They used wires 1, 2, 3, and 6. Well, Cisco decided to use the other 4 wires, 4, 5, 7, and 8, to provide power. Later, Cisco ILP was standardized as Power over Ethernet, so other device makers would be able to use the
technology. PoE and PoE+, also called Type 1 and Type 2, provide more power than the original Cisco ILP.
Note the standard numbers, 802.3af and 802.3at. Then, Cisco released another original non-standard protocol called UPoE, which stands for Universal Power over Ethernet.
But then a similar standard was released, 802.3bt. This includes Type 3, offering up to 60 watts, and Type 4, offering up to 100 watts.
Now, you probably don’t have to memorize this table for the CCNA. You’re supposed to understand PoE concepts, what it is and what it’s used for.
However, just in case I will include some flash cards of this table in the supplemental resources. It’s up to you if you want to keep them or delete them.
Returning to that previous slide again, the PCs will still need to be plugged into an outlet to get their power. But these phones are able to get power over the same Ethernet cable they use to connect to the switch.
PoE isn’t a major CCNA topic, but you should know the information I gave you in this video. Now finally let’s move on to QoS, Quality of Service.
Why did I spend all this time talking about voice VLANs and PoE in a video about QoS? It’s because the voice data from IP phones is often what we want to apply QoS to, to give higher priority to the voice data and ensure high audio quality.
First, here’s an extremely simple history of why QoS was created. Voice traffic and data traffic used to use entirely separate networks.
Voice traffic used the PSTN, public switched telephone network. And what we call data traffic used IP networks such as an enterprise WAN or the Internet, for example a PC accessing a file server over the enterprise WAN.
QoS wasn’t really necessary, because the different kinds of traffic didn’t compete for bandwidth. The audio quality of a phone call won’t be affected if the Internet connection is busy.
However, modern networks are typically converged networks in which IP phones, video traffic, regular data traffic such as web traffic, etc, all share the same IP network.
Now, the PSTN hasn’t disappeared, it’s still used all over the world, but we’ll focus just on the IP network from now on. Converged networks enable cost savings as well as more advanced features for voice and video traffic.
For example IP phones can integrate with collaboration software such as Cisco WebEx or Microsoft Teams. However, the different kinds of traffic now have to compete for bandwidth.
If there is plenty of available bandwidth and the network isn’t congested, that’s not a problem, but a busy network can pose a problem for voice and video traffic which is sensitive to things such as delay.
QoS, Quality of Service, is a set of tools used by network devices to apply different treatment to different packets. Certain kinds of traffic get higher priority treatment, and other kinds of traffic get lower priority treatment.
QoS is used to manage the following four characteristics of network traffic. First, bandwidth, a term you’ve certainly heard before. This refers to the overall capacity of the link and is measured in bits per second, for example kilobits per second, megabits per second, gigabits per
second, etc. QoS tools allow you to reserve a certain amount of a link’s bandwidth for specific kinds of traffic. For example, you could reserve 20% of a link’s bandwidth for voice traffic, 30% for specific kinds of important data traffic, and leave 50% for
all other traffic. The next characteristic is delay. There are two main ways to measure delay. The amount of time it takes for traffic to go from source to destination is called the one-way delay.
Let me demonstrate. The amount of time it takes a packet from phone1 to reach phone2 is called one-way delay. Alternatively, we could measure two-way delay, the amount of time it takes traffic to go from source to destination and return.
So, not just measuring how long it takes a packet to go from phone1 to phone2, but also how long it takes the reply to get back to phone1.
Okay, next up is Jitter. Jitter is the variation in one-way delay between packets sent by the same application. So, if some packets arrive in 10 milliseconds, but some arrive in 100 milliseconds, that’s a lot of jitter, a big difference in how long it takes for each packet to reach its
destination. Jitter will negatively affect the audio quality of phone calls, so IP phones have a jitter buffer to provide a fixed delay to audio packets.
However, if the jitter is too high it will overrun the buffer and the audio quality will suffer. Finally, there is loss. This refers to the percentage of packets sent that do not reach their destination.
This can be caused by faulty cables, or if the network is congested and a device’s packet queues get full, it will start discarding packets that can’t fit into the queue.
If some audio packets don’t reach their destination, for example, that will obviously have a negative effect on the quality of the call.
There are a few recommended standards for acceptable interactive audio quality. Interactive audio means something like a phone call, the audio of a Zoom call, etc.
It is recommended that the one-way delay be 150 milliseconds or less. And the jitter, the variation in delay, should be 30 milliseconds or less.
Finally, the loss should be 1% or less. If these standards are met, you can expect a decent experience, but if the standards are not met there could be a noticeable reduction in the quality of the phone call, the user experience will not be as good.
Now let me introduce the topic of queuing, which is important for understanding other aspects of QoS. If a network device receives messages faster than it can forward them out of the appropriate interface, the messages are placed in a queue.
For example, this router is receiving packets on its G0/0 and G0/1 interfaces faster than it can forward them out of its G0/2 interface.
So, as you can see the queue for its G0/2 interface starts filling up. By default, queued messages will be forwarded in a First In First Out, FIFO, manner.
What that means is that messages will be sent in the order they are received. No special treatment is given to any kind of traffic.
Now, what happens if the queue becomes full? Traffic keeps arriving on the G0/0 and G0/1 interfaces faster than the router can forward the packets out of G0/2 and the queue fills up.
When this happens, new packets will be dropped. So, if this packet arrives and needs to be forwarded out of G0/2, but the queue is full, it is dropped.
This is called tail drop, when there is not enough room in the queue so packets are dropped. Tail drop is harmful, not just because packets are lost, but because it can lead to something called TCP global synchronization.
To explain that, let me review the TCP sliding window. Hosts using TCP use the ‘sliding window’ to increase and decrease the rate at which they send traffic as needed.
So, the host will try to increase the rate at which it sends traffic. And when a packet is dropped, it will be re-transmitted. However, when this happens the sender will reduce the rate it sends traffic.
It will then gradually increase the rate again, and the process will repeat if another packet is dropped. When the queue fills up and tail drop occurs, all TCP hosts sending traffic will slow down the rate at which they send traffic.
They will all then increase the rate at which they send traffic, which rapidly leads to more congestion, dropped packets, and then the process repeats again.
So, it creates waves of the network being underutilized, when they all slow down their rate of transmission, and then congested, when they all increase their rate of transmission.
Let me illustrate it for you. Network congestion leads to tail drop, which leads to a global TCP window size decrease. By global I mean all hosts sending TCP traffic will decrease their window size.
That leads to the network being underutilized. All of the hosts reduce their transmission rate, so they’re not sending traffic as quickly as they could.
That leads to a global TCP window size increase. All sending hosts, noticing that they are able to send traffic more quickly than they currently are, will increase their window size at the same time.
This leads once again to network congestion, and the process repeats in waves. Overutilization, underutilization, overutilization, underutilization etc.
A solution to prevent tail drop and therefore prevent TCP global synchronization is Random Early Detection, RED. When the amount of traffic in the queue reaches a certain threshold, the device will start randomly dropping packets from select TCP flows.
Why is this better than tail drop? Those TCP flows that dropped packets will reduce the rate at which traffic is sent, but you will avoid global TCP synchronization in which ALL TCP flows reduce and then increase the rate of transmission at the same time in waves.
So, ideally it will keep the rate of traffic more even. Now, in standard RED all kinds of traffic are treated the same. There is a global threshold, and if the amount of traffic in the queue crosses the threshold the device will start dropping traffic randomly as I said above.
However an improved version called Weighted Random Early Detection, WRED, allows you to control which packets are dropped depending on the traffic class.
So, you could for example start dropping HTTP packets when the queue is this full, FTP packets when the queue is that full, etc. The kinds of traffic that you configure as lower-priority will be dropped sooner.
We will cover traffic classes and more details about how QoS actually works in the next video. For now, I think this is a sufficient introduction to the topic.
Okay, before moving on to the quiz let’s review what we covered. First I introduced IP phones and voice VLANs. I showed you that an IP phone can be connected to a switch, and then a PC can be connected to the IP phone.
A voice VLAN can be configured on the switchport, and the IP phone will tag traffic it sends using the voice VLAN. Then I briefly introduced Power over Ethernet, which allows end devices to receive electric power via the same Ethernet cable that is used to send and receive data.
It is commonly used for IP phones, cameras, and wireless access points. Finally we got to the main topic of the video, an intro to quality of service, QoS, which allows you to give special treatment to specific kinds of traffic, and it’s commonly used for delay-sensitive traffic such as video
and voice traffic. However, we only covered the foundational knowledge in this video, such as defining delay, jitter, and loss. In the next video we’ll look at the mechanics of how QoS works.
Make sure to watch until the end of the video for a bonus practice question from Boson Software’s ExSim for CCNA, the best practice exams for the CCNA.
Okay, let’s go to question 1 of the quiz. Examine G0/0’s interface configuration. Which of the following statements are true?
Select two. Okay, pause the video now to look at the configuration and select the correct answers.
Okay, the answers are A, voice traffic received by G0/0 should be tagged in VLAN 99, and D, data traffic received by G0/0 should be untagged.
A phone connected to G0/0 should learn using CDP that it is in VLAN 99, and then it should tag traffic it sends in VLAN 99. Now, there is no SWITCHPORT ACCESS VLAN command on the interface, so that means it is in the default VLAN, VLAN 1.
Data traffic, for example sent by a PC connected to the IP phone which is connected to G0/0, will send its traffic untagged. After SW1 receives the untagged traffic it will assume it is in VLAN1, but when it actually receives the traffic it should be untagged.
Okay, let’s go to question 2. You issue the power inline police command on a PoE-enabled switch port. What will happen if the connected device draws too much power from the switch?
Pause the video now to think about the answer. Okay, the answer is C, the interface will be err-disabled and a Syslog message will be generated.
To enable it again, you should issue the SHUTDOWN command and then NO SHUTDOWN command on the interface. When you issue the command, the default action is ERR-DISABLE, so it’s equivalent to POWER INLINE POLICE ACTION ERR-DISABLE.
Okay, let’s go to question 3. Which of the following are recommended standards for acceptable interactive audio quality? Select three. Pause the video now to think about the answers.
Okay, the answers are B, delay of 150 milliseconds or less, C, jitter of 30 milliseconds or less, and E, loss of 1% or less.
If these standards are not met, you can probably expect a noticeable reduction in the quality of the experience. Okay, let’s go to question 4.
Which of the following is a negative effect of tail drop? Pause the video now to think about the answer.
Okay, the answer is D, TCP global synchronization. When a packet queue fills up and tail drop occurs, all hosts sending TCP traffic will slow down their rate of transmission in unison, and then increase it in unison too.
This leads to repeating waves of congestion followed by slower traffic rates. A TCP sliding window, is merely a mechanic in TCP, it’s not a negative thing on its own.
RED and WRED are two tools to avoid tail drop, so they are not a negative effect of tail drop. Okay, let’s go to question 5.
Which of the following is the default manner of forwarding queued packets? Pause the video now to think about the answer.
Okay, the answer is A, FIFO, which stands for First In First Out. Basically, it means that packets will be forwarded in the order they are put into the queue.
Higher priority packets will not be sent to the front of the queue, for example. B, CBWFQ, is something I’ll mention in the next video.
RED and WRED, I have already mentioned. They are not methods of forwarding queued packets, they are methods of dropping queued packets.
Okay, that’s all for the quiz. Now let’s take a look at a bonus question from Boson Software’s ExSim for CCNA.
There are supplementary materials for this video. There is a flashcard deck to use with the software ‘Anki’. There will also be a packet tracer practice lab so you can get some hands-on practice.
That will be in the next video. Sign up for my mailing list via the link in the description, and I’ll send you all of the flashcards and packet tracer lab files for the course.
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 Sam, Anton, Tebogo, Samil, Anand, Pavel, Abraham, Serge, Njoku, Viktor, Roger, Raj, Kenneth, Seamus, Brandon, Aaron, Marcel, Kone, Donald, C Mohd, Gustavo, Benjamin, Justin, Prakaash, Nasir, Erlison, Marko, Daming, Ed, John, Funnydart, Velvijaykum,
Mark, Yousif, Boson Software, Devin, Lito, 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 11th 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.