8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 1/48
7: Multimedia Networking 7-1
Chapter 7Multimedia Networking
A note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers).They’re in PowerPoint form so you can add, modify, and delete slides(including this one) and slide content to suit your needs. They obviouslyrepresent a lot of work on our part. In return for use, we only ask thefollowing:
If you use these slides (e.g., in a class) in substantially unaltered form,that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, andnote our copyright of this material.
Thanks and enjoy! JFK / KWR
All material copyright 1996-2009
J.F Kurose and K.W. Ross, All Rights Reserved
Computer Networking: A TopDown Approach
5 th edition.Jim Kurose, Keith Ross
Addison-Wesley, April 2009.
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 2/48
7: Multimedia Networking 7-2
Multimedia and Quality of Service: What is it?
multimedia applications:network audio and video(“continuous media”)
network providesapplication with level of
performance needed forapplication to function.
QoS
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 3/48
7: Multimedia Networking 7-3
Chapter 7: goals
Principles classify multimedia applicationsidentify network services applications needmaking the best of best effort service
Protocols and Architectures specific protocols for best-effortmechanisms for providing QoS
architectures for QoS
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 4/48
7: Multimedia Networking 7-4
Chapter 7 outline
7.1 multimedia networkingapplications 7.2 streaming stored audio
and video
7.3 making the best out ofbest effort service7.4 protocols for real-time
interactive applications RTP,RTCP,SIP
7.5 providing multipleclasses of service7.6 providing QoS
guarantees
PELAJARI SLIDE YANGTIDAK DIHIDE!
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 5/48
7: Multimedia Networking 7-5
MM Networking Applications
Fundamentalcharacteristics: typically delay sensitive
end-to-end delay
delay jitter loss tolerant : infrequentlosses cause minorglitches
antithesis of data, whichare loss intolerant butdelay tolerant .
Classes of MM applications:1) stored streaming2) live streaming3) interactive, real-time
Jitter is the variabilityof packet delays withinthe same packet stream
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 6/48
7: Multimedia Networking 7-6
Streaming Stored Multimedia
Stored streaming:media stored at sourcetransmitted to clientstreaming: client playout beginsbefore all data has arrived
timing constraint for still-to-betransmitted data: in time for playout
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 7/48
7: Multimedia Networking 7-7
Streaming Stored Multimedia:What is it?
1. videorecorded
2. videosent 3. video received,
played out at client
streaming: at this time, clientplaying out early part of video,while server still sending laterpart of video
networkdelay
time
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 8/48
7: Multimedia Networking 7-8
Streaming Stored Multimedia: Interactivity
VCR-like functionality: client canpause, rewind, FF, push slider bar
10 sec initial delay OK
1-2 sec until command effect OK
timing constraint for still-to-betransmitted data: in time for playout
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 9/48
7: Multimedia Networking 7-9
Streaming Live Multimedia
Examples: Internet radio talk showlive sporting event
Streaming (as with streaming stored multimedia)playback bufferplayback can lag tens of seconds aftertransmissionstill have timing constraint
Interactivity fast forward impossiblerewind, pause possible!
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 10/48
7: Multimedia Networking 7-10
Real-Time Interactive Multimedia
end-end delay requirements:audio: < 150 msec good, < 400 msec OK
• includes application-level (packetization) and network
delays• higher delays noticeable, impair interactivity
session initialization how does callee advertise its IP address, port
number, encoding algorithms?
applications: IP telephony,video conference, distributedinteractive worlds
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 11/48
7: Multimedia Networking 7-11
Multimedia Over Today’s Internet
TCP/UDP/IP: “best -effort service” no guarantees on delay, loss
Today’s Internet multimedia applicationsuse application-level techniques to mitigate
(as best possible) effects of delay, loss
But you said multimedia apps requiresQoS and level of performance to beeffective!
? ? ? ? ?
?
? ? ?
?
?
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 12/48
7: Multimedia Networking 7-12
How should the Internet evolve to bettersupport multimedia?
Integrated services philosophy: fundamental changes inInternet so that apps canreserve end-to-endbandwidth
requires new, complexsoftware in hosts & routersLaissez-faire
no major changesmore bandwidth whenneededcontent distribution,application-layer multicast
application layer
Differentiated servicesphilosophy:fewer changes to Internetinfrastructure, yet provide1st and 2nd class service
What’s your opinion?
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 13/48
7: Multimedia Networking 7-13
A few words about audio compression
analog signal sampledat constant ratetelephone: 8,000samples/secCD music: 44,100samples/sec
each sample quantized,i.e., rounded
e.g., 28=256 possible
quantized valueseach quantized valuerepresented by bits
8 bits for 256 values
example: 8,000samples/sec, 256quantized values -->64,000 bps
receiver converts bitsback to analog signal:some quality reduction
Example rates
CD: 1.411 MbpsMP3: 96, 128, 160 kbpsInternet telephony:5.3 kbps and up
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 14/48
7: Multimedia Networking 7-14
A few words about video compression
video: sequence ofimages displayed atconstant rate
e.g. 24 images/sec
digital image: array ofpixelseach pixel representedby bits
redundancyspatial (within image)temporal (from one imageto next)
Examples: MPEG 1 (CD-ROM) 1.5MbpsMPEG2 (DVD) 3-6 Mbps
MPEG4 (often used inInternet, < 1 Mbps)
Research: layered (scalable) video
adapt layers to availablebandwidth
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 15/48
7: Multimedia Networking 7-16
Streaming Stored Multimedia
application-level streamingtechniques for making thebest out of best effortservice:
client-side buffering use of UDP versus TCP multiple encodings ofmultimedia
jitter removal
decompressionerror concealmentgraphical user interfacew/ controls for
interactivity
Media Player
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 16/48
7: Multimedia Networking 7-17
Internet multimedia: simplest approach
audio, video not streamed: no, “pipelining,” long delays until playout!
audio or video stored in filefiles transferred as HTTP object
received in entirety at clientthen passed to player
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 17/48
7: Multimedia Networking 7-18
Internet multimedia: streaming approach
browser GETs metafile browser launches player, passing metafileplayer contacts serverserver streams audio/video to player
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 18/48
7: Multimedia Networking 7-19
Streaming from a streaming server
allows for non-HTTP protocol between server, mediaplayerUDP or TCP for step (3), more shortly
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 19/48
7: Multimedia Networking 7-22
Streaming Multimedia: UDP or TCP?UDP
server sends at rate appropriate for client (oblivious tonetwork congestion !)
often send rate = encoding rate = constant ratethen, fill rate = constant rate - packet loss
short playout delay (2-5 seconds) to remove network jittererror recover: time permitting
TCP send at maximum possible rate under TCP
fill rate fluctuates due to TCP congestion controllarger playout delay: smooth TCP delivery rateHTTP/TCP passes more easily through firewalls
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 20/48
7: Multimedia Networking 7-43
Content distribution networks (CDNs)
Content replication challenging to stream largefiles (e.g., video) from singleorigin server in real timesolution: replicate content athundreds of serversthroughout Internet
content downloaded to CDNservers ahead of time
placing content “close” touser avoids impairments(loss, delay) of sendingcontent over long pathsCDN server typically inedge/access network
origin serverin North America
CDN distribution node
CDN serverin S. America CDN server
in Europe
CDN serverin Asia
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 21/48
7: Multimedia Networking 7-44
Content distribution networks (CDNs)
Content replication CDN (e.g., Akamai)customer is the contentprovider (e.g., CNN)
CDN replicatescustomers’ content inCDN servers.when provider updates
content, CDN updatesservers
origin serverin North America
CDN distribution node
CDN serverin S. America CDN server
in Europe
CDN serverin Asia
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 22/48
7: Multimedia Networking 7-45
CDN example
origin server (www.foo.com)
distributes HTMLreplaces:http://www.foo.com/sports.ruth.gif
with
http://www.cdn.com/www.foo.com/sports/ruth.gif
HTTP request forwww.foo.com/sports/sports.html
DNS query for www.cdn.com
HTTP request forwww.cdn.com/www.foo.com/sports/ruth.gif
1
2
3
origin server
CDN’s authoritativeDNS server
CDN server near client
CDN company (cdn.com)
distributes gif filesuses its authoritativeDNS server to routeredirect requests
client
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 23/48
7: Multimedia Networking 7-48
Chapter 7 outline
7.1 multimedia networkingapplications7.2 streaming stored audio
and video
7.3 making the best out ofbest effort service7.4 protocols for real-time
interactive applications RTP, RTCP, SIP
7.5 providing multipleclasses of service7.6 providing QoS
guarantees
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 24/48
7: Multimedia Networking 7-49
Real-Time Protocol (RTP)
RTP specifies packetstructure for packetscarrying audio, videodata
RFC 3550RTP packet provides
payload typeidentification
packet sequencenumberingtime stamping
RTP runs in end systemsRTP packetsencapsulated in UDPsegments
interoperability: if twoInternet phoneapplications run RTP,then they may be ableto work together
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 25/48
7: Multimedia Networking 7-50
RTP runs on top of UDP
RTP libraries provide transport-layer interfacethat extends UDP:
• port numbers, IP addresses• payload type identification
• packet sequence numbering• time-stamping
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 26/48
7: Multimedia Networking 7-56
Real-Time Control Protocol (RTCP)
works in conjunctionwith RTP.each participant in RTPsession periodically
transmits RTCP controlpackets to all otherparticipants.each RTCP packetcontains sender and/orreceiver reports
report statistics useful toapplication: # packetssent, # packets lost,
interarrival jitter, etc.
feedback can be usedto controlperformance
sender may modify itstransmissions based onfeedback
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 27/48
7: Multimedia Networking 7-61
SIP: Session Initiation Protocol [RFC 3261]
SIP long-term vision:
all telephone calls, video conference calls takeplace over Internetpeople are identified by names or e-mailaddresses, rather than by phone numbers
you can reach callee, no matter where calleeroams, no matter what IP device callee is currentlyusing
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 28/48
7: Multimedia Networking 7-62
SIP Services
Setting up a call, SIPprovides mechanisms ..for caller to letcallee know she
wants to establish acallso caller, callee canagree on media type,encodingto end call
determine current IPaddress of callee:maps mnemonicidentifier to current IPaddress
call management:add new media streamsduring callchange encoding during
callinvite otherstransfer, hold calls
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 29/48
7: Multimedia Networking 7-63
Setting up a call to known IP address Alice’s SIP invite
message indicates herport number, IP address,encoding she prefers toreceive (PCM ulaw)
Bob’s 200 OK message
indicates his port number,IP address, preferredencoding (GSM)
SIP messages can besent over TCP or UDP;here sent over RTP/UDP.
default SIP port numberis 5060.
time time
Bob'sterminal rings
Alice
167.180.112.24
Bob
193.64.210.89
por t 5060
port 38060m Law audio
GSMport 48753
INV IT E bob@19 3.64.2 10.89 c =IN IP 4 167 .180.112 .2 4m=audi o 38060 RT P / AV P 0por t 5060
2 0 0 O Kc = IN IP 4 1 9 3 .6 4 .2 1 0 .8 9
m = a u d io 4 8 7 5 3 R T P / A V P 3
ACK por t 5060
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 30/48
7: Multimedia Networking 7-71
Chapter 7 outline
7.1 multimedia networkingapplications
7.2 streaming stored audioand video
7.3 making the best out ofbest effort service
7.4 protocols for real-timeinteractive applications RTP, RTCP, SIP
7.5 providing multipleclasses of service7.6 providing QoS
guarantees
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 31/48
7: Multimedia Networking 7-72
Providing Multiple Classes of Servicethus far: making the best of best effort service
one-size fits all service modelalternative: multiple classes of service
partition traffic into classes
network treats different classes of trafficdifferently (analogy: VIP service vs regular service)
0111
granularity:differential serviceamong multipleclasses, not amongindividualconnectionshistory: ToS bits
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 32/48
7: Multimedia Networking 7-73
Multiple classes of service: scenario
R1 R2H1
H2
H3
H41.5 Mbps linkR1 output
interfacequeue
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 33/48
7: Multimedia Networking 7-74
Scenario 1: mixed FTP and audioExample: 1Mbps IP phone, FTP share 1.5 Mbps link.
bursts of FTP can congest router, cause audio losswant to give priority to audio over FTP
packet marking needed for router to distinguishbetween different classes; and new router policyto treat packets accordingly
Principle 1
R1 R2
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 34/48
7: Multimedia Networking 7-75
Principles for QOS Guarantees (more)what if applications misbehave (audio sends higherthan declared rate)
policing: force source adherence to bandwidth allocationsmarking and policing at network edge:
similar to ATM UNI (User Network Interface)
provide protection ( isolation ) for one class from others
Principle 2
R1 R2
1.5 Mbps link
1 Mbpsphone
packet marking and policing
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 35/48
7: Multimedia Networking 7-76
Principles for QOS Guarantees (more)
Allocating fixed (non-sharable) bandwidth to flow:inefficient use of bandwidth if flows doesn’t useits allocation
While providing isolation, it is desirable to useresources as efficiently as possible
Principle 3
R1 R2
1.5 Mbps link
1 Mbps
phone
1 Mbps logical link
0.5 Mbps logical link
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 36/48
7: Multimedia Networking 7-77
Scheduling And Policing Mechanisms
scheduling: choose next packet to send on linkFIFO (first in first out) scheduling: send in order ofarrival to queue
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
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 37/48
7: Multimedia Networking 7-78
Scheduling Policies: more
Priority scheduling: transmit highest priority queuedpacketmultiple classes , with different priorities
class may depend on marking or other header info, e.g. IPsource/dest, port numbers, etc..Real world example?
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 38/48
7: Multimedia Networking 7-79
Scheduling Policies: still more
round robin scheduling: multiple classescyclically scan class queues, serving one from eachclass (if available)
real world example?
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 39/48
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 40/48
7: Multimedia Networking 7-81
Policing Mechanisms
Goal: limit traffic to not exceed declared parametersThree common-used criteria:
(Long term) Average Rate: how many pkts can be sentper unit time (in the long run)
crucial question: what is the interval length: 100 packets persec or 6000 packets per min have same average!Peak Rate: e.g., 6000 pkts per min. (ppm) avg.; 1500ppm peak rate
(Max.) Burst Size: max. number of pkts sentconsecutively (with no intervening idle)
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 41/48
7: Multimedia Networking 7-82
Policing Mechanisms
Token Bucket: limit input to specified Burst Sizeand Average Rate.
bucket can hold b tokenstokens generated at rate r token/sec unless bucketfullover interval of length t: number of packetsadmitted less than or equal to (r t + b).
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 42/48
7: Multimedia Networking 7-83
Policing Mechanisms (more)
token bucket, WFQ combine to provide guaranteedupper bound on delay, i.e., QoS guarantee !
WFQ
token rate, r
bucket size, b per-flowrate, R
D = b/R max
arriving
traffic
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 43/48
7: Multimedia Networking 7-84
IETF Differentiated Services
want “qualitative” service classes “behaves like a wire” relative service distinction: Platinum, Gold, Silver
scalability: simple functions in network core,relatively complex functions at edge routers (orhosts)
signaling, maintaining per-flow router statedifficult with large number of flows
don’t define define service classes, providefunctional components to build service classes
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 44/48
7: Multimedia Networking 7-85
Edge router:per-flow traffic managementmarks packets as in-profile and out-profile
Core router:per class traffic management buffering and scheduling basedon marking at edge preference given to in-profilepackets
Diffserv Architecture
scheduling
.
.
.
r
b
marking
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 45/48
7: Multimedia Networking 7-86
Edge-router Packet Marking
class-based marking: packets of different classes markeddifferentlyintra-class marking: conforming portion of flow markeddifferently than non-conforming one
profile: pre-negotiated rate A, bucket size B
packet marking at edge based on per-flow profile
Possible usage of marking:
User packets
Rate A
B
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 46/48
7: Multimedia Networking 7-87
Classification and Conditioning
Packet is marked in the Type of Service (TOS) inIPv4, and Traffic Class in IPv66 bits used for Differentiated Service Code Point(DSCP) and determine PHB that the packet will
receive2 bits are currently unused
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 47/48
7: Multimedia Networking 7-88
Classification and Conditioning
may be desirable to limit traffic injection rate ofsome class:user declares traffic profile (e.g., rate, burst size)traffic metered, shaped if non-conforming
8/11/2019 Chapter7 5th FINAL May2014
http://slidepdf.com/reader/full/chapter7-5th-final-may2014 48/48
Chapter 7: Summary
Principles classify multimedia applicationsidentify network services applications needmaking the best of best effort service
Protocols and Architectures specific protocols for best-effortmechanisms for providing QoS
architectures for QoSmultiple classes of serviceQoS guarantees, admission control