Multicast Listener Discovery Version 2 (MLDv2) for IPv6
obsoletes
- rfc-3810 — Multicast Listener Discovery Version 2 (MLDv2) for IPv6
updates
- rfc-2710 — Multicast Listener Discovery (MLD) for IPv6
also
- std-101
Extracted elements (30)
MLDv1 host report suppression (where a listener cancels its pending report upon hearing another listener's report for the same address) was removed in MLDv2. Suppression was incompatible with source-specific reporting, since different hosts may listen to different sources for the same multicast address, making any single report insufficient to represent all listeners' state.
MLDv2 distinguishes Current-State Reports from State-Change Reports so that routers only send Multicast Address (and Source) Specific Queries in response to state changes, not periodic refreshes. Without this distinction, the fast-leave mechanism would be ineffective if a State-Change Report is lost and only the subsequent Current-State Report is received.
MLDv2 is designed to interoperate with MLDv1. Nodes maintain a per-interface Host Compatibility Mode variable. In the presence of MLDv1 routers, MLDv2 listeners fall back to sending MLDv1 Reports; in the presence of MLDv1 listeners, MLDv2 routers must still provide multicast service. Query version is determined by message length and content.
All MLDv2 messages MUST be sent with a link-local IPv6 Source Address, an IPv6 Hop Limit of 1, and an IPv6 Router Alert option in a Hop-by-Hop Options header. MLDv2 messages are ICMPv6 (Next Header = 58).
All MLDv2 Queries MUST be sent with a valid IPv6 link-local source address. A node that receives a Query with the unspecified address (::) or any non-link-local source address MUST silently discard it and SHOULD log a warning.
An implementation MUST NOT use an EXCLUDE interface record for a multicast address if all sockets for that address are in INCLUDE state. If system resource limits are reached when computing per-interface source-lists, an error MUST be returned to the requesting application.
MLDv2 implementations MUST NOT include any auxiliary data (Aux Data Len MUST be set to zero) in transmitted Multicast Address Records, and MUST ignore any auxiliary data present in received records. Auxiliary data semantics are reserved for future MLD extensions.
Multicast listeners MUST send MLD messages for all multicast addresses except the link-scope all-nodes address (ff02::1) and any multicast address of scope less than 2 (reserved or node-local). Listening to ff02::1 is permanently enabled and never reported via MLD.
Once a valid link-local address is available on an interface that previously sent Reports using the unspecified source address, a node SHOULD generate new MLDv2 Report messages for all multicast addresses joined on that interface.
The ICMPv6 checksum MUST be verified before processing any received MLDv2 Query or Report message. The checksum covers the entire MLDv2 message plus the IPv6 pseudo-header.
The S flag (Suppress Router-Side Processing), when set to one, instructs receiving multicast routers to suppress normal timer updates upon receiving a Query. It does not suppress querier election or host-side Query processing.
Unrecognized MLDv2 message types MUST be silently ignored. Multicast Address Records with an unrecognized Record Type MUST also be silently ignored, while the rest of the Report continues to be processed.
Version 2 Multicast Listener Reports MUST be sent to the destination address ff02::16 (all MLDv2-capable multicast routers). Routers MUST silently discard a Report not sent with a valid link-local address, without taking action on packet contents; a Report with the unspecified address is also discarded.
When sending a Query, an MLDv2 implementation MUST NOT include additional octets beyond the defined fields. When receiving a Query or Report with extra octets indicated by the IPv6 Payload Length, implementations MUST include them in the checksum computation but MUST otherwise ignore them.
Per-interface multicast listening state is derived from per-socket state: if any socket record 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 INCLUDE socket sources. If all sockets are INCLUDE, the interface record is INCLUDE with source-list = union of all socket source-lists.
Six Multicast Address Record types are defined: MODE_IS_INCLUDE (1), MODE_IS_EXCLUDE (2) for Current-State Records; CHANGE_TO_INCLUDE_MODE (3), CHANGE_TO_EXCLUDE_MODE (4) for Filter-Mode-Change Records; ALLOW_NEW_SOURCES (5), BLOCK_OLD_SOURCES (6) for Source-List-Change Records.
The IPv6MulticastListen(socket, interface, multicast-address, filter-mode, source-list) service interface is required for full MLDv2 support. INCLUDE mode with empty source-list is equivalent to Stop Listening; EXCLUDE mode with empty source-list is equivalent to Start Listening (MLDv1 semantics).
The Querier election mechanism selects one multicast router per subnet to send periodic and triggered Query messages. All routers on the subnet maintain the same multicast listening state so any can assume the Querier role if the current Querier fails.
Three Query variants are defined: (1) General Query — Multicast Address and N both zero, sent to ff02::1 to discover all listeners; (2) Multicast Address Specific Query — N=0 with a specific multicast address; (3) Multicast Address and Source Specific Query — non-zero N with specific multicast address and source list.
IANA assigned ICMPv6 Type 143 for the Version 2 Multicast Listener Report message, and the IPv6 multicast address ff02::16 (all MLDv2-capable multicast routers) is used as the destination for MLDv2 Reports. These assignments are referenced in Section 11.
A malicious node can send bogus MLDv2 Query messages causing all listeners on a link to immediately transmit Reports, producing a report storm. Securing MLD using the Multicast Listener Discovery Security (SEND) mechanisms or similar link-layer security is recommended to mitigate this threat.
Bogus State-Change Report messages can cause multicast routers to maintain unnecessary multicast forwarding state, wasting memory and bandwidth. Current-State Report messages can be spoofed to prevent routers from timing out stale state. Link-layer security or SEND is needed to fully address these threats.
Routers MUST silently discard MLDv2 Reports not sent with a valid link-local source address, preventing unidentified nodes from influencing router multicast listening state. Reports from the unspecified address (::) are also discarded by routers, though nodes may use that address before acquiring a link-local address.
Multicast Address Listener state transitions: a per-interface state change triggers immediate transmission of a State-Change Report per Table 1 (INCLUDE→INCLUDE: ALLOW(B-A)+BLOCK(A-B); EXCLUDE→EXCLUDE: ALLOW(A-B)+BLOCK(B-A); INCLUDE→EXCLUDE: TO_EX(B); EXCLUDE→INCLUDE: TO_IN(B)). The report is retransmitted [Robustness Variable]-1 additional times.
Router filter mode for a multicast address transitions between INCLUDE(A) and EXCLUDE(X,Y). The router enters EXCLUDE when any listener reports EXCLUDE mode; the Filter Timer tracks this state. When the Filter Timer expires (no EXCLUDE mode listeners remain), the router transitions back to INCLUDE, moving the Requested List to the Include List and deleting the Exclude List.
Each Multicast Address Record within a Report contains: 8-bit Record Type, 8-bit Aux Data Len (in 32-bit words), 16-bit Number of Sources (N), 128-bit Multicast Address, N×128-bit Source Addresses, and variable-length Auxiliary Data.
The Maximum Response Code field encodes the Maximum Response Delay in milliseconds: values below 32768 are used directly; values ≥ 32768 use a floating-point encoding with a 1-bit marker, 3-bit exponent, and 12-bit mantissa, yielding Maximum Response Delay = (mant | 0x1000) << (exp+3).
The Multicast Listener Query message (ICMPv6 Type=130) carries: 8-bit Code (zeroed), 16-bit Checksum, 16-bit Maximum Response Code, 16-bit Reserved, 128-bit Multicast Address, 4-bit Flags, 1-bit S flag, 3-bit QRV, 8-bit QQIC, 16-bit Number of Sources (N), and N×128-bit Source Address fields.
The QQIC field encodes the Querier's Query Interval in seconds: values below 128 are used directly; values ≥ 128 use a floating-point encoding with a 1-bit marker, 3-bit exponent, and 4-bit mantissa, yielding QQI = (mant | 0x10) << (exp+3).
The Version 2 Multicast Listener Report message (ICMPv6 Type=143) carries: 8-bit Reserved, 16-bit Checksum, 16-bit Flags, 16-bit Nr of Mcast Address Records (M), followed by M variable-length Multicast Address Records.