chap 19 1 - york university2 ipv4 address formats 3 multicast addressing (2) 1.link-layer (ethernet)...

22
1 Multicasting (19.1) CSE 3213 Fall 2011 1 28 November 2011 Multicast Addressing Class D address (see next slide) Source: unicast IP address S Receivers: multicast group ID G, a class-D address Each group is identified by (S, G) Ethernet broadcast address (all 1’s) 2 ways of doing IP multicast at the link layer: Link-layer (Ethernet) broadcast Link-layer (Ethernet) multicast Both cases need filtering at IP layer. 2

Upload: others

Post on 03-Apr-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

1

Multicasting (19.1)

CSE 3213

Fall 2011

128 November 2011

Multicast Addressing

• Class D address (see next slide)

• Source: unicast IP address S

Receivers: multicast group ID G, a class-D address

• Each group is identified by (S, G)

• Ethernet broadcast address (all 1’s)

• 2 ways of doing IP multicast at the link layer:

– Link-layer (Ethernet) broadcast

– Link-layer (Ethernet) multicast

Both cases need filtering at IP layer.

2

Page 2: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

2

IPv4 Address Formats

3

Multicast Addressing (2)

1. Link-layer (Ethernet) broadcast

• IP multicast packet is encapsulated in an Ethernet broadcast frame and

transmitted on the bus.

• Every host picks up the Ethernet frame and does filtering at the IP layer to

decide whether to keep or discard the frame.

2. Link-layer (Ethernet) multicast

• Requires a mapping of IP multicast address to an Ethernet multicast

address (see next slide).

• There are up to 32 IP class-D addresses mapped to the same Ethernet

multicast address.

• The IP module still has to filter out packets for non-member hosts.

4

Page 3: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

3

Mapping from Class D IP adress to Ethernet

multicast adress

5

Internet Multicast Service Model

Multicast group concept: use of indirection

• a host “sends” IP datagrams to multicast group.

• routers forward multicast datagrams to hosts that have “joined”

that multicast group.

6

128.119.40.186

128.59.16.12

128.34.108.63

128.34.108.60

multicast group

226.17.30.197

Page 4: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

4

Multicast groups

� Class D Internet addresses reserved for multicast:

� Host group semantics:

o anyone can “join” (receive from) multicast group.

o anyone can send to multicast group.

o no network-layer identification to hosts of members.

� Needed: infrastructure to deliver multicast-addressed

datagrams to all hosts that have joined that multicast group.

7

Multicast Protocols

Transport layer

• UDP

• Real-time Transport Protocol (RTP): for multimedia

content

• ReSerVation Protocol (RSVP): for bandwidth

reservation in a multicast distribution

8

Page 5: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

5

Multicast Protocols (2)

Routing, delivery

• On a local network (join/leave):

– Internet Group Management Protocol (IGMP)

– Multicast Listener Discovery (MLD): similar to IGMP but for

IPv6

• Intra-domain (routing):

– MOSPF, PIM, DVMRP

• Inter-domain (routing):

– Multicast Border Gateway Protocol (MBGP)

9

Joining a multicast group: 2-step process

• Local: host informs local multicast router of desire to join

group: IGMP (Internet Group Management Protocol)

• Wide area: local router interacts with other routers to receive

multicast datagram flow

– many protocols (e.g., DVMRP, MOSPF, PIM)

10

IGMPIGMP

IGMP

wide-areamulticast routing

Page 6: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

6

IGMP

Internet Group Management

Protocol (IGMP)

• RFC 3376 used to exchange multicast group

information between hosts & routers on a LAN

• hosts send messages to routers to subscribe and

unsubscribe from multicast group

• routers check which multicast groups are of interest

to which hosts

• IGMP currently at version 3

Page 7: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

7

IGMP (2)

• Host: sends IGMP report (reply) when application wishes to

join a multicast group.

– IP_ADD_MEMBERSHIP socket option

– hosts need not explicitly “unjoin” group when leaving

• Router: sends IGMP query at regular intervals

– hosts belonging to a multicast group must reply to query if

wishing to join or stay in the group.

13

query report

IGMP (3)

• Router: broadcasts Host

Membership Query

message on LAN.

• Host: replies with Host

Membership Report

message to indicate group

membership

– randomized delay

before responding

– implicit leave via no

reply to Query

• Group-specific Query

• Leave Group message

– Last host replying to

Query can send explicit

Leave Group message

– Router performs group-

specific query to see if any

hosts left in group

– Introduced in RFC 2236

• IGMP v3: current version

14

Page 8: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

8

Operation of IGMP v1 and v2

• IGMPv1

– hosts could join group

– routers used timer to unsubscribe members

• IGMPv2 enabled hosts to unsubscribe

• operational model:

– receivers have to subscribe to groups

– sources do not have to subscribe to groups

– any host can send traffic to any multicast group

• problems:

– spamming of multicast groups

– establishment of distribution trees is problematic

– finding globally unique multicast addresses difficult

IGMP v3

• addresses weaknesses by:

– allowing hosts to specify list from which they want

to receive traffic

– blocking traffic from other hosts at routers

– allowing hosts to block packets from sources that

send unwanted traffic

Page 9: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

9

IGMP Message Formats

Membership Query

• sent by multicast router

• three subtypes: general query, group-specific query, group-

and-source specific query

Membership Query Fields

type

max response time

checksum

group address

S flag

QRV (querier's robustness variable)

QQIC (querier's querier interval code)

number of sources

source addresses

Page 10: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

10

IGMP Message Formats

Membership Report

IGMP Message Formats

Group Record

Page 11: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

11

IGMP Operation - Joining

• IGMP host wants to make itself known as group member to other hosts and routers on LAN

• IGMPv3 can signal group membership with filtering capabilities with respect to sources

– EXCLUDE mode – all members except those listed

– INCLUDE mode – only from group members listed

to join send IGMP membership report message

• address field multicast address of group

• sent in IP datagram

• current group members receive & learn new member

• routers listen to all IP multicast addresses to hear all reports

IGMP Operation –

Keeping Lists Valid

routers periodically issue IGMP general query

message

• in datagram with all-hosts multicast address

• hosts must read such datagrams

• hosts respond withreport message

router doesn’t know every host in a group

• needs to know at least one group member still active

• each host in group sets timer with random delay

• host hearing another report cancels own

• if timer expires, host sends report

• only one member of each group reports to router

Page 12: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

12

IGMP Operation - Leaving

• host leaves group by sending a leave group message

to the all-routers static multicast address

– sends a membership report message with EXCLUDE option

and null list of source addresses

• router determines if have any remaining group

members using group-specific query message

Group Membership with IPv6

• IGMP defined for IPv4

– uses 32-bit addresses

• IPv6 internets need functionality

• IGMP functions included in Internet Control

Message Protocol v6 (ICMPv6)

– ICMPv6 has functionality of ICMPv4 & IGMP

• ICMPv6 includes group-membership query

and group-membership report message

Page 13: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

13

IGMP: Summary• For membership management.

• Between a host on a subnet (Ethernet) and the router for the subnet.

• The router periodically broadcast an IGMP host-membership query message on its subnet.

• A host subscribes to a group replies by multicasting a host-membership report message.

– Note: feedback implosion → uses a random timer.

• The report is sent 3 times (for reliability).

• IGMP-1: hosts send no report → leaving the group

IGMP-2: hosts send explicit host-membership leave messages to reduce leave latency.

IGMP-3: filtering and blocking

25

Multicast Routing

Page 14: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

14

Shortest Path Tree

• Multicast cast forwarding tree: tree of shortest path routes

from source to all receivers.

– Dijkstra’s algorithm.

R1

R2

R3

R4

R5

R6 R7

21

6

3 4

5

i

router with attachedgroup member

router with no attachedgroup member

link used for forwarding,i indicates order linkadded by algorithm

LEGENDS: source

27

MOSPF

• Extends OSPF for multicasting.

• Every router has the complete topology of its own network.

• A receiver joins a multicast group G by exchanging IGMP messages with its end-router R.

• The end-router R broadcasts its group membership to the whole network in the form (G, R).

• Every router in the network maintains a group membership table with each entry being a tuple [S, G, <R1, R2, …>].

• A sender simply sends data packets as they are available.

• Each router uses the network topology, the group membership table, and the multicast group ID in the data packets to compute the route(s) to the destination(s).

28

Page 15: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

15

Reverse Path Forwarding

• Building a loop-free broadcast tree

• No knowledge of group membership

29

Reverse Path Forwarding (2)

if (multicast datagram received on incoming link on

shortest path back to sender)

then flood datagram onto all outgoing links

else ignore datagram

� rely on router’s knowledge of unicast shortest path

from it to sender

� each router has simple forwarding behavior:

30

Page 16: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

16

Reverse Path Forwarding: Example

31

A

B

G

DE

c

F

Spanning-Tree Broadcast

32

A

B

G

DE

c

F

A

B

G

DE

c

F

(a) Broadcast initiated at A (b) Broadcast initiated at D

Page 17: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

17

Internet Multicasting Routing: DVMRP

• DVMRP: distance vector multicast routing protocol,

RFC1075.

• Flood and prune: reverse path forwarding, source-

based tree.

– initial datagram to multicast group is flooded

everywhere via RPF

– routers not wanting the multicast data: send

prune messages to upstream neighbors

33

DVMRP Example

R1

R2

R3

R4

R5

R6 R7

21

6

3 4

5

i

router with attachedgroup member

router with no attachedgroup member

link used for forwarding,i indicates order linkadded by algorithm

LEGENDS: source

34

Page 18: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

18

How DVMRP Fits into Multicasting

• IGMP - used for discovery of hosts in multicast

groups, messages exchanged between

neighbors

• DVMRP - routes multicast datagrams within an

AS

• MBGP (Multicast BGP) - routes multicast

datagrams between ASs

DVMRP Details

• Soft state: DVMRP router periodically (1 min.) “forgets” that branches are pruned:

– multicast data again flows down unpruned branches.

– downstream routers: reprune or else continue to receive data.

• Routers can quickly re-graft to tree following an IGMP join at a leaf router by sending a “graft” message upstream.

• Deployment:

– commonly implemented in commercial routers.

– Mbone routing done using DVMRP.

• Works well in small autonomous domains.

36

Page 19: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

19

DVMRP Prune

• Sent from routers receiving multicast traffic

for which they have no downstream group

members

• “Prunes” the tree created by DVMRP

• Stops needless data from being sent

DVMRP Graft

• Used after a branch has been pruned back

• Sent upstream by a router that has a host that joins a multicast group

• Goes from router to router until a router active on the multicast group is reached

• Sent for the following cases

– A new host member joins a group

– A new dependent router joins a pruned branch

– A dependent router restarts on a pruned branch

– If a Graft Ack is not received before the timeout

Page 20: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

20

DVMRP Graft ACK

• Used to acknowledge receipt of Graft message

• Allows sending downstream router to know

upstream router has received and processed

its request

• If not received within 5 sec. Graft message

sent again

DVMRP Issues

• Hop count used as metric

• Scalability issues

– Performs periodic flooding

– Maintains its own routing table

• Older versions lack pruning

• Even though it is a main part of MBone, MBone is being phased out

Page 21: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

21

DVMRP: Summary

• Distance Vector Multicast Routing Protocol

• Leaf router sends a prune message to neighbouring routers

when there is no group member on the subnet.

• Intermediate routers perform pruning whenever possible.

• Flooding and pruning are repeated periodically, when the

current state times out.

• Between flooding rounds, a leaf router can re-join a group by

sending a graft message upstream.

• Intermediate routers propagates the graft message upstream

until the path is re-connected.

41

MBone

• Multicast backbone of the Internet.

• Not all routers support multicast routing protocols and IGMP.

• Connecting multicast-capable routers using (virtual) IP

tunnels.

• Was a long-running experimental approach to enabling

multicast between sites through the use of tunnels.

• No longer operational.

42

Page 22: chap 19 1 - York University2 IPv4 Address Formats 3 Multicast Addressing (2) 1.Link-layer (Ethernet) broadcast • IP multicast packet is encapsulated in an Ethernet broadcast frame

22

Reading

• Section 19.1, Stallings

More references:

• Multicasting on the Internet and Its Applications, Sanjoy Paul,

Kluwer Academic Publishers, 1998, chapters 2, 4, 5.

• Computer Networking: A Top-Down Approach, 5th edition,

Kurose and Ross.

43