You are on page 1of 12

Announcements

I. Times have been posted for demo slots

II. HW5 and HW6 solutions have been posted


VoIP Protocols and QoS • HW6 being graded

III. Final Exam questions?


Internet Protocols
CSC / ECE 573

Fall, 2005

N. C. State University

copyright 2005 Douglas S. Reeves 2

Today’s Lecture
I. VoIP Protocol Overview

II. Motivation and Overview of QoS

III. Mechanisms to Implement QoS VOICE-OVER-IP PROTOCOLS


IV. Some QoS protocols: RSVP and DiffServ

V. QoS Assessment

copyright 2005 Douglas S. Reeves 3

Motivation for VoIP? Voice-over-IP Protocols


• Price? • Master-slave (M-S) relationship is easiest to
manage, easiest to recover from faults
• New services (integration of computer + phone)?
• Peer-to-peer (P2P) is most flexible, most scalable
• Freedom from phone companies? SIP Proxy / SIP Proxy /
MG
SIP MG
(peer-peer)
Controller Controller

MGCP
(Master-Slave)

Media Media
H1 H2
Gateway UDP/RTP media stream Gateway

POTS IP POTS
copyright 2005 Douglas S. Reeves 5 copyright 2005 Douglas S. Reeves 6

1
Session Initiation Protocol (RFC 3261) SIP Key Features
• Used to initiate, control, and terminate telephone • Functionality
calls and other services – SIP is complete for setting up point-to-point or
– end-to-end call signaling, possibly involving media multiparty multimedia calls
gateway controllers (MGC) between the end points – extensive call handling capabilities
– media capabilities are negotiated by endpoints
• Properties
– fully distributed (peer to peer) • Flexibility
– text-based (human readable) – URLs are used for addresses (i.e., to locate the callee)
– modeled on HTTP – users can move to new locations and access their full
– “SIP is a much simpler protocol than H.323, but is at telephony features from anywhere
least as functional” – SIP wins  – users can define what response they want to give
when contacted (availability, etc.)
copyright 2005 Douglas S. Reeves 7 copyright 2005 Douglas S. Reeves 8

SIP Proxies (i.e., Call Servers) Example: “Basic” SIP Call (No Proxy)
• Users may require the use of SIP proxies, or call
servers, to set up and maintain the call
– find the other party
Source: Carrier Grade Voice Over IP,
D. Collins, McGraw-Hill, 2001
– configure the media gateways
– do user authentication, authorization, and billing

• SIP servers are stateless


– means any information about the current state of the
call is stored in the endpoints (gateways, terminals),
rather than in the server
– reason: to simplify the design of the servers, improve
their scalability
copyright 2005 Douglas S. Reeves 9 copyright 2005 Douglas S. Reeves 10

Call Routing Example (with Relaying) REGISTER Request Method


1. Jon initiates a call to eve@isi.edu, sends INVITE message • Purpose: register the current location of a user
2. DNS looks up a SRV record for the SIP server (proxy) at • Who register with?
isi.edu; proxy is sip.isi.edu
– multicast to the well-known "all SIP servers" multicast
3. The caller invitation is sent to sip.isi.edu address "sip.mcast.net" (224.0.1.75)
4. sip.isi.edu indicates Eve is served by SIP server
sipgw.cs.isi.edu • What happens if user is registered as being at
multiple locations? Several choices:
5. sip.isi.edu relays the request to sipgw.cs.isi.edu
1. contact them all at once, wait for the first to respond
6. sipgw.cs.isi.edu has database indicating how to reach Eve 2. contact them one at a time until get successful
– DB is updated whenever Eve registers a new location response
7. sipgw.cs.isi.edu relays the invitation to Eve at her current
location
copyright 2005 Douglas S. Reeves 11 copyright 2005 Douglas S. Reeves 13

2
Media Negotiation
Source: Carrier Grade Voice Over IP,

• The invitation (from caller to callee) suggests the D. Collins, McGraw-Hill, 2001

type of media sessions to establish


– using SDP description Including
Session
• The response (from callee to caller) indicates type
of media sessions that are possible / acceptable Description in
Invitation
• Caller “re-invites” with the commonly-agreed set of
media functions

copyright 2005 Douglas S. Reeves 14 copyright 2005 Douglas S. Reeves 15

Source: Carrier Grade Voice Over IP,


D. Collins, McGraw-Hill, 2001

PSTN to SIP
Call
• Signaling used for REMARKS ON QOS
“conventional”
(PSTN) phone
calls: SS7/ISUP

• Requires
translation
between SIP and
ISUP

copyright 2005 Douglas S. Reeves 16

What QoS Means Applications Requiring QoS


• Predictable / Controllable network behavior and • Voice
performance
– timescale? • Video
– granularity?
• Other
• Performance metrics – multi-user gaming
1. packet drop or “loss” rate – real-time simulation
2. end-to-end latency (delivery time) – online auctions
3. throughput (bandwidth) –…

copyright 2005 Douglas S. Reeves 18 copyright 2005 Douglas S. Reeves 19

3
Applications That Don’t Need QoS How Good Does QoS Need to Be?
• Elastic applications tolerate “best-effort” Internet
service Voice Video
– web, ftp, mail Bandwidth (kb/s) 5—64 64—5000
– “low” loss rates, variable throughput, and small average
delays are good enough
Maximum tolerable 1-3% 1%
packet drop rate
• Non-interactive (streaming) audio and video are
semi-elastic Maximum Latency < 150ms same
(one-way) (if interactive)

copyright 2005 Douglas S. Reeves 20 copyright 2005 Douglas S. Reeves 21

Packet Loss Effect on QoS One-Way Latency Effect on QoS

source: http://www.sprintlabs.com/People/amarko/PAPERS/TON/paper-00149-2002.pdf source: http://www.sprintlabs.com/People/amarko/PAPERS/TON/paper-00149-2002.pdf

copyright 2005 Douglas S. Reeves 22 copyright 2005 Douglas S. Reeves 23

Challenges for Internet QoS Network Loading Variations


• Social / Political / Economic challenges
– user resistance to complex pricing models
– user notions of “fairness”
– incompatibility with “legacy” protocols and
incremental-deployment issues
– increasing abundance of cheap bandwidth
– desire to keep routers simple, cheap, and fast

copyright 2005 Douglas S. Reeves 24 copyright 2005 Douglas S. Reeves 25

4
Application Bandwidth Variations Network Delay Variations

source: http://www.sprintlabs.com/People/amarko/PAPERS/TON/paper-00149-2002.pdf

copyright 2005 Douglas S. Reeves 26 copyright 2005 Douglas S. Reeves 27

Sources of Delay A “Framework” for QoS


• Application  Sender contacts receiver, negotiates

application characteristics (bit-rate, etc.)
– framing delay (time to accumulate one unit of speech or
video for processing): 10-30ms

Sender notifies network of QoS requirements
– video/audio compression and decompression: 30-100 and application characteristics
ms
– jitter removal/smoothing at receiver: 50-200 ms Network determines if QoS can be met,

reserves bandwidth and scheduling priority on
• Network media path
– Media access and serialization delay: 5ms QoS is managed by network
– propagation delay:45 ms (cross-continent)
– queuing and switching delays: 5-200ms
Receiver manages playback buffer


copyright 2005 Douglas S. Reeves 28 copyright 2005 Douglas S. Reeves 29

Compression / Decompression Choices


• Lots of standards: take CSC557 

• Tradeoff of…
– processing overhead and hardware needed
QoS “MECHANISMS” – perceptual quality desired

• Factors that can be adapted


– frame rate, size of image, color depth
– lossiness / quality

copyright 2005 Douglas S. Reeves 31

5
Application Traffic Descriptors LBAP Illustration
• A popular descriptor: Linear Bounded Arrival
Process (LBAP)

• # of bits transmitted in any interval t =


B(t) ≤ ρ* t + σ
– ρ = the long-term average rate
– σ = longest “burst” that application may send

• Example (ρ = 5000 bps, σ = 3000 bits, t = .5)


– B(t) ≤ 5500 bits

copyright 2005 Douglas S. Reeves 32 copyright 2005 Douglas S. Reeves 33

Traffic Shapers or Policers Token Bucket Regulator


• Shapers or regulators enforce the rate at which • Up to σ tokens accumulate in the
applications can inject traffic into the network “bucket”, at rate ρ
– token bucket size σ
• Policers discard traffic which does not conform to – token generation rate ρ

rate ρ
Tokens
a traffic descriptor
• Transmit a packet only when the


• Mechanisms sum of the tokens accumulated ≥
packet size
– leaky bucket size σ
– and remove that amount of tokens
– token bucket from the bucket

• If no token when packet arrives...


– policer: drop packet Incoming Outgoing
Packets  Packets 
– shaper: buffer packet
copyright 2005 Douglas S. Reeves 34 copyright 2005 Douglas S. Reeves 35

Token Bucket Shaping Example Token Bucket Shaping Example


• Bucket size σ = 4 tokens • Bucket size σ = 4 tokens

• Token generation rate ρ = 4 tokens/Sec • Token generation rate ρ = 4 tokens/Sec

Tokens being generated


copyright 2005 Douglas S. Reeves 36 copyright 2005 Douglas S. Reeves 37

6
Token Bucket Shaping Example Token Bucket Shaping Example
• Bucket size σ = 4 tokens • Bucket size σ = 4 tokens

• Token generation rate ρ = 4 tokens/Sec • Token generation rate ρ = 4 tokens/Sec

Packets arriving  Packets arriving 

Packet leaving 

Tokens being generated Tokens being generated


copyright 2005 Douglas S. Reeves 38 copyright 2005 Douglas S. Reeves 39

Token Bucket Shaping Example Token Bucket Shaping Example


• Bucket size σ = 4 tokens • Bucket size σ = 4 tokens

• Token generation rate ρ = 4 tokens/Sec • Token generation rate ρ = 4 tokens/Sec

Packets arriving  Packets arriving 

Packet leaving  Packet leaving 

Tokens being generated Tokens being generated


copyright 2005 Douglas S. Reeves 40 copyright 2005 Douglas S. Reeves 41

Token Bucket Shaping Example Packet Schedulers


• Bucket size σ = 4 tokens • Determine the order in which incoming packets
• Token generation rate ρ = 4 tokens/Sec
are output, and at what times
– affects the queuing time of the packets
Packets arriving 
• The simplest scheduler: First-in-First-Out
– limitation: all flows treated the same
Packet leaving  – variation: remember RED and AQM (active queue
management)?

• Many scheduling algorithms (take CSC557  )


– one example: Weighted Round-Robin (WRR)

Tokens being generated


copyright 2005 Douglas S. Reeves 42 copyright 2005 Douglas S. Reeves 43

7
Playout Buffer Management Example
• Voice and video are captured at constant
sampling intervals. Examples…
– voice: 8000 samples / sec = 1 sample every .125 ms
Voice samples
– video: 30 frames / sec = 1 sample every 333 ms
Sender
• Network “jitter” means the packets will not arrive
at the receiver at a steady rate
Voice
– receiver uses a playout buffer to restore smooth Recording Internet Receiver
playback Device
Playout
Buffer

Receiver

copyright 2005 Douglas S. Reeves 44 copyright 2005 Douglas S. Reeves 45

Playout Buffer Illustration Playout Buffer Illustration


= packet arrivals = packet arrivals

= packets used by application without buffering = packets used by application without buffering

= packets used by application with playout buffering = packets used by application with playout buffering

Time Time

Playout Buffer Illustration Playout Buffer Illustration


= packet arrivals = packet arrivals

= packets used by application without buffering = packets used by application without playout buffering

= packets used by application with playout buffering = packets used by application with playout buffering

Time Time

8
Playout Buffer Illustration Playout Buffer Illustration
= packet arrivals = packet arrivals

= packets used by application with no buffering = packets used by application with no buffering

= packets used by application with playout buffering = packets used by application with playout buffering

Time Time

QoS Guarantees (RFC1633)


• Deterministic (100%) guarantees
– based on peak traffic rate
– simple, predictable, conservative
RSVP AND INTEGRATED SERVICES – Guaranteed Service (RFC 2212)

• Statistical (< 100%) guarantees


– Controlled Load Service

• No guarantees
– Best Effort Service

copyright 2005 Douglas S. Reeves 53

The RSVP Protocol (RFC2205) Point-to-Point Reservations


• Purpose: announce or signal... H2
H1 L1 L4
– the sending application requirements to receivers: L2 R2 L3
PATH messages R1 R3
– the receivers' resource requirements to the network:
RESV messages • Goal: establish a virtual circuit from H1 to H2
– i.e., reserve “resources” in routers R1, R2, and R3
• Properties
– unidirectional (bidirectional QoS requires reservations in • Most controversial aspect: routers have to maintain
both directions) per-flow state
– runs directly over IP (unreliable) – e.g., flow identity, traffic specification, resource
– hop-by-hop (not end-to-end): routers have to process reservation, timer, next and previous hops, …
the messages and possibly modify their contents
copyright 2005 Douglas S. Reeves 54 copyright 2005 Douglas S. Reeves 55

9
Route Pinning and Message Propagation Guaranteed Service Delay Bounds
RES
(Flo V RESV RES
SV
R E lo w • Goal: receiver must calculate R, rate to be
(Flow (Flo
V (F e c ) H2
H1
sp e w
c) spec) sp e w
c)
sp
assigned to flow
R2
PA
T
(T s H
pe
R1 PAT
H R3 TH c+
P A sp e c) • Application requirements determine maximum total
c) PATH (Tsp (T sp e
ec+ e
Ads c+ Ad
(Tsp c)
Adsp
e pec
) end-to-end delay bound Dreq
• Route pinning • Computed from information in Tspec and Adspec
– make sure the RESV message retraces the same path – (see RFC 2212)
taken by the PATH message

copyright 2005 Douglas S. Reeves 56 copyright 2005 Douglas S. Reeves 57

Core vs. Access Networks

Boundary routers Access


Network
Access
Network
R3
DIFFERENTIATED SERVICES R1
Core Network
(DIFFSERV)
R5 R5

R5 R5
R2 R4 Access
Access Network
Network

Core routers

DiffServ Diffserv Codepoint (DSCP)


• QoS will be managed on aggregation (bundle) of • Field in the IP header specifying the class of
flows sharing a path service the packet is to receive
– trades off efficiency for accuracy, guaranteed QoS – replaces the previous (8-bit) TOS field
– simplifies processing in core routers, pushes complexity
to the network edge
– implemented only in core network, not in access
networks
– proper network provisioning for DiffServ is key to
acceptable performance

copyright 2005 Douglas S. Reeves 60 copyright 2005 Douglas S. Reeves 61

10
Expedited Forwarding (EF) PHB Assured Forwarding (AF) PHB
(RFC 2598) (RFC 2597)
• Qualitative guarantee: “low” loss, delay, and jitter • Traffic will be forwarded with "high probability" as
– minimal queuing at routers
long as within subscribed rate
– excess traffic more likely to be discarded
• Policing and shaping needed only at...
• Network must not reorder packets in the same
– access routers, on a per-flow basis
“flow” whether they are in or out of profile
– border routers, on aggregated flows
• Four AF classes, with varying priorities for
• Policing based on simple token bucket
dropping
– packets exceeding the subscribed rate must be
dropped

copyright 2005 Douglas S. Reeves 62 copyright 2005 Douglas S. Reeves 63

What Has Been Adopted So Far?



Playout buffer management

Streaming

QoS ASSESSMENT Overprovisioning

RTP / RTCP

SIP

VoIP

copyright 2005 Douglas S. Reeves 65

What Has Not Been Adopted So Far? Summary


1. IntServ (but RSVP in use) and Admission control • Voice and video transmission impose new
demands on the Internet
2. ~DiffServ~
• Providing QoS requires new packet handling
3. WFQ, other complex schedulers mechanisms
4. Killer issue: incremental deployment • QoS also requires new protocols
– is QoS in 95% of the network good enough?

copyright 2005 Douglas S. Reeves 66 copyright 2005 Douglas S. Reeves 67

11
Next Lecture
• Nothing!

copyright 2005 Douglas S. Reeves 68

12

You might also like