1- Protocolos de transporte con QoS

113
TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/ 1- Protocolos de transporte con QoS Clases de aplicaciones multimedia Redes basadas en IP y QoS RTP/RTCP: Transporte de flujos multimedia RTSP: Control de sesión y localización de medios Multicasting Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

description

1- Protocolos de transporte con QoS. Clases de aplicaciones multimedia Redes basadas en IP y QoS RTP/RTCP: Transporte de flujos multimedia RTSP: Control de sesión y localización de medios Multicasting. - PowerPoint PPT Presentation

Transcript of 1- Protocolos de transporte con QoS

Page 1: 1- Protocolos de transporte con  QoS

TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/

1-Protocolos de transporte con QoS

Clases de aplicaciones multimedia Redes basadas en IP y QoSRTP/RTCP: Transporte de flujos multimediaRTSP: Control de sesión y localización de mediosMulticasting

Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith RossAddison-WesleyMarch 2012

Page 2: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

What is multimedia?

Definition of multimediaHard to find a clear-cut definitionIn general, multimedia is an integration of text, graphics,

still and moving images, animation, sounds, and any other medium where every type of information can be represented, stored, transmitted and processed digitally

Characteristics of multimediaDigital – key conceptIntegration of multiple media type, usually including

video or/and audioMay be interactive or non-interactive

2

Page 3: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Various Media Types

Text, Graphics, image, video, animation, sound, etc.

Classifications of various media typesCaptured vs. synthesized media

Captured media (natural) : information captured from the real world– Example: still image, video, audio

Synthesized media (artificial) : information synthesize by the computer– Example: text, graphics, animation

Discrete vs. continuous mediaDiscrete media: space-based, media involve the space

dimension only– Text, Image, Graphics

Continuous media: time-based, media involves both the space and the time dimension– Video, Sound, Animation3

Page 4: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Classification of Media Type

4

Sound Video

Image

Animation

Text Graphics

Captured From real world

Synthesized By computer

Discrete Discrete

Continuous Continuous

Page 5: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Text

Plain textUnformattedCharacters coded in binary formASCII codeAll characters have the same style and font

Rich textFormattedContains format information besides codes for

charactersNo predominant standardsCharacters of various size, shape and style, e.g. bold,

colorful

5

Page 6: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Plain Text vs. Rich Text

6

An example of Plain text

Example of Rich text

Page 7: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Graphics

Revisable document that retains structural information

Consists of objects such as lines, curves, circles, etc

Usually generated by graphic editor of computer programs

7-4

-20

24

-4

-2

0

2

4-10

-5

0

5

10

Example of graphics (FIG file)

Page 8: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Images

2D matrix consisting of pixelsPixel—smallest element of resolution of the imageOne pixel is represented by a number of bitsPixel depth– the number of bits available to code the

pixelHave no structural informationTwo categories: scanned vs. synthesized still

image

8

Computer software

Capture and A/D conversion

Digital still image

Synthesizedimage

Scannedimage

Camera

Page 9: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Images (cont.)

Examples of imagesBinary image – pixel depth 1Gray-scale – pixel depth 8Color image – pixel depth 24

9

Binary image

Gray-scale imagecolor image

Page 10: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Video vs. Animation

Both images and graphics can be displayed as a succession of view which create an impression of movement

Video – moving images or moving picturesCaptured or SynthesizedConsists of a series of bitmap imagesEach image is called a frameFrame rate: the speed to playback the video (frame per

second)Animation – moving graphics

Generated by computer program (animation authoring tools)

Consists of a set of objectsThe movements of the objects are calculated and the

view is updated at playback10

Page 11: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Sound

1-D time-based signal

Speech vs. non-speech soundSpeech – supports spoken language and has a semantic

content Non-speech – does not convey semantics in general

Natural vs. structured soundNatural sound – Recorded/generated sound wave

represented as digital signal Example: Audio in CD, WAV files

Structured sound – Synthesize sound in a symbolic way Example: MIDI file1

1

0 100 200 300 400 500 600 700 800 900 1000-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

Page 12: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Networked Multimedia

Local vs. networked multimediaLocal: storage and presentation of multimedia

information in standalone computersSample applications: DVD

Networked: involve transmission and distribution of multimedia information on the networkSample applications: videoconferencing, web video

broadcasting, multimedia Email, etc.

12

InternetVideo server

Image serverA scenario of multimedia networking

Page 13: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Consideration of Networked Multimedia

Requirements of multimedia applications on the networkTypically delay sensitive

end-to-end delaydelay jitter:

– Jitter is the variability of packet delays within the same packet stream

Quality requirementSatisfactory quality of media presentationSynchronization requirementContinuous requirement (no jerky video/audio)Can tolerant some degree of information loss

13

Page 14: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Technologies of Multimedia Networking

Challenges of multimedia networking1. Conflict between media size and bandwidth limit of the

network2. Conflict between the user requirement of multimedia

application and the best-effort network3. How to meet different requirements of different users?

Media compression – reduce the data volumeAddress the 1st challenge Image compression Video compression Audio compression

Multimedia transmission technologyAddress the 2nd and 3rd challenges Protocols for real-time transmission Rate / congestion control Error control

14

Page 15: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Multimedia Networking Systems

Live media transmission systemCapture, compress, and transmit the media on the fly

(example?)Send stored media across the network

Media is pre-compressed and stored at the server. This system delivers the stored media to one or multiple receivers. (example?)

Differences between the two systemsFor live media delivery:

Real-time media capture, need hardware supportReal-time compression– speed is importantCompression procedure can be adjusted based on network

conditionsFor stored media delivery

Offline compression – better compression result is important

Compression can not be adjusted during transmission15

Page 16: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Multimedia networking: 3 application types

streaming, stored audio, video streaming: can begin playout before downloading entire

file stored (at server): can transmit faster than audio/video

will be rendered (implies storing/buffering at client) e.g., YouTube, Netflix, Hulu

conversational voice/video over IP interactive nature of human-to-human conversation

limits delay tolerance e.g., Skype

streaming live audio, video e.g., live sporting event (futbol)

16

Page 17: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Streaming stored video:

1. videorecorded (e.g., 30 frames/sec)

2. videosentCum

ulat

ive

data

streaming: at this time, client playing out early part of video, while server still sending laterpart of video

network delay(fixed in this

example) time

3. video received,played out at client(30 frames/sec)

Page 18: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

constant bit rate videotransmission

Cum

ulat

ive

data

time

variablenetwork

delay

client videoreception

constant bit rate video playout at client

client playoutdelay

buffe

red

vide

o

client-side buffering and playout delay: compensate for network-added delay, delay jitter

Streaming stored video: revisted

Page 19: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

variable fill rate, x(t)

client application buffer, size B

playout rate,e.g., CBR r

buffer fill level, Q(t)

video server

client

Client-side buffering, playout

Page 20: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

variable fill rate, x(t)

client application buffer, size B

playout rate,e.g., CBR r

buffer fill level, Q(t)

video server

client

1. Initial fill of buffer until playout begins at tp2. playout begins at tp, 3. buffer fill level varies over time as fill rate x(t) varies and playout rate r is constant

Client-side buffering, playout

Page 21: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

playout buffering: average fill rate (x), playout rate (r):x < r: buffer eventually empties (causing

freezing of video playout until buffer again fills)x > r: buffer will not empty, provided initial

playout delay is large enough to absorb variability in x(t) initial playout delay tradeoff: buffer starvation less

likely with larger delay, but larger delay until user begins watching

variable fill rate, x(t)

client application buffer, size B

playout rate,e.g., CBR r

buffer fill level, Q(t)

video server

Client-side buffering, playout

Page 22: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Streaming multimedia: UDP

server sends at rate appropriate for client often: send rate = encoding rate =

constant rate transmission rate can be oblivious to

congestion levelsshort playout delay (2-5 seconds) to remove

network jittererror recovery: application-level,

timeipermittingRTP [RFC 2326]: multimedia payload typesUDP may not go through firewalls

Page 23: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

multimedia file retrieved via HTTP GETsend at maximum possible rate under TCP

fill rate fluctuates due to TCP congestion control, retransmissions (in-order delivery)

larger playout delay: smooth TCP delivery rateHTTP/TCP passes more easily through firewalls

variable rate, x(t)

TCP send buffer

videofile

TCP receive buffer

application playout buffer

server client

Streaming multimedia: HTTP

Page 24: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

DASH: D ynamic, A daptive S treaming over H

TTPserver:

divides video file into multiple chunks each chunk stored, encoded at different rates manifest file: provides URLs for different chunks

client: periodically measures server-to-client bandwidth consulting manifest, requests one chunk at a time

chooses maximum coding rate sustainable given current bandwidth

can choose different coding rates at different points in time (depending on available bandwidth at time)

Streaming multimedia: DASH

Page 25: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

DASH: D ynamic, A daptive S treaming over H

TTP “intelligence” at client: client determines

when to request chunk (so that buffer starvation, or overflow does not occur)

what encoding rate to request (higher quality when more bandwidth available)

where to request chunk (can request from URL server that is “close” to client or has high available bandwidth)

Streaming multimedia: DASH

Page 26: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users?

option 1: single, large “mega-server”single point of failurepoint of network congestionlong path to distant clientsmultiple copies of video sent over outgoing link

….quite simply: this solution doesn’t scale

Content distribution networks

Page 27: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users?

option 2: store/serve multiple copies of videos at multiple geographically distributed sites (CDN)enter deep: push CDN servers deep into many access

networks close to usersused by Akamai, 1700 locations

bring home: smaller number (10’s) of larger clusters in POPs near (but not within) access networksused by Limelight

Content distribution networks

Page 28: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Bob (client) requests video http://netcinema.com/6Y7B23V video stored in CDN at http://KingCDN.com/NetC6y&B23V

netcinema.com

KingCDN.com

1

1. Bob gets URL for for video http://netcinema.com/6Y7B23Vfrom netcinema.com web page 2

2. resolve http://netcinema.com/6Y7B23Vvia Bob’s local DNS

netcinema’sauthorative DNS

3

3. netcinema’s DNS returns URL http://KingCDN.com/NetC6y&B23V 4

4&5. Resolve http://KingCDN.com/NetC6y&B23via KingCDN’s authoritative DNS, which returns IP address of KIingCDN server with video

56. request video fromKINGCDN server,streamed via HTTP

KingCDNauthoritative DNS

CDN: “simple” content access scenario

Page 29: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

challenge: how does CDN DNS select “good” CDN node to stream to clientpick CDN node geographically closest to clientpick CDN node with shortest delay (or min # hops) to

client (CDN nodes periodically ping access ISPs, reporting results to CDN DNS)

IP anycast

alternative: let client decide - give client a list of several CDN serversclient pings servers, picks “best”Netflix approach

CDN cluster selection strategy

Page 30: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

30% downstream US traffic in 2011owns very little infrastructure, uses 3rd party

services: own registration, payment servers Amazon (3rd party) cloud services:

Netflix uploads studio master to Amazon cloud

create multiple version of movie (different encodings) in cloud

upload versions from cloud to CDNsCloud hosts Netflix web pages for user

browsing three 3rd party CDNs host/stream

Netflix content: Akamai, Limelight, Level-3

Case study: Netflix

Page 31: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

1

1. Bob manages Netflix account

Netflix registration,accounting servers

Amazon cloudAkamai CDN

Limelight CDN

Level-3 CDN

22. Bob browsesNetflix video

3

3. Manifest filereturned for requested video

4. DASH streaming

upload copies of multiple versions of video to CDNs

Case study: Netflix

Page 32: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

VoIP end-end-delay requirement: needed to maintain “conversational” aspecthigher delays noticeable, impair interactivity< 150 msec: good> 400 msec badincludes application-level (packetization,playout),

network delays session initialization: how does callee advertise

IP address, port number, encoding algorithms?value-added services: call forwarding,

screening, recordingemergency services: 911

Voice-over-IP (VoIP)

Page 33: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

speaker’s audio: alternating talk spurts, silent periods.64 kbps during talk spurtpkts generated only during talk spurts20 msec chunks at 8 Kbytes/sec: 160 bytes of data

application-layer header added to each chunk chunk+header encapsulated into UDP or TCP

segmentapplication sends segment into socket every

20 msec during talkspurt

VoIP characteristics

Page 34: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

network loss: IP datagram lost due to network congestion (router buffer overflow)

delay loss: IP datagram arrives too late for playout at receiver delays: processing, queueing in network; end-system

(sender, receiver) delays typical maximum tolerable delay: 400 ms

loss tolerance: depending on voice encoding, loss concealment, packet loss rates between 1% and 10% can be tolerated

VoIP: packet loss, delay

Page 35: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

constant bit ratetransmission

Cum

ulat

ive

data

time

variablenetwork

delay(jitter)

clientreception

constant bit rate playout at client

client playoutdelay

buffe

red

data

end-to-end delays of two consecutive packets: difference can be more or less than 20 msec (transmission time difference)

Delay jitter

Page 36: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

receiver attempts to playout each chunk exactly q msecs after chunk was generated.chunk has time stamp t: play out

chunk at t+q chunk arrives after t+q: data arrives

too late for playout: data “lost” tradeoff in choosing q:

large q: less packet losssmall q: better interactive experience

VoIP: fixed playout delay

Page 37: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

packets

tim e

packetsgenerated

packetsreceived

loss

r

p p '

playout schedulep' - r

playout schedulep - r

sender generates packets every 20 msec during talk spurt. first packet received at time r first playout schedule: begins at p second playout schedule: begins at p’

VoIP: fixed playout delay

Page 38: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

goal: low playout delay, low late loss rateapproach: adaptive playout delay adjustment:

estimate network delay, adjust playout delay at beginning of each talk spurt

silent periods compressed and elongated chunks still played out every 20 msec during talk

spurtadaptively estimate packet delay: (EWMA -

exponentially weighted moving average, recall TCP RTT estimate):di = (1-a)di-1 + a (ri – ti)

delay estimate after ith packet

small constant, e.g. 0.1

time received - time sent (timestamp)

measured delay of ith packet

Adaptive playout delay (1)

Page 39: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

also useful to estimate average deviation of delay, vi :

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:

remaining packets in talkspurt are played out periodically

vi = (1-b)vi-1 + b |ri – ti – di|

playout-timei = ti + di + Kvi

Adaptive playout delay (2)

Page 40: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Q: How does receiver determine whether packet is first in a talkspurt?

if no loss, receiver looks at successive timestamps difference of successive stamps > 20 msec -->talk

spurt begins.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.

Adaptive playout delay (3)

Page 41: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Challenge: recover from packet loss given small tolerable delay between original transmission and playout

each ACK/NAK takes ~ one RTT alternative: Forward Error Correction (FEC)

send enough bits to allow recovery without retransmission (recall two-dimensional parity in Ch. 5)

simple FEC for every group of n chunks, create redundant chunk by

exclusive OR-ing n original chunks send n+1 chunks, increasing bandwidth by factor 1/n can reconstruct original n chunks if at most one lost chunk

from n+1 chunks, with playout delay

VoiP: recovery from packet loss (1)

Page 42: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

another FEC scheme:“piggyback lower

quality stream” send lower resolution

audio stream as redundant information

e.g., nominal stream PCM at 64 kbpsand redundant streamGSM at 13 kbps

non-consecutive loss: receiver can conceal loss generalization: can also append (n-1)st and (n-2)nd

low-bit rate chunk

VoiP: recovery from packet loss (2)

Page 43: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

interleaving to conceal loss:

audio chunks divided into smaller units, e.g. four 5 msec units per 20 msec audio chunk

packet contains small units from different chunks

if packet lost, still have most of every original chunk

no redundancy overhead, but increases playout delay

VoiP: recovery from packet loss (3)

Page 44: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

supernode overlay network

proprietary application-layer protocol (inferred via reverse engineering) encrypted msgs

P2P components:

Skype clients (SC)

clients: skype peers connect directly to each other for VoIP call super nodes (SN): skype peers with special functions

overlay network: among SNs to locate SCs login server

Skype login server supernode (SN)

Voice-over-IP: Skype

Page 45: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

skype client operation:1. joins skype network

by contacting SN (IP address cached) using TCP2. logs-in (usename, password) to centralized skype login server3. obtains IP address for callee from SN, SN overlayor client buddy list

4. initiate call directly to callee

Skype login server

P2P voice-over-IP: skype

Page 46: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

problem: both Alice, Bob are behind “NATs” NAT prevents outside peer

from initiating connection to insider peer

inside peer can initiate connection to outside

relay solution: Alice, Bob maintain open connection

to their SNs Alice signals her SN to

connect to Bob Alice’s SN connects to

Bob’s SN Bob’s SN connects to Bob

over open connection Bob initially initiated to his SN

Skype: peers as relays

Page 47: 1- Protocolos de transporte con  QoS

TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/

1-Protocolos de transporte con QoS.

Clases de aplicaciones multimedia Redes basadas en IP y QoSRTP/RTCP: Transporte de flujos

multimediaRTSP: Control de sesión y

localización de mediosMulticasting

Thanks to :RADCOM technologiesH. ShulzrinnePaul. E. Jones (from packetizer.com)

Page 48: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Requisitos de red.

Se definen 3 parámetros críticos que la red debería suministrar a las aplicaciones multimedia:Productividad (Throughput)

Número de bits que la red es capaz de entregar por unidad de tiempo (tráfico soportado).

CBR (streams de audio y vídeo sin comprimir) VBR (ídem comprimido)

– Ráfagas (Peak Bit Rate y Mean Bit Rate)

Retardo de tránsito (Transit delay)

48

Retardo extremo-a-extremo

Retardo de acceso

Retardo de tránsito

Retardo de transmisión

Mensaje listo para envío

Envío del primer bit del mensaje

Primer bit del mensaje recibido

Ultimo bit del mensaje recibido

Retardo de acceso

Mensaje listo para recepción

Page 49: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Requisitos de red (II).

Varianza del retardo (Jitter)Define la variabilidad del retardo de una red.

Jitter físico (redes de conmutación de circuito)– Suele ser muy pequeño (ns)

LAN jitter (Ethernet, FDDI).– Jitter físico + tiempo de acceso al medio.

Redes WAN de conmutación de paquete (IP, X.25, FR)– Jitter físico + tiempo de acceso + retardo de conmutación de

paquete en conmutadores de la red.

49

1 2 3

1 2 3D1 D2 = D1 D3 > D1

t

t

Emisor

Receptor

Page 50: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Internet y las aplicaciones multimedia

¿Qué podemos añadir a IP para soportar los requerimientos de las aplicaciones multimedia?Técnicas de ecualización de retardos

(buffering)Protocolos de transporte que se ajusten mejor

a las necesidades de las aplicaciones multimedia: RTP (Real-Time Transport Protocol) RFC 1889.RTSP (Real-Time Streaming Protocol) RFC 2326.

Técnicas de control de admisión y reserva de recursos (QoS)RSVP (Resource reSerVation Protocol) RFC 2205

Arquitecturas y protocolos específicos:Protocolos SIP (RFC 2543), SDP (RFC 2327), SAP (RFC

2974), etc.. ITU H.323

50

Page 51: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Internet Protocols

51

Slide thanks to Henning Schulzrinne

Page 52: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Network support for multimedia

Page 53: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Dimensioning best effort networks

approach: deploy enough link capacity so that congestion doesn’t occur, multimedia traffic flows without delay or losslow complexity of network mechanisms (use current “best

effort” network)high bandwidth costs

challenges:network dimensioning: how much bandwidth is “enough?”estimating network traffic demand: needed to determine

how much bandwidth is “enough” (for that much traffic)

Page 54: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Providing multiple classes of service

thus far: making the best of best effort service one-size fits all service model

alternative: multiple classes of service partition traffic into classes network treats different classes of traffic differently

(analogy: VIP service versus regular service)

0111

granularity: differential service among multiple classes, not among individual connections

history: ToS bits

Page 55: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Multiple classes of service: scenario

R1 R2H1

H2

H3

H41.5 Mbps linkR1 output

interface queue

Page 56: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Scenario 1: mixed HTTP and VoIP

example: 1Mbps VoIP, HTTP share 1.5 Mbps link. HTTP bursts can congest router, cause audio loss want to give priority to audio over HTTP

packet marking needed for router to distinguish between different classes; and new router policy to treat packets accordingly

Principle 1

R1 R2

Page 57: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Principles for QOS guarantees (more)

what if applications misbehave (VoIP sends higher than declared rate) policing: force source adherence to bandwidth

allocationsmarking, policing at network edge

provide protection (isolation) for one class from others

Principle 2

R1 R2

1.5 Mbps link

1 Mbps phone

packet marking and policing

Page 58: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesn’t use its allocation

while providing isolation, it is desirable to use resources as efficiently as possible

Principle 3

R1R2

1.5 Mbps link

1 Mbps phone

1 Mbps logical link

0.5 Mbps logical link

Principles for QOS guarantees (more)

Page 59: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Scheduling and policing mechanisms

scheduling: choose next packet to send on linkFIFO (first in first out) scheduling: send in order of

arrival to queue real-world example? discard policy: if packet arrives to full queue: who to

discard?tail drop: drop arriving packetpriority: drop/remove on priority basisrandom: drop/remove randomly

queue(waiting area)

packetarrivals

packetdepartureslink

(server)

Page 60: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Scheduling policies: priority

priority scheduling: send highest priority queued packet

multiple classes, with different priorities class may depend on

marking or other header info, e.g. IP source/dest, port numbers, etc.

real world example?

high priority queue(waiting area)

low priority queue(waiting area)

arrivals

classify

departures

link (server)

1 3 2 4 5

5

5

2

2

1

1

3

3 4

4arrivals

departures

packet in

service

Page 61: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Scheduling policies: still more

Round Robin (RR) scheduling:multiple classescyclically scan class queues, sending one

complete packet from each class (if available) real world example?

1 23 4 5

5

5

2

3

1

1

3

3 4

4arrivals

departures

packet in

service

Page 62: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Weighted Fair Queuing (WFQ): generalized Round Robineach class gets weighted amount of service in

each cycle real-world example?

Scheduling policies: still more

Page 63: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Policing mechanisms

goal: limit traffic to not exceed declared parametersThree 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)

Page 64: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Policing mechanisms: implementation

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 fullover interval of length t: number of packets

admitted less than or equal to (r t + b)

Page 65: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Policing and QoS guarantees

token bucket, WFQ combine to provide guaranteed upper bound on delay, i.e., QoS guarantee!

WFQ

token rate, r

bucket size, bper-flowrate, R

D = b/Rmax

arrivingtraffic

arrivingtraffic

Page 66: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

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 (or hosts)signaling, maintaining per-flow router state difficult

with large number of flows don’t define define service classes, provide

functional components to build service classes

Page 67: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

edge router: per-flow traffic management marks packets as in-profile and

out-profile

core router: per class traffic management buffering and scheduling based

on marking at edge preference given to in-profile

packets over out-of-profile packets

Diffserv architecture

rb

marking

scheduling

...

Page 68: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Edge-router packet marking

class-based marking: packets of different classes marked differently

intra-class marking: conforming portion of flow marked differently than non-conforming one

profile: pre-negotiated rate r, bucket size b

packet marking at edge based on per-flow profile

possible use of marking:

user packets

rate r

b

Page 69: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Diffserv packet marking: details

packet is marked in the Type of Service (TOS) in IPv4, and Traffic Class in IPv6

6 bits used for Differentiated Service Code Point (DSCP) determine PHB that the packet will receive 2 bits currently unused

DSCP unused

Page 70: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Classification, conditioning

may be desirable to limit traffic injection rate of some class:

user declares traffic profile (e.g., rate, burst size)

traffic metered, shaped if non-conforming

7-70

Page 71: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Forwarding Per-hop Behavior (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

Page 72: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Forwarding PHBPHBs proposed:expedited forwarding: pkt departure rate of a

class equals or exceeds specified rate logical link with a minimum guaranteed rate

assured forwarding: 4 classes of traffic each guaranteed minimum amount of bandwidth each with three drop preference partitions

Page 73: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Per-connection QOS guarantees

basic fact of life: can not support traffic demands beyond link capacity

call admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs

Principle 4

R1R2

1.5 Mbps link

1 Mbps phone

1 Mbps phone

Page 74: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

QoS guarantee scenario

resource reservation call setup, signaling (RSVP) traffic, QoS declaration per-element admission control

QoS-sensitive scheduling (e.g., WFQ)

request/reply

Page 75: 1- Protocolos de transporte con  QoS

TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/

1-Protocolos de transporte multimedia.

Clases de aplicaciones multimedia

Redes basadas en IP y QoSRTP/RTCP: Transporte de flujos

multimediaRTSP: Control de sesión y

localización de mediosMulticasting

Page 76: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP (Real-time Transport Protocol)

Se basa en el concepto de sesión: la asociación entre un conjunto de aplicaciones que se comunican usando RTP

Una sesión es identificada por:Una dirección IP multicastDos puertos: Uno para los datos y otro para

control (RTCP)Un participante (participant) puede ser una

máquina o un usuario que participa en una sesiónCada media distinto es trasmitido usando una

sesión diferente. Por ejemplo, si se quisiera transmitir audio y

vídeo harían falta dos sesiones separadas Esto permite a un participante solamente ver o solamente oír

76

Page 77: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP (Real-time Transport Protocol) Audio-conferencia con multicast y RTP

Sesión de audio: Una dirección multicast y dos puertos Datos de audio y mensajes de control RTCP.

Existirá (al menos) una fuente de audio que enviará un stream de segmentos de audio pequeños (20 ms) utilizando UDP.

A cada segmento se le asigna una cabecera RTP La cabecera RTP indica el tipo de codificación (PCM, ADPCM, LPC,

etc.) Número de secuencia y fechado de los datos.

Control de conferencia (RTCP): Número e identificación de participantes en un instante dado. Información acerca de cómo se recibe el audio.

Audio y Vídeo conferencia con multicast y RTPSi se utilizan los dos medios, se debe crear una sesión RTP

independiente para cada uno de ellos. Una dirección multicast y 2 puertos por cada sesión. Existencia de participantes que reciban sólo uno de los medios. Temporización independiente de audio y vídeo.7

7

Page 78: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP: Mezcladores y traductores

Mezcladores (Mixers).Permiten que canales con un BW bajo puedan participar

en una conferencia. El mixer re-sincroniza los paquetes y hace todas las conversiones necesarias para cada tipo de canal.

Traductores (Translators).Permiten conectar sitios que no tienen acceso multicast

(p.ej. que están en una sub-red protegida por un firewall)

78

Page 79: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP: Formato de mensaje (I)

79

V: versión; actualmente es la 2 P: si está a 1 el paquete tiene bytes de relleno (padding) X: presencia de una extensión de la cabecera

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 80: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP: Formato de mensaje (II)

80

CC: Identifica el número de CSRC que contribuyen a los datosM: Marca (definida según el perfil)PT: Tipo de datos (según perfil)

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 81: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP: Formato de mensaje (III)

81

Sequence number: Establece el orden de los paquetesTimestamp: Instante de captura del primer octeto del campo de datosSSRC: Identifica la fuente de sincronizaciónCSRC: Fuentes que contribuyen

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 82: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP header definition

82

/* * RTP data header */typedef struct { unsigned int version:2; unsigned int p:1; unsigned int x:1; unsigned int cc:4; unsigned int m:1; unsigned int pt:7; u_int16 seq; u_int32 ts; u_int32 ssrc; u_int32 csrc[1]; } rtp_hdr_t;

Page 83: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTP y las aplicaciones

La especificación de RTP para una aplicación particular va acompañada de:

Un perfil (profile) que defina un conjunto de códigos para los tipos de datos transportados (payload)

El formato de transporte de cada uno de los tipos de datos previstos

Ej.: RFC 1890 para audio y vídeo

83

PT encoding audio/video clock rate channels name (A/V) (Hz) (audio) ______________________________________________ 0 PCMU A 8000 1 1 1016 A 8000 1 2 G721 A 8000 1 3 GSM A 8000 1 ... 34-71 unassigned ? 72-76 reserved N/A N/A N/A 77-95 unassigned ? 96-127 dynamic ?

PCMU Corresponde a la recomendación CCITT/ITU-T G.711. El audio se codifica con 8 bits por muestra, después de una cuantificación logarítmica. PCMU es la codificación que se utiliza en Internet para un media de tipo audio/basic.

Page 84: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTCP (RTP Control Protocol)

RTCP se basa en envíos periódicos de paquetes de control a los participantes de una sesión RTPPermite realizar una realimentación de la

calidad de recepción de los datos (estadísticas).

Los paquetes de control siempre llevan la identificación de la fuente RTP: CNAMEAsociar más de una sesión a un mismo fuente

(sincronización).El envío de estos paquetes debe ser controlado

por cada participante (sistema ampliable).Control de sesión (opcional)

Información adicional de cada participante.Entrada y salida de participantes en las sesión.Negociación de parámetros y formatos.

84

Page 85: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTCP (RTP Control Protocol)

RTCP permite controlar el trafico que no se auto-limita (p.ej cuando el número de fuentes aumenta)

Para ello se define el ancho de banda de la sesión. RTCP se reserva el 5% (bwRTCP)A cada fuente se le asigna 1/4 de bwRTCPEl intervalo entre cada paquete RTCP es > 5

sec

85

Page 86: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTCP (RTP Control Protocol)

Formato de un paquete RTCP:Existen distintos tipos de paquetes RTCP:

SR (Sender Report): Informes estadísticos de transmisión y recepción de los elementos activos en la sesión.

RR (Receiver Report): Informes estadísticos de recepción en los receptores.

SDES (Source Description): Información del participante (CNAME, e-mail, etc).

BYE: Salida de la sesión.APP: Mensajes específicos de la aplicación.

Cada paquete RTCP tiene su propio formato.Su tamaño debe ser múltiplo de 32 bits (padding).Se pueden concatenar varios paquetes RTCP en uno

(compound RTCP packet).86

Page 87: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTCP: Mensajes SR

87

V P RC PT=SR=200 LongitudSSRC del sender

32 bits

NTP timestamp mswNTP timestamp lsw

RTP timestampContador de los paquetes del senderContador de los bytes del sender

SSRC_1Frac perd Total paquetes perdidos

Num sec más alto recibidoJitter de inter-llegada

Retraso del último SR (LSR)Ultimo SR (LSR)

Report block 1

Sender info

cabecera

Page 88: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTCP: Cálculo del Jitter

Es una estimación de la variancia del tiempo de inter-llegada de los paquetes RTP

Si RTP timestamp del paquete iRi Instante de llegada del paquete i

88

)()()()(),( iijjijij SRSRSSRRjiD ------

16/,1 11 -- -- iii JiiDJJ

Page 89: 1- Protocolos de transporte con  QoS

TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/

1-Protocolos de transporte multimedia.

Clases de aplicaciones multimedia

Redes basadas en IP y QoSRTP/RTCP: Transporte de flujos

multimediaRTSP: Control de sesión y

localización de mediosMulticasting

Page 90: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Real-Time Streaming Protocol RFC 2326

Tiene la función de un “mando a distancia por la red” para servidores multimedia

Permite establecer y controlar uno o más flujos de datos sincronizados

NO existe el concepto de conexión RTSP sino de sesión RTSP

Además, una sesión RTSP no tiene relación con ninguna conexión especifica de nivel transporte (p.ej. TCP o UDP)

Los flujos de datos no tienen por que utilizar RTPEstá basado en HTTP/1.1

Diferencias importantes:No es statelessLos clientes y servidores pueden generar peticiones9

0

Page 91: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Terminología RTSP

ConferenciaMedia stream

Una instancia única de un medio continuo:Un stream audio,Un stream vídeoUna

“whiteboard”Presentación:

Es el conjunto de uno o más streams, que son vistos por el usuario como un conjunto integrado

91

Voz del público

Imagen del conferenciante

Imagen del público

Imagen de las transparencias

Voz del conferenciante

Page 92: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Ejemplo de una sesión

92

Web server

SETUP

PLAY

PAUSE

TEARDOWN

HTTP GET

descripción de la sesión

RTP audio

RTP vídeo

RTCP

Cliente

Media server

Page 93: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Comandos de petición

93

Request = Request-Line ; *( general-header | request-header | entity-header )

CRLF [ message-body ]

Request-Line = Method SP Request-URI SP RTSP-Version CRLF

Method = "DESCRIBE“ | "ANNOUNCE" | "GET_PARAMETER" |

"OPTIONS“ | "PAUSE" | "PLAY" | "RECORD" |

"REDIRECT" | "SETUP" | "SET_PARAMETER" |

"TEARDOWN" | extension-method

extension-method = token

Request-URI = "*" | absolute_URI

RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT

Page 94: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Mensajes de respuesta

94

Response = Status-Line ; *( general-header | response-header | entity-header )

CRLF [ message-body ]

Status-Line = RTSP-version SP Status-Code SP Reason-Phrase CRLF

Status-Code =

1xx: Información (Comando recibido, procesando,..) |

2xx: Exito (Comando recibido y ejecutado con éxito) |

3xx: Re-dirección (Comando recibido pero aún no completado) |

4xx: Error del cliente (El comando tiene errores de sintaxis) |

5xx: Error del servidor (Error interno del servidor)

Page 95: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Una sesión completa (I)

95

C->W: GET /twister.sdp HTTP/1.1 Host: www.example.com Accept: application/sdp

W->C: HTTP/1.0 200 OK Content-Type: application/sdp

v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session m=audio 0 RTP/AVP 0 a=control:rtsp://audio.example.com/twister/audio.en m=video 0 RTP/AVP 31 a=control:rtsp://video.example.com/twister/video

web server W

cliente C

media server A

media server V

1

3

2

4

Page 96: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Una sesión completa (II)

96

C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057

A->C: RTSP/1.0 200 OK CSeq: 1 Session: 12345678 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057; server_port=5000-5001

C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059

V->C: RTSP/1.0 200 OK CSeq: 1 Session: 23456789 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059; server_port=5002-5003

Page 97: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Una sesión completa (III)

97

C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 2 Session: 23456789 Range: smpte=0:10:00-

V->C: RTSP/1.0 200 OK CSeq: 2 Session: 23456789 Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://video.example.com/twister/video; seq=12312232;rtptime=78712811

C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 2 Session: 12345678 Range: smpte=0:10:00-

A->C: RTSP/1.0 200 OK CSeq: 2 Session: 12345678 Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; seq=876655;rtptime=1032181

Page 98: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

RTSP: Una sesión completa (IV)

98

C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 3 Session: 12345678

A->C: RTSP/1.0 200 OK CSeq: 3

C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 3 Session: 23456789

V->C: RTSP/1.0 200 OK CSeq: 3

Page 99: 1- Protocolos de transporte con  QoS

TECNOLOGÍAS DE RED AVANZADAS – Master IC 2013-2014 – http://www.grc.upv.es/docencia/tra/

1-Protocolos de transporte multimedia.

Clases de aplicaciones multimedia

Redes basadas en IP y QoSGestión de los recursos: IntServ

vs DiffServ RSVP

RTP/RTCP: Transporte de flujos multimedia

RTSP: Control de sesión y localización de medios

Multicasting

Page 100: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Multicast = Efficient Data Distribution

100

Src Src

Page 101: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Why Multicast ?

Need for efficient one-to-many delivery of same data

Applications:News/sports/stock/weather updatesDistance learningConfiguration, routing updates, service locationPointcast-type “push” appsTeleconferencing (audio, video, shared whiteboard, text

editor)Distributed interactive gaming or simulationsEmail distribution listsContent distribution; Software distributionWeb-cache updates Database replication

101

Page 102: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Why Not Broadcast or Unicast?

Broadcast: Send a copy to every machine on the netSimple, but inefficientAll nodes must process packet even if they don’t careWastes more CPU cycles of slower machines (“broadcast

radiation”)Network loops lead to “broadcast storms”

Replicated Unicast:Sender sends a copy to each receiver in turnReceivers need to register or sender must be pre-

configuredSender is focal point of all control trafficReliability => per-receiver state, separate

sessions/processes at sender102

Page 103: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Multicast Apps Characteristics

Number of (simultaneous) senders to the groupThe size of the groups

Number of members (receivers)Geographic extent or scopeDiameter of the group measured in router hops

The longevity of the groupNumber of aggregate packets/secondThe peak/average used by sourceLevel of human interactivity

Lecture mode vs interactiveData-only (eg database replication) vs multimedia

103

Page 104: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Reliable Multicast vs. Unreliable Multicast

When a multicast message is sent by a process, the runtime support of the multicast mechanism is responsible for delivering the message to each process currently in the multicast group.

As each participating process may be on a separate host, due to factors such as failures of network links and/or network hosts, routing delays, and differences in software and hardware, the time between when a message is sent and when it is received may vary among the recipient processes.

Moreover, a message may not be received by one or more of the processes at all.

104

Page 105: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4 Classification of multicasting mechanisms in terms of message delivery

Unreliable multicast: The arrival of the correct message at each process is not

guaranteed. Reliable multicast:

Guarantees that each message is eventually delivered in a non-corrupted form to each process in the group.

The definition of reliable multicast requires that each participating process receives exactly one copy of each message sent. It does not put any restriction of the order the messages delivered.

Reliable multicast can be further classified based on the order of the delivery of the messages: unordered, FIFO, causal order, atomic order.

105

Page 106: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4 Classification of reliable multicast -- unordered

An unordered reliable multicast system guarantees the safe delivery of each message, but it provides no guarantee on the delivery order of the messages.

Example: Processes P1, P2, and P3 have formed a multicast group. Three messages, m1, m2, m3 have been sent to the group. An unordered reliable multicast system may deliver the messages to each of the three processes in any of these:

106

m1-m2-m3,m1-m3-m2, m2-m1-m3, m2-m3-m1, m3-m1-m2, m3-m2-m1

Page 107: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

Classification of reliable multicast - FIFO

If process P sent messages mi and mj, in that order, then each process in the multicast group will be delivered the messages mi and mj, in that order.

Note that FIFO multicast places no restriction on the delivery order among messages sent by different processes. For example, P1 sends messages m11 then m12, and P2 sends messages m21 then m22. It is possible for different processes to receive any of the following orders:

107

m11-m12-m21-m22,m11-m21-m12-m22, m11-m21-m22-m12, m21-m11-m12-m22 m21-m11-m22-m12 m21-m22-m11-m12.

Page 108: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4 Classification of reliable multicast – Causal order

If message mi causes (results in) the occurrence of message mj, then mi will be delivered to each process prior to mj. Messages mi and mj are said to have a causal or happen-before relationship.

For example, P1 sends a message m1, to which P2 replies with a multicast message m2. Since m2 is triggered by m1, the two messages share a causal relationship of m1-> m2. A causal-order multicast message system ensures that these two messages will be delivered to each of the processes in the order of m1- m2.

108

Page 109: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4 Classification of reliable multicast – Atomic order

In an atomic-order multicast system, all messages are guaranteed to be delivered to each participant in the exact same order. Note that the delivery order does not have to be FIFO or causal, but must be identical for each process.

Example:P1 sends m1, P2 sends m2, and P3 sends m3.

An atomic system will guarantee that the messages will be delivered to each process in only one of the six orders:

109

m1-m2- m3, m1- m3- m2, m2- m1-m3, m2-m3-m1, m3-m1- m2, m3-m2-m1.

Page 110: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

IP Multicast Architecture

110

Hosts

Routers

Service model

Host-to-router protocol(IGMP)

Multicast routing protocols(various)

Page 111: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

IP Multicast model: RFC 1112

Message sent to multicast “group” (of receivers)Senders need not be group membersA group identified by a single “group address”

Use “group address” instead of destination address in IP packet sent to group

Groups can have any size;Group members can be located anywhere on the InternetGroup membership is not explicitly knownReceivers can join/leave at will

Packets are not duplicated or delivered to destinations outside the groupDistribution tree constructed for delivery of packetsNo more than one copy of packet appears on any subnet Packets delivered only to “interested” receivers => multicast

delivery tree changes dynamicallyNetwork has to actively discover paths between senders and

receivers111

Page 112: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

IP Multicast Addresses

Class D IP addresses224.0.0.0 – 239.255.255.255

Address allocation:Well-known (reserved) multicast addresses, assigned by

IANA: 224.0.0.x and 224.0.1.x Transient multicast addresses, assigned and reclaimed dynamically, e.g., by “sdr” program

Each multicast address represents a group of arbitrary size, called a “host group”

There is no structure within class D address space like subnetting => flat address space

112

1 1 1 0 Group ID

Page 113: 1- Protocolos de transporte con  QoS

TECN

OLOG

ÍAS

DE R

ED A

VANZ

ADAS

– M

aste

r IC

2013

-201

4

IP Multicast Service

SendingUses normal IP-Send operation, with an IP multicast

address specified as the destinationMust provide sending application a way to:

Specify outgoing network interface, if >1 availableSpecify IP time-to-live (TTL) on outgoing packetEnable/disable loop-back if the sending host is/isn't a

member of the destination group on the outgoing interface

ReceivingTwo new operations

Join-IP-Multicast-Group(group-address, interface) Leave-IP-Multicast-Group(group-address, interface)

Receive multicast packets for joined groups via normal IP-Receive operation

113