Internet Group Management Protocol, Version 2
updated by
- rfc-3376 — Internet Group Management Protocol, Version 3
- rfc-9776 — Internet Group Management Protocol, Version 3
updates
- rfc-1112 — Host extensions for IP multicasting
Extracted elements (25)
IGMPv2 standardizes the querier election mechanism (lowest IP address wins) because IGMPv1 left it to multicast routing protocols, which used different mechanisms and could result in more than one querier per network. This required adding an administratively-configured IGMPv1 compatibility mode to IGMPv2 routers.
Leave Group messages are sent to the all-routers group (224.0.0.2) rather than the group being left because other group members have no need to know a host left. This is a design choice that optimizes for reducing unnecessary traffic to group members.
The Max Response Time field (unused in IGMPv1) was repurposed in IGMPv2 to allow routers to tune leave latency and control burstiness of IGMP traffic on a subnet by spreading host responses over a configurable interval.
When an IGMPv2 host operates with an IGMPv1 querier router, a Max Response Time of 0 in queries MUST be interpreted as 100 (10 seconds). A per-interface state variable MUST track whether the querier is IGMPv1 or IGMPv2 based on whether an IGMPv1 query was heard in the last [Version 1 Router Present Timeout] seconds.
An IGMPv2 implementation MUST ignore anything past the first 8 octets while processing a recognized packet type, to maintain forward compatibility with longer future messages. The checksum, however, is always computed over the whole IP payload.
If a multicast router hears a Query message from a router with a lower IP address, it MUST become a Non-Querier on that network. This querier election mechanism is standardized in IGMPv2 (unlike IGMPv1 which left it to routing protocols).
If a router receives a Version 1 Membership Report, it MUST set a timer (equal to [Group Membership Interval]) noting v1 hosts are present for that group. While v1 hosts are present for a group, a router MUST ignore any Leave Group messages for that group.
If any IGMPv1 routers are present, the querier MUST use IGMPv1 mode. This must be administratively configured; there is no reliable way to dynamically detect IGMPv1 routers. In the absence of explicit configuration, the default MUST be IGMPv2.
Non-Queriers MUST ignore Leave Group messages. Queriers SHOULD ignore Leave Group messages for which there are no group members on the reception interface.
On startup, a router SHOULD send [Startup Query Count] General Queries spaced closely together [Startup Query Interval] to quickly and reliably determine membership information. A General Query is addressed to 224.0.0.1 with Group Address field of 0.
When a host leaves a multicast group, if it was the last host to reply to a Query with a Membership Report for that group, it SHOULD send a Leave Group message to the all-routers multicast group (224.0.0.2). A host without sufficient storage to track this MAY always send a Leave Group message.
When transmitting packets, the 16-bit one's complement checksum MUST be computed and inserted into the Checksum field. When receiving packets, the checksum MUST be verified before processing. The checksum is always computed over the whole IP payload, even though IGMPv2 only processes the first 8 octets.
Group Membership Interval MUST be ((Robustness Variable) * (Query Interval)) + (one Query Response Interval). Other Querier Present Interval MUST be ((Robustness Variable) * (Query Interval)) + (one half of one Query Response Interval).
IGMPv2 defines four message types: 0x11 (Membership Query, with General and Group-Specific subtypes), 0x16 (Version 2 Membership Report), 0x17 (Leave Group), and 0x12 (Version 1 Membership Report for backwards compatibility). Unrecognized message types MUST be silently ignored.
Key timer defaults: Query Interval = 125 seconds, Query Response Interval = 100 (10 seconds), Last Member Query Interval = 10 (1 second), Unsolicited Report Interval = 10 seconds, Version 1 Router Present Timeout = 400 seconds. Non-default timer settings MUST be consistent among all routers on a single link.
Message destinations: General Query to ALL-SYSTEMS (224.0.0.1), Group-Specific Query to the group being queried, Membership Report to the group being reported, Leave Message to ALL-ROUTERS (224.0.0.2). Hosts MUST send Leave Messages to 224.0.0.2 to be compliant.
The Max Response Time field is meaningful only in Membership Query messages, specifying the maximum allowed time before sending a responding report in units of 1/10 second. In all other messages it is set to zero by the sender and ignored by receivers.
The Robustness Variable tunes for expected packet loss; IGMP is robust to (Robustness Variable - 1) packet losses. It MUST NOT be zero and SHOULD NOT be one. Default value is 2.
A forged Leave message causes the Querier to send Group-Specific Queries, creating extra processing load but not causing traffic loss. Defenses include source address validation and requiring Router Alert option presence while preventing routers from forwarding Leave messages.
A forged Query from a lower IP address will cause the forger to assume Querier duties; if the forger ignores Leave Messages, traffic may flow to groups with no members for up to [Group Membership Interval]. Defenses include source address validation and Router Alert option enforcement.
A forged Version 1 Report Message can place a router in 'version 1 members present' state, causing it to ignore Leave messages and forward traffic to groups with no members for up to [Group Membership Interval]. Defenses are source address validation or a configuration switch to ignore Version 1 messages entirely.
A host also maintains a per-interface IGMPv1 router presence state: 'No IGMPv1 Router Present' (initial) and 'IGMPv1 Router Present'. The IGMPv1 Router Present state is entered when a query with Max Response Time = 0 is received, and times out after [Version 1 Router Present Timeout] (400 seconds).
A host maintains three states per group per interface: Non-Member (initial), Delaying Member (member with running report delay timer), and Idle Member (member without running timer). Transitions are triggered by join group, leave group, query received, report received, and timer expired events.
A router maintains Querier/Non-Querier state per attached network, plus four group membership states: No Members Present, Members Present, Version 1 Members Present, and Checking Membership. Transitions are driven by v1/v2 report reception, leave reception, and various timer expirations.
All IGMPv2 messages share an 8-octet format: Type (1 octet), Max Response Time (1 octet), Checksum (2 octets), Group Address (4 octets). Messages are encapsulated in IP datagrams with protocol number 2, sent with TTL 1, and include the IP Router Alert option.