Integrated Services &
Differentiated Services
1
Introduction
Modern Internet applications demand services
not provided by a best-effort service model
– variable/long packet delays due to queueing delays
– high packet losses due to congestion
The Internet infrastructure must be modified
to support real-time QoS, which provides
some control over end-to-end packet delays.
Service providers (network owners/operators)
demand better ability to manage their
network resources according to customer and
network requirements:
– Best effort service
– Real-time service
– Controlled resource sharing 2
Chapter 17: Integrated and Differentiated Services
Internet QoS Architectures
Two complementary, yet fundamentally
different, traffic management frameworks
have evolved:
– Integrated Services (IS, ISA, IntServ): reserve
resources per session and limit total demand to the
capacity that can be handled by the network
– Differentiated Services (DS, DiffServ): classify
traffic aggregates into a number of traffic groups
and handle traffic based on its group
Traffic control mechanisms: queuing discipline,
packet discard policy
Services are specified within a given domain
– possibly an autonomous system, or a single service
provider’s coverage area
3
Chapter 17: Integrated and Differentiated Services
Internet Traffic
Elastic Traffic
– traffic that can adapt, over a wide
range, to delay and throughput changes
– typically TCP/UDP
– QoS perceived based on application
Inelastic Traffic
– traffic does not adapt well
– requires guarantees on: throughput, elastic
traffic must
delay, jitter, packet loss still be
supported
– e.g. traffic generated by real-time
applications
4
Chapter 17: Integrated and Differentiated Services
IntServ Approach
Two key features form core of architecture
– Resource reservation – routers must maintain state
of available resource reserved for each “session”
– Call/session setup – each router on the session’s
path must verify availability of required resources
for a session and admit sessions only if
requirements can be met
Call Admission process (more later)
– Traffic characterization (TSpec)
– Desired QoS characterization (RSpec)
– Reservation signaling (RSVP: RFC 2205, et.al.)
– Per-element call admission per Tspec and Rspec
5
Chapter 17: Integrated and Differentiated Services
IntServ Implementation
Associate each packet with a “flow”
– a distinguishable stream of related IP packets that
result from a single user activity and demand the same
QoS (per RFC 1633)
– unidirectional, can have multiple recipients (multicast)
– typically identified by: source & destination IP
addresses, TCP/UDP port numbers and protocol type
Provide for enhanced router functions to manage
flows:
– Admission control based on requested QoS and
availability of required network resources
– Routing protocol based on QoS (like OSPF/MOSPF)
– Queuing/scheduling disciplines based on QoS
– Packet discard policy based on QoS
6
Chapter 17: Integrated and Differentiated Services
IntServ Architecture (ISA) -
requirements at each router
RSVP
Background
Functions
Primary Forwarding
Functions
7
Chapter 17: Integrated and Differentiated Services
ISA: 3 Categories of Service
Guaranteed Service
– assured capacity (data rate)
– specified upper bound on queuing delay
through the network
– no queuing loss (i.e., no buffer overflow)
Controlled Load
– roughly equivalent to best-effort under no-
load conditions (dprop + dtrans)
– no specified upper bound on queuing delay, but
will approximate minimum expected transit
delay
– almost no queuing loss
Best Effort
8
Chapter 17: Integrated and Differentiated Services
Queuing Disciplines
Single FIFO queues have numerous
drawbacks relative to QoS demands
– no special treatment based on priority
– larger packets get better service
– connections can get an unfair share of
resources
IntServ allows for multiple queues
– one per flow
– separate discipline per flow
– fair queuing policy
9
Chapter 17: Integrated and Differentiated Services
Token Bucket Scheme
Used to:
1. Characterize traffic in
a flow (TSpec).
2. Describe the load
imposed by a flow.
3. Traffic policing.
Two parameters:
1. Replenishment rate, R SCR
2. Bucket size, B MBS
Note that, during any time period T, the
amount of data sent cannot exceed RT+B, and
Maximum queuing delay by a packet is B/R.
10
Chapter 17: Integrated and Differentiated Services
Queuing Disciplines (Scheduling)
FIFO (First-Come-First-Served) Round Robin (Fair Queuing)
Drawbacks? Drawbacks?
• Flows with busy (greedy) • More of the capacity goes to
sources crowd out others flows with longer average
packet size, so flows with
• Flows with shorter packets
shorter packets are penalized
are penalized 11
Chapter 17: Integrated and Differentiated Services
Processor Sharing Approach
Processor Sharing (PS)
– transmit only one bit per round per queue
– ideal policy but, obviously, not practical
– with N queues, each queue receives
exactly 1/N of the available capacity
– consider each queue independently to
calculate “virtual” start and finish times
for each transmission
EXAMPLE QUEUE QUEUE QUEUE
Packet 1 Packet 2 Packet 1 Packet 2 Packet 1
Real arrival time, i 0 2 1 2 3
Transmission time, Pi 3 1 1 4 2
Virtual start time, Si 0 3 1 2 3
Virtual finish time, Fi 3 4 2 6 5
12
Chapter 17: Integrated and Differentiated Services
Bit-Round Fair Queuing
Bit-Round Fair Queuing (BRFQ)
– emulates PS round-robin approach for
packets and multiple synchronous queues
– uses packet length and flow identification
(queue) to schedule packets
– calculate Si and Fi as though PS were running
– when a packet finishes transmission, send
next packet based on smallest value of Fi over
all queues
– algorithm is fair on the basis of the amount
of data transmitted instead of number of
packets 13
Chapter 17: Integrated and Differentiated Services
PS vs. BRFQ Example
Drawback?
No precedence
or priority
weighting of
flows.
14
Chapter 17: Integrated and Differentiated Services
Scheduling Discipline
Examples
Load equals capacity
15
Chapter 17: Integrated and Differentiated Services
Queuing Discipline Examples
Load exceeds capacity Drawbacks? 16
Chapter 17: Integrated and Differentiated Services
Weighted Fair Queue (WFQ)
Guaranteed Rate (weight, Φ) = .5
Guaranteed Rate (weight, Φ) = .05 Fi = Si +
Pi , = weight
Maximum delay for flow i
Bi (Ki-1)Li K
i Lmax
Di
Ri Ri m=1 Cm
Di = max. delay for flow i
Bi = token bucket size for flow i
Ri = token rate for flow i
Ki = number of nodes in flow i path
Li = max. packet size for flow i
Lmax = max. packet length for all flows
through all nodes on flow i path
Cm = outgoing link capacity at node
m
17
Chapter 17: Integrated and Differentiated Services
Scheduling Discipline – Priority
Queuing
Data Communications and
Networking, Forouzan, 2004
18
Chapter 17: Integrated and Differentiated Services
Scheduling Discipline – Weighted
Round Robin (WRR) Queuing
Data Communications and
Networking, Forouzan, 2004
19
Chapter 17: Integrated and Differentiated Services
Scheduling: Weighted Round
Robin (WRR) Queuing
Simple to implement
Allows weighting of packet service
provided to one queue vs. another
Does not address the issue of fairness…
– flows with larger packets utilize more of
available bandwidth
Does not address priority of scheduling
20
Chapter 17: Integrated and Differentiated Services
Scheduling: Deficit Weighted
Round Robin (DWRR) Queuing
Similar to WFQ: compensates for packet size
inequity between flows (fairness)
Based on an established Maximum Packet Size
(MPS), equivalent to weight, established for the
each queue at the output port
Packets in non-empty queues are serviced on a
round robin basis, however…
– When a packet larger than the MPS for the queue
arrive, the MPS is subtracted form the packet
length, creating a “deficit” for that queue
– Queues are serviced on basis of their credit… those
with a deficit are bypassed until the next round
21
Chapter 17: Integrated and Differentiated Services
Queuing: Deficit Weighted
Round Robin (DWRR) Queuing
const integer N // Nb of queues
const integer Q[1..N] // Per queue quantum
integer DC[1..N] // Per queue deficit counter
queue queue[1..N] // The queues
while (true)
for i in 1..N
if not queue[i].empty()
DC[i]:= DC[i] + Q[i]
while( not queue[i].empty() and
DC[i] >= queue[i].head().size() )
DC[i]:= DC[i] - queue[i].head().size()
send( queue[i].head() )
queue[i].dequeue()
end while
if queue[i].empty()
DC[i]:= 0
end if
end if
end for
22
Chapter 17: end while
Integrated and Differentiated Services
Queuing: Deficit Weighted
Round Robin (DWRR) Queuing
23
Chapter 17: Integrated and Differentiated Services
Scheduling vs. Queue
Management (see RFC 2309)
Closely related, but different
performance issues…
Scheduling: managing allocation of
bandwidth between flows by
determining which packet to send
next (queuing discipline)
Queue Management: managing the
length of packet queues by
proactively dropping packets when
necessary (packet discard policy)
24
Chapter 17: Integrated and Differentiated Services
Random Early Detection (RED)
Queuing discipline with proactive
packet discard
– anticipate congestion and take early
avoidance action
– improved performance for elastic traffic
by not penalizing bursty traffic
– avoids “global synchronization”
phenomenon at congestion onset
– control average queue length (buffer size)
within deterministic bounds… therefore,
control average queuing delay
25
Chapter 17: Integrated and Differentiated Services
RED Buffer Management
Discard probability is calculated for each packet arrival
at the output queue based on:
• the current weighted average queue size, and
• the number of packets sent since the previous packet
discard
26
Chapter 17: Integrated and Differentiated Services
Generalized RED Algorithm
calculate the average queue size, avg
if avg < THmin
queue the packet
else if THmin avg < THmax
calculate probability Pa See Figure 17.8,
page 489
with probability Pa
discard the packet
else with probability 1 – Pa
queue the packet
else if avg THmax
discard the packet
27
Chapter 17: Integrated and Differentiated Services
RED Algorithm
avg lags considerably behind changes in
actual queue size (weight, wq, is small…
typ. 0.002)
– avg (1 – wq)avg + wqq
– prevents reaction to short bursts
count, number of packets passed
without discard, increases incrementally
while Thmin < avg < Thmax
– probability of discard, Pa, increases as
count increases
– helps ensure fairness across multiple flows 28
Chapter 17: Integrated and Differentiated Services
RED Probability Function
(Increasing F)
1
Pa =
1/(F x Pmax) - count
avg - THmin
F=
THmax - THmin
29
Chapter 17: Integrated and Differentiated Services
RED Probability Function
(Constant F)
avg - THmin
Fconst =
THmax - THmin
Pb = F x Pmax
1
Pa =
1/Pb - count
30
Chapter 17: Integrated and Differentiated Services
RED Performance (vs. Drop
Tail Queuing Policy)
RED Recommended:
Pmax = 0.02
Yields performance (throughput)
superior to drop-tail at high levels
of congestion.
31
Chapter 17: Integrated and Differentiated Services
Chapter 17 continued
Differentiated
Services
32
Differentiated Services (DS)
ISA and RSVP deployment drawbacks
– relatively complex
– may not scale well for large traffic volumes
DiffServ solution (RFC2475, 3260)
– designed as a simple, easily-implemented, low-overhead tool
– offers a range of services in differentiated service
categories… scalable and flexible service classification
Key characteristics
– uses existing IPv4 TOS field or IPv6 Traffic Class field
(for DS field - DSCP)
– SLA established in advance… no application changes required
– built-in aggregation mechanism based on traffic category
– routers queue and forward based on information carried in
the DSCP
33
Chapter 17: Integrated and Differentiated Services
DS Domains
Contiguous portion of the Internet over which a
consistent set of DS policies are agreed and
administered
Typically under control of a single management entity
Services in a domain defined by a Service Level
Agreement (SLA) – a contract between service
provider and user/another domain which specifies
QoS parameters
– detailed service parameters: throughput, drop probability,
latency
– ingress/egress constraints
– service-based traffic profiles
– disposition of excess (in violation of SLA) traffic
DS field carries a traffic class as specified by the
SLA
34
Chapter 17: Integrated and Differentiated Services
DS Terminology
Traffic
conditioning
functions
35
Chapter 17: Integrated and Differentiated Services
DS Terminology
Service Level Agreement (per RFC 3260):
– A Service Level Specification (SLS) is a set of
parameters and their values which together
define the service offered to a traffic stream
by a DS domain.
– A Traffic Conditioning Specification (TCS) is a
set of parameters and their values which
together specify a set of classifier rules and a
traffic profile. A TCS is an integral element of
an SLS.
36
Chapter 17: Integrated and Differentiated Services
DS Terminology
Examples of Service Level Specifications that
might be found in an SLA (per RFC 3260):
– Service level A will be delivered with low latency.
– Service level B will be delivered with low loss.
– 90% of in-profile traffic delivered at service level C will
experience max. of 50msec latency.
– 95% of in-profile traffic delivered at service level D will
be delivered.
– Traffic offered at service level E will be allotted twice
the bandwidth of traffic at service level F.
– Traffic with a drop precedence X has a higher
probability of delivery than traffic with drop precedence
Y.
37
Chapter 17: Integrated and Differentiated Services
Per-Hop Behavior
RFC 2475 definition:
– “a description of the externally observable forwarding
behavior of a DiffServ node applied to a particular
DiffServ behavior aggregate.”
Two standard PHBs defined:
– Expedited Forwarding (RFC 2598)
– Assured Forwarding (RFC 2597)
Expedited Forwarding
– “Premium service” with low delay, low-loss, low
jitter, and assured bandwidth
– Domain boundary nodes control traffic
aggregate to limit its characteristics (i.e.
controlled rate and burstiness)
– Interior nodes ensure that the aggregate’s
maximum arrival rate is less than its minimum
departure rate (i.e. limit the queuing effect) 38
Chapter 17: Integrated and Differentiated Services
Per-Hop Behavior (cont.)
Assured Forwarding
– designed to offer a service level that is
“superior to best-effort service”
– based on explicit allocation concept
choice of classes offered, each with different traffic
profile
monitor traffic at boundary nodes, and mark as in or
out based on conformance to profile
interior nodes handle packets based only on in or out
mark
in congestion, drop outs before ins
implementation defines four AF classes and
replaces in/out mark with a drop precedence
codepoint
– simple and easy to implement in nodes
39
Chapter 17: Integrated and Differentiated Services
DS and IPv4 TOS Fields
IP ECN Field,
per RFC 3168
& RFC 3260
Replaces
6-bit DS code point, in three pools
Pool 1: xxxxx0 - standards-based use (e.g. 000000, xxx000)
Pool 2: xxxx11 – experimental/local use
Pool 3: xxxx01 – experimental/local use, future standards
40
Chapter 17: Integrated and Differentiated Services
Differentiated Services
Assured Forwarding PHB
ECN
RFC 2597
Designated AF1x, AF2x, AF3x, AF4x
41
Chapter 17: Integrated and Differentiated Services
Differentiated Services
Assured Forwarding PHB
AF1 AF2 AF3 AF4
Low 001010 010010 011010 100010
Medium 001100 010100 011100 100100
High 001110 010110 011110 100110
42
Chapter 17: Integrated and Differentiated Services
DS Codepoint (DSCP, RFC 2474)
6-bit DS code point, in three pools
Pool 1: xxxxx0 - standards-based use (e.g. 000000, xxx000)
Pool 2: xxxx11 – experimental/local use
Pool 3: xxxx01 – experimental/local use, future standards
Codepoint 000000: default class (best-effort)
Codepoints xxx000: backward compatibility with IPv4 precedence classes
(DS Class Selector)
DS Assured Forwarding Classes
– 001xx0: AF1
– 010xx0: AF2
– 011xx0: AF3
– 100xx0: AF4
Expedited Forwarding Class: 101110
43
Chapter 17: Integrated and Differentiated Services
DS Domains/Regions
Border node: Per Hop Behavior (PHB) plus traffic conditioning mechanisms
Interior node: typically only PHB mechanisms
44
Chapter 17: Integrated and Differentiated Services
DS Traffic Classifier/Conditioner
Conformance test per SLA
(e.g peak rate, burstiness, …)
Regulate traffic flow to
achieve a specified
traffic rate (e.g. with a
token bucket)
Mark with a DS codepoint, or Police traffic and drop packets if
Separate traffic into classes
re-mark as necessary (at rate exceeds that specified
based on fields as specified in
domain ingress node, or at in the SLA (per metering function)
the TCS (source IP, dest. IP,
boundary between domains)
source port #, dest. port #, …)
45
Chapter 17: Integrated and Differentiated Services
Real-Time Traffic Flow
46
Chapter 17: Integrated and Differentiated Services
Real-Time Packet Transmission
• fixed-size packets, • on/off source • variable packet size at
generated at fixed • alternates between uniform intervals
intervals fixed size packets with • Examples: compressed
• data too important for fixed intervals and video as in video
lossy compression inactivity conferencing
• Examples: ATC or RT • Examples: voice
simulations telephony or audio
conferencing
47
Chapter 17: Integrated and Differentiated Services