7 Multicast
7 Multicast
Olivier Bonaventure
http://inl.info.ucl.ac.be/
These slides are licensed under the creative commons attribution share-alike license 3.0. You can obtain detailed
information
about this license at http://creativecommons.org/licenses/by-sa/3.0/
The motivation for non-unicast
http://www.cisco.com/en/US/about/ac123/ac147/ac175/about_cisco_ipj_archive09186a0080132b7c.html
A short discussion of IP multicast may be found in :
J. Kurose, K. Ross, Computer Networking : a top-down approach featuring the Internet, 2nd Edition, Addison Wesley, 2002
R. Perlman, Interconnections, 2nd Edition, Addison Wesley
Dimensions to consider
Senders
Number of senders
How many endsystems will send packets
Localization of the senders
Where are these senders located ?
Volatility of the senders
How often does the set of senders change ?
Receivers
Number of receivers
How many endsystems will receive packets ?
Localization of the receivers
Where are all the receivers for a given transmission ?
Volatility of the senders
How often does the set of receivers change ?
3
Dimensions to consider (2)
4
Network-level multicast
Routers need to :
R7
know the existence of local receivers R5
for each defined group address
distribute this information to others
R6
decide on which links to retransmit
each received multicast packet Receiver3
packets should reach all receivers
packets should not be sent Receiver1
several times on the same links
Receiver2
Receivers must indicate their interest in receiving
packets destined to specific group addresses
CNPP/2008.7. © O. Bonaventure 2008
5
Application-level multicast
Sender
Receiver4
R1 R2
R5 R7
Application copy and reproduce info
Application-level topology should
be tuned to avoid R6
sending the same information
several times over costly links Receiver3
Receiver1
6
Sample non-unicast applications
Localization applications
a server announces its availability
a client tries to locate the closest server
7
Localization of services
R2 Routing table
R1 West 1
R1 Routing table R1 R2 R4 East 1
R2 East 1 R3 West 2
R4 East 2 R4 A.B.C.D/32 W 2
R3 South-East 1
A.B.C.D/32 SE 1 R3
R4 Routing table
R2 NWest 1
R3 S-W 1
R1 Nwest 2
A.B.C.D/32 SW 2
Patridge, C., Mendez, T. and W. Milliken, "Host Anycasting Service", RFC 1546, November 1993.
This type of service is used notably for some DNS servers. For example, several ISPs place several copies of their DNS servers at various
locations and each of those servers uses the same IP address. This allows the ISP customers to utilize the same IP addresses in their
configuration independently of their location.
Another example is the utilization of anycast for one of the root servers, see :
http://www.as112.net/
http://www.ripe.net/ripe/draft-documents/k-root-anycasting.html
Distribution of realtime information
http://www-mice.cs.ucl.ac.uk/multimedia/software/
Distribution of realtime information (2)
Live audio/video
one sender transmits streaming audio/video to
large number of receivers
Sender
R1 R2
R4 Receiver4
R3
Number of senders : one
Number of receivers : can be R5 R7
large
Data traffic
continuous R6
Lifetime : long
Volatility : volatile or stable Receiver3
Concurrent sessions : usually few
Receiver1
CNPP/2008.7.
Receiver2 © O. Bonaventure 2008
10
Reliable distribution of information
Network-level solution
Information distributed by multicast packets
Issue
Multicast transport protocol are required for reliability
Those protocols are deployed in some enterprise networks, but
not widely available in the global Internet
11
Concerning the application-level solutions, several researchers are currently working on the definition of generic multicast overlays that could
be used by applications.
Several reliable multicast protocols have been proposed during th e last years.
RFC 2887: The Reliable Multicast Design Space for Bulk Data Transfer
M. Handley, S. Floyd, B. Whetten, R. Kermode, L. Vicisano, M. Luby, August 2000
RFC 3208: PGM Reliable Transport Protocol Specification
T. Speakman, J. Crowcroft, J. Gemmell, D. Farinacci, S. Lin, D. Leshchiner, M. Luby, T. Montgomery, L. Rizzo, A. Tweedly, N. Bhaskar, R.
Edmonstone, R. Sumanasekera, L. Vicisano, December 2001
See also :
http://www.ietf.org/html.charters/rmt-charter.html
The benefits and costs
of network-level multicast
Benefits
Multicast allows a more efficient utilization of the
available bandwidth
no unnecessary packet duplication
12
The Any-Source IP Multicast (ASM)
service model
Principles
A fraction of the IP address space is reserved
exclusively for IP multicast
224.0.0.0 -> 239.255.255.255
13
14
15
Advantages
Any source can send packets to any group
Any receiver may join any group
Drawbacks
How do we allocate IP multicast addresses ?
Random allocation is not really a long term solution
Risk of collision is severe
Lack of access control
Any source can send packets to any group
Consider a videoconference between professors where students
could easily send packets to interrupt the conference...
Any receiver may join any group
Encryption can be used to protect packet contents, but ...
Inefficient handling of well-known sources
CNN uses 226.0.0.10 and IraqiTV selects same address...
16
The Source-Specific IP Multicast (SSM)
service model
Objective
Provide a deployable one-to-many service
Principles
SSM multicast address = channel from a sender
A single source can use as many channels as there are
SSM addresses
Several senders can use same channel id without problems
A fraction of the IP address space is reserved
exclusively for SSM multicast addresses
232.0.0.0 -> 232.255.255.255
Receivers subscribe to channels from senders
Receiver knows from which sender packets will arrive
Routers retransmit multicast packets from the
sender to all channel subscribers
Packet forwarding based on both packet source and
destination addresses (Channel)
17
Source-Specific Protocol Independent Multicast in 232/8, D. Meyer, R. Rockell, G. Shepherd, RFC4608, 2006
Issues for network-level multicast
18
Localization of receivers
R1
Response Response query
Principle
Routers query their attached LANs to identify
active groups
Hosts respond to router queries
Routers redistribute the localization of the
receivers towards other routers
19
IGMPv1
20
IGMPv1 is defined in :
RFC 1112 Deering, S., "Host Extensions for IP Multicasting",
STD 5, RFC 1112, August 1989.
IGMPv1 (2)
R1
Response(G3)
Response
21
As an optimization, it is possible for a host to send an IGMP response message without receiving a Query when they join a
group. This allows the router to be immediately informed about new group members.
IGMPv1 (3)
R1
Router state
Group1 present (timer=30sec)
PC2 Membership PC1 Membership PC3 Membership Group2 present (timer=45 sec)
Group4 Group1 Group3
Group2
Group3 present (timer=60sec)
Group2 Group2 Group4 present (timer=10sec)
Soft-state solution
timer associated to router state for each group
if timer expires before the reception of a group
response, group is considered to be absent on the LAN
timer should be longer than interval between IGMP queries
22
IGMP v2
23
IGMPv2 is defined in :
RFC 2236: Internet Group Management Protocol, Version 2 , W. Fenner, November 1997
IGMPv2 (2)
Example leave
R1
3: Response(Group2) 1: Leave(Group2)
2: Query(Group2)
24
LAN-level multicast
Principle
Two types of destination Ethernet addresses
Physical addresses
identifies one Ethernet adapter
Logical addresses
identifies a logical group of Ethernet destinations
48 bits
OUI
0 : physical address (unicast)
1 : logical address (multicast)
25
IP Multicast over Ethernet
1 89 16 17 24 25 32 33 40 41 48
OUI IP Multicast 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
26
Issue :
32 IP addresses are mapped on the same Ethernet address. For example, Ethernet address 01-00-5e-0a-00-0a is used to send IP packets
destined to the following IP multicast addresses :
224.10.0.1, 225.10.0.1, 226.10.0.1, 227.10.0.1,
228.10.0.1, 229.10.0.1, 230.10.0.1, 231.10.0.1,
232.10.0.1, 233.10.0.1, 234.10.0.1, 235.10.0.1,
236.10.0.1, 237.10.0.1, 238.10.0.1, 239.10.0.1,
224.138.0.1, 225.138.0.1, 226.138.0.1, 227.138.0.1,
228.138.0.1, 229.138.0.1, 230.138.0.1, 231.138.0.1,
232.138.0.1, 233.138.0.1, 234.138.0.1, 235.138.0.1,
236.138.0.1, 237.138.0.1, 238.138.0.1, 239.138.0.1,
The hidden cost of LAN multicast
Sw
27
Some switches are able to look at the contents of IP packets to determine whether they can provide some information about the location of
receivers, but this is outside the scope of this presentation.
IGMPv3
S3 S1 R
S4 S2 S5
28
Some switches are able to snoop IGMP messages and to determine automatically the location of IP multicast receivers. However, this implies
that those switches need to inspect the content of the receivers multicast frames carrying IP packets.
IGMPv3 (2)
IGMPv3 Query
R1
29
IGMPv3 is defined in :
RFC 3376: Internet Group Management Protocol, Version 3 , B. Cain, S. Deering, I. Kouvelas, B. Fenner, A . Thyagarajan, October 2002
IGMPv3 (3)
IGMPv3 Responses
R1
Resp(G4,G2) Resp(G1,G2) Resp(G3,G2) Query
30
Issues for network-level multicast
31
Multicast source distribution tree
Sender2
Sender1
Receiver4
R1 R2
32
This type of source distribution tree is well suited to support the SSM service model, but can also be used to support the ASM service model.
Building the source tree
How to build the distribution tree ?
Link-state solution
link-state routing protocol used to distribute membership
Each router knows the exact location of group members
Each router can easily compute source trees
Broadcast solution
Assume initially that group members are everywhere
The first packet towards a group is sent everywhere
If a router receives unwanted traffic, it will ask its
upstream routers to stop transmitting this traffic
Distribution tree is built progressively
33
Building the source tree
Link-state solution
Principle
Routers collect membership information with IGMP
34
Multicast with OSPF
Router B state
Router A state ... Router C state
... (C,G1) : ->A,LAN (C,G1) : ->B, ->E
(C,G1) : LAN ... (C,G2) : ->B, ->E
... (C,G3) : ->E
G2 G1
G1 A B CC
D E
G1 Router E state
G2 G3 ...
Router E state (C,G1) : LAN
... (C,G2) : ->D
(C,G2) : LAN (C,G3) : ->D
(C,G3) : LAN ...
...
CNPP/2008.7. © O. Bonaventure 2008
35
36
Building the source tree
How to build the distribution tree ?
Link-state solution
link-state routing protocol used to distribute membership
Each router knows the exact location of group members
Each router can easily compute source trees
Broadcast solution
Assume initially that group members are everywhere
The first packet towards a group is sent everywhere
If a router receives unwanted traffic, it will ask its
upstream routers to stop transmitting this traffic
Distribution tree is built progressively
37
Broadcasting IP packets
38
Reverse Path Forwarding
39
RPF example
A B Src:C Dst:Broad CC
Src:C Dst:Broad
D E
Src:C Dst:Broad
40
Improving RPF
Receiver-driven solution
41
Improving RPF
Sender-based solution
C outing table
B Routing table Router B's state A : West [via B]
Router A's state A : West (A,Broad ) : ->E, ->C B : West
(A,Broad ) : ->B, ->D B : Local
C : East (C,Broad ) : ->A C : Local
(C,Broad ) : ->D (D,Broad ) : ->C D : West [via B]
D : South [via E] E : South-West
(D,Broad ) : - E : South (E,Broad ) : ->A
(E,Broad ) : ->A
A B CC
A Routing table
A : Local
D : South
B : East Routing table
C : East [via B] D Routing table
A : North A : North [via B]
E: East [via B] B : North
B : North [via A]
C : North-Est
C : North [via A] D E D : West
D : Local
E : East E : Local
42
Receiver-driven solution
for each source, router maintains list of outgoing interfaces
broadcast packets are only forwarded on these interfaces
Computation of list of outgoing interfaces
Initially list of outgoing interfaces contains all interfaces
when a router receives a packet over a non-shortest path, it sends a
special message to the upstream router
the upstream router will then update its list of interfaces
Less CPU intensive than sender-based solution
43
Improving RPF
Receiver-based solution
Packet received by B on shortest path
Create state for router B:
(C,Broad) : ->A, ->E
Packet is retransmitted on all links in outgoing list
Src:C Dst:Broad
A B CC
Src:C Dst:Broad
D E
44
Improving RPF
Receiver-based solution (2)
Packet received by A on shortest path Packet received by B from non shortest path
Create state for router A Packet is discarded
(C,Broad) : ->D Send Prune message (C,Broad) to router E
Packet is transmitted on all other links
Src:C Dst:Broad
A B CC
D E
Src:C Dst:Broad
45
Improving RPF
Receiver-based solution (3)
Prune message indicates that
broadcast packets from C should not
be retransmitted towards E
New state for router :
(C,Broad) : ->A
A B CC
Src:C Dst:Broad
Prune(C) Prune(C)
Prune(C)
D E
46
Improving RPF
Receiver-based solution (4)
Final router states
State for router A : State for router B :
(C,Broad) : ->D (C,Broad) : ->A
A B CC
D E
47
Using RPF for Multicast
Principles
Multicast packets are initially transmitted by routers
as if they were broadcast packets
48
RPF for Multicast : Example
Packet received by B on shortest path
(C,G2) state is set to all router interfaces except incoming interface
New state for router B:
(C,G2) : ->A, ->E
Packet is retransmitted on all branches of source tree
Src:C Dst:G2
G2 A B CC
Src:C Dst:G2
G1
D E
G2
49
RPF for Multicast : Example (2)
Packet received by A on shortest path
(C,G2) is set to all interfaces except incoming interface
New state for router A:
(C,G2) : ->D, LAN
Packet is retransmitted on all branches Packet received by B on non shortest path
of source tree Packet is discarded
No update to state
Send Prune (C,G2) msg to E
Src:C Dst:G2
G2 A B CC
Src:C Dst:G2
G1
D E
G2
50
RPF for Multicast : Example (3)
G2 A B CC
Prune(C,G2)
Src:C Dst:G2 Prune(C,G2)
G1
D E
Prune(C,G2) G2
51
RPF for Multicast : Example (4)
Prune received from router B
New state for router A :
(C,G2) : ->LAN State for router B :
(C,G2) : -> A
G2 A B CC
Prune(C,G2)
G1
D E
G2
52
Example protocols
DVMRP
first multicast routing protocol deployed
special unicast distance vector routing protocol
sender-based optimization for RPF
special poison reverse message to inform upstream router
that it is the best path for a given source
timer associated with router state
periodic flood and prune
PIM-Dense Mode
periodic flood and prune
does not rely on a special unicast routing protocol
RPF is based on existing unicast routing table
receiver-based optimization for RPF
53
DVMRP is defined in :
A. Adams, J. Nicholas, W. Siadak, Protocol Independent Multicast - Dense Mode (PIM-DM): Protocol Specification (Revised), Internet draft,
draft-ietf-pim-dm-new-v2-01.txt, work in progress, Feb. 2002
Issues for network-level multicast
54
Multicast shared distribution tree
Sender2
Sender1
Receiver4
R1 R2
Receiver3
Receiver1
Tradeoff Shared tree
optimum distribution tree versus router state Receiver2
55
In this example, R3 is a special router acting as the root for the multicast shared distribution tree
Using unidirectional shared trees
Principles
One router is configured as Rendez-vous Point
56
Construction of the shared tree
A has a member of group G2
Initial state for router A :
(*,G2) : ->LAN, incoming:RP
RP
Join(*,G2)
G2 B CC
A
Join(*,G2)
D E
G2
E has a member of group G2
Initial state for router E :
(*,G2) : ->LAN, incoming:B
57
Construction of the shared tree (2)
D E
G2
58
Construction of the shared tree (3)
G2 B CC
A
D E
G2
59
Transmission of multicast packets
G2 B CC
A
Src:S Dst:G2
D E
G2
Sender : S
Multicast packet sent
State for router E : by Sender towards G2
(*,G2) : ->LAN, incoming:B
60
The Register packet used by router C is a kind of tunnel. Router C places the packet received from the sender inside an IP packet whose
source is C and whose destination is the RP.
Transmission of multicast packets (2)
G2 B CC
A
D E
G2
Sender : S
61
Construction of the source tree
G2 B CC
A
D E
G2
Sender : S
62
Construction of the source tree (2)
G2 B CC
A
D E
G2
Sender
63
Forwarding of multicast packets
G2 B CC
A
D E
G2
Sender
State for router E :
(*,G2) : ->LAN, incoming:B
CNPP/2008.7. © O. Bonaventure 2008
64
Forwarding of multicast packets (2)
G2 B CC
A RPPrune(S,G2)
D E
G2
Sender S
State for router E :
(*,G2) : ->LAN, incoming:B
CNPP/2008.7. © O. Bonaventure 2008
65
Switching to the source tree
When receiving Join(S,G2), B will
State for RP: add E to the (S,G2) source tree
(* except S,G2) : ->A, ->B New state for router B
(S,G2) : -, incoming : B (*,G2) : ->E, incoming:RP
(S,G2): ->RP, ->E, incoming : C
Asks to join source tree
State for router A :
RP
(*,G2) : ->LAN, incoming:RP
G2 B CC
A
Join(S,G2)
D E
G2
Sender S
Asks to join the source tree
State for router E :
(*,G2) : ->LAN, incoming:B
(S,G2) : ->LAN, incoming:B
66
Switching to the source tree (2)
RP
G2 B CC
A
State for router A :
(*,G2) : ->LAN, incoming:RP
RPLeave(*,G2)
D E
G2
Sender
When packets arrive on source tree, router E will ask
its upstream to stop sending (S,G2) on shared tree
State for router E :
(*,G2) : ->LAN, incoming:B
(S,G2) : ->LAN, incoming:B
CNPP/2008.7. © O. Bonaventure 2008
67
Switching to the source tree (3)
State for RP: State for router B :
(* except S, G2) ->A, ->B (* except S,G2) : ->E, incoming:RP
(S,G2) : ->A, incoming : B (S,G2): ->RP, ->E, incoming : C
RP
G2 B CC
A
D E
G2
State for router E : Sender
(*,G2) : ->LAN, incoming:B
(S,G2) : ->LAN, incoming:B
Examples
Multicast packet from Sender S towards G2
Multicast packets from sender attached to D towards G2
CNPP/2008.7. © O. Bonaventure 2008
68
PIM Sparse Mode
69
RFC2362 Protocol Independent Multicast-Sparse Mode (PIM-SM): Protocol Specification. D. Estrin, D. Farinacci, A. Helmy, D. Thaler, S.
Deering, M. Handley, V. Jacobson, C. Liu, P. Sharma, L. Wei. June 1998.
Issues for network-level multicast
70
Using bi-directional shared trees
Principles
One router is configured as core for each group
71
Multicast shared distribution tree
Sender2
Sender1
Receiver4
R1 R2
Receiver3
Receiver1
Tradeoff
optimum distribution tree versus router state Receiver2
72
Construction of the shared tree
A has a member of G2
Initial state for router A :
(G2) : ->LAN, incoming ?
CORE
Join(G2)
G2 B CC
A
Join(G2)
D E
G2
E has a member of G2
Initial state for router E :
(G2) : ->LAN, incoming ?
73
This example is based on the utilization of CBT. Other protocols may behave differently
Construction of the shared tree (2)
D E
G2
E has a member of G2
Initial state for router E :
(G2) : ->LAN, incoming:?
74
Construction of the shared tree (3)
G2 B CC
A
JoinACK(G2)
D E
G2
E has a member of G2
Initial state for router E :
(G2) : ->LAN, incoming:B
75
Transmission of multicast packets
Member transmission
State for core
(G2) : ->A, ->B
State for router A :
(G2) : ->LAN, incoming:Core State for router B :
CORE (G2) : ->E, incoming: Core
G2 B CC
A
S G2
S G2 S G2
Sender S
D E
G2
76
Transmission of multicast packets (2)
Non-member transmission
State for core
(G2) : ->A, ->B
State for router A : State for router B :
(G2) : ->LAN, incoming:Core (G2) : ->E, incoming: Core
CORE
S G2 S G2
G2 B CC
A
DCore S G2 S G2
D E
G2
77
CBT : Core Based Tree
78
CBT is defined in :
RFC2189 Core Based Trees (CBT version 2) Multicast Routing. A. Ballardie.
September 1997
Besides CBT, an extension to PIM that supports bidirectionnal shared trees is being developed, see :
Mark Handley, Isidor Kouvelas, Tony Speakman, Lorenzo Vicisano, Bi-directional Protocol Independent Multicast (BIDIR-PIM), Internet draft,
draft-ietf-pim-bidir-04.txt , work in progress
Multicast without trees
Alternative solution
Connectionless/explicit multicast for small groups
Principle
Modify the IP header to encode the IP addresses of all the
members of the group inside the IP header
Routers will forward and duplicate packets on this basis
routers do not need to maintain per-group state
routers must instead perform per-packet processing
solution could be useful in specific cases (e.g. ADSL)
79
See e.g. R. Boivie et al. Explicit Multicast (Xcast) Concepts and Options, RFC5058, Nov. 2007