Introduction To QoS
Introduction To QoS
Introduction To QoS
This section introduces the concept of QoS and discusses the four main issues in a
converged network that have QoS implications, as well as the Cisco IP QoS
mechanisms and best practices to deal with those issues. This section also introduces
the three steps in implementing a QoS policy on a network.
Available Bandwidth
Packets usually flow through the best path from source to destination.
The maximum bandwidth of that path is equal to the bandwidth of the link
with the smallest bandwidth. Figure 2-1 shows that R1-R2-R3-R4 is the best
path between the client and the server. On this path, the maximum
bandwidth is 10 Mbps because that is the bandwidth of the link with the
smallest bandwidth on that path. The average available bandwidth is the
maximum bandwidth divided by the number of flows.
Figure 2-1 Maximum Bandwidth and Average Available Bandwidth
Along the Best Path (R1-R2-R3-R4) Between the Client and Server
End-to-End Delay
There are different types of delay from source to destination.
End-to-end delay is the sum of those different delay types that affect
the packets of a certain flow or application. Four of the important
types of delay that make up end-to-end delay are as follows:
Processing delay
Queuing delay
Serialization delay
Propagation delay
Delay Variation
The variation in delays experienced by the packets of the same
flow is called delay variation or jitter. Packets of the same flow might
not arrive at the destination at the same rate that they were released.
These packets, individually and independent from each other, are
processed, queued, dequeued, and so on. Therefore, they might
arrive out of sequence, and their end-to-end delays might vary. For
voice and video packets, it is essential that at the destination point,
the packets are released to the application in the correct order and at
the same rate that they were released at the source. The de-jitter
buffer serves that purpose. As long as the delay variation is not too
much, at the destination point, the de-jitter buffer holds packets, sorts
them, and releases them to the application based on the Real-Time
Transport Protocol (RTP) time stamp on the packets. Because the
buffer compensates the jitter introduced by the network, it is called
the de-jitter buffer.
Average queue length, packet size, and link bandwidth
contribute to serialization and propagation delay. You can
reduce delay by doing some or all of the following:
Increase (upgrade) link bandwidthThis is effective as the
queue sizes drop and queuing delays soar. However, upgrading link
capacity (bandwidth) takes time and has cost implications, rendering
this approach unrealistic at times.
Prioritize delay-sensitive packets and forward important
packets firstThis might require packet classification or marking,
but it certainly requires deployment of a queuing mechanism such as
weighted fair queuing (WFQ), class-based weighted fair queuing
(CBWFQ), or low-latency queuing (LLQ). This approach is not as costly
as the previous approach, which is a bandwidth upgrade.
Reprioritize packetsIn certain cases, the packet priority
(marking) has to change as the packet enters or leaves a device.
When packets leave one domain and enter another, this priority
change might have to happen. For instance, the packets that leave an
enterprise network with critical marking and enter a provider network
might have to be reprioritized (remarked) to best effort if the
enterprise is only paying for best effort service.
Layer 2 payload compressionLayer 2 compression reduces
the size of the IP packet (or any other packet type that is the frames
payload), and it frees up available bandwidth on that link. Because
complexity and delay are associated with performing the
compression, you must ensure that the delay reduced because of
compression is more than the delay introduced by the compression
complexity. Note that payload compression leaves the frame header
in tact; this is required in cases such as frame relay connections.
Use header compressionRTP header compression (cRTP) is
effective for VoIP packets, because it greatly improves the overheadto-payload ratio. cRTP is recommended on slow (less than 2 Mbps)
links. Header compression is less CPU-intensive than Layer 2 payload
compression.
Packet Loss
Packet loss occurs when a network device such as a router has
no more buffer space on an interface (output queue) to hold the new
incoming packets and it ends up dropping them. A router may drop
some packets to make room for higher priority ones. Sometimes an
interface reset causes packets to be flushed and dropped. Packets are
dropped for other reasons, too, including interface overrun.
TCP resends the dropped packets; meanwhile, it reduces the
size of the send window and slows down at times of congestion and
high network traffic volume. If a packet belonging to a UDP-based file
transfer (such as TFTP) is dropped, the whole file might have to be
resent. This creates even more traffic on the network, and it might
annoy the user. Application flows that do not use TCP, and therefore
are more drop-sensitive, are called fragile flows.
During a VoIP call, packet loss results in audio breakup. A video
conference will have jerky pictures and its audio will be out of synch
with the video if packet drops or extended delays occur. When
network traffic volume and congestion are heavy, applications
experience packet drops, extended delays, and jitter. Only with proper
QoS configuration can you avoid these problems or at least limit them
to low-priority packets.
On a Cisco router, at times of congestion and packet drops,
you can enter the show interface command and observe that
on some or all interfaces, certain counters such as those in
the following list have incremented more than usual
(baseline):
Figure 2-2 displays the stated scenario that leads to extended delay
and packet loss. Congestion avoidance tools trigger TCP-based
applications to throttle back before queues and buffers become full
and tail drops start. Because congestion avoidance features such as
WRED do not trigger UDP-based applications (such as VoIP) to slow
down, for those types of applications, you must deploy other features,
including compression techniques such as cRTP and advanced
queuing such as LLQ.
The earliest versions of QoS tools protected data against data. For
instance, priority queuing made sure packets that matched an access
list always had the right of way on an egress interface. Another
example is WFQ, which prevents small packets from waiting too long
behind large packets on an egress interface outbound queue. When
VoIP started to become a serious technology, QoS tools were created
to protect voice from data. An example of such a tool is RTP priority
queue.
RTP priority queue is reserved for RTP (encapsulating voice
payload). RTP priority queuing ensures that voice packets receive
right of way. If there are too many voice streams, data applications
begin experiencing too much delay and too many drops. Strict priority
queue (incorporated in LLQ) was invented to limit the bandwidth of
the priority queue, which is essentially dedicated to voice packets.
This technique protects data from voice; too many voice streams do
not downgrade the quality of service for data applications. However,
what if there are too many voice streams? All the voice calls and
streams must share the bandwidth dedicated to the strict priority
queue that is reserved for voice packets. If the number of voice calls
exceeds the allocated resources, the quality of those calls will drop.
The solution to this problem is call admission control (CAC). CAC
prevents the number of concurrent voice calls from going beyond a
specified limit and hurting the quality of the active calls. CAC protects
voice from voice. Almost all the voice requirements apply to video
applications, too; however, the video applications are more bandwidth
hungry.
Enterprise networks must support a variety of applications with
diverse bandwidth, drop, delay, and jitter expectations. Network
engineers, by using proper devices, Cisco IOS features, and
configurations, can control the behavior of the network and make it
provide predictable service to those applications. The existence of
voice, video, and multimedia applications in general not only adds to
the bandwidth requirements in networks but also adds to the
challenges involved in having to provide granular and strictly
controlled delay, jitter, and loss guarantees.
Implementing QoS
Implementing QoS involves three major steps:
Step 1 Identifying traffic types and their requirements
Step 2 Classifying traffic based on the requirements identified
Step 3 Defining policies for each traffic class
Step 2: Classifying
Identified
Traffic
Based
on
the
Requirements
After the traffic classes have been formed based on the network
audit and business objectives, the final step of implementing QoS in
an enterprise is to provide a network-wide definition for the QoS
service level that must be assigned to each traffic class. This is called
defining a QoS policy, and it might include having to complete the
following tasks:
Setting a maximum bandwidth limit for a class
Setting a minimum bandwidth guarantee for a class
Assigning a relative priority level to a class
Applying congestion management, congestion avoidance, and
many other advanced QoS technologies to a class.
To provide an example, based on the traffic classes listed in the
previous section, Table 2-2 defines a practical QoS policy.