ETE405 :: Lecture 9
Chapter 9. Quality of Service
Dr. Mashiur Rahman
Quality of Service
• Quality of service (QoS) is an often-used and
misused term that has a variety of meanings.
In this course, QoS refers to both class of
service (CoS) and type of service (ToS). The
basic goal of CoS and ToS is to achieve the
bandwidth and latency needed for a particular
• A CoS enables a network administrator to
group different packet flows, each having
distinct latency and bandwidth requirements.
A ToS is a field in an Internet Protocol (IP)
header that enables CoS to take place.
Currently, a ToS field uses three bits, which
allow for eight packet-flow groupings, or CoSs
(0-7). New Requests For Comments (RFCs) will
enable six bits in a ToS field to allow for more
• It is important to note that the tools for
implementing these services are not as
important as the end result achieved. In other
words, do not focus on one QoS tool to solve
all your QoS problems. Instead, look at the
network as a whole to determine which tools,
if any, belong in which portions of your
QoS Network Toolkit
End-to-End Delay Budget
• A VoIP phone call can be equivalent to any other large expense you would
plan for. Therefore, it is important to know which parts of the budget you
cannot change and which parts you might be able to control, as shown in
The International Telecommunication Union Telecommunication Standardization Sector
(ITU-T) G.114 recommendation suggests no more than 150 milliseconds (ms) of end-to-
end delay to maintain "good" voice quality.
The first issue of major concern when designing a VoIP network is bandwidth constraints. Depending upon
which codec you use and how many voice samples you want per packet, the amount of bandwidth per call
can increase drastically. For an explanation of packet sizes and bandwidth consumed, see Table
After reviewing this table, you might be asking yourself why 24 kbps of bandwidth is
consumed when you're using an 8-kbps codec. This occurs due to a phenomenon called "The
IP Tax." G.729 using two 10-ms samples consumes 20 bytes per frame, which works out to 8
kbps. The packet headers that include IP, RTP, and User Datagram Protocol (UDP) add 40 bytes
to each frame. This "IP Tax" header is twice the amount of the payload.
To reduce the large percentage of bandwidth consumed by a G.729 voice call, you can use cRTP. cRTP
enables you to compress the 40-byte IP/RTP/UDP header to 2 to 4 bytes most of the time
• cRTP uses some of the same techniques as
Transmission Control Protocol (TCP) header
compression. In TCP header compression, the
first factor-of-two reduction in data rate
occurs because half of the bytes in the IP and
TCP headers remain constant over the life of
• You should not use cRTP on high-speed interfaces, as the
disadvantages of doing so outweigh the advantages. "High-
speed network" is a relative term: Usually anything higher
than T1 or E1 speed does not need cRTP, but in some
networks 512 kbps can qualify as a high-speed connection.
• As with any compression, the CPU incurs extra processing
duties to compress the packet. This increases the amount
of CPU utilization on the router. Therefore, you must weigh
the advantages (lower bandwidth requirements) against
the disadvantages (higher CPU utilization). A router with
higher CPU utilization can experience problems running
other tasks. As such, it is usually a good rule of thumb to
keep CPU utilization at less than 60 to 70 percent to keep
your network running smoothly.
• As in the tollbooth line, in queuing the concept of
first in, first out (FIFO) exists, which means that if
you are the first to get in the line, you are the first to
get out of the line.
• Today's networks, with their variety of applications,
protocols, and users, require a way to classify
different traffic. Going back to the tollbooth example,
a special "lane" is necessary to enable some cars to
get bumped up in line.
Queuing tool: that enable a network administrator to specify what type of traffic is
"special" or important and to queue the traffic based on that information instead of
when a packet arrives. Queuing techniques is known as WFQ
Weighted Fair Queuing
• FIFO queuing places all packets it receives in
one queue and transmits them as bandwidth
becomes available. WFQ, on the other hand,
uses multiple queues to separate flows and
gives equal amounts of bandwidth to each
flow. This prevents one application, such as
File Transfer Protocol (FTP), from consuming
all available bandwidth.
• WFQ ensures that queues do not starve for bandwidth
and that traffic gets predictable service. Low-volume
data streams receive preferential service, transmitting
their entire offered loads in a timely fashion. High-
volume traffic streams share the remaining capacity,
obtaining equal or proportional bandwidth.
• Fair queuing enables low-bandwidth applications,
which make up most of the traffic, to have as much
bandwidth as needed, relegating higher-bandwidth
traffic to share the remaining traffic in a fair manner.
Fair queuing offers reduced jitter and enables efficient
sharing of available bandwidth between all
• Custom queuing (CQ) enables users to specify a percentage
of available bandwidth to a particular protocol. You can
define up to 16 output queues as well as one additional
queue for system messages (such as keep alives).
• The router determines how many bytes from each queue
should be transmitted, based on the speed of the interface
as well as the configured traffic percentage. In other words,
another traffic type can use unused bandwidth from queue
A until queue A requires its full percentage.
• CQ Caveats: CQ requires knowledge of port types and
traffic types. This equates to a large amount of
administrative overhead. But after the administrative
overhead is complete, CQ offers a highly granular approach
to queuing, which is what some customers prefer.
• PQ enables the network administrator to configure
four traffic priorities—high, normal, medium, and low.
Inbound traffic is assigned to one of the four output
queues. Traffic in the high-priority queue is serviced
until the queue is empty; then, packets in the next
priority queue are transmitted.
• PQ Caveats: PQ enables a network administrator to
"starve" applications. An improperly configured PQ can
service one queue and completely disregard all other
queues. This can, in effect, force some applications to
stop working. As long as the system administrator
realizes this caveat, PQ can be the proper alternative
for some customers.
• To achieve your intended packet delivery, you must
know how to properly weight WFQ. This section
focuses on different weighting techniques and ways
you can use them in various networks to achieve the
amount of QoS you require.
– IP Precedence
– Policy routing
– Resource Reservation Protocol (RSVP)
– IP Real-Time Transport Protocol Reserve (IP RTP Reserve)
– IP RTP Priority
IP Header and ToS Field
IP Precedence refers to the three bits in the
ToS field in an IP header, as shown in Figure.
IP Precedence Caveats
• IP Precedence has no built-in mechanism for refusing
incorrect IP Precedence settings. The network
administrator needs to take precautions to ensure that
the IP Precedence settings in the network remain as
they were originally planned.
• The following example shows the problems that can
occur when IP Precedence is not carefully configured.
– Company B uses WFQ with VoIP on all its WAN links and
uses IP Precedence to prioritize traffic on the network.
Company B uses a precedence setting of 5 for VoIP and a
precedence setting of 4 for Systems Network Architecture
(SNA) traffic. All other traffic is assumed to have a
precedence setting of 0 (the lowest precedence).
• With policy-based routing, you can configure a defined
policy for traffic flows and not have to rely completely on
routing protocols to determine traffic forwarding and
routing. Policy routing also enables you to set the IP
Precedence field so that the network can utilize different
classes of service.
• You can base policies on IP addresses, port numbers,
protocols, or the size of packets. You can use one of these
descriptors to create a simple policy, or you can use all of
them to create a complicated policy.
• All packets received on an interface with policy-based
routing enabled are passed through enhanced packet filters
known as route maps. The route maps dictate where the
packets are forwarded.
Generic Traffic Shaping (GTS)
GTS applies on a per-interface basis and can use access lists to
select the traffic to shape. It works with a variety of Layer 2
technologies, including Frame Relay, ATM, Switched Multimegabit
Data Service (SMDS), and Ethernet.
• This chapter covered a broad topic called QoS.
The concept of receiving a packet at the
instant the sender wants it to be received is
complex. Indeed, building a network to run
VoIP is complex. Proper QoS is the most
important step in ensuring good voice quality.