Multicast control protocols
Status: draft
Notes on IGMPv1, v2, v3 / MLDv1 and v2 / PIM-SM v2. Definitions are in crates/wpg-protocols/src/mcast.rs, samples in templates/protocols/mcast/.
How they are reached, and samples
| id | Protocol | Layer below | Sample |
|---|---|---|---|
igmp + igmpv2 | IGMPv1 / v2 (query, report, leave) | IPv4 protocol 2 | igmpv2-query.wpg.yaml |
igmp + igmpv3_query | IGMPv3 query | IPv4 protocol 2, type 0x11 with at least 8 octets left | igmpv3-query.wpg.yaml |
igmp + igmpv3_report | IGMPv3 report | IPv4 protocol 2, type 0x22 | igmpv3-report.wpg.yaml |
icmpv6 + mld | MLDv1 (query, report, done) | ICMPv6 type 130 / 131 / 132 | mldv1-query.wpg.yaml |
icmpv6 + mldv2_query | MLDv2 query | ICMPv6 type 130 with at least 24 octets left | mldv2-query.wpg.yaml |
icmpv6 + mldv2_report | MLDv2 report | ICMPv6 type 143 | mldv2-report.wpg.yaml |
pim + pim_hello / pim_join_prune | PIM-SM v2 | IPv4 protocol 103 | pim-hello.wpg.yaml, pim-join-prune.wpg.yaml |
pim_register | PIM Register (standalone) | chosen when building (decodes as pim) | pim-register.wpg.yaml |
Like ICMPv6, IGMP and PIM are two layers, a common header (type, checksum) and a body; the header type is Auto from the body. MLD bodies stack on icmpv6.
ipv4 / igmp / igmpv3_report
ipv6 / ipv6_hopopts / icmpv6 / mldv2_report
ipv4 / pim / pim_join_prune
ipv4 / pim_register / ipv4 / udp / payload
Auto fields
- IGMP / PIM header
typeandchecksum. The MLD checksum is computed byicmpv6, including the IPv6 pseudo header. - Counts:
num_sourcesof IGMPv3 / MLDv2 queries,num_group_records/num_recordsof reports,num_sourcesinside a group record, and PIM Join/Prunenum_groups/num_joined/num_pruned. Adding or removing list elements keeps them right. pim_register.checksum: covers only the 8 octets of PIM header + Register flags (RFC 7761).
Limits and approximations
- v2 and v3 queries differ only in length: with at least 8 (IGMPv3) or 24 (MLDv2) octets left, a query decodes as the v3 / v2 query body, otherwise as
igmpv2/mld. - PIM Register’s checksum does not cover the encapsulated packet, so
pim_registeris a standalone definition that repeats the PIM header. IP protocol 103 decodes aspim, so the body of a received Register decodes asraw. The inner packet is IPv4 or IPv6 by its first nibble. - PIM over IPv6 needs the IPv6 pseudo header in its checksum, but a checksum kind cannot depend on the lower layer, so
pimis reached from IPv4 only and uses the plain Internet checksum. - PIM encoded addresses are typed for IPv4 (address family 1) only.
- IGMP / MLD need the Router Alert option; the samples put it in the
ipv4options/ theipv6_hopoptslayer.
Generated reference
Field reference of the protocols on this page (generated from the definitions):
ipv4 · ipv6_hopopts · icmpv6 · igmp · igmpv2 · igmpv3_query · igmpv3_report · mld · mldv2_query · mldv2_report · pim · pim_hello · pim_join_prune · pim_register · raw