gianluca mazzini @unife.it università · pdf fileigmp report • one router on ......

36
1 Multicast @Unife Gianluca Mazzini [email protected] Università di Ferrara slide for internal use with part from other presentations

Upload: phamnhan

Post on 28-Mar-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

1

Multicast @Unife

Gianluca [email protected]

Università di Ferrara

slide for internal use

with part from other presentations

Page 2: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

2

Definitions• Unicast

– Single source, single receiver• Broadcast

Send same packet to all receivers “all” usually limited in some way

• LAN, subnet, organization • Multicast

Send same packet to many receivers

Page 3: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

3

Ideal Multicast• Senders (S) and Receivers (R) not aware of

each other’s position in the network• Scalable• Low latency (join, data propagation)• Low bandwidth and processing overhead• “Reliable”, if this is cheap (“end-to-end”?)• Easy to join/leave

Page 4: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

4

Why it is difficult• Very different application needs• Limited bandwidth and processing power• Poorly known/changing network topology• Hard to deploy changes in routers• Large/unequal/changing propagation delays• Unclear what “best” policy means in various

contexts• Wireless and Wired coexistence

Page 5: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

5

Example• Broadcast audio/video• Push-based systems• Software distribution• Web-cache updates • Teleconferencing (audio, video, shared

whiteboard, text editor)• Multi-player games• Server/service location• Distributed applications• Sensor networks?

Page 6: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

6

Multicast vs Unicast• Unicast: one source to one destination• Multicast: one source to many destinations• Two main functions:

– Efficient data distribution – Logical naming of a group

Page 7: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

7

UnicastSrc Src Src Src

Page 8: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

8

Multicast

Src Src Src Src

Page 9: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

9

Architecture

hosts

routers

service model

host-to-router protocol(IGMP)

multicast routing protocols(various)

Page 10: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

10

Group• Members are the intended receivers• Senders may or may not be members• Destination address is class D IP address

– globally known portion of address space• Hosts may belong to many groups• Hosts may send to many groups• Support dynamic creation of groups, dynamic

membership, dynamic sources

Page 11: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

11

Addressing• Multicast address allocation• Assume address is advertised • Avoid collisions as much as possible

– Mcast address must be unique in space and time• Use randomization• Can’t have highly used address space• Multiple multicast groups per conference…different

app streams, different layers…

Page 12: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

12

IP Multicast Service Model (RFC-1112)• Each group identified by a single IP address

• Groups may be of any size• Members of groups may be located anywhere in

the Internet• Members of groups can join and leave at will• Senders do not need to be members• Group membership not known explicitly• Analogy:

– each multicast address is like a radio frequency, on which anyone can transmit, and to which anyone can tune-in.

Page 13: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

13

AddressingClass D IP addresses:

in “dotted decimal” notation: 224.0.0.0 — 239.255.255.255

two administrative categories:– “well-known” multicast addresses, assigned by

IANA– “transient” multicast addresses, assigned and

reclaimed dynamically, e.g., by “sdr” program

1 1 1 0 group ID

Page 14: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

14

Ethernet vs Multicast

– for Ethernet and other LANs using 802 addresses

– for point-to-point links: no mapping needed

LAN multicast address0 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 15: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

15

Scope• Groups can have different scope• LAN (local scope)• Campus/admin scoping• TTL scoping must be used with caution• Concept of scope important to multipoint

protocols and applications

Page 16: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

16

TTL Scope Control

s

1

2

3

to reach or find a nearby subset of a group

Page 17: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

17

TTL Scope Control

to keep multicast traffic within an administrative domain, e.g., for privacy or resource reasons

an administrative domain

TTL threshold set oninterfaces to these links,greater than the diameterof the admin. domain

the rest of the Internet

Page 18: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

18

Address Scope Control

an administrative domain

address boundary set oninterfaces to these links

the rest of the Internet

– RFC 1112 – uses address range 239.0.0.0 — 239.255.255.255– supports overlapping (not just nested) domains

Page 19: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

19

Sending Operation• uses normal IP-Send operation, with an IP

multicast address specified as the destination• must provide sending application a way to:

– specify outgoing network interface, if >1 available– specify IP time-to-live (TTL) on outgoing packet– enable/disable loopback if the sending host is a

member of the destination group on the outgoing interface

Page 20: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

20

Receiving operation• two 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 21: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

21

Mbone• MBone = Multicast Backbone• an “interconnected” set of multicast-capable

routers, providing the IP multicast service in the Internet

• can be thought of as a virtual network, overlaid on the Internet

physical topology logical topology

Page 22: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

22

Mbone Tunnels• a method for sending multicast packets through

multicast-ignorant routers• IP multicast packet is encapsulated in a unicast packet

addressed to far end of tunnel:

• a tunnel acts like a virtual point-to-point link• each end of tunnel is manually configured with unicast

address of the other end

IP header,dest = unicast

IP header,dest = multicast

transport headerand data…

Page 23: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

23

IGMP• End system to router protocol is IGMP• Member or process starts an application with mcast

address• IGMP process informed of joined mcast group• When local router sends IGMP query, host sends

IGMP report• One router on LAN is IGMP querier• Hosts listen to responses and suppress duplicates• The protocol by which hosts report their multicast

group memberships to neighboring routers • Operates over broadcast LANs and point-to-point links• Occupies similar position and role as ICMP in the

TCP/IP protocol stack

Page 24: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

24

IGMP

• 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 25: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

25

IGMP

• 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 their timers

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

Q

G G G G

Page 26: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

26

IGMP• Note that, in normal case, only one report message per

group present is sent in response to a query(routers need not know who all the members are,only that members exist)

• Query interval is typically 60—90 seconds

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

Page 27: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

27

IGMP v2• changes from version 1:

– new message and procedures to reduce “leave latency”

– standard querier election method specified– version and type fields merged into a single field

• backward-compatible with version 1• widely implemented already• RFC 2236 v2, RFC 3376 v3

Page 28: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

28

GARR

Page 29: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

29

Streaming Keys• Multicast real-time• Multicast pseudo-VOD• Unicast real-time• Unicast VOD• P2P real-time• P2P VOD

Page 30: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

30

VideoLAN Client (VLC) media playerVLC - the cross-platform media player and streaming

server.

VLC is a multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols.

It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network.

Page 31: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

31

VLC architecture

Page 32: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

32

VLC and Multicast• with unicast, when a lot of clients want to receive the stream,

the network interface of the server becomes saturated.So the number of clients is very limited, especially when the stream is big.

• with broadcast, the machines that do not want to receive the stream are polluted and some devices do not like to receive huge broadcasts. If you want to send several streams at the same time, the network becomes oversaturated.

• It is possible for one client to belong to several groups.

Page 33: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

33

VLC Example

Server – Send the Data Select File – Open File, and Browse to select a file. Select the “Stream output” checkbox, then the

Settings button – this opens a Stream Output window.

Output Methods For multicasting, select UDP and write following : address : ff1e and port : 1234 Select the checkbox : Play locally

Page 34: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

34

VLC streaming

Page 35: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

35

VLC streaming

Client – Receive the Data Open VLC on the receiving PC. Select File – Open Network Stream. To join the session of multicast as sent by the server do the following : Select UDP/RTP multicast and write : address : ff1e and port : 1234 Click the OK button, and the VLC display window

should open.

Page 36: Gianluca Mazzini @unife.it Università · PDF fileIGMP report • One router on ... streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or

Others• Skypecast• Icecast• vic/rat• skycast• ...