tecnologÍas de red avanzadas – master ic 2010-2011 – 1- protocolos de transporte con qos ...

165
TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 – http://www.grc.upv.es/docencia/tra/ 1- Protocolos de transporte con QoS Clases de aplicaciones multimedia Redes basadas en IP y QoS Gestió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 Thanks to : RADCOM technologies H. Shulzrinne Paul. E. Jones (from packetizer.com) Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004.

Upload: rolando-maysonet

Post on 28-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte con QoS1-Protocolos de transporte con QoS

Clases de aplicaciones multimedia Redes basadas en IP y QoS Gestió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

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

Computer Networking: A Top Down Approach

Featuring the Internet, 3rd edition.

Jim Kurose, Keith RossAddison-Wesley, July

2004.

Page 2: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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 media Discrete 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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Classification of Media Type

4

SoundSound VideoVideo

ImageImage

AnimationAnimation

TextText GraphicsGraphics

Captured From real world

Synthesized By computer

Discrete Discrete

Continuous Continuous

Page 5: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Plain Text vs. Rich Text

6

An example of Plain text

Example of Rich text

Page 7: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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

pixel

Have no structural informationTwo categories: scanned vs. synthesized still

image

8

Computer software

Computer software

Capture and A/D conversionCapture and

A/D conversion

Digital still imageDigital still image

Synthesizedimage

Scannedimage

Camera

Page 9: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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 graphicsGenerated 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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Sound

1-D time-based signal

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

content Non-speech – does not convey semantics in general

Natural vs. structured sound Natural 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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Networked Multimedia

Local vs. networked multimediaLocal: storage and presentation of multimedia

information in standalone computers Sample applications: DVD

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

broadcasting, multimedia Email, etc.

12

InternetInternetVideo server

Image serverA scenario of multimedia networking

Page 13: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Consideration of Networked Multimedia

Requirements of multimedia applications on the networkTypically delay sensitive

end-to-end delay delay jitter:

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

Quality requirement Satisfactory quality of media presentation Synchronization requirement Continuous requirement (no jerky video/audio) Can tolerant some degree of information loss

13

Page 14: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Multimedia Networking Systems

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

(example?)

Send stored media across the networkMedia 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 support Real-time compression– speed is important Compression procedure can be adjusted based on network

conditionsFor stored media delivery

Offline compression – better compression result is important Compression can not be adjusted during transmission

15

Page 16: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Classes of multimedia applications

Streaming stored audio and videoStreaming live audio and videoReal-time interactive audio and video

16

Page 17: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming Stored Multimedia: What is it?

17

1. videorecorded

2. videosent

3. video received,played out at client

Cum

ula

tive

data

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

networkdelay

time

t>0

100%

Page 18: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming vs. Download of Stored Multimedia Content

18

Download: Receive entire content before playback begins High “start-up” delay as media

file can be large~ 4GB for a 2 hour MPEG II

movie Streaming: Play the media file

while it is being received Reasonable “start-up” delaysReception Rate >= playback

rate. Why?

Page 19: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming Stored Multimedia: Interactivity

19

VCR-like functionality: client can pause, rewind, FF, push slider bar

•10 sec initial delay OK•1-2 sec until command effect

OK•RTSP often used (more later)

timing constraint for still-to-be transmitted data: in time for playout

Page 20: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming Multimedia: Client Buffering

20

Client-side buffering, playout delay compensate for network-added delay, delay jitter

constant bit rate videotransmission

Cum

ula

tive

data

time

variablenetwork

delay

client videoreception

constant bit rate video playout at client

client playoutdelay

bu

ffere

dvid

eo

Page 21: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming Multimedia: Client Buffering

Client-side buffering, playout delay compensate for network-added delay, delay jitter

21

bufferedvideo

variable fillrate, x(t)

constant drainrate, d

Page 22: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Interactive, Real-Time Multimedia

applications: IP telephony, video conference, distributed interactive worlds

end-end delay requirements:audio: < 150 msec good, < 400 msec OK

includes application-level (packetization) and network delays

higher delays noticeable, impair interactivity

session initializationhow does callee advertise its IP address, port number,

encoding algorithms?

22

Page 23: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Internet multimedia: simplest approach

23

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

Page 24: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Progressive Download

24

browser GETs metafile browser launches player, passing metafile player contacts server server downloads audio/video to player

Page 25: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming from a streaming server

This architecture allows for non-HTTP protocol between server and media player

Can also use UDP instead of TCP.

25

Page 26: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Multimedia Over Today’s Internet

TCP/UDP/IP: “best-effort service”no guarantees on delay, loss

But multimedia apps requires QoS and level of performance to be effective!

Today’s Internet multimedia applications use application-level techniques to mitigate (as best possible) effects of delay, loss

26

Page 27: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Streaming Multimedia: UDP or TCP?

UDP server sends at rate appropriate for client

(oblivious to network congestion!)often send rate = encoding rate = constant ratethen, fill rate = constant rate - packet loss

short playout delay (2-5 seconds) to compensate for network delay jitter

error recover: time permittingTCP send at maximum possible rate under TCPfill rate fluctuates due to TCP congestion control larger playout delay: smooth TCP delivery rateHTTP/TCP passes more easily through firewalls2

7

Page 28: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte con QoS.

1-Protocolos de transporte con QoS.

Clases de aplicaciones multimedia Redes basadas en IP y QoS Gestió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

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

Page 29: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

29

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)

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 30: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

30

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.

1 2 3

1 2 3D1 D2 = D1 D3 > D1

t

t

Emisor

Receptor

Requisitos de red (II).

Page 31: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

31

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

Page 32: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

32

Internet Protocols

Slide thanks to Henning Schulzrinne

Page 33: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Multimedia, Quality of Service: What is it?

33

Multimedia applications: network audio and video(“continuous media”)

network provides application with level of performance needed for application to function.

QoS

Page 34: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Improving QOS in IP Networks

Thus far: “making the best of best effort”Future: next generation Internet with QoS

guaranteesRSVP: signaling for resource reservationsDifferentiated Services: differential guaranteesIntegrated Services: firm guarantees

simple model for sharing and congestion studies:

34

Page 35: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Principles for QOS Guarantees

Example: 1Mbps IPphone, FTP share 1.5 Mbps link. bursts of FTP can congest router, cause audio losswant to give priority to audio over FTP

35

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

Principle 1

Page 36: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Principles for QOS Guarantees (more)

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

allocations

marking and policing at network edge:similar to ATM UNI (User Network Interface)

36

provide protection (isolation) for one class from others

Principle 2

Page 37: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Principles for QOS Guarantees (more)

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

37

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

Principle 3

Page 38: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Principles for QOS Guarantees (more)

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

38

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

Principle 4

Page 39: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

Summary of QoS Principles

39

Page 40: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1- Protocolos de transporte con QoS.

1- Protocolos de transporte con QoS.

Clases de aplicaciones multimedia Redes basadas en IP y QoS Gestió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

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

Page 41: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

41

Scheduling And Policing Mechanisms

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

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

Page 42: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

42

Scheduling Policies: more

Priority scheduling: transmit highest priority queued packet

multiple classes, with different prioritiesclass may depend on marking or other header info,

e.g. IP source/dest, port numbers, etc..

Page 43: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

43

Scheduling Policies: still more

round robin scheduling: multiple classes cyclically scan class queues, serving one from each class (if available)

Page 44: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

44

Scheduling Policies: still more

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

each cycle

Page 45: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

45

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

pps peak rate(Max.) Burst Size: max. number of pkts sent

consecutively (with no intervening idle)

Page 46: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

46

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).

Page 47: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

47

Policing Mechanisms (more)

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

WFQ

token rate, r

bucket size, b

per-flowrate, R

D = b/Rmax

arrivingtraffic

Page 48: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

48

IETF Integrated Services

architecture for providing QOS guarantees in IP networks for individual application sessions

resource reservation: routers maintain state info of allocated resources, QoS req’s

admit/deny new call setup requests:

Question: can newly arriving flow be admitted with performance guarantees while not violated QoS guarantees made to already admitted flows?

Page 49: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

49

Intserv: QoS guarantee scenario

Resource reservationcall setup, signaling (RSVP) traffic, QoS declarationper-element admission control

QoS-sensitive scheduling (e.g.,

WFQ)

request/reply

Page 50: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

50

Call Admission

Arriving session must :declare its QOS requirement

R-spec: defines the QOS being requested

characterize traffic it will send into network T-spec: defines traffic characteristics

signaling protocol: needed to carry R-spec and T-spec to routers (where reservation is required)RSVP

Page 51: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

51

Intserv QoS: Service models [RFC2211, RFC2212]

Guaranteed service: worst case traffic arrival: leaky-

bucket-policed source simple (mathematically provable)

bound on delay [Parekh 1992, Cruz 1988]

Controlled load service: "a quality of service closely

approximating the QoS that same flow would receive from an unloaded network element."

WFQ

token rate, r

bucket size, b

per-flowrate, R

D = b/Rmax

arrivingtraffic

Page 52: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

52

IETF Differentiated Services

Concerns with Intserv: Scalability: signaling, maintaining per-flow router state difficult with large

number of flows Flexible Service Models: Intserv has only two classes. Also want “qualitative”

service classes“behaves like a wire”relative service distinction: Platinum, Gold, Silver

Diffserv approach: simple functions in network core, relatively complex functions at edge routers

(or hosts) Don’t define service classes, provide functional components to build service

classes

Page 53: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

53

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 Assured Forwarding

Diffserv Architecture

scheduling

...

r

b

marking

Page 54: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

54

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 A, bucket size B packet marking at edge based on per-flow profile

Possible usage of marking:

User packets

Rate A

B

Page 55: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

55

Classification and Conditioning

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) and determine PHB that the packet will receive

2 bits are currently unused

Page 56: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

56

Classification and 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

Page 57: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

57

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 lengthClass A packets leave first before packets from class B

Page 58: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

58

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

Assured Forwarding: 4 classes of trafficeach guaranteed minimum amount of bandwidtheach with three drop preference partitions

Page 59: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte multimedia.

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 60: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

60

Signaling in the Internet

connectionless (stateless)

forwarding by IP routers

best effort service

no network signaling protocols

in initial IP design

+ =

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 !

earlier Internet Signaling protocol: ST-II [RFC 1819]

Page 61: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

61

RSVP Design Goals

1. accommodate heterogeneous receivers (different bandwidth along paths)

2. accommodate different applications with different resource requirements

3. make multicast a first class service, with adaptation to multicast group membership

4. leverage existing multicast/unicast routing, with adaptation to changes in underlying unicast, multicast routes

5. control protocol overhead to grow (at worst) linear in # receivers

6. modular design for heterogeneous underlying technologies

Page 62: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

62

RSVP: does not…

specify how resources are to be reservedrather: a mechanism for communicating needs

determine routes packets will takethat’s the job of routing protocolssignaling decoupled from routing

interact with forwarding of packetsseparation of control (signaling) and data (forwarding)

planes

Page 63: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

63

RSVP: overview of operation

senders, receiver join a multicast group done outside of RSVP senders need not join group

sender-to-network signaling path message: make sender

presence known to routers path teardown: delete

sender’s 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

Page 64: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

64

Call Admission

Session must first declare its QOS requirement and characterize the traffic it will send through the network

R-spec: defines the QOS being requestedT-spec: defines the traffic characteristicsA signaling protocol is needed to carry the R-spec

and T-spec to the routers where reservation is required;

RSVP is a leading candidate for such signaling protocol

Page 65: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

65

RSVP request (T-Spec)

A token bucket specificationbucket size, btoken rate, rthe packet is transmitted onward only if the number of

tokens in the bucket is at least as large as the packet

peak rate, pp > r

maximum packet size, Mminimum policed unit, m

All packets less than m bytes are considered to be m bytes

Reduces the overhead to process each packetBound the bandwidth overhead of link-level headers

Page 66: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

66

Call Admission

Call Admission: routers will admit calls based on their R-spec and T-spec and base on the current resource allocated at the routers to other calls.

Page 67: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

67

Integrated Services: Classes

Guaranteed QOS: this class is provided with firm bounds on queuing delay at a router; envisioned for hard real-time applications that are highly sensitive to end-to-end delay expectation and variance

Controlled Load: this class is provided a QOS closely approximating that provided by an unloaded router; envisioned for today’s IP network real-time applications which perform well in an unloaded network

Page 68: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

68

R-spec

An indication of the QoS control service requestedControlled-load service and Guaranteed service

For Controlled-load serviceSimply a Tspec

For Guaranteed serviceA Rate (R) term, the bandwidth required

R r, extra bandwidth will reduce queuing delaysA Slack (S) term

The difference between the desired delay and the delay that would be achieved if rate R were used

With a zero slack term, each router along the path must reserve R bandwidth

A nonzero slack term offers the individual routers greater flexibility in making their local reservation

Number decreased by routers on the path.

Page 69: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

69

QoS Routing: Multiple constraints

A request specifies the desired QoS requirements e.g., BW, Delay, Jitter, packet loss, path reliability etc

Two type of constraints:Additive: e.g., delayMaximum (or Minimum): e.g., Bandwidth

TaskFind a (min cost) path which satisfies the constraintsif no feasible path found, reject the connection

Page 70: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

70

Path msgs: RSVP sender-to-network signaling

path message contents:address: unicast destination, or multicast groupflowspec: bandwidth requirements spec.filter flag: if yes, record identities of upstream senders

(to allow packets filtering by source)previous hop: upstream router/host IDrefresh time: time until this info times out

path message: communicates sender info, and reverse-path-to-sender routing infolater upstream forwarding of receiver reservations

Page 71: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

71

RSVP: simple audio conference

H1, H2, H3, H4, H5 both senders and receiversmulticast group m1no filtering: packets from any sender forwardedaudio rate: bonly one multicast routing tree possible

H2

H5

H3

H4H1

R1 R2 R3

Page 72: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

72

inout

inout

inout

RSVP: building up path state

H1, …, H5 all send path messages on m1: (address=m1, Tspec=b, filter-spec=no-filter,refresh=100)

Suppose H1 sends first path message

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L5 L7L6

L1L2 L6 L3

L7L4m1:

m1:

m1:

Page 73: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

73

inout

inout

inout

RSVP: building up path state

next, H5 sends path message, creating more state in routers

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L5 L7L6

L1L2 L6 L3

L7L4

L5

L6L1

L6

m1:

m1:

m1:

Page 74: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

74

inout

inout

inout

RSVP: building up path state

H2, H3, H5 send path msgs, completing path state tables

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L5 L7L6

L1L2 L6 L3

L7L4

L5

L6L1

L6L7

L4L3L7

L2m1:

m1:

m1:

Page 75: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

75

reservation msgs: receiver-to-network signaling

reservation message contents:desired bandwidth: filter type:

no filter: any packets address to multicast group can use reservation

fixed filter: only packets from specific set of senders can use reservation

dynamic filter: senders who’s packets can be forwarded across link will change (by receiver choice) over time.

filter spec

reservations flow upstream from receiver-to-senders, reserving resources, creating additional, receiver-related state at routers

Page 76: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

76

RSVP: receiver reservation example 1

H1 wants to receive audio from all other sendersH1 reservation msg flows uptree to sourcesH1 only reserves enough bandwidth for 1 audio

stream reservation is of type “no filter” – any sender can

use reserved bandwidth

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

Page 77: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

77

inout

RSVP: receiver reservation example 1

H1 reservation msgs flows uptree to sources routers, hosts reserve bandwidth b needed on

downstream links towards H1

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L1L2 L6

L6L1(b)

inout

L5L6 L7

L7L5 (b)

L6

inout

L3L4 L7

L7L3 (b)

L4L2

b

bb

b

bb

b

m1:

m1:

m1:

Page 78: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

78

inout

RSVP: receiver reservation example 1 (more)

next, H2 makes no-filter reservation for bandwidth b

H2 forwards to R1, R1 forwards to H1 and R2 (?)R2 takes no action, since b already reserved on

L6

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L1L2 L6

L6L1(b)

inout

L5L6 L7

L7L5 (b)

L6

inout

L3L4 L7

L7L3 (b)

L4L2

b

bb

b

bb

b

b

b

(b)m1:

m1:

m1:

Page 79: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

79

inout

RSVP: receiver reservation: issues

What if multiple senders (e.g., H3, H4, H5) over link (e.g., L6)? arbitrary interleaving of packets L6 flow policed by leaky bucket: if H3+H4+H5 sending rate

exceeds b, packet loss will occur

H2

H5

H3

H4H1

R1 R2 R3L1

L2 L3

L4L5

L6 L7

L1L2 L6

L6L1(b)

inout

L5L6 L7

L7L5 (b)

L6

inout

L3L4 L7

L7L3 (b)

L4L2

b

bb

b

bb

b

b

b

(b)m1:

m1:

m1:

Page 80: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

80

RSVP: example 2

H1, H4 are only senderssend path messages as before, indicating filtered

reservationRouters store upstream senders for each upstream link

H2 will want to receive from H4 (only)

H2 H3

H4H1

R1 R2 R3L1

L2 L3

L4L6 L7

H2 H3

L2 L3

Page 81: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

81

RSVP: example 2

H1, H4 are only senderssend path messages as before, indicating filtered

reservation

H2 H3

H4H1

R1 R3L1

L2 L3

L4L6 L7

H2 H3

L2 L3

L2(H1-via-H1 ; H4-via-R2 )L6(H1-via-H1 )L1(H4-via-R2 )

in

out

L6(H4-via-R3 )L7(H1-via-R1 )

in

out

L1, L6

L6, L7

L3(H4-via-H4 ; H1-via-R3 )L4(H1-via-R2 )L7(H4-via-H4 )

in

out

L4, L7

R2

Page 82: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

82

RSVP: example 2

receiver H2 sends reservation message for source H4 at bandwidth bpropagated upstream towards H4, reserving b

H2 H3

H4H1

R1 R3L1

L2 L3

L4L6 L7

H2 H3

L2 L3

L2(H1-via-H1 ;H4-via-R2 )L6(H1-via-H1 )L1(H4-via-R2 )

in

out

L6(H4-via-R3 )L7(H1-via-R1 )

in

out

L1, L6

L6, L7

L3(H4-via-H4 ; H1-via-R2 )L4(H1-via-R2 )L7(H4-via-H4 )

in

out

L4, L7

R2

(b)

(b)

(b)

L1

bb b

b

Page 83: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

83

RSVP: soft-state

senders periodically resend path msgs to refresh (maintain) state receivers periodically resend resv msgs to refresh (maintain) state path and resv msgs have TTL field, specifying refresh interval

H2 H3

H4H1

R1 R3L1

L2 L3

L4L6 L7

H2 H3

L2 L3

L2(H1-via-H1 ;H4-via-R2 )L6(H1-via-H1 )L1(H4-via-R2 )

in

out

L6(H4-via-R3 )L7(H1-via-R1 )

in

out

L1, L6

L6, L7

L3(H4-via-H4 ; H1-via-R3 )L4(H1-via-R2 )L7(H4-via-H4 )

in

out

L4, L7

R2

(b)

(b)

(b)

L1

bb b

b

Page 84: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

84

RSVP: soft-state

suppose H4 (sender) leaves without performing teardown

H2 H3

H4H1

R1 R3L1

L2 L3

L4L6 L7

H2 H3

L2 L3

L2(H1-via-H1 ;H4-via-R2 )L6(H1-via-H1 )L1(H4-via-R2 )

in

out

L6(H4-via-R3 )L7(H1-via-R1 )

in

out

L1, L6

L6, L7

L3(H4-via-H4 ; H1-via-R3 )L4(H1-via-R2 )L7(H4-via-H4 )

in

out

L4, L7

R2

(b)

(b)

(b)

L1

bb b

b

eventually state in routers will timeout and disappear!

gonefishing!

Page 85: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte multimedia.

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 86: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

86

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ón Cada 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

Page 87: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

87

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 RTP Si 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.

Page 88: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

88

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)

Page 89: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

89

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

RTP: Formato de mensaje (I)

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 90: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

90

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)

RTP: Formato de mensaje (II)

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 91: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

91

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

RTP: Formato de mensaje (III)

V P CCX M PT Sequence number

Timestamp

Synchronization Source (SSRC) ID

Contributing Source (CSRC) ID

32 bits

Page 92: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

92

RTP header definition

/* * 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;

/* * 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 93: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

93

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 ?

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 ?

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

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.

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 94: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

94

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.

Page 95: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

95

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

Page 96: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

96

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).

Page 97: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

97

RTCP: Mensajes SR

V P RC PT=SR=200 Longitud

SSRC del sender

32 bits

NTP timestamp mswNTP timestamp lsw

RTP timestamp

Contador de los paquetes del sender

Contador de los bytes del senderSSRC_1

Frac 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 98: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

98

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 i

Ri Instante de llegada del paquete i

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

16/,1 11 iii JiiDJJ

Page 99: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte multimedia.

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: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

100

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 peticiones

Page 101: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

101

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

Voz del público

Imagen del conferenciante

Imagen del público

Imagen de las transparencias

Voz del conferenciante

Page 102: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

102

RTSP: Ejemplo de una sesión

Web server

SETUP

PLAY

PAUSE

TEARDOWN

HTTP GET

descripción de la sesión

RTP audio

RTP vídeo

RTCP

Cliente

Media server

Page 103: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

103

RTSP: Comandos de petición

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 104: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

104

RTSP: Mensajes de respuesta

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 105: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

105

RTSP: Una sesión completa (I)

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

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 106: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

106

RTSP: Una sesión completa (II)

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

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 107: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

107

RTSP: Una sesión completa (III)

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

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 108: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

108

RTSP: Una sesión completa (IV)

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

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 109: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

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

1-Protocolos de transporte multimedia.

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 110: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

110

Multicast = Efficient Data Distribution

Src Src

Page 111: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

111

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

Page 112: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

112

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 sender

Page 113: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

113

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

Page 114: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

114

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.

Page 115: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

115

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.

Page 116: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

116

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: m1-m2-m3,

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

Page 117: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

117

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:

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 118: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

118

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.

Page 119: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

119

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:

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

Page 120: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

120

IP Multicast Architecture

Hosts

Routers

Service modelService model

Host-to-router protocol(IGMP)

Multicast routing protocols(various)

Page 121: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

121

IP Multicast model: RFC 1112

Message sent to multicast “group” (of receivers) Senders need not be group members A 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 Internet Group membership is not explicitly known Receivers can join/leave at will

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

delivery tree changes dynamically Network has to actively discover paths between senders and

receivers

Page 122: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

122

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

1 1 1 0 Group ID

Page 123: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

123

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 available Specify IP time-to-live (TTL) on outgoing packet Enable/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

Page 124: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

124

Link-Layer Transmission/Reception

TransmissionIP multicast packet is transmitted as a link-layer

multicast, on those links that support multicastLink-layer destination address is determined by an

algorithm specific to the type of link

ReceptionNecessary steps are taken to receive desired multicasts

on a particular link, such as modifying address reception filters on LAN interfaces

Multicast routers must be able to receive all IP multicasts on a link, without knowing in advance which groups will be used

Page 125: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

125

Using Link-Layer Multicast Addresses

Ethernet and other LANs using 802 addresses: Direct mapping! Simpler than unicast! No ARP etc.

32 class D addresses may map to one MAC address Special OUI for IETF: 0x01-00-5E. No mapping needed for point-to-point links

LAN multicast address

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0

1 1 1 0 28 bits

23 bits

IP multicast address

Group bit

Page 126: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

126

Multicast over LANs & Scoping

Multicasts are flooded across MAC-layer bridges along a spanning tree But flooding may steal sending opportunity for non-member

stations which want to transmit Almost like broadcast!

Scope: How far do transmissions propagate? Implicit scoping: Reserved Mcast addresses => don’t leave

subnet. Also called “link-local” addresses

TTL-based scoping: Multicast routers have a configured TTL threshold Multicast datagram dropped if TTL <= TTL threshold Useful as a blanket parameter.

Administrative scoping: Use a portion of class D address space (239.0.0.0 thru

239.255.255.255) Truly local to admin domain; address reuse possible. In IPv6, scoping is an internal attribute of an IPv6 multicast address

Page 127: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

127

Multicast Scope Control – Small TTLs

TTL expanding-ring search to reach or find a nearby subset of a group

Rings can be nested, but not overlapping

s

1

2

3

Page 128: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

128

IP Multicast Architecture

Hosts

Routers

Service model

Host-to-router protocolHost-to-router protocol(IGMP)(IGMP)

Multicast routing protocols(various)

Page 129: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

129

Internet Group Management Protocol

IGMP: “signaling” protocol to establish, maintain, remove groups on a subnet.

Objective: keep router up-to-date with group membership of entire LANRouters need not know who all the members are, only

that members exist

Each host keeps track of which mcast groups are subscribed toSocket API informs IGMP process of all joins

Page 130: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

130

How IGMP Works

On each link, one router is elected the “querier”Querier periodically sends a Membership Query

message to the all-systems group (224.0.0.1), with TTL = 1

On receipt, hosts start random timers (between 0 and 10 seconds) for each multicast group to which they belong

QRouters:

Hosts:

Page 131: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

131

How IGMP Works (cont.)

When a host’s timer for group G expires, it sends a Membership Report to group G, with TTL = 1

Other members of G hear the report and stop (suppress) their timers

Routers hear all reports, and time out non-responding groups

Q

G G G G

Routers:

Hosts:

Page 132: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

132

How IGMP Works (cont.)

Normal case: only one report message per group present is sent in response to a query Query interval is typically 60-90 seconds

When a host first joins a group, it sends immediate reports, instead of waiting for a query

IGMPv2: Hosts may send a “Leave group” message to “all routers” (224.0.0.2) address Querier responds with a Group-specific Query message:

see if any group members are present Lower leave latency

Page 133: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

133

The Java Basic Multicast API

At the transport layer, the basic multicast supported by Java is an extension of UDP (the User Datagram Protocol)

For the basic multicast, Java provides a set of classes which are closely related to the datagram socket API classes

Page 134: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

134

Datagram - recap

a by te a rra y

a D a ta g ra m Pa ck e t o bje ct

r e c e i ve r 'sa d d r e s s

a D a ta g ra m S o ck e t o bje ct

s e nde r pro c e s s

a by te a rra y

a D a ta g ra m Pa ck e t o bje ct

a D a ta g ra m S o ck e t o bje ct

re c e ive r pro c e s s

s e n d

re ce iv e

o bje ct re f e re n ce

da ta f lo w

Page 135: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

135

The Java Basic Multicast API - 2

There are four major classes in the API, the first three of which we have already seen in the context of datagram sockets.

InetAddress: In the datagram socket API, this class represents the IP address of the sender or receiver. In multicasting, this class can be used to identify a multicast group.

DatagramPacket: As with datagram sockets, an object of this class represents an actual datagram; in multicast, a DatagramPacket object represents a packet of data sent to all participants or received by each participant in a multicast group.

DatagramSocket: In the datagram socket API, this class represents a socket through which a process may send or receive data.

MulticastSocket : A MulticastSocket is a DatagramSocket, with additional capabilities for joining and leaving a multicast group. An object of the multicast datagram socket class can be used for sending and receiving multicast packets. In the Java API, a MulticastSocket object is bound to a port address, e.g. 3456, and methods of the object allows for the joining and leaving of a multicast address, e.g. 239.1.2.3

Page 136: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

136

Joining a multicast group

To join a multicast group at IP address m and UDP port p, a MulticastSocket object must be instantiated with p, then the object’s joinGroup method can be invoked specifying the address m:

// join a Multicast group at IP address // 239.1.2.3 and port 3456

InetAddress group = InetAddress.getByName("239.1.2.3"); MulticastSocket s = new MulticastSocket(3456); s.joinGroup(group);  

Page 137: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

137

Sending to a multicast group

A multicast message can be sent using syntax similar with the datagram socket API.

String msg = "a multicast message."; InetAddress group = InetAddress.getByName("239.1.2.3"); MulticastSocket s = new MulticastSocket(3456); s.joinGroup(group); // optional DatagramPacket hi = new DatagramPacket(msg.getBytes( ),

msg.length( ),group, 3456); s.send(hi);

Page 138: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

138

Receiving messages sent to a multicast group

A process that has joined a multicast group may receive messages sent to the group using syntax similar to receiving data using a datagram socket API.

byte[] buf = new byte[1000]; InetAddress group =

InetAddress.getByName("239.1.2.3");

MulticastSocket s =

new MulticastSocket(3456);

s.joinGroup(group);

DatagramPacket recv =

new DatagramPacket(buf,buf.length);

s.receive(recv);

Page 139: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

139

Leaving a multicast group

A process may leave a multicast group by invoking the leaveGroup method of a MulticastSocket object, specifying the multicast address of the group. 

s.leaveGroup(group);

Page 140: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

140

Setting the “time-to-live”

The runtime support needs to propagate a multicast message from a host to a neighboring host in an algorithm which, when executed properly, will eventually deliver the message to all the participants.

Under some anomalous circumstances, however, it is possible that the algorithm which controls the propagation does not terminate properly, resulting in a packet circulating in the network indefinitely.

Indefinite message propagation causes unnecessary overhead on the systems and the network.

To avoid this occurrence, it is recommended that a “time to live” parameter be set with each multicast datagram.

The time-to-live (ttl) parameter, when set, limits the count of network links or hops that the packet will be forwarded on the network.

Page 141: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

141

Setting the “time-to-live”

The recommended ttl settings are: 0 if the multicast is restricted to processes on the same

host 1 if the multicast is restricted to processes on the same

subnet 32 if the multicast is restricted to processes on the same

site 64 if the multicast is restricted to is processes on the same

region 128 is if the multicast is restricted to processes on the

same continent 255 is the multicast is unrestricted

Page 142: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

142

Setting the “time-to-live”

  String msg = "Hello everyone!"; InetAddress group =

InetAddress.getByName("239.1.2.3"); MulticastSocket s = new MulticastSocket(3456); s.setTimeToLive(1);

// set time-to-live to 1 hop DatagramPacket hi =

new DatagramPacket(msg.getBytes( ), msg.length( ),group, 3456);

s.send(hi);

The value specified for the ttl must be in the range 0 <= ttl <= 255; an IllegalArgumentException will be thrown otherwise.

Page 143: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

143

The C version: Joining Multicast Groups

To join a group, you use the setsockopt() kernel service call with a new parameter. The new parameter is the ip_mreq structure:

The imr_multiaddr field specifies the multicast group you want to join. It is the same format as the sin_addr field in the sockaddr_in structure. The imr_interface field lets you choose a particular host interface. This is similar to a bind(), which lets you specify the host interface (or leave the host option wide open with an INADDR_ANY value).

/************************************************************//*** The ip_mreq structure for selecting a multicast addr ***//************************************************************/struct ip_mreq{ struct in_addr imr_multiaddr; /* known multicast group */ struct in_addr imr_interface; /* network interface */} ;

Page 144: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

144

The C version: Joining Multicast Groups

The following code snippet shows you how to join a group using the ip_mreq structure. It sets the imr_interface field to INADDR_ANY merely for demonstration. Do not use it unless you have only one interface on your host; the results can be unpredictable .

/************************************************************//*** Join a multicast group ***//************************************************************/const char *GroupID = "224.0.0.10";struct ip_mreq mreq;if ( inet_aton(GroupID, &mreq.imr_multiaddr) == 0 ) panic("address (%s) bad", GroupID);mreq.imr_interface.s_addr = INADDR_ANY;if ( setsockopt(sd, SOL_IP, IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq))!= 0) panic("Join multicast failed");

/************************************************************//*** Drop a multicast group ***//************************************************************/if ( setsockopt(sd, SOL_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) != 0 ) panic("Drop multicast failed");

Page 145: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

145

IP Multicast Architecture

Hosts

Routers

Service model

Host-to-router protocol(IGMP)

Multicast routing protocols

Page 146: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

146

Multicast Routing

Basic objective – build distribution tree for multicast packetsThe “leaves” of the distribution tree are the subnets

containing at least one group member (detected by IGMP)

Multicast service model makes it hardAnonymityDynamic join/leave

Page 147: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

147

Simple Multicast Routing Techniques

Flood and pruneBegin by flooding traffic to entire networkPrune branches with no receiversExamples: DVMRP, PIM-DMUnwanted state where there are no receivers

Link-state multicast protocolsRouters advertise groups for which they have receivers

to entire networkCompute trees on demandExample: MOSPFUnwanted state where there are no senders

Page 148: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

148

How to Flood Efficiently ?

A router forwards a packet from source (S) iff it arrives via the shortest path from the router back to SReverse path check!

Packet is replicated out all but the incoming interface

Reverse shortest paths easy to compute just use info in DV routing tablesDV gives shortest reverse pathsEfficient if costs are symmetric

xxyy

tt

SS

a

zz

Forward packets that arriveon shortest path from “t” to “S” (assume symmetric routes)

Page 149: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

149

Problem

Flooding can cause a given packet to be sent multiple times over the same link: can filter better than this!

Solution: Reverse Path Broadcasting

xx yy

zz

SS

a

b

duplicate packet

Page 150: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

150

Reverse Path Broadcasting (RPB)

Basic idea: forward a packet from S only on child links for S Child link of router x for source S: link that has x as parent

on the shortest path from the link to S

xx yy

zz

SS

a

b

5 6

child link of xfor S

forward onlyto child link

Page 151: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

151

How to Find Child Links?

Routing updates ! If z tells x that it can reach S through y, and if the cost of this path is >= the cost of the path from z to

S through x, then x knows that the link to z is a child link

In case of tie, lower address wins

xx yy

zz

SS

a

b

5 6

child link of xfor S

forward onlyto child link

Page 152: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

152

Truncated RPB

This is still a broadcast algorithm – the traffic goes everywhere – lousy filtering!

First order solution: Truncated RPBDon't forward traffic onto networks with no receiversIdentify leaves

Leaf links are the child links that no other router uses to reach source S

Use periodic updates of form: – “this is my next-link to source S”

If child is not the “next-link” for anyone, it is a leaf

Detect group membership in leaf (IGMP)

Page 153: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

153

Reverse Path Multicast (RPM)

Prune back transmission so that only absolutely necessary links carry traffic

Use on-demand pruning so that router group state scales with number of active groups

xx yy

tt

SS

vv bbaa

aa bb

data messageprune message

Page 154: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

154

Basic RPM Idea

Prune (Source,Group) at leaf if no membersSend Non-Membership Report (NMR) up the tree

If all children of router R prune (S,G)Propagate prune for (S,G) to parent R

On timeout: Prune droppedFlow is reinstatedDown stream routers re-pruneNote: this is a soft-state approach

Grafting: Explicitly reinstate sub-tree when IGMP detects new members at leaf, or when a child asks

for a graft.

Page 155: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

155

Putting it together: Topology

G G

S

G

Page 156: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

156

Flood with Truncated Broadcast

G G

S

G

Page 157: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

157

Pruning

G G

S

Prune (s,g)

Prune (s,g)

G

Page 158: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

158

Graft (s,g)

Graft (s,g)

Grafting

G G

S

G

G

Report (g)

Page 159: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

159

After Grafting Complete

G G

S

G

G

Page 160: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

160

Reliable Multicast: The Goal

Implement reliability on top of IP multicastWhy is this hard ?

Sender cannot keep state for unknown number of dynamic receivers Remember open & dynamic group semantic?

Algorithms like TCP that estimate path properties such as RTT and congestion window don’t generalize to trees. Remember: TCP is only for a unicast session!

Has to address (N)ACK implosions

Page 161: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

161

R1

Implosion

S

R3 R4

R2

21

R1

S

R3 R4

R2

Packet 1 is lost All 4 receivers request a resend

Resend request

Page 162: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

162

Retransmission

Re-transmitter Options: sender, other receivers

How to retransmit Unicast, multicast, scoped multicast, retransmission group, …

Problem: retransmissions (aka repairs) may reach destinations that don’t require a retransmission A.k.a “exposure” problem Solution: subcast the re-transmission only to receivers that

need it.

Page 163: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

163

R1

Why Subcast? Exposure problem…

S

R3 R4

R2

21

R1

S

R3 R4

R2

Packet 1 does not reach R1;Receiver 1 requests a resend

Packet 1 resent to all 4 receivers

1

1

Resend request Resent packet

Page 164: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

164

Ideal Recovery Model

S

R3 R4

R2

2

1

S

R3 R4

R2

Packet 1 reaches R1 but is lost before reaching other Receivers

Only one receiver sends NACK to the nearest S or R with packet

Resend request

1 1Resent packet

Repair sent only to those that need packet

R1 R1

Page 165: TECNOLOGÍAS DE RED AVANZADAS – Master IC 2010-2011 –  1- Protocolos de transporte con QoS  Clases de aplicaciones multimedia

TEC

NO

LOG

ÍAS D

E R

ED

AV

AN

ZA

DA

S –

Mast

er

IC 2

01

0-2

01

1

165

Reliable Multicast Transport: Issues

Retransmission can make reliable multicast as inefficient as replicated unicast(N)ACK-implosion if all destinations ack at once“Crying baby”: a bad link affects entire group

Heterogeneity: receivers, links, group sizesAnonymous/Open/Dynamic Group Model:

Source does not know # of destinations, and destinations may vanish

Multicast applications do not need strong reliability of the type provided by TCP. Can tolerate some reordering, delay, etc