Professional Documents
Culture Documents
Module21 Mcast
Module21 Mcast
1
Applications with multiple receivers
2
Motivation
3
Multicasting
4
Multicasting over a Packet Network
Multiple copies
of the same
message is
transmitted on
the same link
5
Multicasting over a Packet Network
7
The IP Protocol Stack
Socket Layer
TCP UDP
IP IP Multicast
Network Interface
8
IP Multicasting
IP Multicast Addressing
IP Group Management
Multicast Routing
9
Multicast Addressing
Class From To
D 224.0.0.0 239.255.255.255
• Multicast addresses are dynamically assigned.
• An IP datagram sent to a multicast address is forwarded to everyone
who has joined the multicast group
11
Multicast Address Translation
12
Multicast Address Mapping
Ethernet
00000001 00000000 01011110 0------- -------- -------- Address
13
IGMP
14
IGMP Protocol
• Multicast router keeps a table on the multicast groups that have joined
hosts. The router only forwards a packet, if there is a host still joined.
• Note: Router does not keep track which host is joined.
15
IGMP Packet Format
IGMP
Ethernet Header IP header
Message
Version Type
(unused) Checksum
(= 0) (=1-2)
32-bit Class D address
16
IGMP Protocol
H1 H2
R1
Ethernet
IGMP query
IGMP Report
17
IGMP Protocol
H1 H2
R1
Ethernet
IGMP general query
IGMP group address = 0
Destination IP address = 224.0.0.1
Source IP address = router's IP address
18
Networks with multiple multicast routers
Host
19
Multicast Routing Protocols
20
Multicast routing as a graph problem
21
Multicast routing as a graph problem
22
Multicast routing as a graph problem
23
Multicast routing in practice
2. Core-based Tree:
– Build a single distribution tree that is shared by all senders
– Does not use Solution 2 (because it is too expensive)
– Selects one router as a “core” (also called “rendezvous point”)
– All receivers build a shortest path to the core reverse shortest
path / reverse path
forwarding
24
Reverse Path Forwarding (RPF)
• RPF builds a shortest path tree in a distributed fashion by taking advantage of the
unicast routing tables.
• Main idea: Given the address of the root of the tree, a router selects as its
upstream neighbor in the tree the router which is the next-hop neighbor for
forwarding unicast packets to the root.
H1
• How can this be used to build a tree? RPF
Source
neighbor of R3
1. RPF Forwarding: for H2
26
Multicast Routing table
27
Building a source-based tree
• Flood-and-Prune R2
R3
H2
R4
R5
R6
R7
H3 R8
joined
H4 H5
joined
28
Building a source-based tree
Flood=
Forward packets that R5
R6
arrive on RPF interface
on all non-RPF
R7
interfaces H3
R8
joined
H4 H5
joined
29
Building a source-based tree
• Flood-and-Prune
R1
R3
Flood= R2
H2
Forward packets R4
on all non-RPF interfaces
R5
Receiver drops packets
R6
not received on
RPF interface
R7
R8
H3
joined
H4 H5
joined 30
Building a source-based tree
forwarding
R1
• Flood-and-Prune R3
R2
H2
e
R4 P r un e
Prune= Pru Prun
ne
Send a prune message Prune
Pr
Prune
when a packet is
un
R5
e
received on a non-RPF Prune R6
Pru
Pru
ne
interface or when there
Prune
Pru
ne
ne
are no receivers R7 Prune
R8
downstream H3
joined
Prune message disables
routing table entry
H4 H5
joined
31
Pruning
32
Building a source-based tree
• When a receiver H1
re-activate a pruned
routing table entry
R1
R3
R2
• Grafting H2
R4
Sending a Graft
message disables
Gr
prune, and re-activatesR5
af
t
routing table entry. R6
Graft
R7
R8
H3
joined
H4 H5
joined
joined
33
Alternative method for building a source-based tree
if the receiver
Source
knows the
source
n R1
Joi Joi
n R3
R2
• Explicit-Join H2
R4
– Receiver sends
in
Jo
a Join message
to RPF neighbor R5
R6
– Join message
in
Jo
creates (S,G)
routing table H3
R7
R8
entry joined
– Join message is
passed on H4 H5
joined
34
Building a core-based tree
Jo
(*, G) routing table R5
in
entry R6
Join
Join
R7
R8
H3
joined
H4 H5
joined joined
35
Building a core-based tree
R5
R6
R7
R8
H3
joined
H4 H5
joined joined
36
Multicast routing protocols in the Internet
37
PIM Messages (PIM version 2)
32 bit
Version
Type Reserved Checksum
(= 2)
flood-and-prune src: S1
dest: G
R1
• Orange packet: src: S1
I1
• Blue packet: src: S1
R2
src: S1
PIM message dest: G I1 I3 dest: G
prune (H1, G)
R3 R4
src: S1
dest: G
H2 H3
joined
39
PIM-SM: PIM Sparse Mode
rendezvous-point (RP)
• Receivers know RP R1
(statically configured or
dynamically elected) I1
RP
R2 R5
join (*, G)
I1 I3
RP on RPF.
IGMP
H2 H3
joined
core-based tree.
RP
I1
R2 R5
I1 I3
R3 join (*, G) R4
IGMP
H2 H3
joined
41
PIM-SM: Data transmission
packet to RP
dest: G
• Packet is attached to an
register src: S1
RP Register message R1 (S1, G) dest: G
join (S1,G)
R3 R4
message on reverse
path to S1 H2
joined
H3
R3 R4
src: S1
dest: G
H2 H3
joined
43
PIM-SM: Data transmission
R3 R4
src: S1
dest: G
H2 H3
joined
44
PIM-SM: Switching to source-based tree
routers switch to a
source-based tree R1 src: S1
dest: G
join (S1,G) RP
R3 R4
src: S1
• There may be duplicate dest: G
R3 R4
src: S1
dest: G
H2 H3
joined