What is IGMP (Internet Group Management Protocol)?

published
August 23, 2024
TABLE OF CONTENTS
Build Your Dream Network Architecture
Sign up for a 2-week free trial and experience seamless remote access for easy setup and full control with Netmaker.

IGMP, or Internet Group Management Protocol, is a communication protocol used by devices in an IP network to establish multicast group memberships. In simpler terms, it helps devices join and leave groups for receiving multicast traffic. 

Think of IGMP as a subscription service where you choose what channels you want to receive. It operates primarily on local area networks (LANs) and works closely with routers to manage these memberships.

How IGMP works

Imagine you're in a large office, and there are several TV screens displaying different channels. You only want to watch the news and sports channels. 

IGMP is like the remote control, allowing your TV (or device) to tell the network, "Hey, I want to join the sports channel multicast group." The router listens to these requests and ensures that multicast traffic for the sports channel is sent to your device.

This protocol comes in handy for applications like video conferencing and streaming services, where multiple users need to receive the same data simultaneously. For instance, during a company-wide video conference, IGMP manages the data stream so that all connected participants receive the video feed without overwhelming the network.

In practice, when a new employee joins the video stream, their device sends an IGMP join message to the router. The router then updates its multicast forwarding table to include the new member. 

If the employee decides to leave the stream, their device sends an IGMP leave message, and the router stops sending multicast traffic to that device. This dynamic membership management helps keep the network efficient and responsive.

Understanding IGMP is crucial for network administrators in a corporate environment, as it enables efficient use of network resources and ensures that multicast applications run smoothly.

The evolution of IGMP

IGMPv1

IGMPv1 manages multicast group memberships using a query and response mechanism. Say you're in a company network where several routers and hosts participate in multicast communication. Each router running IGMP on the same subnet listens for IGMP membership report messages from hosts. 

However, only one router will act as the IGMP querier. This querier is elected through a process, making it responsible for sending IGMP query messages to the hosts.

In IGMPv1, the designated router (DR) elected by the multicast routing protocol, such as Protocol Independent Multicast (PIM), acts as the IGMP querier. So, if router B gets elected as the querier, it will handle the queries on that subnet.

Let’s look at an example. Imagine Host B and Host C are interested in receiving multicast data for the multicast group G1, and Host A is interested in the group G2. The process begins when these hosts send unsolicited IGMP reports to their desired multicast groups without waiting for any IGMP queries.

Periodically, the IGMP querier, in our case Router B, multicasts IGMP queries to all hosts and routers on the local subnet using the destination address 224.0.0.1. Hosts then respond to these queries. 

Host B, for instance, sends an IGMP report for the multicast group G1, while Host A sends a report for G2. When Host C sees that Host B has already sent a report for G1, it suppresses its own report to reduce traffic on the subnet. This is known as the host IGMP report suppression mechanism.

By this query and response process, Router A and Router B identify that the local subnet has members for groups G1 and G2. The routers then update their multicast forwarding tables with entries like (*, G1) and (*, G2), where an asterisk (*) represents any multicast source. These entries help in forwarding multicast data to the correct groups.

For example, when multicast data addressed to G1 or G2 reaches Router B, it checks its multicast forwarding table and routes the data to the local subnet. Hosts like B and C, part of G1, and Host A, part of G2, will then receive the multicast data.

IGMPv1 does not define a leave group message. When a host like Host A leaves a multicast group, it simply stops sending reports. If no other host on the subnet is a member of that group, the routers will eventually clear the membership information after not receiving any reports for a period of time. This ensures that the network resources are efficiently managed.

IGMPv2

Introduced in 1997, IGMPv2 brought some notable improvements over IGMPv1. One of the key features was the ability for a host to signal when it wanted to leave a multicast group. Before this, routers had no quick way of knowing if a host was done with a multicast group. This is essential for efficient network traffic management.

In IGMPv2, there are several message types you should be aware of. Membership Queries, Membership Reports, and Leave Group messages are the main ones. Membership Queries are sent by routers to find out which multicast addresses are of interest to hosts on the network. 

For instance, if a router wants to know who’s still interested in the video conference on a specific multicast address, it will send out a Membership Query.

Membership Reports are sent by hosts in response to these queries or when they first join a multicast group. For instance, if you open an app to watch that same live game; your device would send a Membership Report to indicate interest. This helps the router understand that you need those multicast packets.

Leave Group messages come into play when a host no longer wants to receive a multicast transmission. For example, if you decide to switch off the video conference, your device sends a Leave Group message to inform the router. This way, the router stops sending multicast traffic to your device, freeing up network resources.

Another crucial feature in IGMPv2 is the introduction of group-specific and group-and-source-specific queries. These allow routers to zero in on the exact multicast group or even specific source addresses. 

For instance, if the router needs to check whether anyone still wants to receive game updates from a particular streaming server, it sends a group-and-source-specific query.

IGMPv2 messages are wrapped in bare IP packets with IP protocol number 2. This is similar to ICMP messages. So, when a router sends a Membership Query, it’s essentially an IP packet with this protocol number, aimed at addresses like 224.0.0.1 for all hosts or a specific multicast address for group-specific queries.

The fields in an IGMPv2 packet include the Type, Max Response Time, Checksum, and Group Address. The Type field indicates the message type, like 0x11 for Membership Queries or 0x16 for Membership Reports. 

The Max Response Time sets how quickly hosts should reply to queries, in units of 0.1 seconds. The Group Address specifies which multicast group the query is for, which is zero for general queries.

IGMPv2 added a lot of functionality to make multicast networking more efficient and responsive. Whether you’re streaming a live event or playing an online game, these improvements help manage the network traffic smartly.

IGMPv3

IGMPv3 is an enhanced version of the Internet Group Management Protocol, improving upon IGMPv2 with significant features. One of the key advancements in IGMPv3 is its support for source-specific multicast (SSM). This means that a host can specify not only which multicast group it wants to join but also from which sources it wants to receive traffic. 

Imagine you're subscribed to a news channel but only want updates from specific news agencies. IGMPv3 lets you filter the sources, so you only get the content you care about.

Another major feature of IGMPv3 is membership report aggregation. In earlier versions, each host sent separate membership reports. However, in IGMPv3, these reports can be combined. 

So, if multiple hosts in the network want to join the same multicast group, their requests can be aggregated into a single report, reducing network congestion and improving efficiency.

IGMPv3 also introduces changes in the membership report messages. In IGMPv1 and IGMPv2, the membership reports were sent to the group's multicast address. In IGMPv3, these reports are sent to a specific multicast address: `224.0.0.22`. This change helps routers quickly identify membership messages related to source-specific multicast.

Furthermore, IGMPv3 continues to support general queries, group-specific queries, and introduces group-and-source-specific queries. For instance, if a router needs to know if any hosts want to receive traffic from a particular source within a multicast group, it sends a group-and-source-specific query. 

One more thing to note is the max response code. In earlier IGMP versions, this was called "max response time" and was a fixed value. IGMPv3 makes it more flexible with a code that can represent longer timescales, which is especially useful in large networks where you want to spread out responses to avoid bursts of traffic.

When discussing robustness and query intervals, IGMPv3 provides more flexibility. The "Querier's Robustness Variable" and "Querier's Query Interval Code" allow fine-tuning of how often routers send queries and how resilient the network is to packet loss.

IGMPv3 is backward compatible with IGMPv1 and IGMPv2. This means that a network running IGMPv3 can still handle older devices that use previous IGMP versions. This backward compatibility makes it easier to upgrade network infrastructure without needing to replace all the old devices immediately.

How multicast groups work

A network that wants to deliver a multicast service using IGMP would typically follow a straightforward architecture. If you've got a local network with different devices, including your computer and a router, IGMP acts as the middleman, ensuring that devices only receive the multicast transmissions they care about.

For example, if you're streaming a live event, IGMP ensures that only the devices interested in that stream get the data. It operates between your computer (the host) and your router. 

Routers and switches that support IGMP snooping can also observe these transactions to optimize network performance further. This way, only the relevant data gets through, cutting down on unnecessary traffic.

The protocol works at the network layer, which is Layer 3 of the OSI model. This is the same layer where other management protocols like ICMP reside. Both your device and the router have roles to play. When you want to join a multicast group, your device sends a membership request to the local router. 

The router, in turn, listens for these membership requests and periodically sends out queries to manage active subscriptions. Within each subnet, routers decide among themselves who will handle these queries.

There are some security concerns with IGMP. It's not bulletproof and can be susceptible to various attacks. For instance, someone could spoof IGMP messages to disrupt network services. Because of this, many firewalls offer the option to disable IGMP if it's not needed.

How membership queries optimize network resources

Membership queries are essential for managing multicast groups in a network. When a router needs to determine which devices want to join a multicast group, it sends out what we call a "membership query" message. Think of it as a roll call for devices that want to receive specific multicast traffic.

There are actually two types of membership queries: general and group-specific. A general membership query is like the router shouting, "Who wants to receive any multicast traffic?" So, this query helps the router understand if there are any devices interested in joining any multicast groups at all. 

On the other hand, a group-specific membership query is more targeted. It's like the router saying, "Okay, who wants to join this particular multicast group?" This query is used when the router wants to check if there are still any members in a specified group.

When devices, or hosts, receive these queries, they need to respond. If your device wants to join the multicast group for that sports event, it will send a membership report back to the router. This membership report is like raising your hand and saying, "Yes, I want to join this group!"

Now, not all devices need to respond to every query. If another device already responds saying it wants to join the same group, your device can keep quiet. This helps reduce network traffic and avoids duplicate membership reports.

There’s also a scenario where your device might want to leave a multicast group. Maybe the video stream ended, and you no longer need the live feed. So, your device will send a "leave group" message. This message tells the router that it can stop sending multicast traffic for that group to your device.

The router then propagates this information throughout the network, ensuring that multicast traffic is only sent to devices that still want it. This efficient management keeps network resources optimized and avoids unnecessary data transmission.

What is the purpose of membership reports?

When a host, like your computer, wants to join a multicast group, it sends out an IGMP membership report. This report tells the network to include your device in that specific multicast group.

Now, there's a built-in safety net. When your device joins a new group, it doesn't send just one report—it usually sends a couple. This redundancy is to account for any possible packet loss during transmission.

A point to note here is that membership reports don't just happen when you start a new stream. They're also sent in response to IGMP membership queries from a multicast router. In this instance, a membership query is like a roll call. The router asks, "Who still wants to receive this content?" Your device responds with a membership report if it still wants the content.

It's fascinating because your device listens to specific signals to decide when to send these reports. It checks the Maximum Response Time field in a query. If this field isn't blank, the sender is likely an IGMPv2 multicast router. So, this feature helps your device determine that it’s talking to a modern router, ensuring compatibility.

There's a bit of efficiency magic, too. If another device in your group already responds to a membership query, your device stays quiet to reduce network chatter. This selective reporting keeps things orderly, ensuring the network runs smoothly.

These membership reports also help when you decide to leave a multicast group. Your device sends a leave group message to the router, which then informs the network to stop sending that multicast traffic to your device. This way, you don’t get bombarded with unnecessary data after you’re done with a stream.

IGMP use cases

Video conferencing

IGMP plays a critical role in optimizing video conferencing, which has become an essential tool in corporate communications. You might not think about it much, but IGMP is what helps manage your video streams so they don't clog up the network.

Imagine a meeting with multiple people joining via video. Without IGMP, every video stream would get sent to everyone on the network, even if they're not in the meeting. This can seriously slow down your network, making everything feel sluggish. IGMP allows devices to join and leave multicast groups efficiently, ensuring only those who need the video stream get it.

For example, let's say you're in a video conference with four colleagues. IGMP will ensure that the data packets for that video feed only go to the participants in that specific meeting. This means that other employees, who are working on different tasks, won't have their network bandwidth eaten up by your video call.

You can use IGMP snooping on your network switches to make this even more efficient. With IGMP snooping, the switch listens to IGMP conversations between your computers and routers. It then determines which devices really need the video streams and directs the traffic accordingly. This optimizes network performance, even during peak hours.

IP telephony

One of the biggest challenges with using IP telephony company networks is the difficulty in managing multicast traffic. IGMP helps with this. It allows your network devices to efficiently manage and control bandwidth, ensuring that multicast data like VoIP packets reach only the intended receivers.

Let’s illustrate this with an example. When someone in your company picks up a VoIP phone to make a call, the phone sends a join request to the multicast group for that specific call. The network, using IGMP, ensures that only the devices that need to participate in the call receive those packets. 

This minimizes unnecessary traffic and allows for a smoother call experience. Without IGMP, every device on the network could end up receiving the multicast traffic, wasting bandwidth and potentially causing network congestion.

Another situation where IGMP shines is during company-wide meetings held over IP phones. If everyone’s using the VoIP service, the network could be flooded with multicast packets. 

However, with IGMP, the switch can control who receives the multicast streams. It checks which devices need the multicast traffic and sends it only to them. This way, you can have hundreds of employees attending a call without any drop in quality or performance.

In IP telephony, every millisecond counts. Having IGMP ensures that your voice packets are prioritized and routed efficiently, making sure conversations are crystal clear. It’s like having a traffic cop that directs data packets to where they need to go, without causing a traffic jam.

Data distribution

IGMP allows you to send data to multiple recipients without clogging up the network with unnecessary copies. Say you have a webcast that everyone in the marketing department needs to see. 

Instead of sending individual streams to each person, IGMP helps you create a multicast group where one stream can be shared by all. This way, the network bandwidth is used more efficiently, and everyone gets the information at the same time.

But what happens when someone wants to leave the group? That’s simple. They send an IGMP leave message, and the router stops forwarding the stream to that device. If no devices are left in the group, the router will prune the data stream, conserving bandwidth.

Using IGMP, you can ensure that your company's network is efficient and responsive, especially when dealing with large-scale data distribution. It's a powerful tool that keeps everyone connected without overwhelming your network infrastructure.

Build Your Dream Network Architecture
Sign up for a 2-week free trial and experience seamless remote access for easy setup and full control with Netmaker.
More posts

GET STARTED

A WireGuard® VPN that connects machines securely, wherever they are.
Star us on GitHub
Can we use Cookies?  (see  Privacy Policy).