- [Instructor] Imagine a situation
where I have an internet connection of 100 megabits.
I also have users inside doing a myriad of tasks
from using voice over IP phones
connected to a PBX on the internet
to researching on Google to browsing Facebook
or even watching YouTube videos.
This doesn't sound too far off of a normal environment.
Now imagine that your users are trying to use 150 megabits
of download on your 100 megabit connection.
You're going to have a bad time.
This causes all sorts of slowdowns,
failed connections, terrible phone quality,
and a lot of angry people yelling at you about the internet.
Luckily, there's a mechanism designed to handle
these kinds of situations, Quality of Service, or QoS.
QoS is a suite of tools that are used
to identify certain types of traffic,
mark it for action in this or another device,
and last, to enact a policy on it.
Effectively, QoS provides an administrator the ability
to manage jitter, delay, loss, and bandwidth.
Bandwidth is essentially the speed of a link
measured in bits per second.
This equates to the capacity of your pipe.
One-way delay is the amount of time it takes a packet
to reach a destination from the time it sent.
Round-trip delay refers to the amount of time it takes
for a packet to reach a host and for that traffic to return.
Jitter is when there is rapid variance in delay.
Say, for example, I make a VoIP call and my traffic
uses a delay of 30 milliseconds,
then 300, then 30, then 400.
My call quality will be awful
as there will be major stuttering on the call.
Loss is pretty simple.
It's just how many packets are lost from point A to point B.
Traffic can be acted upon
as it enters or leaves an interface.
Step one is to identify certain types of traffic
through a process known as classification.
Differentiated services, or DiffServ,
operates on the principle of traffic classification.
It marks each data packet
into one of a limited number of traffic classes.
This classification can be done in a router
then acted upon, say, with a queue.
Queuing is a process where different packets
are placed in different buckets.
And, when there's a congestion situation,
different buckets will get to send packets first.
Classification can also happen earlier in a packet's life,
say, as it enters a switch from a host.
As traffic enters a switch port,
it can be classified then marked by setting values
in the differentiated services code point field
within the IP header.
This is a six-bit field
designed specifically for QoS marking.
This means that, when the traffic hits the router,
it can simply examine the DSCP field
without having to reclassify.
DiffServ has many values traffic can be marked as.
Expedited forwarding is represented as 46 in decimal form
or expedited forward in text.
When configuring values,
either text or decimal are acceptable.
EF is designed for low latency, jitter, and loss packets.
This is generally reserved for VoIP traffic.
Assured forwarding is a collection
of 12 various DSCP values.
It defines four queue types,
each with three levels of drop priority.
Queues are utilized in all networking equipment.
Sometimes as packets are accepted,
then a forwarding decision is made, and the packet is sent.
The outgoing interface is busy
so the device will store the packet in a queue
until the interface is no longer busy.
By default, many devices use a FIFO,
or first-in, first-out queue.
In essence, everyone stands in line
and the first that arrived gets sent first.
The classifier chooses which queued packets enter,
then a scheduler picks the packets from the queues
and sends them out of the queues.
Prioritization is when the scheduler
chooses packets from one queue over another.
No matter the queuing type,
it's generally a good idea to put voice traffic
into a low latency queue.
Time-sensitive traffic like voice
shouldn't sit in a queue for extended periods
as it can create delay and jitter which harm phone calls.
An LLQ will quickly empty
as not to interfere with important communications.
There are a couple of tools often seen at the WAN,
and I also use them in ISP networks
to limit customer traffic, shaping and policing.
Both monitor data bit rates
and attempt to keep them within a set limit.
Shaping does so by holding packets in a queue
while policing just drops packets.
I use policing in my ISP networks since it's the simplest
to configure and has the least impact to hardware resources.
It also allows for short bursting of traffic,
can be enabled bidirectionally on interfaces,
and can discard excess packets or remark them
so they can be acted upon later, if needed.
Since shaping stores packets,
an administrator needs to account for voice
and other low latency protocols
as not to store them so long as to cause jitter or delay.
Shapers can also allow for bursting
and they are enabled on egress only.
QoS can really be a lifesaver on constrained WAN lengths
so keep them in mind for your next low-bandwidth install.