6CS029 Lecture 4 - QoS Concepts

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Quality of Service (QoS) Concepts

6CS029 Advanced Networking


In this session
• Network Transmission Quality
• Traffic Characteristics
• Queuing Algorithms
• QoS Models
• QoS Implementation Techniques
Network Transmission Quality
The Purpose of QoS
• When traffic volume is greater than what can be
transported across the network, devices queue (hold) the
packets in memory until resources become available to
transmit them.
• Queuing packets causes delay because new packets
cannot be transmitted until previous packets have been
processed.
• If the number of packets to be queued continues to
increase, the memory within the device fills up and packets
are dropped.
Prioritizing Traffic
• One QoS technique that can help with this problem is to classify
data into multiple queues
Bandwidth, Congestion, Delay, and
Jitter
• Bandwidth is measured in the number of bits that can be
transmitted in a single second.
• Network congestion causes delay.
• Congestion points are ideal candidates for QoS mechanisms.
• Aggregation, speed mismatch, and LAN to WAN.
Bandwidth, Congestion, Delay, and
Jitter
Delay Description
Code delay The fixed amount of time it takes to compress data at the source
before transmitting to the first internetworking device, usually a switch.
Packetization The fixed time it takes to encapsulate a packet with all the necessary
delay header information.
Queuing delay The variable amount of time a frame or packet waits to be transmitted
on the link.
Serialization The fixed amount of time it takes to transmit a frame onto the wire.
delay
Propagation The variable amount of time it takes for the frame to travel between the
delay source and destination.
De-jitter delay The fixed amount of time it takes to buffer a flow of packets and then
send them out in evenly spaced intervals.
Packet Loss
Without QoS mechanisms, time-
sensitive packets, such as real-
time video and voice, are dropped
with the same frequency as data
that is not time-sensitive.
• When a router receives a Real-
Time Protocol (RTP) digital
audio stream for Voice over IP
Playout Delay Buffer Compensates for Jitter
(VoIP), it compensates for the
jitter that is encountered using a
playout delay buffer.
• The playout delay buffer buffers
these packets and then plays
them out in a steady stream.
Packet Loss
If the jitter is so large that it causes
packets to be received out of the
range of the play out buffer, the out-
of-range packets are discarded and
dropouts are heard in the audio.
• For losses as small as one packet,
the digital signal processor (DSP)
interpolates what it thinks the audio
should be and no problem is
audible to the user.
• When jitter exceeds what the DSP
can do to make up for the missing
packets, audio problems are heard.
Traffic Characteristics
Network Traffic Trends
In the early 2000s, the predominant types of IP traffic were voice and
data.
• Voice traffic has a predictable bandwidth need and known packet arrival
times.
• Data traffic is not real-time and has unpredictable bandwidth need.
• Data traffic can temporarily burst
More recently, video traffic has become the increasingly important.
• Video traffic represented 70% of all traffic in 2017.
• By 2022, video will represent 82% of all traffic.
• Mobile video traffic will reach 60.9 exabytes per month by 2022.
The type of demands that voice, video, and data traffic place on the
network are very different.
Voice
• Voice Traffic Characteristics
– Smooth
– Benign
– Drop sensitive
– Delay sensitive
– UPD priority
• Requirements
– Latency < 150ms
– Jitter < 30ms
– Loss < 1% Bandwidth (30-128
Kbps)
Video
• Characteristics
– Bursty
– Greedy
– Drop sensitive
– Delay sensitive
– UPD priority
• One-Way Requirements
– Latency < 200-400 ms
– Jitter < 30-50 ms
– Loss < 0.1 – 1%
– Bandwidth (384 Kbps - 20 Mbps)
Data
•Data applications that have no tolerance for data loss, such
as email and web pages, use TCP to ensure that if packets
are lost in transit, they will be resent.
• Data traffic can be smooth or bursty.
• Network control traffic is usually smooth and predictable.
•Some TCP applications can consume a large portion of
network capacity.
• Characteristics
• Smooth/bursty
• Benign/greedy
• Drop insensitive
• Delay insensitive
• TCP retransmits
Data
Data traffic is relatively insensitive to drops and delays compared to voice and video.
Quality of Experience or QoE is important to consider with data traffic.
• Does the data come from an interactive application?
• Is the data mission critical?

Factor Mission Critical Not Mission Critical

Interactive Prioritize for the lowest delay of all Applications could benefit from
data traffic and strive for a 1 to 2 lower delay.
second response time.
Not interactive Delay can vary greatly as long as Gets any leftover bandwidth after
the necessary minimum bandwidth all voice, video, and other data
is supplied. application needs are met.
Queuing Algorithms
First in First Out
• First In First Out (FIFO) queuing buffers and forwards packets in the
order of their arrival.
• FIFO has no concept of priority or classes of traffic and
consequently, makes no decision about packet priority.
• There is only one queue, and all packets are treated equally.
• Packets are sent out an interface in the order in which they arrive.
Weighted Fair Queuing (WFQ)
Provides fair bandwidth allocation to all network traffic.
• WFQ applies priority to identified traffic, classifies it into conversations
or flows, and then determines how much bandwidth each flow is
allowed relative to other flows.
• Classification can be based on source and destination IP addresses,
MAC addresses, port numbers, protocol, and Type of Service (ToS)
value.

• WFQ is not supported with tunneling


and encryption
Class-Based Weighted Fair Queuing
(CBWFQ)
Extends the standard WFQ functionality to provide support for user-
defined traffic classes.
• Traffic classes are defined based on match criteria including protocols,
access control lists (ACLs), and input interfaces.
• A FIFO queue is reserved
for each class
• A class can be assigned
characteristics, such as
bandwidth, weight, and
maximum packet limit.
Low Latency Queuing (LLQ)
The Low Latency Queuing (LLQ) feature brings strict priority queuing
(PQ) to CBWFQ.
• Strict PQ allows delay-sensitive packets such as voice to be sent
before packets in other queues.
• LLQ allows delay-
sensitive packets to be
sent first giving delay-
sensitive packets
preferential treatment
over other traffic.
QoS Models
QoS Models
Model Description

Best-effort • Not an implementation as QoS is not explicitly configured.


model • Use when QoS is not required.

Integrated • Provides very high QoS to IP packets with guaranteed delivery.


services • Defines a signaling process for applications to signal to the
(IntServ) network that they require special QoS for a period and that
bandwidth should be reserved.
• IntServ can severely limit the scalability of a network.

Differentiated • Provides high scalability and flexibility in implementing QoS.


services • Network devices recognize traffic classes and provide different
(DiffServ) levels of QoS to different traffic classes.
Best Effort
The basic design of the internet is best-effort packet delivery and
provides no guarantees.
• All network packets are treated in the same way

Benefits Drawbacks
The model is the most scalable. There are no guarantees of delivery.
Scalability is only limited by Packets will arrive whenever they can
available bandwidth, in which and in any order possible, if they
case all traffic is equally affected. arrive at all.
No special QoS mechanisms are No packets have preferential
required. treatment.
It is the easiest and quickest Critical data is treated the same as
model to deploy. casual email is treated.
Integrated Services
• Explicitly provide QoS to individual flows
• Uses resource reservation and admission-
control mechanisms
• Uses a connection-oriented approach
• Admission control at the edge router
• Application informs the network of its traffic
profile and requests a particular kind of
service.
• Uses the Resource Reservation Protocol
(RSVP) to signal the QoS needs of an
application’s traffic along devices in the end-
to-end path through the network.
Benefits Drawbacks
• Explicit end-to-end resource admission • Resource intensive due to the stateful
control architecture requirement for continuous
• Per-request policy admission control signaling.
• Signaling of dynamic port numbers • Flow-based approach not scalable to large
implementations such as the internet.
Differentiated Services
Simple and scalable mechanism for classifying
and managing network traffic.
• Is not an end-to-end QoS strategy because it
cannot enforce end-to-end guarantees.
• The router which classifies the flows into
classes based on business requirements and
provides the appropriate QoS policy for the
classes.
• Enforces and applies QoS mechanisms on a
hop-by-hop basis
• It is possible to choose many levels of service
with DiffServ.
Benefits Drawbacks
• Highly scalable • No absolute guarantee of service quality
• Provides many different levels • Requires a set of complex mechanisms to
of quality work in concert throughout the network
QoS Implementation Techniques
QoS Tools
QoS Tools Description
Classification and • Sessions, or flows, are analyzed to determine
marking tools what traffic class they belong to and then marked

Congestion • Traffic classes are allotted portions of network


avoidance tools resources, as defined by the QoS policy.
• The QoS policy also identifies how some traffic
may be selectively dropped, delayed, or re-
marked to avoid congestion.
Congestion • When traffic exceeds available network
management tools resources, traffic is queued to await availability of
resources.
QoS Tools

Note: Classification and marking can be done on ingress or egress, whereas other
QoS actions such queuing and shaping are usually done on egress.
Classification and Marking
Before a packet can have a QoS policy applied to it, the packet has to be classified.
Classification determines the class of traffic to which packets or frames belong. Only
after traffic is marked can policies be applied to it.
How a packet is classified depends on the QoS implementation.
• Methods of classifying traffic flows at Layer 2 and 3 include using interfaces,
ACLs, and class maps.
• Traffic can also be classified at Layers 4 to 7 using Network Based Application
Recognition (NBAR).

QoS Tools Layer Marking Field Bits


Ethernet (802.1q, 2 Class of Service (CoS) 3
802.1p)
802.11 (Wi-Fi) 2 Wi-Fi Traffic Identifier (TID) 3
MPLS 2 Experimental (EXP) 3
IPv4 and IPv6 3 IP Precedence (IPP) 3
IPv4 and IPv6 3 Differentiated Services Code Point 6
(DSCP)
Marking at Layer 2
802.1Q is the IEEE standard that supports VLAN tagging at Layer 2 on Ethernet
networks. When 802.1Q is implemented, two fields are inserted into the Ethernet
frame following the source MAC address field.
Marking at Layer 3
IPv4 and IPv6 specify an 8-
bit field in their packet
headers to mark packets.

Both IPv4 and IPv6 support


an 8-bit field for marking:
the Type of Service (ToS)
field for IPv4 and the Traffic
Class field for IPv6.
Type of Service and Traffic Class Field
The Type of Service (IPv4) and Traffic Class
(IPv6) carry the packet marking as assigned
by the QoS classification tools.
• RFC 791 specified the 3-bit IP
Precedence (IPP) field to be used for
QoS markings.
• RFC 791 and redefines the ToS field by
renaming and extending the IPP field to 6
bits called the Differentiated Services
Code Point (DSCP) field, these six bits
offer a maximum of 64 possible classes of
service.
• The remaining two IP Extended
Congestion Notification (ECN) bits can be
used by ECN-aware routers to mark
packets instead of dropping them.
DSCP Values
The 64 DSCP values are organized into
three categories:
• Best-Effort (BE) - This is the default
for all IP packets. The DSCP value is
0.
• Expedited Forwarding (EF) -
decimal value 46 (binary 101110).
The first 3 bits (101) map directly to
the Layer 2 CoS value 5 used for
voice traffic. At Layer 3, it is
recommended that EF only be used
to mark voice packets.
• Assured Forwarding (AF) - use the
5 most significant DSCP bits to
indicate queues and drop • The first 3 most significant bits of the DSCP field
preference. and indicate the class.
• Map directly to the 3 bits of the CoS field and
the IPP field to maintain compatibility
Trust Boundaries
Traffic should be classified and marked as close to its source as technically and
administratively feasible. This defines the trust boundary.
1. Trusted endpoints have the capabilities and intelligence to mark application traffic to the
appropriate Layer 2 CoS and/or Layer 3 DSCP values.
2. Secure endpoints can have traffic marked at the Layer 2 switch.
3. Traffic can also be marked at Layer 3 switches / routers.
Congestion Avoidance
•Tools to monitor traffic to anticipate and avoid congestion at common
bottlenecks
•monitor the average depth of the queue, When the maximum threshold is
passed, all packets are dropped.
•Some congestion avoidance techniques provide preferential treatment for which
packets get dropped.
Shaping and Policing
Mechanisms provided to prevent congestion.
• Traffic shaping retains excess packets in a queue and then schedules the
excess for later transmission over increments of time. Traffic shaping results
in a smoothed packet output rate.
• Shaping is an outbound concept; packets going out an interface get queued
and can be shaped. In contrast, policing is applied to inbound traffic on an
interface.
Shaping and Policing
Policing is applied to inbound traffic on an interface. Policing is commonly
implemented by service providers to enforce a contracted customer information
rate (CIR). However, the service provider may also allow bursting over the CIR
if the service provider’s network is not currently experiencing congestion.
Questions?

You might also like