Chapter7 4th Ed June 25 2007
Chapter7 4th Ed June 25 2007
Chapter7 4th Ed June 25 2007
Multimedia Networking
QoS
network provides
application with level of
performance needed for
application to function.
7: Multimedia Networking 7-2
Chapter 7: goals
Principles
classify multimedia applications
identify network services applications need
making the best of best effort service
Protocols and Architectures
specific protocols for best-effort
mechanisms for providing QoS
architectures for QoS
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
RTP,RTCP,SIP
MM Networking Applications
Classes of MM applications:
1) stored streaming
2) live streaming
3) interactive, real-time
Fundamental
characteristics:
typically delay sensitive
end-to-end delay
delay jitter
Stored streaming:
media stored at source
transmitted to client
streaming: client playout begins
before all data has arrived
timing constraint for still-to-be
Cumulative data
1. video
recorded
2. video
sent
network
delay
3. video received,
played out at client
time
applications: IP telephony,
session initialization
7: Multimedia Networking 7-
application layer
Differentiated services
philosophy:
fewer changes to Internet
infrastructure, yet provide
1st and 2nd class service
at constant rate
telephone: 8,000
samples/sec
CD music: 44,100
samples/sec
i.e., rounded
represented by bits
example: 8,000
samples/sec, 256
quantized values -->
64,000 bps
receiver converts bits
back to analog signal:
Example rates
CD: 1.411 Mbps
MP3: 96, 128, 160 kbps
Internet telephony:
5.3 kbps and up
7: Multimedia Networking 7-
images displayed at
constant rate
e.g. 24 images/sec
pixels
redundancy
spatial (within image)
temporal (from one image
to next)
Examples:
MPEG 1 (CD-ROM) 1.5
Mbps
MPEG2 (DVD) 3-6 Mbps
MPEG4 (often used in
Internet, < 1 Mbps)
Research:
layered (scalable) video
7: Multimedia Networking 7-
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
RTP,RTCP,SIP
7: Multimedia Networking 7-
Media Player
jitter removal
decompression
error concealment
graphical user interface
w/ controls for
interactivity
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
player
UDP or TCP for step (3), more shortly
7: Multimedia Networking 7-
constant bit
rate video
transmission
variable
network
delay
client video
reception
constant bit
rate video
playout at client
buffered
video
Cumulative data
time
client playout
delay
7: Multimedia Networking 7-
constant
drain
rate, d
variable fill
rate, x(t)
buffered
video
7: Multimedia Networking 7-
TCP
send at maximum possible rate under TCP
fill rate fluctuates due to TCP congestion control
larger playout delay: smooth TCP delivery rate
HTTP/TCP passes more easily through firewalls
7: Multimedia Networking 7-
7: Multimedia Networking 7-
RTSP Example
Scenario:
metafile communicated to web browser
browser launches player
player sets up an RTSP control connection, data
7: Multimedia Networking 7-
Metafile Example
<title>Twister</title>
<session>
<group language=en lipsync>
<switch>
<track type=audio
e="PCMU/8000/1"
src = "rtsp://audio.example.com/twister/audio.en/lofi">
<track type=audio
e="DVI4/16000/2" pt="90 DVI4/8000/1"
src="rtsp://audio.example.com/twister/audio.en/hifi">
</switch>
<track type="video/jpeg"
src="rtsp://video.example.com/twister/video">
</group>
</session>
7: Multimedia Networking 7-
RTSP Operation
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
RTP,RTCP,SIP
7: Multimedia Networking 7-
Skype
PC-2-phone
Dialpad
Net2phone
Skype
videoconference with
webcams
Skype
Polycom
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
constant bit
rate
transmission
variable
network
delay
(jitter)
client
reception
constant bit
rate playout
at client
buffered
data
Cumulative data
Delay Jitter
time
client playout
delay
7: Multimedia Networking 7-
7: Multimedia Networking 7-
lo s s
p a c k e ts
g e n e ra te d
p a c k e ts
r e c e iv e d
p la y o u t s c h e d u le
p'- r
p la y o u t s c h e d u le
p - r
t im e
r
p
p'
7: Multimedia Networking 7-
d i (1 u )d i 1 u( ri ti )
where u is a fixed constant (e.g., u = .01).
7: Multimedia Networking 7-
vi (1 u )vi 1 u | ri ti d i |
pi ti d i Kvi
where K is positive constant
7: Multimedia Networking 7-
7: Multimedia Networking 7-
lost
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Interleaving
chunks divided into smaller units
for example, four 5 msec units
per chunk
packet contains small units from
different chunks
of every chunk
no redundancy overhead, but
7: Multimedia Networking 7-
origin server
in North America
CDN server
in S. America CDN server
in Europe
CDN server
in Asia
7: Multimedia Networking 7-
origin server
in North America
CDN server
in S. America CDN server
in Europe
CDN server
in Asia
7: Multimedia Networking 7-
CDN example
origin server
1
2
client
3
CDNs authoritative
DNS server
HTTP request for
www.cdn.com/www.foo.com/sports/ruth.gif
with
http://www.cdn.com/www.foo.com/sports/ruth.gif
7: Multimedia Networking 7-
network
7: Multimedia Networking 7-
for delay
server side matches stream bandwidth to available
client-to-server path bandwidth
7: Multimedia Networking 7-
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
7: Multimedia Networking 7-
encapsulated in UDP
segments
interoperability: if two
Internet phone
applications run RTP,
then they may be able
to work together
7: Multimedia Networking 7-
7: Multimedia Networking 7-
RTP Example
consider sending 64
kbps PCM-encoded
voice over RTP.
application collects
encoded data in chunks,
e.g., every 20 msec =
160 bytes in a chunk.
audio chunk + RTP
header form RTP
packet, which is
encapsulated in UDP
segment
contains sequence
numbers, timestamps.
7: Multimedia Networking 7-
7: Multimedia Networking 7-
RTP Header
Sequence Number (16 bits): Increments by one for each RTP packet
sent, and may be used to detect packet loss and to restore packet
sequence.
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
with RTP.
each participant in RTP
session periodically
transmits RTCP control
packets to all other
participants.
each RTCP packet
contains sender and/or
receiver reports
to control
performance
7: Multimedia Networking 7-
RTCP - Continued
each RTP session: typically a single multicast address; all RTP /RTCP
packets belonging to session use multicast address.
RTP, RTCP packets distinguished from each other via distinct port numbers.
7: Multimedia Networking 7-
RTCP Packets
Receiver report packets:
fraction of packets
lost, last sequence
number, average
interarrival jitter
Sender report packets:
SSRC of RTP stream,
current time, number of
packets sent, number of
bytes sent
Source description
packets:
e-mail address of
sender, sender's name,
SSRC of associated
RTP stream
provide mapping
between the SSRC and
the user/host name
7: Multimedia Networking 7-
Synchronization of Streams
RTCP can synchronize
to synchronize playout of
audio, video
7: Multimedia Networking 7-
traffic to 5% of session
bandwidth.
Example
Suppose one sender,
sending video at 2 Mbps.
Then RTCP attempts to
limit its traffic to 100
Kbps.
RTCP gives 75% of rate to
receivers; remaining 25%
to sender
among receivers:
traffic at 25 kbps.
participant determines RTCP
packet transmission period by
calculating avg RTCP packet
size (across entire session)
and dividing by allocated rate
7: Multimedia Networking 7-
7: Multimedia Networking 7-
SIP Services
Setting up a call, SIP
provides mechanisms ..
for caller to let
callee know she
wants to establish a
call
so caller, callee can
agree on media type,
encoding
to end call
determine current IP
address of callee:
maps mnemonic
identifier to current IP
address
call management:
add new media streams
during call
change encoding during
call
invite others
transfer, hold calls
7: Multimedia Networking 7-
A lic e
1 6 7 .1 8 0 .1 1 2 .2 4
1 9 3 .6 4 .2 1 0 .8 9
B o b 's
te r m in a l r in g s
L a w a u d io
p o rt 3 8 0 6 0
G SM
default
p o rt 4 8 7 5 3
is 5060.
tim e
tim e
7: Multimedia Networking 7-
rejecting a call
7: Multimedia Networking 7-
Alice specifies in
Via:
header that SIP client
sends, receives SIP
messages over UDP
7: Multimedia Networking 7-
SIP Registrar
when Bob starts SIP client, client sends SIP
Register Message:
REGISTER sip:domain.com SIP/2.0
Via: SIP/2.0/UDP 193.64.210.89
From: sip:[email protected]
To: sip:[email protected]
Expires: 3600
7: Multimedia Networking 7-
SIP Proxy
Alice sends invite message to her proxy server
contains address sip:[email protected]
proxy responsible for routing SIP messages to
callee
of proxies.
proxy returns SIP response message to Alice
7: Multimedia Networking 7-
Example
Caller [email protected]
with places a
call to [email protected]
S IP r e g is tr a r
u p e n n .e d u
S IP
r e g is tr a r
e u r e c o m .fr
S IP p r o x y
u m a s s .e d u
7
8
S IP c lie n t
2 1 7 .1 2 3 .5 6 .8 9
S IP c lie n t
1 9 7 .8 7 .5 4 .2 1
7: Multimedia Networking 7-
(telephony).
SIP comes from IETF:
Borrows much of its
concepts from HTTP
SIP has Web flavor,
whereas H.323 has
telephony flavor.
SIP uses the KISS
principle: Keep it simple
stupid.
7: Multimedia Networking 7-
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
7: Multimedia Networking 7-
7: Multimedia Networking 7-
H1
H2
R1
R1 output
interface
queue
H3
R2
H4
7: Multimedia Networking 7-
R2
Principle 1
packet marking needed for router to distinguish
between different classes; and new router policy
to treat packets accordingly
7: Multimedia Networking 7-
declared rate)
R1
R2
1.5 Mbps link
Allocating
1 Mbps
phone
R1
R2
1.5 Mbps link
Principle 3
While providing isolation, it is desirable to use
resources as efficiently as possible
7: Multimedia Networking 7-
real-world example?
discard policy: if packet arrives to full queue: who to discard?
Tail drop: drop arriving packet
priority: drop/remove on priority basis
random: drop/remove randomly
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Policing Mechanisms
Goal: limit traffic to not exceed declared parameters
Three common-used criteria:
(Long term) Average Rate: how many pkts can be sent per unit time (in
the long run)
crucial question: what is the interval length: 100 packets per sec or 6000 packets per
min have same average!
Peak Rate: e.g., 6000 pkts per min. (ppm) avg.; 1500 ppm peak rate
(Max.) Burst Size: max. number of pkts sent consecutively (with no
intervening idle)
7: Multimedia Networking 7-
Policing Mechanisms
Token Bucket: limit input to specified Burst Size and
Average Rate.
7: Multimedia Networking 7-
arriving
traffic
token rate, r
bucket size, b
WFQ
per-flow
rate, R
D = b/R
max
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Diffserv Architecture
Edge router:
r marking
scheduling
and out-profile
..
.
Core router:
per class traffic management
buffering and scheduling based
on marking at edge
preference given to in-profile
packets
7: Multimedia Networking 7-
Rate A
B
User packets
differently
intra-class marking: conforming portion of flow marked
differently than non-conforming one
7: Multimedia Networking 7-
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Forwarding (PHB)
PHB result in a different observable (measurable)
7: Multimedia Networking 7-
Forwarding (PHB)
PHBs being developed:
Expedited Forwarding: pkt departure rate of a
7: Multimedia Networking 7-
Chapter 7 outline
7.1 multimedia networking
applications
7.2 streaming stored audio
and video
7.3 making the best out of
best effort service
7.4 protocols for real-time
interactive applications
7: Multimedia Networking 7-
Chapter 7 outline
7.1 Multimedia Networking
Applications
7.2 Streaming stored audio
and video
7.3 Real-time Multimedia:
Internet Phone study
7.4 Protocols for Real-Time
Interactive Applications
RTP,RTCP,SIP
7.5 Distributing
Effort
7.7 Scheduling and
Policing Mechanisms
7.8 Integrated
Services and
Differentiated
Services
7.9 RSVP
Multimedia: content
distribution networks
7: Multimedia Networking 7-
1 Mbps
phone
R1
R2
1.5 Mbps link
Principle 4
Call Admission: flow declares its needs, network may
block call (e.g., busy signal) if it cannot meet needs
7: Multimedia Networking 7-
request/
reply
QoS-sensitive
scheduling (e.g., WFQ)
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Call Admission
Arriving session must :
declare its QOS requirement
7: Multimedia Networking 7-
leaky-bucket-policed source
simple (mathematically
provable) bound on delay
[Parekh 1992, Cruz 1988]
arriving
traffic
token rate, r
bucket size, b
WFQ
per-flow
rate, R
D = b/R
max
7: Multimedia Networking 7-
best effort
service
no network
signaling protocols
in initial IP
design
7: Multimedia Networking 7-
5.
6.
7: Multimedia Networking 7-
7: Multimedia Networking 7-
Chapter 7: Summary
Principles
classify multimedia applications
identify network services applications need
making the best of best effort service
Protocols and Architectures
specific protocols for best-effort
mechanisms for providing QoS
architectures for QoS
multiple classes of service
QoS guarantees, admission control
7: Multimedia Networking 7-