Beruflich Dokumente
Kultur Dokumente
Spring 2015
D. Raychaudhuri
Lecture 8 (QoS)
Todays Lecture
Congestion control in best effort
networks
Basic principles & mechanisms
FQ, WFQ, congestion feedback, TCP,
RED
Quality-of-service (QoS)
Mechanisms (traffic shaping,
admission control, reservation,
priority queuing)
RSVP Intserv and Diffserv, RIO
Comparison to ATM (CBR, VBR; ABR)
Network Congestion
Smax
Thru
Capacity Limit
Traffic
margin
Overload
region
Congestion control policies
Normal operating
Point (G0)
Queue Scheduling
A queue scheduler employs 2
strategies:
Scheduling discipline: Which packet to
serve (transmit) next
Drop policy: Which packet to drop
next (when required)
FIFO Queuing
FIFO:first-in-first-out (or FCFS: firstcome-first-serve)
Arriving packets get dropped when
queue is full regardless of flow or
importance - implies drop-tail
Important distinction:
FIFO: scheduling discipline
Drop-tail: drop policy
Fair Queuing
Main idea:
maintain a separate queue for each
flow currently flowing through router
router services queues in RoundRobin fashion
FQ illustration
Flow 1
Flow 2
I/P
O/P
Flow n
Variation: Weighted Fair Queuing (WFQ)
Some Complications
Packets are of different length
We really need bit-by-bit roundrobin (RR)
FQ simulates bit-by-bit RR
Not feasible to interleave bits!
Bit-by-bit RR
Single flow: suppose clock ticks when a bit is
transmitted. For packet i:
Pi: length, Ai = arrival time, Si: begin transmit time, Fi:
finish transmit time. Fi = Si+Pi
Fi = max (Fi-1, Ai) + Pi
Bit-by-bit RR
Start with A(*,*)=0 (all pkts arrive at T=0)
Flow 1
Pkt 1-3=
1 unit
Pkt 1-2=
1 unit
Flow 2
P(1,1) = 2
P(1,2) = 1
P(1,3) = 1
F(1,1) = 1
F(1,2) = 1.5
F(1,3) = 2
F(2,1) = 1.5
F(2,2) = 2.5
Channel clock -
P(2,1) = 3
P(2,2) = 2
2-1
Bq
w
q 1
Source
Rate
(bps)
Time-out
Alternatively:
We can try to predict congestion and reduce rate before
packets start being discarded
This is called congestion avoidance
Aim:
Keep throughput high and delay low
Accommodate bursts
RED Algorithm
Maintain running average of queue
length
If avg < minth do nothing
Low queuing, send packets through
RED Operation
If AvgLen <= MinThreshold
Max
threshold
Min
threshold
( AvgLen MinThresho ld )
( MaxThreshold MinThresho ld )
P TemP /(1 count TempP )
TempP MaxP
P(drop)
1.0
MaxP
minthresh
maxthresh
4
Version
8
HLen
16
TOS
31
Length
Ident
TTL
19
Flags
Protocol
Offset
Checksum
SourceAddr
DestinationAddr
Options (variable)
Pad
(variable)
Data
Quality of Service
Outline
Realtime Applications
Integrated Services
Differentiated Services
Realtime Applications
Microphone
Sampler,
A D
converter
Buffer,
D A
Speaker
Playback Buffer
Sequence number
Packet
arrival
Packet
generation
Playback
Network
delay
Time
Buffer
Example Distribution of
Delays
90% 97% 98%
Packets (%)
99%
50
100
Delay (milliseconds)
150
200
Taxonomy of applications
Applications
Real-Time
Loss, delay
tolerant
adaptive
Delay
adaptive
Non-adaptive
Rate
adaptive
Elastic
Intolerant
Interactive
Rate
adaptive
Non-adaptive
Asynchronous
Interactive-bulk
Types of guarantees
Absolute bound on delay and jitter
Absolute bound on delay only
Statistical bound on delay
No quantitative delay bound but
admission control and preferential
treatment
None
Controlled load
a QoS closely approximating the QoS that
same flow would receive from an unloaded
network element, but uses capacity
(admission) control to assure that this
service is received even when the network
element is overloaded
Use a queuing mechanism such as WFQ to isolate
the controlled load traffic from other traffic
Admission control to limit the total amount of
controlled load traffic
Best effort
Overview of mechanisms
Flow specification (flowspec)
type of service we require
Admission control
can the network provide the
requested service?
Packet scheduling
Flowspecs
Tspec: describes the flows traffic
characteristics
Rspec: describes the service
requested from the network
Traffic Shaping
Traffic shaping: control traffic in order to
conform to the traffic contract by delaying
packets to meet certain criteria.
Token bucket
Traffic Policing
Traffic policing: router monitors the flow traffic
for conformity with a traffic contract
Drop or tag the packets not conforming to the TSpec
that used to make the reservation
to enforce compliance with that contract
Token bucket
tokens are placed in bucket at rate r
if bucket fills, tokens are discarded
When a packet of p bytes arrives, p tokens are
removed from the bucket, and the packet is sent to
the network.
If fewer than p tokens are available, no tokens are
removed from the bucket, and the packet is
considered to be non-conformant.
Drop or mark the non-conformant packets
Operation:
tokens
tokens
Packet
Enough tokens
packet goes through,
tokens removed
Packet
Not enough
tokens - wait for
tokens to
accumulate
TB characteristics
On the long run, rate is limited to r
On the short run, a burst of size B
can be sent at peak data rate
Amount of traffic entering at
interval T is bounded by:
traffic = B + r*T
BW
2
Flow B
Time
Admission control
When new flow request arrives,
look at Rspec and Tspec and
decide whether to admit or reject
Can it provide the desired service
requested by the flow, given the
currently available resources without
causing any previously admitted flow
to receive worse service that agreed?
Not policing
RSVP
Used on connectionless networks
Relies on soft state: reservations
must be refreshed and do not have
to be explicitly deleted
Aims to support multicast as
effectively as unicast flows - mcast
apps good candidates for realtime, and are heterogeneous
Receiver-oriented approach
TEARDOWN message
ERROR message (if path or RESV
fails)
Making a reservation
Receivers make reservation
Before making a reservation,
receiver must know:
type of traffic sender will send (Tspec)
path the senders packets will follow
PATH messages
PATH messages carry senders Tspec
and sent from the sender to the receiver
Record the path from the sender to the
receiver in the PATH message
Receivers send RESV messages that
follow reverse path and setup
reservations
If reservation cannot be made, user gets
an error
Sender 2
PATH
R
PATH
RESV (merged)
RESV
receiver 1
RESV
receiver 2
Soft State
Allow increasing or decreasing the level of
resource reservation
Adapt to link or router failure and topology
changes
Routing protocol makes routing changes, RSVP
adjusts reservation state
In absence of route or membership changes,
periodic PATH and RESV msgs refresh
established reservation state
When change, new PATH msgs follow new path,
new RESV msgs set reservation
Non-refreshed state times out automatically
ATM
rt-VBR
Real-Time Variable Bit Rate
Variable bandwidth with tight bounds on delay and delay
variation
nrt-VBR
Non-Real-Time Variable Bit Rate
Variable bandwidth with tight bound on cell loss
UBR
Unspecified Bit Rate
No guarantees (i.e., best effort delivery)
ABR
Available Bit Rate
Flow control on source with tight bound on cell loss
Differentiated Services
(DiffServ)
Analogy:
airline service, first class, coach,
various restrictions on coach as a
function of payment
Best-effort expected to make up bulk of
traffic, but revenue from premium
service important to economic base (will
pay for more plentiful bandwidth
overall)
Not motivated by real-time,
motivated by economics and
IP DiffServ
0
4
Version
8
HLen
16
TOS
31
Length
Ident
TTL
19
Flags
Protocol
Offset
Checksum
SourceAddr
DestinationAddr
Options (variable)
Pad
(variable)
Data
DiffServ
Where and how to set the DSCP value
host
first hop
router
Unmarked
packet flow
ISP
border
router
border
router
Marker N
Arriving
packet
Clear
A&P
bits
Packet
classifier
Best effort
Forwarding
engine
Wait for
token
Set P bit
Packet
output
A service
No token
Packet
input
Test if
token
token
Set A bit
Packet
output
P-bit set?
yes
High-priority Q
Packets out
no
If A-bit set
incr A_cnt
Low-priority Q
RIO queue
management
If A-bit set
decr A_cnt
A set
Arriving
packet
Is packet
marked?
Token
available?
no
Clear A-bit
token
Forwarding
engine
Not marked
token
P set
Token
available?
no
Drop packet
P(drop)
1.0
MaxP
Minout
AvgLen
Minin
Maxout
Maxin
Todays Homework
Chapter 6
-6.13
4th ed
-6.32
-6.43
-6.44
Due 4/3/15
65