Multimedia Networks - 1 - Introduction
Multimedia Networks - 1 - Introduction
1: Introduction
1-1
QoS
network provides application with level of performance needed for application to function.
1: Introduction 1-2
Chapter 1: 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
1: Introduction 1-3
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP,RTCP,SIP
1: Introduction
1-4
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
Jitter is the variability of packet delays within the same packet stream
1: Introduction
loss tolerant: infrequent losses cause minor glitches antithesis of data, which are loss intolerant but delay tolerant.
1-5
Stored streaming: media stored at source transmitted to client streaming: client playout begins before all data has arrived
timing constraint for still-to-be transmitted
1: Introduction
1-6
1. video recorded
streaming: at this time, client playing out early part of video, while server still sending later part of video
1: Introduction 1-7
pause, rewind, FF, push slider bar 10 sec initial delay OK 1-2 sec until command effect OK transmitted data: in time for playout
1: Introduction 1-8
session initialization
how does callee advertise its IP address, port number, encoding algorithms?
1: Introduction 1-10
? But you said multimedia apps requires QoS and level of performance to be ? ? effective! ?
Todays Internet multimedia applications use application-level techniques to mitigate (as best possible) effects of delay, loss
1: Introduction 1-11
Differentiated services philosophy: fewer changes to Internet infrastructure, yet provide 1st and 2nd class service
example: 8,000 samples/sec, 256 quantized values --> 64,000 bps receiver converts bits back to analog signal:
some quality reduction
Example rates CD: 1.411 Mbps MP3: 96, 128, 160 kbps Internet telephony: 5.3 kbps and up
1: Introduction
113
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
adapt layers to available bandwidth
1: Introduction 114
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP,RTCP,SIP
1: Introduction
115
1: Introduction
116
audio, video not streamed: no, pipelining, long delays until playout!
1: Introduction 1-17
browser GETs metafile browser launches player, passing metafile player contacts server server streams audio/video to player
1: Introduction 1-18
allows for non-HTTP protocol between server, media player UDP or TCP for step (3), more shortly
1: Introduction 1-19
buffered video
time
client-side buffering, playout delay compensate for network-added delay, 1: Introduction delay jitter
1-20
buffered video
client-side buffering, playout delay compensate for network-added delay, 1: Introduction delay jitter
1-21
often send rate = encoding rate = constant rate then, fill rate = constant rate - packet loss
short playout delay (2-5 seconds) to remove network jitter error recover: time permitting
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
1: Introduction
1-22
Q: how to handle different client receive rate capabilities? 28.8 Kbps dialup 100 Mbps Ethernet A: server stores, transmits multiple copies of video, encoded at different rates
1: Introduction 1-23
124
1: Introduction
125
RTSP Example
Scenario: metafile communicated to web browser browser launches player player sets up an RTSP control connection, data connection to streaming server
1: Introduction
1-26
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>
1: Introduction
1-27
RTSP Operation
1: Introduction
1-28
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP,RTCP,SIP
1: Introduction
130
1: Introduction
1-31
application-layer header added to each chunk. chunk+header encapsulated into UDP segment.
application sends UDP segment into socket every 20 msec during talkspurt
1: Introduction
1-32
loss tolerance: depending on voice encoding, losses concealed, packet loss rates between 1% and 10% can be 1: Introduction tolerated.
1-33
Delay Jitter
constant bit rate transmission client reception constant bit rate playout at client
buffered data
time
consider end-to-end delays of two consecutive packets: difference can be more or less than 20 msec (transmission time difference)
1: Introduction 1-34
tradeoff in choosing q:
large q: less packet loss small q: better interactive experience
1: Introduction 1-35
first packet received at time r first playout schedule: begins at p second playout schedule: begins at p
packets
loss
playout schedule p' - r playout schedule p-r
time
r p
1: Introduction
p'
1-36
t i timestamp of the ith packet ri the time packet i is received by receiver p i the time packet i is played at receiver ri t i network delay for ith packet d i estimate of average network delay after receiving ith packet dynamic estimate of average delay at receiver:
di (1 u)di 1 u(ri ti )
where u is a fixed constant (e.g., u = .01).
1: Introduction 1-37
vi (1 u)vi 1 u | ri ti di |
estimates di , vi calculated for every received packet (but used only at start of talk spurt
for first packet in talk spurt, playout time is:
pi ti di Kvi
where K is positive constant
1: Introduction
1-38
with loss possible, receiver must look at both time stamps and sequence numbers.
difference of successive stamps > 20 msec and sequence numbers without gaps --> talk spurt begins. 1: Introduction 1-39
1: Introduction
140
1: Introduction 1-41
Interleaving chunks divided into smaller units for example, four 5 msec units per chunk packet contains small units from different chunks
if packet lost, still have most of every chunk no redundancy overhead, but increases playout delay
1: Introduction
1-42
1: Introduction
CDN example
1 2
origin server
client
3
with
http://www.cdn.com/www.foo.com/sports/ruth.gif
CDN company (cdn.com) distributes gif files uses its authoritative DNS server to route redirect requests
1: Introduction 1-45
1: Introduction
1-46
Summary:
bag of tricks
Internet Multimedia:
use UDP to avoid TCP congestion control (delays) for time-sensitive traffic
client-side adaptive playout delay: to compensate for delay server side matches stream bandwidth to available client-to-server path bandwidth
chose among pre-encoded stream rates dynamic server encoding rate
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP, RTCP, SIP
1: Introduction
1-48
1: Introduction
1-49
1: Introduction
1-50
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 RTP header indicates type of audio encoding in each packet
sender can change encoding during conference.
1: Introduction
1-51
1: Introduction
1-52
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.
1: Introduction
1-53
identifies source of t RTP stream. Each stream in RTP session should have distinct SSRC.
1: Introduction
1-54
1: Introduction
1-55
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.
to limit traffic, each participant reduces RTCP traffic as number of conference participants increases
1: Introduction 1-57
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
1: Introduction 1-58
Synchronization of Streams
RTCP can synchronize different media streams within a RTP session consider videoconferencing app for which each sender generates one RTP stream for video, one for audio. timestamps in RTP packets tied to the video, audio sampling clocks not tied to wall-clock time each RTCP sender-report packet contains (for most recently generated packet in associated RTP stream):
timestamp of RTP packet wall-clock time for when packet was created.
1: Introduction
1-59
1: Introduction
1-61
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
1: Introduction 1-62
167.180.112.24 INVITE bob @193.64.2 10.89 c=IN IP4 16 7.180.112.2 4 m=audio 38 060 RTP/A VP 0
193.64.210.89
Alices SIP invite message indicates her port number, IP address, encoding she prefers to receive (PCM ulaw)
port 5060
port 5060
ACK
port 5060
Bobs 200 OK message indicates his port number, IP address, preferred encoding (GSM)
m Law audio
port 38060
GSM
SIP messages can be sent over TCP or UDP; here sent over RTP/UDP.
port 48753
default
time
1: Introduction time
1-63
Alice sends, receives SIP messages using SIP default port 506
Alice specifies in Via: header that SIP client sends, receives SIP messages over UDP
1-65
Service provided by SIP servers: SIP registrar server SIP proxy server
1: Introduction
1-66
SIP Registrar
when Bob starts SIP client, client sends SIP
REGISTER message to Bobs registrar server (similar function needed by Instant Messaging)
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
1: Introduction
1-67
SIP Proxy
Alice sends invite message to her proxy server
contains address sip:[email protected]
callee sends response back through the same set of proxies. proxy returns SIP response message to Alice
contains Bobs IP address
1: Introduction
1-68
Example
Caller [email protected] with places a call to [email protected] (1) Jim sends INVITE message to umass SIP proxy. (2) Proxy forwards request to upenn registrar server. (3) upenn server returns redirect response, indicating that it should try [email protected]
2
1 8
7 6
(4) umass proxy sends INVITE to eurecom registrar. (5) eurecom registrar forwards INVITE to 191.81.54.21, which is running keiths SIP client. (6-8) SIP response sent back (9) media sent directly between clients. Note: also a SIP ack message, which is not shown.
1: Introduction 1-69
1: Introduction
1-70
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP, RTCP, SIP
1: Introduction
1-71
granularity: differential
service among multiple classes, not among individual connections history: ToS bits
0111
1: Introduction
1-72
H2
H4
1: Introduction
1-73
R1
R2
Principle 1 packet marking needed for router to distinguish between different classes; and new router policy to treat packets accordingly
1: Introduction 1-74
1 Mbps phone
R1
1.5 Mbps link
R2
R1
1.5 Mbps link 0.5 Mbps logical link
R2
Principle 3
While providing isolation, it is desirable to use resources as efficiently as possible
1: Introduction 1-76
1: Introduction
1-77
1: Introduction
1-78
1: Introduction
1-79
1: Introduction
1-80
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)
1: Introduction 1-81
Policing Mechanisms
Token Bucket: limit input to specified Burst Size and Average Rate.
bucket can hold b tokens tokens generated at rate r token/sec unless bucket full over interval of length t: number of packets admitted less than or equal to (r t + b).
1: Introduction 1-82
WFQ
per-flow rate, R
D = b/R max
1: Introduction
1-83
scalability: simple functions in network core, relatively complex functions at edge routers (or hosts)
signaling, maintaining per-flow router state difficult with large number of flows
dont define define service classes, provide functional components to build service classes
1: Introduction
1-84
Diffserv Architecture
Edge router:
per-flow traffic management
marks packets as in-profile and
r marking scheduling
b
out-profile
. . .
Core router:
per class traffic management buffering and scheduling based on
1: Introduction
1-85
differently intra-class marking: conforming portion of flow marked differently than non-conforming one
1: Introduction
1-86
1: Introduction
1-87
1: Introduction
1-88
Forwarding (PHB)
PHB result in a different observable (measurable) forwarding performance behavior PHB does not specify what mechanisms to use to ensure required PHB performance behavior Examples:
Class A gets x% of outgoing link bandwidth over time intervals of a specified length Class A packets leave first before packets from class B
1: Introduction
1-89
Forwarding (PHB)
PHBs being developed: Expedited Forwarding: pkt departure rate of a class equals or exceeds specified rate
logical link with a minimum guaranteed rate
1: Introduction
1-90
Chapter 1 outline
1.1 multimedia networking applications 1.2 streaming stored audio and video 1.3 making the best out of best effort service 1.4 protocols for real-time interactive applications
RTP, RTCP, SIP
1: Introduction
1-91
R1
1.5 Mbps link
R2
1 Mbps phone
Principle 4
Call Admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs
1: Introduction 1-92
request/ reply
Question: can newly arriving flow be admitted with performance guarantees while not violated QoS guarantees made to already admitted flows?
1: Introduction
1-94
Call Admission
Arriving session must : declare its QOS requirement
R-spec: defines the QOS being requested
signaling protocol: needed to carry Rspec and T-spec to routers (where reservation is required)
RSVP
1: Introduction 1-95
Guaranteed service:
worst case traffic arrival: 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
1: Introduction 1-96
New requirement: reserve resources along end-to-end path (end system, routers) for QoS for multimedia applications RSVP: Resource Reservation Protocol [RFC 2205]
allow users to communicate requirements to network in robust and efficient way. i.e., signaling !
1: Introduction
1-97
rather: a mechanism for communicating needs thats the job of routing protocols signaling decoupled from routing separation of control (signaling) and data (forwarding) planes
1: Introduction
1-99
sender-to-network signaling
path message: make sender presence known to routers path teardown: delete senders path state from routers
receiver-to-network signaling
reservation message: reserve resources from sender(s) to receiver reservation teardown: remove receiver reservations
network-to-end-system signaling
path error reservation error
1: Introduction 1-100
Chapter 1: 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
1: Introduction 1-101