1. Lecture 11 – Quality of Service
Li
DCN330 Fall 2017
2. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
2
DCN330 Fall 2017
3. 3
Why Do We Need QoS?
Video Streaming Services
Video Conferencing
VoIP
QoS development inspired by new types of applications
in IP environment:
DCN330 Fall 2017
4. Why Do We Need QoS?
Multiple application networks are being
combined into consolidated corporate utility
networks
Traffic can suffer from the following symptoms:
Delay (or latency)- is the time that is required for a
packet to travel from its source to its destination.
Jitter (or delay variation)- is the uneven arrival of
packets.
Packet drops (or packet loss)-Packet drops occur
when a link is congested and a buffer overflows.
4
DCN330 Fall 2017
5. Why Do We Need QoS?
Voice
No more than 150 ms of one-way delay
No more than 30 ms of jitter
No more than 1 percent packet loss
Video
No more than 150ms of one-way delay for interactive voice applications (e.g.
video conferending)
No more than 30 ms of jitter
No more than 1 percent packet loss
Data
Applications have varying delay and loss characteristics
5
DCN330 Fall 2017
6. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
6
DCN330 Fall 2017
7. 7
QoS Architecture Models
Best Effort Service
Integrated Service
Differentiated Service
DCN330 Fall 2017
8. 8
QoS Architecture Models
Best Effort Service:
All packets treated equally
Unpredictable bandwidth
Unpredictable delay and jitter
DCN330 Fall 2017
9. 9
QoS Architecture Models
Integrated Service (IntServ)
IntServ is often referred to as “Hard QoS,” because it can make strict
bandwidth reservations. IntServ uses signaling among network devices
to provide bandwidth reservations. Resource Reservation Protocol
(RSVP) is an example of an IntServ approach to QoS. Because IntServ
must be configured on every router along a packet’s path, the main
drawback of IntServ is its lack of scalability.
DCN330 Fall 2017
10. 10
QoS Architecture Models
Differentiated Service (DiffServ)
DiffServ, as the name suggests, differentiates between multiple traffic flows.
Specifically, packets are “marked,” and routers and switches can then make
decisions (for example, dropping or forwarding decisions) based on those
markings.
Each compliant node can have various behaviors
DiffServ is far more flexible and scalable
DiffServ can be pervasively deployed throughout the network
Focus of today’s lecture
DCN330 Fall 2017
11. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
11
DCN330 Fall 2017
12. 12
QoS Architecture Components
Classification and Marking
Traffic Shaping/Policing
Congestion Management
Congestion Avoidance
Link Efficiency
DCN330 Fall 2017
13. Classification and Marking Options
QoS Tools (You must have a QoS tool that references those
marking and alters the packets’ treatment based on those
markings, because marking alone does not alter the
behaviour of packets. )
Classification—Classification is the process of placing traffic into
different categories. Multiple characteristics can be used for
classification. For example, POP3, IMAP, SMTP, and Exchange traffic
could all be placed in an “EMAIL” class. Classification does not,
however, alter bits in the frame or packet.
Marking—Marking alters bits (for example, bits in the ToS byte) within
a frame, cell, or packet to indicate how the network should treat that
traffic. Marking alone does not change how the network treats a
packet. Other tools (for example, queuing tools) can, however,
reference those markings and make decisions based on them.
13
DCN330 Fall 2017
14. 14
Classification and Marking Options
Classification can be done on:
Layer 1 criteria: such as ingress physical interface
Layer 2 criteria: such as IEEE 802.1Q/p CoS (Class of Service)
Layer 3 criteria: such as IP DSCP
Layer 4 criteria: such as TCP/UDP port(s)
Layer 7 criteria: such as Packet Content (NBAR)
i.e. HTTP, HTTPS, FTP etc.
Marking can be done on:
Layer 2 fields: such as IEEE 802.1Q/p CoS
Layer “2.5” fields: such as MPLS EXP
Layer 3 fields: such as IP DSCP
DCN330 Fall 2017
15. Classification & Marking Tools
DiffServ at Layer 3
Inside an IPv4 header is a byte called the type of service (ToS) byte. You can
mark packets, using bits within the ToS byte, with either IP Precedence or
Differentiated Service Code Point (DSCP) markings.
The challenge with so many values at your disposal is that the value you
choose to represent a certain level of priority can be treated differently by a
router or switch under someone else’s administration.
15
DCN330 Fall 2017
16. Classification & Marking Tools
DiffServ at Layer 3
The 6 leftmost bits (or DSCP) in the ToS yields 64
possible values
These 64 values called per-hop behaviours (PHBs).
because they indicate how packets should be
treated by each router hop along the path from
the source to the destination
16
DCN330 Fall 2017
17. 17
QoS Architecture Components
Classification and Marking
Traffic Shaping/Policing
Congestion Management
Congestion Avoidance
Link Efficiency
DCN330 Fall 2017
18. QoS Architecture Components (cont’d)
Policing and shaping—Sometimes, instead of making a minimum amount of
bandwidth available for specific traffic types, you might want to limit the available
bandwidth. Both policing and shaping tools can accomplish this objective. Collectively,
these tools are called traffic conditioners.
Congestion management—When you hear the term congestion management, think
queuing. These concepts are the same. When an interface’s output software queue
contains packets, the interface’s queuing strategy determines how the packets are
emptied from the queue. We will present details later in the lecture.
Congestion avoidance—If an interface’s output queue fills to capacity, newly arriving
packets are discarded (that is, “tail-dropped”), regardless of the priority that is
assigned to the discarded packet.
Link efficiency—To make the most of the limited bandwidth that is available on
slower-speed links, you can choose to implement compression or Link Fragmentation
and Interleaving (LFI).
18
DCN330 Fall 2017
19. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
19
DCN330 Fall 2017
20. Basic QoS Configuration
One of the most powerful approaches to QoS
configuration is the Modular Quality of Service
Command-Line Interface (MQC).
20
DCN330 Fall 2017
21. Basic QoS Configuration (cont’d)
Step 1: create class-maps to categorize traffic types.
IOS Commands:
Router(config)#class-map [match-any | match-all] class-
name
After you are in class-map configuration mode, you can
specify multiple match statements to match traffic, and all
traffic that meets the criteria that you specified with the
match commands is categorized under the class-map.
After the class-maps are defined, the first step of MQC is
complete.
21
DCN330 Fall 2017
22. Basic QoS Configuration (cont’d)
Step 2: create a policy-map, which assigns
characteristics (for example, marking) to the
classified traffic.
To enter policy-map configuration mode, issue the
following command:
Router(config)#policy-map policy-name
From policy-map configuration mode, enter policy-map-
class configuration mode with the following command:
Router(config-pmap)#class class-name
22
DCN330 Fall 2017
23. Basic QoS Configuration (cont’d)
Step 3: apply the policy-map to an interface.
Command:
Router(config-if)#service-policy {input | output} policy-
map-name
23
DCN330 Fall 2017
24. Basic QoS Configuration (cont’d)
Example: you are classifying various types
of e-mail traffic (for example, SMTP, IMAP,
and POP3) into one class-map. The KaZaa
protocol, which is used for music
downloads, is placed in another class-map.
Voice over IP (VoIP) traffic is placed in yet
another class-map. Then, the policy-map
assigns bandwidth allocations or limitations
to these traffic types.
•Explanation: the QOS-STUDY policy-map
makes 128 kbps of bandwidth available to
e-mail traffic. However, KaZaa version 2
traffic bandwidth is limited to 32 kbps (that
is, KaZaa traffic higher than this rate will be
dropped). Voice packets not only have
access to 256 kbps of bandwidth, but they
also receive “priority” treatment, meaning
that they are sent first (that is, ahead of
other traffic) up to the 256-kbps limit.
24
Note:
Some application
protocols may not
be available by
default on your
router, which needs
to be supported by
the PDLM (or
application
recognition
modules)
installation.
DCN330 Fall 2017
25. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
25
DCN330 Fall 2017
26. Queuing
Queuing
is sometimes referred to as congestion management, queuing
mechanisms identify how traffic from multiple streams is sent out of
an interface that is currently experiencing congestion. We will
examines approaches to queuing and emphasizes the queuing
approaches configured via MQC.
Queuing Basics
When a device, such as a switch or a router, is receiving traffic faster
than it can be transmitted, the device attempts to buffer the extra
traffic until bandwidth is available. This buffering process is called
queuing. You can use queuing mechanisms to influence in what order
various traffic types are emptied from the queue.
26
DCN330 Fall 2017
27. Queuing (cont’d)
Two queuing mechanisms: CB-WFQ (Class-Based Weighted Fair Queueing)
and LLQ (Low Latency Queuing).
The WFQ mechanism made sure that no traffic was starved out. However,
WFQ did not make a specific amount of bandwidth available for defined
traffic types. You can, however, specify a minimum amount of bandwidth
to make available for various traffic types using the CB-WFQ mechanism.
CB-WFQ is configured through the three-step MQC process. Using
MQC, you can create up to 63 class-maps and assign a minimum
amount of bandwidth for each one. Note that the reason you cannot
create 64 class-maps is that the class-default class-map has already
been created.
Low Latency Queuing (LLQ) is almost identical to CB-WFQ. However, with
LLQ, you can instruct one or more class-maps to direct traffic into a
priority queue.
27
DCN330 Fall 2017
28. Queuing (cont’d)
CB-WFQ:
You can make a specific amount of bandwidth available for classified
traffic. To allocate a bandwidth amount, use the following command,
noting that the units of measure are in kbps:
Router(config-pmap-c)#bandwidth {kbps}
Instead of specifying an exact amount of bandwidth, you can specify a
percentage of the interface bandwidth. For example, a policy-map
could allocate 25 percent of an interface’s bandwidth. Then, that
policy-map could be applied to, for example, a Fast Ethernet interface
and also to a slower-speed serial interface.
Router(config-pmap-c)#bandwidth percent {value}
28
DCN330 Fall 2017
29. Queuing (cont’d)
LLQ:
You can use either of the following commands to direct packets to the
priority queue:
Router(config-pmap-c)#priority bandwidth
(Note that the bandwidth units of measure are in kbps.)
Router(config-pmap-c)#priority percent percent
(Note that the percent option references a percentage of the interface
bandwidth.)
29
DCN330 Fall 2017
30. Queuing (cont’d)
LLQ Example: in the example on the
right, NBAR is being used to recognize
http traffic, and that traffic is placed in
the SURFING class. Note that NBAR
(Network-Based Application
Recognition) is invoked with the
following command:
Router(config-cmap)# match protocol
Voice packets are placed in the VOICE
class. The QOS_STUDY policy-map gives
128 kbps of bandwidth to the http
traffic while giving 256 kbps of priority
bandwidth to voice traffic. Then the
policy-map is applied outbound to
interface serial 0/1.
30
DCN330 Fall 2017
31. QoS
Why Do We Need QoS?
QoS Architecture Models
QoS Architecture Components
Basic Configurations
Example in Queuing
IOS Commands Review
31
DCN330 Fall 2017
32. IOS Commands Review
class-map Creates a class map to be used for matching packets to the class whose
name you specify.
match protocol Defines the match criteria to classify traffic. NBAR (Network-Based
Application Recognition) will be invoked.
class Specifies the name of the class whose policy you want to create or change or
to specify the default class (commonly known as the class-default class) before
you configure its policy.
policy-map Enters policy-map configuration mode and creates or modifies a policy
map that can be attached to one or more interfaces to specify a service policy.
bandwidth The bandwidth command (used in policy-map) provides a minimum
bandwidth guarantee during congestion.
priority The priority command (used in policy-map) implements a maximum
bandwidth guarantee.
To confirm the QOS is working you would use the command: show policy-map
interface [fastethernet 0/0]
To show class map(s) defined: show class-map
32
DCN330 Fall 2017
33. IOS Commands Review (cont’d)
Difference between bandwidth and priority
command.
http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-packet-marking/10100-priorityvsbw.html
33
DCN330 Fall 2017
34. IOS Commands Review (cont’d)
Although the bandwidth guarantees provided by the bandwidth and priority
commands have been described with words like "reserved" and "bandwidth to be
set aside", neither command implements a true reservation. In other words, if a
traffic class is not using its configured bandwidth, any unused bandwidth is shared
among the other classes.
The queueing system imposes an important exception to this rule with a priority
class.
http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-packet-marking/10100-priorityvsbw.html
34
DCN330 Fall 2017
35. In-Class Activity
Finish the following task in groups:
In a WAN connection between R1 and R2,
you want to make sure the outbound
HTTP traffic on the interface S0/0/0 of
R1, can be guaranteed with the 1Mbps
bandwidth. Try to apply a QoS policy
following the steps:
Step 1: Create a class-map “WEB” to
category this HTTP traffic.
Step 2: Create a policy-map “MY-
QOS-POLICY”, which assigns
characteristics (for example, marking)
to the classified traffic.
Step 3: Apply the policy-map to an
interface.
Step 4: Verify your class-map and
policy-map
35
Note: The router type can be Cisco 2811 with one
WIC-2T module installed (two serial ports are
available on this module).
DCN330 Fall 2017
36. References
Cisco IP Telephony Flash Cards: Weighted Random Early Detection (WRED).
Available at http://www.ciscopress.com/articles/article.asp?p=352991
Comparing the bandwidth and priority Commands of a QoS Service Policy.
Available at: http://www.cisco.com/c/en/us/support/docs/quality-of-service-
qos/qos-packet-marking/10100-priorityvsbw.html
Comparing Traffic Policing and Traffic Shaping for Bandwidth Limiting. Available at:
http://www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-
policing/19645-policevsshape.html
36
DCN330 Fall 2017