2. Part –II Quality of Service
Quality of service (QoS) is an internetworking issue that refers to a
set of techniques and mechanisms that guarantee the performance
of the network to deliver predictable service to an application.
DATA-FLOW CHARACTERISTICS
FLOW CONTROL to IMPROVE QoS
INTEGRATED SERVICES (INTSERV)
DIFFERENTIATED SERVICES (DFFSERV)
3. DATA-FLOW CHARACTERISTICS
• Provide quality of service for an Internet application.
• Four types of characteristics are attributed to a flow:
1. Reliability
2. Delay
3. Jitter
4. Bandwidth
4. Definitions
Reliability :
• Packets safe and sound
• Lack of reliability[ packet retransmission, losing
acknowledgement etc.]
• Reliability varies [Email and FTP ---reliability is
very important]
• Ex: Reliable transmission- Email compare with
video conferencing
5. Delay :
• Source-to-destination delay.
• Applications can tolerate delay in different
degrees.
• Ex: Telephony, audio conferencing, video
conferencing, and remote logging need minimum
delay
• while delay in file transfer or e-mail is less
important.
6. Jitter: Jitter is the variation in delay for packets belonging to the
same flow.
• Ex: For example, if four packets depart at times 0, 1, 2, 3 and
arrive at 20, 21, 22, 23, all have the same delay, 20 units of
time.
• On other hand if the above four packets arrive at 21, 23, 24,
and 28, they will have different delays.
• Ex: audio and video, Case 1
• Ex. Email Case2
7. Bandwidth : Different applications need different bandwidths.
In video conferencing we need to send millions of bits per second to
refresh a color screen.
Number of bits in an e-mail may not reach even a million.
9. Flow Classes
• Based on the flow characteristics, we can classify flows into
groups.
• Internet community has not yet defined such a classification
formally.
• For example: FTP needs a high level of reliability and probably a
medium level of bandwidth but delay and jitter is not important.
10. Flow classes
Internet has not defined flow classes formally, the ATM protocol does. As per
ATM specifications, there are five classes of defined service.
1) Constant Bit Rate (CBR): used for circuit switching. CBR applications .
Ex. telephone traffic, conferencing, and television.
2) Variable Bit Rate-Non Real Time (VBR-NRT): Users in this class can send
traffic at a rate that varies with time Ex. multimedia e-mail.
3) Variable Bit Rate-Real Time (VBR-RT): This class is similar
to VBR–NRT but is designed for applications such as
interactive compressed video. [Source and Dst. Synchronized]
4) Available Bit Rate (ABR): ATM services provides rate-based
flow control and is aimed at data traffic such as file transfer
and e-mail.[source and Dst. not synchronized]
5) Unspecified Bit Rate (UBR). This class includes all other
classes and is widely used today for TCP/IP.
11. FLOW CONTROL TO IMPROVE QoS
• Classes of flow are not defined in the Internet.
• But IP datagram has ToS(Type of Service) field required to set of datagrams
sent by an application {IP informally defines TOS}
• Different Mechanism are
Scheduling
Traffic Shaping or Policing
Resource Reservation
Admission Control
12. Scheduling
• Required level of service for packets mostly happen at the routers.
• At the router the packet may be delayed, be lost, assigned bandwidth etc.
• Good scheduling technique treats the different flows in a fair and appropriate
manner.
• Scheduling techniques are designed to improve the quality of service. Three
of them are
1) FIFO queuing
2) Priority queuing
3) weighted fair queuing.
14. FIFO Queuing
• In FIFO, packets wait in a buffer (queue) until the node (router)
is ready to process them.
• If arrival rate is higher than the average processing rate, packet
drops.
• Packets from different applications (with different sizes) arrive
at the queue, are processed, and depart.
• FIFO queuing is the default scheduling in the Internet.
• Does FIFO queuing distinguish between packet classes?
• No matter if a packet belongs to FTP, or Voice over IP, or an e-
mail message, they will be equally subject to loss, delay, and
jitter.
16. Priority Queuing
• Queuing delay in FIFO queuing often degrades quality of
service.
• Frame carrying real-time packets may have to wait a long time.
• In priority queuing, packets are first assigned to a priority
class.
• Packets in the highest-priority queue are processed first.
• Packets in the lowest-priority queue are processed last.
• A packet priority is determined from a specific field in the
packet header: the ToS field of an IPv4 header, the priority field
of IPv6.
• Problem- Starvation
18. Weighted Fair Queuing
• Packets are still assigned to different classes and admitted to
different queues.
• The queue, however, are weighted based on the priority of the
queues; higher priority means a higher weight.
• Processes packets in each queue in a round-robin fashion.
• Packets of different sizes may create many imbalances in dividing
a decent share of time between different classes.
19. Traffic Shaping or Policing
• To control the amount and the rate of traffic is called traffic
shaping or traffic policing.
• Two techniques can shape or police the traffic:
Leaky bucket
Token bucket.
20. Leaky Bucket
• Suppose we have a bucket in
which we are pouring water
in a random order but we
have to get water in a fixed
rate , for this we will make a
hole at the bottom of the
bucket.
• It will ensure that water
coming out is in a some fixed
rate . And also if bucket will
full we will stop pouring in it.
• The input rate can vary, but
the output rate remains
constant. Hence, the leaky
bucket can smooth out bursty
traffic.
• Bursty chunks are stored in
the bucket and sent out at an
average rate.
21. • The input rate can vary, but the output rate remains constant are called Leaky
bucket.
• The leaky bucket may prevent congestion.
• A simple leaky bucket algorithm can be implemented using FIFO queue. A
• FIFO queue holds the packets.
• If the traffic consists of fixed-size packets (e.g., cells in ATM networks), the
process removes a fixed number of packets from the queue at each tick of the
clock.
• If the traffic consists of variable-length packets, the fixed output rate must be
based on the number of bytes or bits.
22. An algorithm for variable-length packets
1. Initialize a counter to n [buffer size or bucket size] at the tick
of the clock.
2. Set the output rate
2. If n is greater than the size of the packet, send the packet and
decrement the counter by the packet size. Repeat this step until the
counter value is smaller than the packet size. [Reject the packets
where its size is greater than the bucket size]
3. Reset the counter to n and go to step 1.
23. Leaky bucket algorithm
A leaky bucket algorithm shapes bursty traffic into
fixed-rate traffic by averaging the data rate. It may
drop the packets if the bucket is full.
24. 24
Example:
• Let n=1000
• Packet=
• Since n> front of Queue i.e. n>200
• Therefore, n=1000-200=800
• Packet size of 200 is sent to the network.
• Now Again n>front of the queue i.e. n > 400
• Therefore, n=800-400=400
• Packet size of 400 is sent to the network.
• Since n< front of queue Therefore, the procedure is stop.
• And we initialize n=1000 on another tick of clock.
• This procedure is repeated until all the packets are sent to the network
25. Token Bucket
• The leaky bucket is very restrictive.
• It does not credit an idle host.
For example, if a host is not sending for a while, its bucket becomes
empty.
• Token bucket algorithm allows idle hosts to accumulate credit for the
future in the form of tokens.
• maximum number of cells :
Maximum number of packets = r × t + c, Where c capacity of token,
r is the bucket at the rate of per second, t is the interval of the length
• maximum average rate for the token bucket.
Maximum average rate = (r × t + c)/t packets per second
27. Example 30.2
Let’s assume that the bucket capacity is 10,000 tokens and tokens are added at
the rate of 1000 tokens per second. If the system is idle for 10 seconds (or
more), the bucket collects 10,000 tokens and becomes full. Any additional
tokens will be discarded. The maximum average rate is shown below.
Solution:
Maximum Average rate = (1000t + 10,000)/t
Token Bucket : The token bucket allows bursty
traffic at a regulated maximum rate
28. What is the difference between token bucket and leaky bucket algorithms?
Leaky bucket:
Parameters: rate
1. Smooth out traffic by passing packets through fixed rate outflow. Does not permit
burstiness.
2. Discards packets if the bucket is full (no concept of queue)
3. Application: Traffic shaping or traffic policing.
Token bucket:
Params: rate, burstiness.
1. Token bucket smooths traffic too but permits burstiness - which is equivalent to the
number of tokens accumulated in the bucket.
2. Discards tokens if bucket is full, but never discards packets (infinite queue).
3. Application: Network traffic shaping or rate limiting.
29. Resource Reservation
• A flow of data needs resources such as a buffer, bandwidth,
CPU time, and so on.
• Quality of service is improved if these resources are reserved
beforehand.
• QoS model called Integrated Services, which depends heavily
on resource reservation
30. Admission Control
• Mechanism used by a router or a switch to accept or reject a flow based
on predefined parameters called flow specifications.
• Before a router accepts a flow for processing, it checks the flow
specifications to see its capacity to handle the new flow
• It takes into account bandwidth, buffer size, CPU speed, etc
• Admission control in ATM networks is known as Connection Admission
Control (CAC).
31. INTEGRATED SERVICES (INTSERV)
• Internet provides Best-effort delivery service
• QoS for different applications [Audio, video…]
• To provide different QoS for different applications IETF developed a model
known as Integrated service (IntServ). This model uses flow-based
architecture[ bandwidth, buffer….]
• The model is based on three schemes:
Packets are first classified according to the service they require.
model uses scheduling to forward the packets according to their flow
characteristics.
Devices like routers use admission control[ may need high data rate ]
32. • IntServe is a flow based model means all resources must be made available
before flow can start.
• We need connection oriented service at the network layer
• Since IP is currently a connectionless protocol, we need another protocol to
be run on top of IP to make it a connection-oriented protocol before we can
use this model. This protocol is called Resource Reservation Protocol
(RSVP).
• Integrated Services is a flow-based QoS model designed for
IP. In this model packets are marked by routers according to
flow characteristics.
33. Flow Specification
• A source needs to define a flow specification, which is made
of two parts:
Rspec (resource specification). Bandwidth, buffer etc.,
Tspec (traffic specification). Bustiness in the traffic etc.
34. Two classes of services are
1. Guaranteed Service Class :
• Real-time traffic and Minimum end-to-end delay
• This type of service guarantees that the packets will arrive within a
certain delivery time and are not discarded if flow traffic stays within
the boundary of Tspec.
• Guaranteed services are required for real-time applications (voice
over IP).
• Guaranteed services are quantitative services,[ amount of end-to-
end delay and data rate must be defined by the application]
Service Classes
35. 2. Controlled-Load Service Class :
Designed for applications that can accept some delays.
Good examples of these types of applications are file transfer, e-mail.
The controlled load service is a qualitative service.(low-loss or no-loss
packets)
Service Classes
36. Resource Reservation Protocol (RSVP)
• IP is a connectionless protocol.
• Independent protocol separate from the Integrated Services
model.
Multicast Trees
Receiver-Based Reservation
RSVP Messages
Reservation Merging
Reservation Styles
Soft State
Resource Reservation Protocol (RSVP) is a Transport Layer protocol designed to
reserve resources across a network for an integrated services Internet.
37. • Multicast Trees :
RSVP is based on Multicast communication.
RSVP to provide resource reservations for all kinds of traffic including
multimedia.
• Receiver-Based Reservation :
This strategy matches the other multicasting protocols. Ex. In RSVP receiver,
not the sender, make a reservation. In multicast routing protocol, the
receiver, not the sender make a decision to join or leave a multicast group.
38. RSVP Messages: RSVP has several types of messages. Two
of them are
• Path Messages : To solve the problem of finding the path from receiver to
source, RSVP uses Path messages.
• A Path message travels from the sender and reaches all receivers in the
multicast path.
• A Path message is sent in a multicast environment;
• A new message is created when the path diverges.
39. Resv Messages :
• After a receiver has received a Path message, it sends a Resv message.
• Resv message travels toward the sender (upstream) and makes a
resource reservation on the routers that support RSVP.
• If a router on the path does not support RSVP, uses best effort delivery
40. Reservation Merging
• In RSVP, the resources are not reserved for each receiver in a flow; the
reservation is merged.
• 2-Mbps input reservation can handle both requests.
41. Reservation Styles
RSVP defines three types of reservation styles:
• Wildcard filter (WF) : The router creates a single reservation
for all senders. (Largest request). It is used when the flows
from different sender do not occur at the same time.
• Fixed filter (FF) : The router creates a distinct reservation for
each flow(If N flows, N different reservation).
• Shared explicit (SE) : The router creates a single reservation
that can be shared by a set of flows
42. Problems with Integrated Services
There are two problems are scalability and service-type limitation.
• Scalability : IntServ model requires that each router keep information for
each flow. As the internet grows, this becomes a serious problem
• Service type Limitation: Two types of service (guaranteed and control
load), application may need more than these two types of service.
43. DIFFEREN
TIATED
SERVICES
(DIFFSER
V)
• In this model { DiffServ} packets are marked by applications into classes
according to their priorities.
• Two fundamental changes were made:
The main processing was moved from the core of the network to the
edge of the network.
The per-flow service is changed to per-class service
• Differentiated Services is a class-based QoS model designed
for IP. In this Model packets are marked by applications
according to their priority.
44. DS Field
• In DiffServ, each packet contains a field called the DS field.
• Value set at the host or the first router.
• The DS field contains two subfields :
• DSCP (Differentiated Services Code Point) is a 6-bit subfield
that defines the per-hop behavior (PHB).
• 2-bit CU (Currently Unused).
45. Per Hop behavior(PHB)
The Diffserv model defies PHB for each node that receives a packet. So far three
PHBs are defined :
1) DE PHB (Default) is same as best-effort delivery, which is compatible with
TOS.
2) EF PHB (Expedited forwarding), provides the following services
a) low loss
b) low latency (time it takes for a packet to move from one point to another)
c) ensured bandwidth
This is same as virtual connection between source and destination
3) AF PHB (Assured forwarding) : deliver the packet with high assurance as
long as the class traffic does not exceed the traffic profile of the node.
47. • Meter : It checks to see if the incoming flow matches the negotiated traffic
profile.
• Marker : A marker can re-mark a packet that is using best-effort delivery or
down-mark a packet based on information received from the meter.
• Shaper : A shaper uses the information received from the meter to reshape
the traffic.
• Dropper : A dropper, which works as a shaper with no buffer, discards
packets if the flow severely violates the negotiated profile.