The Internet Group Management Protocol (IGMP) is the protocol used by hosts to notify the local multicast router on the segment that they want to start receiving or stop receiving multicast traffic for a given multicast IPv4 group address.
Why do we need IGMP?
Imagine the following scenario. We have a multicast-enabled router R1. It has three directly connected networks as follows:
- Gi0/0 - 172.16.1.0/24 (Vlan 10)
- Gi0/1- 192.168.1.0/24 (Vlan 20)
- Gi0/2- 10.1.1.0/24 (Vlan 30)
R1 receives a multicast stream on group address 239.1.1.1 from a remote source. On which directly connected network segment must R1 replicate the multicast stream? Can we answer the question using the information given? No, we can't.
R1 cannot determine whether any host in each of the connected segments is interested in receiving the multicast stream 239.1.1.1. The only way to understand is to ask the hosts. That's what IGMP is for — a protocol allowing the local multicast router to ask connected hosts if they want to receive a specific multicast stream, as shown in Figure 2 below.
IGMP has evolved through three versions—IGMPv1, IGMPv2, and IGMPv3—each introducing enhancements to support more efficient multicast group management. Let's walk through each version, starting with version one.
IGMPv1
Official IGMP version 1 was introduced through RFC 1112 in August 1989. IGMPv1 offers a very basic query-response mechanism that allows the local multicast router to query the hosts within a segment and determine if there are active multicast receivers.
IGMPv1 uses only two types of messages, as shown in the diagram above:
- Membership Query: The local multicast router(s) on the segment sends periodic Membership Queries to destination 224.0.0.1 (all hosts local multicast) to determine if any local host wants to be a member of a specific multicast group.
- Query Interval: The default Membership query interval is 60 seconds. However, it can be configured to a custom value between 1 and 18000 seconds.
- Membership Report: If a local host wants to receive multicast traffic on a specific group, it responds to each Membership Query with a Membership Report.
The protocol is as simple as that. It just provides basic query-response functionality.
IGMPv1 Packet Format
The following diagram shows the IGMPv1 packet format. It is 64 bits long (8 bytes) with five fields.
The following screenshot shows an IGMPv2 Membership Query message sent by a multicast router into segment 192.168.1.0/24. Notice a few important aspects:
- The router sends the message to the all-hosts link-local multicast 224.0.0.1.
- The multicast IP address converts to the MAC 0100.5e00.0001.
- The "Type" field is set to 0x11, which means the packet is a membership Query.
- The IGMP packet's multicast group address is set to 0.0.0.0, which is why it is referred to as the "General Membership Report."
The following screenshot shows an IGMPv2 Membership Report message sent by a host with IP 192.168.1.10. Notice a few important aspects:
- The host responds to the multicast group it wants to join - 239.1.1.1.
- The multicast IP address converts to the MAC 0100.5e01.0101.
- The "Type" field is set to 0x12, which means the packet is a Membership Report.
- The multicast group address in the IGMP packet is set to 239.1.1.1. This is the group that the hosts want to join.
Notice that IGMP works directly on top of the IP layer. IGMP packets have an IP header and an IGMP header. Like ICMP, IGMP doesn't use a transport layer protocol like UDP/TCP.
IGMPv1 Inefficiencies
The main inefficiency of IGMP version 1 is that it does not have a mechanism for hosts to "leave" a group. When a host no longer wants to receive multicast, it simply stops responding to Membership Query messages from the router. The router on the segment waits for 3 x Query-interval, then expires the group and stops replicating multicast traffic into the segment. Since the default query interval is 60 seconds, it takes 180 seconds to stop sending multicast into a segment.
Key Takeaways
Purpose: IGMPv1 is a simple query-response protocol that allows routers to ask and learn which multicast groups have active members on their directly connected networks.
Message Types:
- Membership Query: Routers periodically send IGMPv1 Query messages to determine if there are active receivers on a multicast group on their network segments.
- Membership Reports: When a host wants to join a multicast group, it responds with an IGMPv1 Membership Report to the group's multicast address.
Inefficiencies:
- No Leave Group Message: IGMPv1 does not have a specific message for leaving a multicast group. Instead, if a host no longer wants to receive multicast traffic for a group, it simply stops responding to Query messages from the router.
- Basic Functionality: IGMPv1 provides basic multicast management and lacks the enhancements and optimizations introduced in later versions (IGMPv2 and IGMPv3).
Use Case: IGMPv1 is considered legacy and is no longer used. Cisco devices use IGMP version 2 by default now. However, if a very old device only supports IGMPv1, the protocol is compatible with versions 2 and 3.
Packet Structure: IGMPv1 messages are encapsulated within IP packets. Since the protocol is designed to operate within a network segment, it does not use a transport layer header.