How IGMP Interacts with UDP Multicast

The Internet Group Management Protocol (IGMP) and User Datagram Protocol (UDP) multicast work together to enable efficient one-to-many data streaming over IPv4 networks. While UDP delivers the actual payload without the overhead of connection management, IGMP operates as the control-plane signaling mechanism between local hosts and routers. This article explains how IGMP establishes and maintains the network paths required for UDP multicast traffic to reach interested receivers without overwhelming the local network.

The Distinct Roles of IGMP and UDP

Multicast networking separates control signaling from data delivery:

Step-by-Step Interaction Process

1. Joining a Multicast Group

When an application wants to receive a UDP multicast stream, it binds to a UDP port and requests to join a multicast group IP address via an operating system socket call. The host operating system’s networking stack then generates an IGMP Membership Report (Join message) and broadcasts it onto the local subnet.

2. Router Path Establishment

The local multicast-enabled router receives the IGMP Membership Report. It updates its multicast forwarding table, marking the receiving interface as active for that specific group. The router then uses upstream multicast routing protocols (such as Protocol Independent Multicast, or PIM) to pull the incoming UDP stream from the source toward that local subnet.

3. Delivering the UDP Stream

Once the multicast route is established, the router receives UDP packets addressed to the multicast group and forwards them onto the local subnet. The host’s network interface controller (NIC) accepts these packets and passes them up the stack to the UDP socket listening on the specified port.

4. Membership Maintenance

To ensure bandwidth is not wasted on inactive sessions, multicast routers periodically send IGMP Membership Queries to the subnet. Receiving hosts respond with an IGMP Membership Report to confirm they are still listening to the stream. As long as at least one host responds, the router continues forwarding the UDP packets.

5. Leaving a Multicast Group

When the host application closes the socket or unsubscribes from the feed: * In IGMPv2 and IGMPv3, the host sends an explicit IGMP Leave Group message to the router. * The router sends a Group-Specific Query to verify if any other hosts on the subnet require the stream. * If no other hosts respond, the router drops the multicast state for that interface and stops forwarding the UDP traffic.

Layer 2 Optimization: IGMP Snooping

On local Ethernet segments, switches normally treat multicast frames as broadcast traffic, flooding them to all switch ports. To prevent this, modern switches use IGMP Snooping.

By inspecting (snooping on) the IGMP Join and Leave messages passing between hosts and the router, the switch maps specific multicast MAC addresses to physical switch ports. Consequently, the incoming UDP multicast stream is delivered only to the specific physical switch ports containing subscribed receivers rather than every device on the LAN.