Multicast¶
Multicast overview¶
Multicast routing enables a one to many communication methodology, by sending traffic to a designated group address. The multicast traffic is emitted from a source device, and is propagated until the end subscribers.
For IPv4 traffic, the multicast addresses range is from the 224.0.0.0
through the 239.255.255.255
IP addresses.
Multicast is generally used for streaming multimedia traffic (TV channels, videoconferencing, ..). Using multicast traffic reduces the consumed bandwidth as the source only needs to send a packet at once. On a given network segment, where multiple subscribers are present, only one copy of the multicast packet is sent.
multicast propagation across a network topology¶
By default, switches and routers do not forward multicast packets. The network
protocols IGMP and PIM enable the propagation of IPv4 multicast traffic
along specific OSI layer 2 paths and across designated routers, respectively.
However, packets addressed to the 224.0.0.0/24
range, known as the local
multicast range, are broadcast to all hosts on the layer 2 network segment
without any restrictions. Within this range, IGMP is not necessary for
managing multicast traffic, and PIM does not function.
It is important to note that most cloud providers, including AWS, do not allow the propagation of multicast traffic across their network infrastructure, even if protocols like IGMP and PIM are configured.
Internet Group Management Protocol (IGMP)¶
IGMP allows hosts to express the wish to receive multicast traffic on specific
multicast groups. IGMP operates on a given LAN segment, and helps maintaining
a multicast registration between a host and a router called a querier
. The
following messages are handled :
The querier that forwards multicast traffic is in charge of maintaining the queries on each network segment, by regularly sending
membership report
messages that indicates the multicast group addresses the querier is handling.Hosts send
membership queries
to routers acting asqueriers
. The query can be an IGMPjoin
orleave
message and indicates which multicast group the host want to respectively register, unregister to.Hosts will maintain the multicast group registration by periodically sending membership queries with the querier.
LAN switches with IGMP-snooping enabled listen to IGMP packets and enable the forwarding of multicast traffic only to the ports that lead to interested hosts.
IGMP packets target special multicast addresses: 224.0.0.1
for all systems
and 224.0.0.2
for all routers on a local network segment.
The IGMP protocol version 2 and 3 are supported. IGMP version 3 includes the source IP address of a multicast group address, thus permitting any host to get a flow from a dedicated source.
Another multicast routing protocol is used to convey multicast traffic from its source to the querier: PIM.
Protocol-Independent Multicast (PIM)¶
Protocol-Independent Multicast (PIM) is a multicast routing protocol for routing multicast groups efficiently. PIM creates adjacencies with its neighbors, and exchanges PIM messages. When used with IGMP, the IGMP information is translated into PIM messages to notify upstream routers the wish to receive a multicast flow or not.
PIM supports sparse mode (PIM-SM), which is the most commonly used on internet
networks today: routers must explicitly declare the group they want to receive
traffic from, by sending join
or prune
messages. The upstream routers will then
be able to forward multicast traffic accordingly.
In this mode, some roles are assigned to routers:
The device that first wants to register to a given multicast group is called the
receiver
. It will send join messages to its neighbors.Somewhere in the network, a device acts as the meeting place between sources and receivers of multicast data. This device is called the Rendezvous Point (RP) and is necessary to start new multicast flow sessions with sources and receivers. An RP tree or shared path tree is built thanks to the
join
messages sent by the other routers requesting for a given multicast group. The router at the root of the shared tree is the RP itself, which means that upstream multicast traffic is received by the RP and follows the shared tree path, until it reaches the various receivers.Between the RP and the
receiver
, a designated router (dr
) is in charge of forwarding a PIM message to the RP. The designated router helps to avoid having duplicatejoin
messages coming from several devices sharing the same access network. This results in avoiding duplicating multicast traffic.
PIM also supports PIM source specific Multicast (PIM-SSM), and builds directly a source based distribution tree, up to the source of the multicast flow. In that case, the RP is not needed.