Introduction
In the world of networking, sending information from one point to another seems simple. But what happens when you need to send the same information to many points simultaneously? Consider a live 4K sports broadcast streaming to thousands of viewers. How does the network handle this without collapsing under the strain? The two most basic methods of communication (Unicast and Broadcast) fall short.
Multicasting emerges as the elegant solution. The source sends just a single stream of data. The network infrastructure then becomes smart enough to duplicate that stream and only provide it to the particular devices which have requested it. This not only saves bandwidth but also reduces stress on the source, and is thus the key to modern and effective content delivery. Multicast is an integral part of PyNet Labs’ CCNA training. Do check it out.
In this blog, we will cover how multicasting works and how the data is processed in multicast communication, its advantages, multicast forwarding, and everything you need to know about it.
What is Multicasting in Computer Networks?
The term “multicast” refers to a method of sending a single message to a large group of people and a tool to make the most of available network bandwidth while conserving system resources. Also, we can say that Multicast communication is a type of technique that transfers packets from one source to many receivers simultaneously.
We also use many applications in our daily life, like Audio/Video Conferencing, Online Gaming, IPTV, etc. The best part is that all these applications work on multicasting.
Multicasting in computer networks is regarded as a special kind of broadcasting. Similar to broadcasting in operation, multicasting sends information to selected or targeted network participants. This task can be completed by sending separate copies to each user or network node, but doing so is wasteful and could result in an increase in network latency. Multicasting, which allows a single transmission to be split up among numerous users to address these drawbacks, therefore limits the signal’s capacity.
Two types of multicasting in computer networks are:
- Ethernet Multicast: Ethernet multicast signifies the process of multicasting at the data link layer in Ethernet networks. Ethernet Frames are sent to a group of destination devices that shares a common multicast address. By setting the least significant bit of the first byte of the destination address to 1 these frames are identified, differentiating them from unicast and broadcast frames.
- IP Multicast: IP multicast is a communication method that allows one-to-many communication over an IP network. The sender sends a single packet that is replicated by routers in the network to reach multiple receivers, instead of sending multiple individual unicast packets to each recipient. It helps in reducing Network traffic and conserves bandwidth. Again, by sending join and leave messages to the network routers the destination nodes indicate their interest in receiving multicast messages. This way, the sender only needs to transmit the data packet once, and the routers take care of replicating and delivering it to the intended recipients.
Multicast Communication basic terminologies
There are a few important terms in Multicast communication, and these are very basic terminologies that are known by different names in normal.
- In multicast communication, the sequence of data packets is called a stream.
- Multicast destination IP address is considered a group address.
- Recipient devices of a multicast stream are generally referred to as receivers.
Communication and Its Types
In computer networks, “casting” refers to the process of sending information from one or more clients to one or more recipients across a shared communication medium called a network. Computer networks use three distinct forms of casting:
- UNICAST
- BROADCAST
- MULTICAST
If you send the traffic from one source to one destination, it is unicast traffic. Whereas if we are sending from one source to all, it is considered as broadcast.
And about multicast, we all know that it’s used to send data from one source to a group of receivers.
Almost all of the data exchanged in an IP network is of the directed unicast type. By definition, only the two hosts involved in the initial request may interact with one another through the path set up by the unicast.
How Multicasting Works?
Any host within a small home or office network has the ability to send and receive multicast datagrams.
A multicast datagram can be received by any host on the network that has been set up to receive messages on the corresponding multicast address. Also, a host has the capability to send and receive on multiple multicast addresses.
Note: UDP is used by multicast and are sent through switches and hubs.
The host must be configured to receive on that multicast address to receive a multicast message.
Understanding the Language of Multicast IP Addressing
To participate in a multicast conversation, devices need a common “channel” to tune into. This is achieved through a special range of IP addresses.
- Class D Addresses: Multicasting Communication occurs in the reserved IPv4 Class D address range, as 224.0.0.0 to 239.255.255.255. When a device wishes to receive a specific stream (such as an IPTV channel), it “joins” a multicast group that is represented by one of these addresses.
- Reserved Ranges: It should be noted that not every Class D address is accessible in general. Some of the ranges are dedicated to particular network protocols. As an example, updates of routing protocols, such as OSPF, are sent using the 224.0.0.5 and 224.0.0.6. The other important range is 232.0.0.0/8, which is used in Source-Specific Multicast (SSM), which is a more enhanced type of multicast.
Multicast Groups
When a host is configured to receive datagrams sent to a multicast, it is added to the multicast group for that address. One to an unlimited number of hosts comes under a group. The list of individual group members is neither maintained by the host nor by routers.
A host can belong to several multicast groups and send multicast messages to various multicast addresses. A host can send datagrams to a multicast group address even though there are no members present in that group, and a host doesn’t need to be a member of a group to send multicast datagrams to that group.
Note: Multicast packets are routed through switches.
Multicasting on Internet
- A router will check to see if any hosts on a locally connected network are set up to accept multicast datagrams by using IGMP (Internet Group Management Protocol).
- On the local subnet on a regular basis router will listen to IGMP messages and send queries. By using the multicast group address 224.0.0.1 (reserved for all hosts).
- Multicast routers do not keep a record of which hosts are members of a group but only need to know if any hosts on that subnet are part of a group.
- If a router gets a multicast datagram from another network and does not have any members for that group address on any of its subnets, the packet is dropped.
Why is Multicasting Important?
Multicasting is important in modern networking as it optimizes bandwidth usage. Multicast enables sending a single data stream to all interested parties instead of sending multiple copies of the same data to different users (like unicasting).
It not only minimizes network congestion but also enhances network performance in applications like Video Streaming and online gaming.
NOTE: Another way of providing one-to-many packet delivery is Replicated Unicast.
Let’s see a quick comparison between the two.
Multicast Vs. Replicated Unicast
Below, we have discussed the basic difference between multicast and replicated unicast based on different factors.
Factors | Multicast | Replicated Unicast |
Mechanism | The sender transmits a single packet to a multicast group. The network duplicates it where needed | The sender transmits a separate, identical packet to every single receiver. |
Bandwidth Efficiency | High. Consumes bandwidth as if sending to only one receiver, regardless of the group size. | Low. Bandwidth use multiplies with each new receiver. |
Sender Overhead | Low. The sender processes and sends only one data stream. | High. The sender’s CPU and network card work harder for each additional receiver. |
Scalability | Excellent. Scales to thousands or millions of receivers with ease. | Poor. Performance degrades quickly as the number of receivers grows. |
Network Support | Required. Routers and switches must be configured to support multicast protocols (like PIM and IGMP). | None required. It works on any standard IP network. |
Use Cases | Live video streaming (IPTV), online gaming, stock market data feeds | Small-scale messages or video calls with a very small number of recipients. |
Multicasting Protocols
In this section, we will discuss various multicasting protocols. Two major protocols are deployed alongside each other to achieve the optimal performance of the multicast traffic: IGMP, which takes care of the group membership, and PIM, which transports the multicast traffic on the network.
1. IGMP
A receiver leaves a signal to the network to indicate that it wishes to receive a multicast stream by using the Internet Group Management Protocol (IGMP). It’s not limited to only LANs but also WANs.
IGMP Versions
There are 3 versions available –
a. IGMP v1 – old version not used today.
b. IGMP v2 – common in most multicast networks.
c. IGMP v3 – used by source-specific multicast.
- Function: IGMP is a protocol that runs between a host (a PC or a smart TV) and its local router. When a user chooses the play button on a live stream, the device transmits an IGMP Membership Report message to its router, which basically sends out a message that says, please forward me the traffic of group 239.1.1.1.
- IGMP Snooping: It has been one of the most important concepts of network efficiency. In its absence, a switch would regard the multicast traffic as broadcast and would flood it everywhere. IGMP Snooping is a Layer 2 functionality in which the switch listens to the IGMP messages between the host and the routers. Using these messages, the switch creates a table of port mappings as to which multicast streams, they require. This enables intelligent switching of multicast traffic to only the ports having interested receivers. This avoids network flooding and is quite essential in any multicast implementation.
PIM: The Intelligent Traffic Router
Protocol Independent Multicast (PIM) is the routing protocol that builds the delivery paths, or “trees,” for multicast traffic.
- Reverse Path Forwarding (RPF): This is PIM’s built-in loop prevention mechanism. A router will only accept a multicast packet from a source if it arrives on the same interface the router would use to send traffic back to that source. If the packet arrives on an unexpected interface, it fails the RPF check and is discarded, preventing routing loops.
- “Protocol Independent”: PIM does not have a routing table of its own. Rather, it uses what the unicast routing table has already made (by protocols such as OSPF or BGP) in making its forwarding decisions. This allows it to be adaptable and fit into the current networks.
- PIM Sparse Mode (PIM-SM): This is the modern, de facto standard for multicast routing. It operates on an “explicit join” model, meaning traffic is only sent where it’s explicitly requested. Two components are essential to PIM-SM:
- The Rendezvous Point (RP): This is a designated router that acts as a central “meeting point” for a multicast group. New sources register with the RP, and receivers send their join requests to the RP to discover sources.
- Distribution Trees: PIM-SM uses two types of delivery paths. The process is as follows:
- Shared Tree (RPT): Initially, a path is built from the receiver to the Rendezvous Point. This is the (*,G) or “any-source” tree.
- Shortest Path Tree (SPT): Once the receiver’s router learns the actual IP address of the source from the RP, it can switch to a more direct, optimized path straight from the source. This is the (S,G) or “source-specific” tree, which ensures the lowest latency.
PIM Operating Modes:
- PIM Dense Mode (PIM-DM)
- PIM Sparse Mode (PIM-SM)
- PIM Sparse Dense Mode
- PIM Source-Specific Multicast (PIM-SSM)
- PIM Bidirectional Mode (Bidir-PIM)
Layer 3 Multicast MAC
Source IPs in multicast packets always remain in the form of unicast as we know that there is a one-to-one correlation between IP and MAC at a data-link layer where we have two sub-layers of Data-Link, which are MAC & LLC.
But when it comes to destination IP, a specific MAC is reserved for multicast destination IP. The motive is to have the sender and receiver agree on a single, suitable destination MAC.
So, a new special reserved MAC is created to send multicast packets in the IP networks so that multicast traffic replication doesn’t have packet manipulation and the burden on routing resources could be avoided.
The IP address of a multicast group is translated to a unique MAC address, which is used by interfaces to determine which multicast packets belong to which reserved groups. Depending on the MAC address associated with the multicast traffic, a LAN segment can support multiple streams, and the receiver can choose which stream to forward to the CPU for processing. So, that’s how the mapping is done here with the help of this reserved MAC add which is attached to multicast IPs.
NOTE: Multicast Reserve MAC Address always starts with 01:00:5E
Reserved Multicast Addresses
Mapping L3 TO L2
To provide this, a simple mapping procedure is used to generate a well-known multicast MAC address which is the special MAC Address (01:00:5E)
- The first 24 bits of a multicast MAC address always start with 01:00:5E.
- The 25th bit is always 0.
- A multicast MAC address is created by duplicating the lower 23 bits of a multicast group IP address.
To illustrate this point, let’s presume that we have the multicast address 224.0.0.5. After Mapping, the first 24-bit standard part will be – 01:00:5E (Reserve MAC). Also, the 25th Bit is always set to – 0.
01:00:5E – 0000|0001: 0000|0000: 0101|1110
(This is the conversion of special MAC)
Now we have this multicast address – 224.0.0.5 so, we’ll convert the remaining 24 bits of this IP.
224.0.0.5 – 11100000.00000000.00000000.00000101
(This is the conversion Multicast IP) so, now we’ll use the remaining 24 bits
224.0.0.5 – 11100000.00000000.00000000.00000101
So, the last 24 bits will be – 00000000.00000000.00000101
The bold and italic mark is the special 25th bit which is always 0
Now, the resulting destination MAC will be – 01:00:5E:00:00:05
Let’s move on and understand Multicast forwarding.
Multicast Forwarding
A collection of hosts is often clustered under a multicast IP address in multicast forwarding. Data may then be sent from the source to the IP address, which subsequently sends data to the many hosts allocated to the multicast IP. This is a data transfer from one location to multiple locations.
- In unicast forwarding, the packets are always guided toward the destination.
- In multicast forwarding, the packets are always guided away from a source.
There are two major interface types per multicast source –
- Upstream interface – closest to the source
- Downstream interfaces – are considered receivers
So, we call this entire concept reverse path forwarding (RPF).
Real-World Use Cases of Multicasting
The theory comes to life when we see where multicast is used every day.
- IPTV & Live Video Streaming: This is the classic use case. Multicast is used by the service providers to transport the live TV channels across the IP networks. Millions of homes can easily receive a stream of high definition, and this would not be possible in unicast.
- Data Center Operations: Multicast is applied in the recent data centers to execute processes such as simultaneous deployment of an operating system image to hundreds of servers or software patch distribution. It is also extremely important in financial services, where it is used to transfer stock market data to trading servers, where every millisecond is vital.
- Corporate Communications & Education: Corporates also use multicasting to broadcast a meeting of the CEO or a live training session to thousands of employees all over the world without overwhelming their internal network.
Advantages of Multicasting
The success of certain cutting-edge applications is greatly aided by the benefits offered by multicast technology. Several of these advantages of Multicasting are discussed below.
- Better bandwidth utilization.
- Better resource utilization at the source.
- Better resource utilization at the receivers.
- The one-to-many communication provided by multicast traffic is achieved by sending just a single data packet over a connection and then replicating it across other links at the request of recipients.
Challenges associated with Multicasting
Despite these advantages, there are some challenges:
- Configuring multicast on large networks can be a challenging task.
- Some older networking devices or software may not fully support multicasting.
Best Practices & Troubleshooting Tips for Multicast Network
For network engineers, designing and maintaining a multicast network requires care.
Best Practices:
- Use PIM-SM: PIM-Sparse Mode is the standard used to perform new deployments in the industry. PIM Dense Mode is legacy and inefficient due to its initial flood-and-prune characteristics in most applications.
- Select Appropriate Addresses: Use a non-conflicting segment of the multicast address range as the addresses range within the administratively scoped block (e.g. 239.0.0.0/8) to prevent clashing with public applications.
- Plan Your RP: Rendezvous Point may be a single point of failure. To achieve a high availability, implement redundant RPs with protocols such as Anycast RP or BSR (Bootstrap Router).
Troubleshooting Checklist:
When multicast isn’t working, check the following:
- Receiver: Is the host actually sending an IGMP join message?
- Layer 2: Is IGMP snooping configured correctly on the switches? Are they learning the right multicast groups on the right ports?
- Layer 3: Is PIM enabled on all router interfaces in the path?
- RPF Failures: Are packets being dropped due to RPF check failures? This often points to a mismatch between the unicast and multicast routing paths. For a deep dive into commands, vendor documentation, like Cisco’s Multicast Troubleshooting Guide (cisco.com), is an invaluable resource.
Frequently Asked Questions
Q1. What is multicast communication with an example?
Multicast communication is a network communication method where a single sender can transmit data to multiple recipients simultaneously. For example, in video conferencing, a sender can multicast video and audio streams to multiple participants, allowing real-time communication and collaboration.
Q2. What is the purpose of multicast?
The purpose of multicast is to enable efficient and scalable one-to-many or many-to-many communication over a network. Multicast is commonly used for applications such as multimedia streaming, software distribution, real-time collaboration, and content delivery networks.
Q3. Is multicast TCP or UDP?
Multicast can be used with both TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). However, UDP is more commonly used for multicast due to its connectionless nature and lower overhead.
Q4. What are two applications of multicasting?
Two applications of multicasting include video streaming and software updates. Multicasting enables efficient delivery of live video streams to multiple viewers simultaneously, reducing network bandwidth usage. Similarly, for software updates, multicasting allows for simultaneous distribution to numerous devices, reducing network congestion and ensuring timely updates for all recipients.
Conclusion
Multicast is more than just a networking term; it is a fundamental technology that enables efficient, scalable, and real-time communication in our increasingly connected world. From the live sports we watch to the financial markets that power our economy, multicast works silently in the background. In this blog, we have discussed everything related to Multicast Communication and Multicasting.
To conclude this article, we can say that communication methods represent vast opportunities for developing networked systems. With the proper software engineering and correct practical use of addressing methods, systems can communicate in the network with improved efficiency, reliability, and security.
If you are still with us, it would be great if you share your honest feedback about this article. If you like this article, subscribe to our free newsletter.