CS 552 Computer Networks Quality of Service: Richard Martin
CS 552 Computer Networks Quality of Service: Richard Martin
CS 552 Computer Networks Quality of Service: Richard Martin
Computer Networks
Quality Of Service
Richard Martin
Credit slides by B. Nath, I. Stoica
1
Outline
2
Best Effort vs. QoS
• Best Effort:
• You get a link to the Internet with at most B bits/sec.
• If you don’t like it, switch to another provider.
• Quality of Service (QoS)
– We provide you some kind of guarantees for:
• Bandwidth
• Latency
• Jitter
– I.e., network is engineered to provide some
Quality beyond “Not to exceed B bits/s”
3
QoS’s Quest
4
Two Styles of QoS
• Worse-case
– Provide bandwidth/delay/jitter guarantee to every
packet
– E.g., “hard real time”
• Average-case
– Provide bandwidth/delay/jitter guarantee over
many packets
– Statistical in nature
– E.g. “Soft real time”
5
Resource Reservation: Example
7
Leaky Bucket
8
Leaky Bucket: Analogy
Packets from host
Leaky
Bucket
Network 9
Leaky Bucket (cont’d)
10
Leaky Bucket:
Doesn’t allow bursty transmissions
11
Token Bucket
• The bucket holds tokens instead of packets
• Tokens are generated and placed into the token bucket at a
constant rate
• When a packet arrives at the token bucket, it is transmitted if
there is a token available. Otherwise it is buffered until a token
becomes available.
• The token bucket has a fixed size, so when it becomes full,
subsequently generated tokens are discarded
12
Token Bucket
Packets from host
Token Generator
(Generates a token
once every T seconds)
Network 13
Token Bucket vs. Leaky Bucket
14
Token Bucket vs. Leaky Bucket
15
Flow Specification: Token Bucket
Arrival curve
r bps bits
slope r
b
b bits
slope R
<= R bps
time
regulator 16
Quality of service issues
• Flow specification
– Flow spec: traffic characteristics, QoS requirements (delay,
jitter,bandwidth)
• Routing
– Routing traffic to best meet demand
• Resource reservation
– End-host signaling to network QoS resource requirements
• Admission control
– Limiting number of reservations
• Packet scheduling
– Packet by packet scheduling (fairness, delay)
• RSVP addresses reservation
17
Integrated Services Example: Data Path
• Per-flow classification
Receiver
Sender
18
Integrated Services Example: Data Path
19
Integrated Services Example
• Per-flow scheduling
Receiver
Sender
20
How Things Fit Together
Routing RSVP
Routing RSVP
Messages messages
Control Plane
Admission
Control
Data Plane
Forwarding Table Per Flow QoS Table
Data In
Route Lookup Classifier Scheduler Data Out
21
Service Classes
22
Worse-case : Guaranteed Services
• Service contract
– Network to client: guarantee a deterministic upper
bound on delay for each packet in a session
– Client to network: the session does not send more
than it specifies
• Algorithm support
– Admission control based on worst-case analysis
– Per flow classification/scheduling at routers
23
Average-case: Controlled Load Service
• Service contract:
– Network to client: Average delay, jitter, bandwidth, e.g., makes
network appear as an unloaded, best effort network with
bandwidth and delay
– Client to network: the session does not send more than it
specifies
• Algorithm Support
– Admission control based on measurement of aggregates
– Scheduling for aggregate possible
24
Role of RSVP in the Architecture
25
RSVP Design Features
26
RSVP Reservation Model
27
The Big Picture
Network
Sender
PATH Msg
Receiver
28
The Big Picture (2)
Network
Sender
PATH Msg
Receiver
RESV Msg
29
RSVP terminology
30
RSVP Basic Operations
31
RSVP messages
32
RSVP Operation
Sender
Merged reservations
Merged reservations
Receiver3
Receiver1 Receiver2
33
RSVP PATH MESSAGE
34
RSVP RESV MESSAGE
35
Route Pinning
IP routing
PATH S4 S5
RESV
36
How Is the Token Bucket Used?
• Can be enforced by
– End-hosts (e.g., cable modems)
– Routers (e.g., ingress routers in a Diffserv domain)
• Can be used to characterize the traffic sent
by an end-host
37
Source Traffic Characterization
bps bits
Arrival curve
time Δt
38
QoS Guarantees: Per-hop Reservation
• End-host: specify
– the arrival rate characterized by token-bucket with parameters (b,r,R)
– the maximum maximum admissible delay D
• Router: allocate bandwidth ra and buffer space Ba such that
– no packet is dropped
– no packet experiences a delay larger than D
slope ra
slope r
bits Arrival curve
b*R/(R-r)
D
Ba
39
End-to-End Reservation
S2 (b,r,R,3) R
S (b,r,R)
(b,r,R,2,D-d1)
(b,r,R,3,D)
(b,r,R,0,0) S1 (b,r,R,1,D-d1-d2) S3
worst-case delay
PATH
RESV 40
Reservation Style
41
Reservation Styles and Filter Spec
• Reservation style
– use filter to specify which sender can use the
reservation
• Three styles
– Wildcard filter: does not specify any sender; all packets
associated to a destination shares same resources
• Group in which there are a small number of
simultaneously active senders
– Fixed filter: no sharing among senders, sender
explicitly identified for the reservation
• Sources cannot be modified over time
– Dynamic filter: resource shared by senders that are
(explicitly) specified
• Sources can be modified over time
42
Wildcard Filter Example
(B,*) H3
H2
S1 S2 S3
(B,*) (B,*)
(B,*) (B,*) (B,*)
H1 H4
H5
receiver sender
43
Wildcard Filter Example
• H2 reserves B
(B,*) H3
H2 (B,*)
S1 S2 S3
(B,*) (B,*)
(B,*) (B,*) (B,*)
H1 H4
H5
receiver sender
44
Wildcard Filter
• Advantages
– Minimal state at routers
• Routers need to maintain only routing state augmented
by reserved bandwidth on outgoing links
• Disadvantages
– May result in inefficient resource utilization
45
Wildcard Filter: Inefficient Resource
Utilization Example
• H1 reserves 3B; wants to listen from all senders
simultaneously
• Problem: reserve 3B on (S3:S2) although 2B
sufficient!
H3
H2
S1 S2 S3
(3B,*) (3B,*)
(3B,*)
H1 H4
H5
receiver sender
46
Fixed Filter Example
• Receivers: H2, H3, H4, H5; Senders: H1, H4, H5
• Routers maintain state for each receiver in the
routing table
NextHop Sources
H1 S2(H5, H4)
H2 H1(H1), S2(H5, H4) H3
H2
S1 S2 S3
H1 H4
H5
47
Fixed Filter Example
H3
H2 (B,H4)
S1 S2 S3
(B,H4) (B,H4)
(B,H4)
H1 H4
H5
48
Dynamic Filter Example
H3
H2 (B,H4)
(B,*)
S1 S2 S3
(B,H4) (B,H4)
(B,*) (2B,*) (B,H4)
H1 H4
H5
49
Soft State
50
Tear-down Example
H3
H2 (B,H4)
(B,*)
S1 S2 S3
(B,H4) (B,H4)
(B,*) (2B,*) (B,H4)
H1 H4
H5
51
Tear-down Example
H3
H2
(B,*)
S1 S2 S3
(B,*) (2B,*)
H1
H5
52
RSVP Soft-state
53
Soft State (cont)
54
RSVP and Routing
55
Recap of RSVP
• PATH message
– sender template and traffic spec
– advertisement
– mark route for RESV message
– follow data path
• RESV message
– reservation request, including flow and filter spec
– reservation style and merging rules
– follow reverse data path
• Other messages
– PathTear, ResvTear, PathErr, ResvErr
56
Why did IntServ fail?
• Economic factors
– Deployment cost vs Benefit
• Is reservation, the right approach?
– Multicast centric view
• Is per-flow state maintenance an issue?
• More about QoS in general …
57
What is the Problem?
58
Differentiated Services (Diffserv)
DS-1 DS-2
Ingress Ingress
Egress Egress
61
Differentiated Services
62
Assured Service
[Clark & Wroclawski ‘97]
63
Assured Service
Ingress
64
Premium Service
[Jacobson ’97]
65
Edge Router
Ingress
Traffic conditioner
Class 1
Marked traffic
Traffic conditioner
Class 2
Data traffic
Classifier Scheduler
Best-effort
Per aggregate
Classification
(e.g., user)
66
Assumptions
67
TC Performing Metering/Marking
• Used to implement Assured Service
• In-profile traffic is marked:
– A-bit is set in every packet
• Out-of-profile (excess) traffic is unmarked
– A-bit is cleared (if it was previously set) in every packet; this
traffic treated as best-effort
r bps
User profile
b bits (token bucket)
68
TC Performing Metering/Marking/Shaping
• Used to implement Premium Service
• In-profile traffic marked:
– Set P-bit in each packet
• Out-of-profile traffic is delayed, and when buffer overflows it
is dropped
r bps
User profile
b bits (token bucket)
premium traffic
Metering/
Shaper/ in-profile traffic
Set P-bit
out-of-profile traffic
(delayed and dropped) 69
Scheduler
• Employed by both edge and core routers
• For premium service – use strict priority, or weighted fair queuing
(WFQ)
• For assured service – use RIO (RED with In and Out)
– Always drop OUT packets first
• For OUT measure entire queue
• For IN measure only in-profile queue
Dropping
probability
1
OUT IN
yes
P-bit set? high priority
no
yes
A-bit set? no RIO low priority
71
Control Path
72
Example
2 3
BB BB BB
7 5
1 9
8 profile 6 4 profile
profile
receiver
sender
73
Comparison: Best-Effort, Diffserv, Intserv
75
Non-technical Factors Impacting QoS
• Existing Networks
– What is available today to solve our needs? Why
switch?
• Business Models
– How QoS make doing business harders
• Deployment Issues
– How QoS makes running the network harder.
76
Existing Networks
• Motivating applications?
– Tele/Video conferencing, video distribution, VPN,
games.
• IP+QoS must be better AND cheaper than:
– PSTN with N-way calling
– Cable TV with digital recorders (Tivo)
– Telecom leased lines (ISDN, ATM, SONET)
– Peer to Peer networks
77
Business Issues
78
Deployment Issues
79
Deployment Issues
80
Non-technical Issues summary
81
Over Provisioning Vs. QoS
• QoS:
– Insure resources per flow
• Over Provisioning
– Domain of traffic engineering
– Insure sufficient resources aggregate demand
– Formalism for this approach?
82
Over Provisioning Formalism
83