Anybody who has studied computer networks will have learned about unicast, . While unicast routing, where packets are delivered from a single source to a single destination, is the most abundant, there are numerous content and service provider networks where multicast is the preferred method for data transfer. Examples include those used for streaming media, bulk data transfer, or shared data applications, like stock market live feeds. In this blog post, we discuss the basics of multicast routing.
Multicast is a method for transferring data from one source to a group of receivers simultaneously. While it is possible to send data from a source to multiple receivers using unicast, it requires creating copies of the data at the source and transmitting this duplicate content over the same link to different receivers.
With multicast, a single instance of the data is transmitted by a source into the network. The routers that receive this data forward it to the intended receivers. Copies of the data are made as close to the receivers as possible and only if it has to be forwarded over multiple outbound links to reach the receivers. Multicast thus helps minimize the computational resources needed to make copies of the data and the total volume of bandwidth that otherwise would have been used to carry multiple copies of the same content.
When a source has to send data to a number of receivers, the group of receivers is identified by the prefix 184.108.40.206/4 and includes the addresses from 220.127.116.11 to 18.104.22.168. These addresses, earlier known as Class D, are referred to as the multicast group addresses. A group of receivers associated with a multicast address is referred to as a multicast group.
The routers and interfaces traversed by multicast data to reach its receiver form a tree. The source that transmits the data is known as the root and the receivers are the leaves on the multicast tree.
IGMP is the protocol that allows a receiver to join specific multicast groups. When a receiver wants to join a multicast group, it sends an IGMP request message to its attached router. But how is a multicast tree set up and how is the multicast data forwarded along the links in a tree to its receiver over the Internet? This is achieved using PIM, a multicast routing algorithm. While there are other methods, such as DVMRP and MOSPF, we will cover the widely-used PIM in this blog.
PIM is a multicast routing algorithm that helps set up a multicast tree to connect all the receivers belonging to a multicast group. Once a tree is set up, multicast packets will be routed from the root or source, along the links in the tree to the leaves.
There are two types of multicast trees. One is a source-based tree (Source Distribution Tree) where separate, individual trees are set up for each sender. The other is a group-shared tree (Shared Distribution Tree), where a single tree is shared by all its members and data flows on the same tree regardless of the sender.
There are two methods by which PIM sets up a multicast tree and routes packets.
In PIM-Dense Mode (PIM-DM), the multicast group members are densely located. This means that most of the routers in an area are involved in routing the multicast data. In this method, the initial packet is broadcast across the network. After this, the routers having segments with no receivers prune their segments from the tree.
This is used in sparse networks. In this method of tree creation, routers send explicit join messages to a to join a tree. In PIM-SM mode, a Rendezvous Point (RP) is a center point in a multicast tree which is statically configured or dynamically elected. When a receiver wants to join a multicast group, the attached routers send a join message to this center point. The join message is forwarded until it reaches a router that is already a part of the multicast tree or until it reaches the RP.
PIM-SM can set up three types of trees. The first type is Any Source Multicast (ASM), where the source and receivers are not known. The second type is Source Specific Multicast (SSM), which is used when the multicast source is already known. The third type of tree, brought in to address scaling problems with ASM and SSM, uses bidirectional trees and is referred to as PIM-BIDIR. Here the trees are similar to shared trees and are not optimum for any source.
I hope that has given you some insights into the basics of multicast routing. You can find more information on Multicast Routing here: https://www.net.t-labs.tu-berlin.de/teaching/computer_networking/04.08.htm
Once you are ready with your multicast network, don’t forget to check out our blog on monitoring Multicast Networks.
The “Network Basics by Packet Design” blog series explains terminologies and technologies used by network operators and service providers, including routing, MPLS, Traffic Engineering, SDN, etc. Don’t forget to check out the other blogs in this series here.