Internet Group Management Protocol, Version 3
obsoleted by
- rfc-9776 — Internet Group Management Protocol, Version 3
updated by
- rfc-4604 — Using Internet Group Management Protocol Version 3 (IGMPv3) and Multicast Listener Discovery Protocol Version 2 (MLDv2) for Source-Specific Multicast
updates
- rfc-2236 — Internet Group Management Protocol, Version 2
Extracted elements (31)
IGMPv3 reports are sent to 224.0.0.22 rather than to the individual group address (as in IGMPv2) so that IGMPv1/v2 hosts on the same network do not receive and potentially mishandle IGMPv3 reports. All IGMPv3-capable routers listen on 224.0.0.22, allowing a single well-known address to collect all version 3 reports.
Source filtering (INCLUDE/EXCLUDE mode) was added to IGMPv3 primarily to enable Source-Specific Multicast (SSM), where receivers specify both the group and the desired sources, allowing routing protocols to avoid delivering traffic from undesired sources to networks without interested receivers.
IGMPv3 hosts MUST operate in IGMPv1 and IGMPv2 compatibility modes when older-version queriers are present. An IGMPv1 router's Max Resp Code of 0 MUST be interpreted as 100 (10 seconds). When in IGMPv2 compatibility mode, a host uses only the IGMPv2 protocol on that interface.
IGMPv3 routers MUST implement versions 1 and 2 of IGMP and maintain a Group Compatibility Mode variable (IGMPv1/v2/v3) per group record, based on received Membership Report versions and the Older Version Host Present timer. When in IGMPv1 mode, routers MUST ignore Leave Group messages and send queries with Max Resp Code=0.
Query version is determined by packet length and Max Resp Code: IGMPv1 Query has length=8 octets and Max Resp Code=0; IGMPv2 Query has length=8 octets and Max Resp Code≠0; IGMPv3 Query has length≥12 octets. Queries not matching any condition MUST be silently ignored.
An implementation MAY impose a limit on source list size but that limit MUST NOT be less than 64 addresses per list. When an operation causes the source list size limit to be exceeded, the service interface MUST return an error.
Every IGMP message described in this document MUST be sent with an IP TTL of 1, IP Precedence of Internetwork Control (ToS 0xc0), and MUST carry an IP Router Alert option in its IP header.
General Queries are sent to 224.0.0.1; Group-Specific and Group-and-Source-Specific Queries are sent to the queried multicast address. A system MUST accept and process any Query whose IP Destination Address contains any address (unicast or multicast) assigned to the receiving interface.
IGMPv3 MUST NOT include auxiliary data in any transmitted Group Record (Aux Data Len MUST be set to zero) and MUST ignore auxiliary data present in any received Group Record. Auxiliary data semantics are reserved for future IGMP versions.
IGMPv3 uses the IGMPv2 querier election mechanism (lowest IP address wins). When a router receives a query with a lower IP source address, it ceases sending queries. If a router receives an older version query, it MUST use the lowest version of IGMP present on the network.
Implementations responding to a General Query are RECOMMENDED to spread Report transmissions over (0, Max Resp Time) rather than using a single interface timer. Implementations MUST NOT send a Report immediately on reception of a General Query to avoid ack-implosion.
Unrecognized IGMP message types MUST be silently ignored. An IGMPv3 implementation MUST also support message types 0x12 (IGMPv1 Membership Report), 0x16 (IGMPv2 Membership Report), and 0x17 (IGMPv2 Leave Group) for interoperation with previous IGMP versions.
Version 3 Reports MUST be sent with IP destination address 224.0.0.22, to which all IGMPv3-capable multicast routers listen. Routers MUST accept a report with a source address of 0.0.0.0, which may be used by systems not yet having an IP address.
When receiving IGMP packets, the 16-bit one's complement checksum of the entire IP payload MUST be verified before processing a packet. The Checksum field is set to zero when computing the checksum.
Group Record types are: MODE_IS_INCLUDE (1) and MODE_IS_EXCLUDE (2) for Current-State Records; CHANGE_TO_INCLUDE_MODE (3) and CHANGE_TO_EXCLUDE_MODE (4) for Filter-Mode-Change Records; ALLOW_NEW_SOURCES (5) and BLOCK_OLD_SOURCES (6) for Source-List-Change Records. Unrecognized Record Type values MUST be silently ignored.
IGMPv3 introduces IPMulticastListen(socket, interface, multicast-address, filter-mode, source-list) as the IP service interface for multicast reception. Filter-mode is INCLUDE (receive only from listed sources) or EXCLUDE (receive from all but listed sources). The old Join/Leave operations map to EXCLUDE/{} and INCLUDE/{} respectively.
Three query variants: General Query (Group Address=0, N=0) to learn all multicast reception state; Group-Specific Query (Group Address set, N=0) for a single group; Group-and-Source-Specific Query (Group Address set, N>0) to learn if any receiver desires packets from specific sources sent to a group.
IGMP message types are registered by IANA as described by RFC-3228. This document defines message type 0x22 (Version 3 Membership Report) and relies on existing registrations for 0x11 (Membership Query), 0x12 (Version 1 Report), 0x16 (Version 2 Report), and 0x17 (Version 2 Leave Group).
A malicious host can spoof the IP source address of IGMP reports to impersonate another host, potentially causing routers to make incorrect forwarding decisions. Routers cannot verify that the source address of a report belongs to the sending system, and no IGMP-layer defense exists for this attack.
IGMP messages are not authenticated. A malicious system on a network can forge IGMP reports to cause routers to start or stop delivering multicast traffic, enabling both traffic injection (forged IS_EX or ALLOW) and denial-of-service (forged TO_IN or BLOCK). IPsec authentication can protect IGMP messages on networks where this is supported.
Host Compatibility Mode (per interface) defaults to IGMPv3. It switches to IGMPv2 when an IGMPv2 General Query is received (IGMPv2 Querier Present timer starts), and to IGMPv1 when an IGMPv1 Query is received (IGMPv1 Querier Present timer starts). Timer expiry reverts compatibility mode upward. Mode changes cause immediate cancellation of all pending response and retransmission timers.
On interface state change, a host immediately transmits a State-Change Report with records determined by comparing old and new filter-mode/source-list: INCLUDE(A)→INCLUDE(B) sends ALLOW(B-A)+BLOCK(A-B); INCLUDE(A)→EXCLUDE(B) sends TO_EX(B); EXCLUDE(A)→INCLUDE(B) sends TO_IN(B). The report is retransmitted [Robustness Variable]-1 more times at random intervals within [Unsolicited Report Interval]. Subsequent state changes before retransmissions complete cause the pending report to be merged.
Per-interface multicast reception state is derived from per-socket state: if any socket for a (interface, multicast-address) pair is EXCLUDE, the interface record is EXCLUDE with source list = intersection of all EXCLUDE socket source lists minus any sources in INCLUDE sockets. If all sockets are INCLUDE, the interface record is INCLUDE with source list = union of all socket source lists.
Router per-group state is (multicast-address, group-timer, filter-mode, source-records). Each source record holds (source-address, source-timer). In INCLUDE mode, source records list desired sources; source timer expiry deletes the record. In EXCLUDE mode, the group timer tracks when to transition back to INCLUDE; source timer expiry stops the forwarding suggestion but does not delete the record.
Router transitions on receiving Current-State Records: INCLUDE(A)+IS_IN(B)→INCLUDE(A+B), set (B)=GMI; INCLUDE(A)+IS_EX(B)→EXCLUDE(A*B, B-A), set (B-A)=0, delete (A-B), Group Timer=GMI; EXCLUDE(X,Y)+IS_IN(A)→EXCLUDE(X+A, Y-A), set (A)=GMI; EXCLUDE(X,Y)+IS_EX(A)→EXCLUDE(A-Y, Y*A), set (A-X-Y)=GMI, delete (X-A) and (Y-A), Group Timer=GMI.
Router transitions on State-Change Records include query generation: INCLUDE(A)+TO_EX(B)→EXCLUDE(A*B, B-A) sends Q(G, A*B); EXCLUDE(X,Y)+TO_IN(A)→EXCLUDE(X+A, Y-A) sends Q(G, X-A) and Q(G). Queries must be sent [Last Member Query Count] times at [Last Member Query Interval], and pending queries for the same group must be merged with new ones.
When the group timer expires with router filter-mode EXCLUDE, the router transitions to INCLUDE using source records with running timers (timer > 0) as the new INCLUDE source list; source records with timer = 0 are deleted. For example, EXCLUDE(X,Y) with expired group timer becomes INCLUDE(X).
Max Resp Code encodes max response time in units of 1/10 second. Values < 128 are linear (Max Resp Time = Max Resp Code). Values >= 128 represent a floating-point value as 1|exp(3 bits)|mant(4 bits), where Max Resp Time = (mant | 0x10) << (exp + 3), enabling a range up to ~3174 seconds.
The Membership Query message (Type=0x11) encodes: 8-bit Type, 8-bit Max Resp Code, 16-bit Checksum, 32-bit Group Address, 4-bit Resv, 1-bit S flag (Suppress Router-Side Processing), 3-bit QRV (Querier's Robustness Variable), 8-bit QQIC (Querier's Query Interval Code), 16-bit Number of Sources (N), followed by N×32-bit Source Addresses.
The QQIC field encodes the Querier's Query Interval in seconds using the same encoding as Max Resp Code: linear for values < 128, and floating-point 1|exp(3 bits)|mant(4 bits) for values >= 128, where QQI = (mant | 0x10) << (exp + 3).
The Version 3 Membership Report (Type=0x22) contains: 8-bit Type, 8-bit Reserved, 16-bit Checksum, 16-bit Reserved, 16-bit Number of Group Records (M), followed by M Group Records. Each Group Record encodes: 8-bit Record Type, 8-bit Aux Data Len (in 32-bit words), 16-bit Number of Sources (N), 32-bit Multicast Address, N×32-bit Source Addresses, and optional Auxiliary Data.