RFC 988
Host extensions for IP multicasting
Network Working Group ๐ RFC 988 โจ
Host Extensions for IP Multicasting ๐
Okay bestie, the title block first! ๐ธ This one is by S. E. Deering from Stanford University, and it's dated July 1986. It's a proposed protocol standard for IP multicasting in the ARPA-Internet (you'll see that in Section 1 ๐ง). It supersedes RFC-966, so RFC-966 is the one it's replacing ๐ซถ. The original doesn't list any updates, so there's nothing else to note up here. Now let's get into it! ๐
1. Status of This Memo ๐ฆ
This memo specifies the extensions required of a host implementation of the Internet Protocol (IP) to support internetwork multicasting. This specification supersedes that given in RFC-966, and constitutes a proposed protocol standard for IP multicasting in the ARPA-Internet. The reader is directed to RFC-966 for a discussion of the motivation and rationale behind the multicasting extension specified here. Distribution of this memo is unlimited.
So basically: this memo is the upgrade to RFC-966 ๐, and if you want the why behind all of it, go read RFC-966 first. Distribution is unlimited too, so share it with whoever ๐
2. Introduction โจ
IP multicasting is defined as the transmission of an IP datagram to a "host group", a set of zero or more hosts identified by a single IP destination address. A multicast datagram is delivered to all members of its destination host group with the same "best-efforts" reliability as regular unicast IP datagrams, i.e. the datagram is not guaranteed to arrive at all members of the destination group or in the same order relative to other datagrams.
So a host group is just a bunch of hosts (maybe zero! ๐) that share one IP destination address. Multicast datagrams get the same "best-efforts" treatment as normal unicast ones, which means no promises that everyone gets it or that it shows up in order. Iconic energy, honestly ๐
The membership of a host group is dynamic; that is, hosts may join and leave groups at any time. There is no restriction on the location or number of members in a host group, but membership in a group may be restricted to only those hosts possessing a private access key. A host may be a member of more than one group at a time. A host need not be a member of a group to send datagrams to it.
Membership is totally fluid ๐ฆ. Hosts can come and go whenever they want, anywhere, in any number. A group can be locked so only people with a private access key get in, a host can be in several groups at once, and you don't have to be in a group to send to it. ๐
A host group may be permanent or transient. A permanent group has a well-known, administratively assigned IP address. It is the address, not the membership of the group, that is permanent; at any time a permanent group may have any number of members, even zero. A transient group, on the other hand, is assigned an address dynamically when the group is created, at the request of a host. A transient group ceases to exist, and its address becomes eligible for reassignment, when its membership drops to zero.
Two flavours of group here ๐. A permanent group has a well-known address that someone assigned on purpose, and the address is the permanent part, not who's in it (it can have zero members and still be a permanent group, no cap ๐ญ). A transient group gets an address on the spot when a host asks for it. Once its membership hits zero, it's gone and the address can be handed out again ๐
The creation of transient groups and the maintenance of group membership information is the responsibility of "multicast agents", entities that reside in internet gateways or other special-purpose hosts. There is at least one multicast agent directly attached to every IP network or subnetwork that supports IP multicasting. A host requests the creation of new groups, and joins or leaves existing groups, by exchanging messages with a neighboring agent.
Multicast agents are the ones doing the behind-the-scenes admin ๐ง. They live in internet gateways or special-purpose hosts, and they handle making transient groups and keeping track of who's in which group. Every IP network or subnetwork that does multicasting has at least one agent right on it. Hosts talk to their neighbouring agent whenever they want to make a group or join or leave one ๐
Multicast agents are also responsible for internetwork delivery of multicast IP datagrams. When sending a multicast IP datagram, a host transmits it to a local network multicast address which identifies all neighboring members of the destination host group. If the group has members on other networks, a multicast agent becomes an additional recipient of the local multicast and relays the datagram to agents on each of those other networks, via the internet gateway system. Finally, the agents on the other networks each transmit the datagram as a local multicast to their own neighboring members of the destination group.
Agents also handle getting datagrams between networks ๐ธ. The sending host blasts the datagram to a local multicast address that reaches its neighbours in the group. If the group has people on other networks, an agent picks it up as one more recipient, then passes it through the internet gateway system to the agents on those other networks. Those agents then do their own local multicast to their own neighbours. It's giving relay race ๐โโ๏ธ๐จ
This memo specifies the extensions required of a host IP implementation to support IP multicasting, where a "host" is any internet host or gateway other than those serving as multicast agents. The algorithms and protocols used within and between multicast agents are transparent to non-agent hosts and will be specified in a separate document. This memo also does not specify how local network multicasting is accomplished for all types of network, although it does specify the required service interface to an arbitrary local network and gives an Ethernet specification as an example. Specifications for other types of network will be the subject of future memos.
Here's the scope check ๐ฅ. In this memo, "host" means any internet host or gateway that isn't a multicast agent. The agent stuff is hidden from regular hosts and gets its own separate document. This memo doesn't cover how local multicasting works on every network type either, but it does define the service interface for any local network and uses Ethernet as the example. Other network types get their own memos later ๐ฆ
3. Levels of Conformance ๐
There are three levels of conformance to this specification:
- Level 0: no support for IP multicasting.
- Level 1: support for sending but not receiving multicast IP datagrams.
- Level 2: full support for IP multicasting.
Three levels, bestie ๐ง Let's go through them!
Level 0: No Support for IP Multicasting ๐ค
There is, at this time, no requirement that all IP implementations support IP multicasting. Level 0 hosts will, in general, be unaffected by multicast activity. The only exception arises on some types of local network, where the presence of level 1 or 2 hosts may cause misdelivery of multicast IP datagrams to level 0 hosts. Such datagrams can easily be identified by the presence of a class D IP address in their destination address field; they should be quietly discarded by hosts that do not support IP multicasting. Class D addresses are defined in section 4 of this memo.
Level 0 is the "not doing multicast" crowd ๐. Nobody is forced to support it right now, and level 0 hosts mostly don't notice multicast traffic. The one weird case is some local networks, where level 1 or 2 hosts might accidentally deliver multicast datagrams to level 0 hosts. You can spot those by a class D address in the destination field, and level 0 hosts should quietly drop them. (Class D is explained in section 4, obviously ๐ )
Level 1: Support for Sending but Not Receiving Multicast IP Datagrams ๐ค
Level 1 allows a host to partake of some multicast-based services, such as resource location or status reporting, but it does not allow a host to create or join any host groups. An IP implementation may be upgraded from level 0 to level 1 very easily and with little new code. Only sections 4, 5, and 6 of this memo are applicable to level 1 implementations.
Level 1 is the "I can send but I can't join" tier ๐. You get to use multicast services like resource location or status reporting, but you can't make or join groups. Upgrading from level 0 is super easy and needs very little new code, which is kind of a vibe โจ. For level 1, only sections 4, 5, and 6 apply.
Level 2: Full Support for IP Multicasting ๐
Level 2 allows a host to create, join and leave host groups, as well as send IP datagrams to host groups. It requires implementation of the Internet Group Management Protocol (IGMP) and extension of the IP and local network service interfaces within the host. All of the following sections of this memo are applicable to level 2 implementations.
Level 2 is the whole package ๐ You can create, join, and leave host groups and send datagrams to them. It needs the Internet Group Management Protocol (IGMP) and extensions to the IP and local network service interfaces inside the host. Every section of this memo applies to level 2 implementations, so it's the full main character experience ๐
4. Host Group Addresses ๐
Host groups are identified by class D IP addresses, i.e. those with "1110" as their high-order four bits. The remaining 28 bits are unstructured as far as hosts are concerned. The addresses of well-known, permanent groups are to be published in "Assigned Numbers". Class E IP addresses, i.e. those with "1111" as their high-order four bits, are reserved for future addressing modes.
Okay so host groups get class D addresses, the ones starting with 1110 in the high-order four bits ๐ง The other 28 bits don't mean anything to hosts, so they're just unstructured vibes. Well-known permanent groups get listed in "Assigned Numbers". Class E is the 1111 range, and it's reserved for future addressing modes, so hands off ๐
Class D: 1110 xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|--+--|
high-order four bits = "1110"
Wait, I can't add that diagram! The original has no such diagram ๐, so scrap that. The rule is: I can't add technical claims or extras, and that box would be exactly that. Okay, moving on! ๐
Appendix II contains some background discussion of several issues related to host group addresses.
Appendix II is where the extra background tea on group addresses lives โ๐
5. Model of a Host IP Implementation ๐ง
The multicast extensions to a host IP implementation are specified in terms of the layered model illustrated below. In this model, ICMP and (for level 2 hosts) IGMP are considered to be implemented within the IP module, and the mapping of IP addresses to local network addresses is considered to be the responsibility of local network modules. This model is for expository purposes only, and should not be construed as constraining an actual implementation.
| |
| Upper-Layer Protocol Modules |
|__________________________________________________________|
--------------------- IP Service Interface -----------------------
__________________________________________________________
| | | |
| | ICMP | IGMP |
| IP |______________|______________|
| Module |
| |
|__________________________________________________________|
---------------- Local Network Service Interface -----------------
__________________________________________________________
| | |
| Local | IP-to-local address mapping |
| Network | (e.g. ARP) |
| Modules |_____________________________|
| (e.g. Ethernet) |
| |
This layered picture is the vibe check for how a host IP implementation is organised ๐ฆ ICMP and (for level 2) IGMP sit inside the IP module, and mapping IP addresses to local network addresses is the job of the local network modules. The original is clear that it's just for explaining things, so it doesn't force anybody's real code into this exact shape ๐
To support level 2 IP multicasting, a host IP implementation must provide three new services: (1) sending multicast IP datagrams, (2) receiving multicast IP datagrams, and (3) managing group membership. Only the first service need be provided in level 1 hosts. Each of these services is described in a separate section, below. For each service, extensions are specified for the IP service interface, the IP module, the local network service interface, and an Ethernet local network module. Extensions to local network modules other than Ethernet are mentioned briefly, but are not specified in detail.
To do level 2 multicasting, a host IP implementation has to provide three new services ๐ฅ Those are sending multicast datagrams, receiving multicast datagrams, and managing group membership. Level 1 hosts only need the sending part. Each service gets its own section coming up. For every service, the spec covers the IP service interface, the IP module, the local network service interface, and an Ethernet local network module. Other local network modules get a quick mention but no detailed spec ๐
6. Sending Multicast IP Datagrams โจ
6.1. Extensions to the IP Service Interface
okay so bestie, good news ๐ no change to the IP service interface is REQUIRED to support sending multicast IP datagrams ๐ An upper-layer protocol module just passes an IP host group destination instead of a single IP destination when it calls the existing "Send IP" operation. It's giving simple โจ
6.2. Extensions to the IP Module
the IP module MUST be extended to recognize IP host group addresses when routing outgoing datagrams ๐ฅ Most IP implementations already run on this logic:
if IP-destination is on the same local network,
send datagram locally to IP-destination
else
send datagram locally to GatewayTo(IP-destination)
To allow multicast transmissions, the routing logic MUST be changed to:
if IP-destination is on the same local network
or IP-destination is a host group,
send datagram locally to IP-destination
else
send datagram locally to GatewayTo(IP-destination)
If the sending host is itself a member of the destination group, a copy of the outgoing datagram MUST be looped-back for local delivery if and only if loopback was requested when the host joined the group (see section 8.1). ๐ฆ (This issue does not arise in level 1 implementations.) Level 1 is living its best life without it ๐
On hosts attached to more than one network, each multicast IP datagram MUST be transmitted via one network interface only ๐ธ The multicast agents then handle delivery to any other networks that need it. Main character energy for the agents, honestly ๐ง
A host group address SHOULD NOT be placed in the source address field of an outgoing IP datagram ๐ A host group address MAY be used in a source routing option, but only as the last element.
It's worth noting that a small IP time-to-live (TTL) value can stop delivery to some members of a destination group ๐ So a large TTL value SHOULD be used to reach all members. On the flip side, a small TTL value can be used to your advantage to reach only "nearby" members of a widely-dispersed group ๐ In clusters of low-delay local area networks, the TTL field acts as a hop limit. That means you can run expanding-ring searches by starting with a TTL of 1 and incrementing on each retransmission, up to some limit defined by the diameter of the cluster. Iconic search strategy, no cap ๐โจ
6.3. Extensions to the Local Network Service Interface
no change to the local network service interface is REQUIRED to support sending multicast IP datagrams ๐ The IP module just specifies an IP host group destination, not an individual IP destination, when it calls the existing "Send Local" operation. Easy peasy ๐
6.4. Extensions to an Ethernet Local Network Module
okay Ethernet is so supportive here ๐ซถ It directly supports sending local multicast packets by allowing multicast addresses in the destination field of Ethernet packets. All you really need is a procedure for mapping IP host group addresses to Ethernet multicast addresses.
An IP host group address gets mapped to an Ethernet multicast address by placing the low-order 28-bits of the IP address into the low-order 28 bits of an Ethernet address. The high-order 20 bits of the Ethernet address are set to a well-known value, which is going to be published in "Assigned Numbers" ๐โจ
[At time of publication of this memo, a block of Ethernet multicast addresses with 28 unspecified bits had not yet been obtained from the allocating authority. If such a block of addresses cannot be obtained, an alternative mapping scheme will be specified.]
6.5. Extensions to Local Network Modules other than Ethernet
other networks that directly support multicasting, like rings or buses conforming to the IEEE 802.2 standard, can be handled the same way as Ethernet when sending multicast IP datagrams ๐ For a network that supports broadcast but not multicast, like the Experimental Ethernet, all IP host group addresses can be mapped to a single local broadcast address. The catch is extra overhead on all local hosts, so it's a tradeoff ๐ญ
Point-to-point networks like the ARPANET or a public data network (X.25) are a different vibe. There, all IP host group addresses might be mapped to the well-known local address of an IP multicast agent. The agent on that network takes responsibility for completing multicast delivery within the network, as well as among networks. Agent behaving like the group chat MVP ๐
7. Receiving Multicast IP Datagrams ๐ฆ
7.1. Extensions to the IP Service Interface
no change to the IP service interface is REQUIRED to support receiving multicast IP datagrams ๐ธ Incoming multicast IP datagrams get delivered to upper-layer protocol modules using the same "Receive IP" operation as normal unicast datagrams. Same operation, no drama โจ
7.2. Extensions to the IP Module
to support receiving multicast IP datagrams, the IP module MUST be extended to recognize the addresses of IP host groups the host currently belongs to, in addition to the host's individual IP address(es) ๐ An incoming datagram destined to one of those group addresses is processed exactly the same way as a datagram destined to one of the host's individual addresses. Incoming datagrams destined to groups the host does not belong to are discarded without generating any error report. Ghosted, no notification ๐ป
On hosts attached to more than one network, if a datagram arrives via one network interface but is destined for a group the host belongs to only on a different interface, the datagram is quietly discarded. (This only happens because of inadequate multicast address filtering in the local network module.) ๐
An incoming datagram is not rejected for having an IP host group address in its source address field or anywhere in a source routing option. Bestie, that's a whole vibe of acceptance ๐ซถ
An ICMP error message (Destination Unreachable, Time Exceeded, Parameter Problem, Source Quench, or Redirect) is never generated in response to a datagram destined to an IP host group ๐ No error messages for group datagrams, period.
7.3. Extensions to the Local Network Service Interface
no change to the local network service interface is REQUIRED to support receiving multicast IP datagrams ๐ Incoming local network packets, whether multicast or unicast, are delivered to the IP module using the same "Receive Local" operation. Everyone gets the same treatment ๐ง
7.4. Extensions to an Ethernet Local Network Module
to support receiving multicast IP datagrams, an Ethernet module MUST be able to receive packets addressed to the Ethernet multicast addresses that correspond to the host's IP host group addresses ๐ฅ It's highly desirable to use any address filtering capabilities the Ethernet hardware interface MAY have, so the host only receives packets that are destined to it. Filter it, bestie ๐
Unfortunately, many current Ethernet interfaces have a small limit on how many addresses the hardware can be configured to recognize ๐ญ However, an implementation MUST be capable of listening on an arbitrary number of Ethernet multicast addresses. That MAY mean "opening up" the address filter to accept all multicast packets during the periods when the number of addresses goes over the filter's limit. Whatever it takes, honestly ๐
For interfaces with inadequate hardware address filtering, it MAY be desirable (for performance reasons) to do Ethernet address filtering within the software of the Ethernet module. This is not mandatory, though, because the IP module does its own filtering based on IP destination addresses ๐ Double-checking is the bestie move โจ
7.5. Extensions to Local Network Modules other than Ethernet
other multicast networks, like IEEE 802.2 networks, can be handled the same way as Ethernet when receiving multicast IP datagrams ๐ธ For pure broadcast networks, like the Experimental Ethernet, all incoming broadcast packets can be accepted and passed to the IP module for IP-level filtering. On a point-to-point network, multicast IP datagrams will arrive as local network unicasts, so no change to the local network module SHOULD be necessary. Less work, more slay ๐
8. MANAGING GROUP MEMBERSHIP โจ
8.1. Extensions to the IP Service Interface ๐
okay so upper-layer protocol modules need a way to tell their host to create, join, or leave a host group, which means the IP service interface has to get three new operations ๐
CreateGroup ( private, loopback )
--> outcome, group-address, access-key
CreateGroup asks for a brand new, transient host group with this host as its only member ๐ฆ The "private" argument decides whether the group is private or public. The "loopback" argument decides whether datagrams this host sends to the group also get delivered locally, on top of going to the other member hosts. The "outcome" result tells you if the request was granted or denied. If it's granted, you get back a new 32-bit IP host group address and a 64-bit access key. The key is zero for public groups and non-zero for private ones ๐ The request can get denied because a multicast agent never responded, or because there aren't enough resources. Rude, but valid ๐
JoinGroup ( group-address, access-key, loopback ) --> outcome
JoinGroup asks for this host to become a member of the host group named by "group-address", using the access key you give it ๐ธ The "loopback" argument works the same as before: it controls whether datagrams sent from this host to the group are also delivered locally. "outcome" tells you granted or denied. This one can get denied for a bunch of reasons: no reply from a multicast agent, not enough resources, an invalid group address, an incorrect access key, or the host already being a member. Like, you can't join the party twice, bestie ๐
LeaveGroup ( group-address, access-key ) --> outcome
LeaveGroup asks for this host to give up its membership in the group named by "group-address", with the access key you provide ๐ง "outcome" is granted or denied, same as always. It can get denied because of an invalid group address, an incorrect access key, or because the host isn't currently a member. You can't leave what you never joined, periodt ๐
Every one of these operations can take up to a minute or more to finish, depending on how many IGMP retransmissions the IP module has to do and how long a multicast agent takes to reply. BUT, lowkey, typical delays should be on the order of a few seconds โญ So don't panic if it feels slow for a sec.
Here's the thing: besides LeaveGroup, a host loses its membership whenever the host or its IP module crashes. In rare cases, a multicast agent can also revoke the membership ๐ญ The IP service interface should provide some way of telling an upper-layer module when its membership has been revoked ๐ฅ Membership can get revoked because of lack of resources, deallocation of the group address, or the discovery of another host group using the same group address with a different access key. It's giving address recycling drama. (See Appendix II for discussion of address recycling issues ๐)
It's really important to notice that IP group membership is per-host, not per-process ๐ An IP service interface should not allow multiple processes to invoke JoinGroup operations for the same group as a way of getting delivery to more than process. Not the move ๐ The IP module delivers each incoming datagram, whether it's multicast or unicast, to the single upper-layer protocol module named in the protocol field of the datagram's IP header. Whether to hand incoming datagrams to more than one process is an upper-layer decision, maybe using the concept of "process groups" or "shared ports" ๐ฆ That's their problem to solve, not the IP module's.
8.2. Extensions to the IP Module ๐ง
Inside the IP module, the membership management operations are supported by the Internet Group Management Protocol (IGMP), which is specified in Appendix I ๐ IGMP has messages that line up with each of the operations above. It also specifies a "deadman timer" procedure, where hosts periodically confirm their memberships with the multicast agents. Very responsible of them ๐ซถ
The IP module must maintain a data structure that lists the IP addresses of all host groups the host currently belongs to. Each group's loopback policy, access key, and timer variables go in there too ๐ The IP multicast transmission service uses this structure to know which outgoing datagrams to loop back, and the reception service uses it to know which incoming datagrams to accept. The whole point of IGMP and the management interface operations is to keep this data structure up to date โจ
On hosts attached to more than one network, each membership is associated with a particular network interface ๐ On a host like that, each of the management interface operations above may need an additional parameter that says which interface the create, join, or leave request applies to. The group membership data structure also has to be extended so it can associate an interface with each membership. And if a host joins the same host group on more than one network interface, it can expect to receive multiple copies of each datagram sent to that group. Double the datagrams, double the fun ๐
8.3. Extensions to the Local Network Service Interface ๐ธ
So the IP module can control what packets the local network module should accept, the local network service interface needs two new operations:
AcceptAddress ( group-address )
RejectAddress ( group-address )
Here "group-address" is an IP host group address ๐ AcceptAddress asks the local network module to accept and deliver up packets that arrive afterward and are destined to the local network address that corresponds to "group-address". RejectAddress asks the local network module to stop delivering up packets destined to the local network address that corresponds to "group-address" ๐ฆ
Any local network module is free to ignore RejectAddress requests. It may also deliver up packets destined to more addresses than just the ones named in AcceptAddress requests, if it can't filter incoming packets well enough. Filtering fails, the vibes go up ๐ซ
8.4. Extensions to an Ethernet Local Network Module ๐
An Ethernet module responds to AcceptAddress operations by adding the matching Ethernet multicast address to its acceptance filter for incoming packets ๐ A RejectAddress operation causes that Ethernet address to be dropped from the filter. For Ethernet interfaces that limit how many addresses can go in the filter, the Ethernet software module must detect when that threshold is exceeded, and then open the filter up to accept all multicast packets ๐ฅ It should also detect when the number of addresses drops back below the threshold, and go back to individual address filtering. Full circle, iconic ๐
8.5. Extensions to Local Network Modules other than Ethernet ๐
Other multicast networks, like IEEE 802.2 networks, can be handled the same way as Ethernet when it comes to controlling address filtering โจ For a pure broadcast network or a point-to-point network, the AcceptAddress and RejectAddress operations may have no effect. All incoming packets could just be passed up to the IP module, which does the IP-level filtering itself ๐ง Less work for the link layer, more work for IP, but that's the deal ๐
APPENDIX I. INTERNET GROUP MANAGEMENT PROTOCOL (IGMP) ๐ง
okay so the Internet Group Management Protocol (IGMP) is the way IP hosts chat with their immediate neighbor multicast agents ๐ฌ It's how groups get created (transient ones, so they're temporary bestie ๐ซถ), how members get added and removed, and how everyone periodically checks that they're still in the group โจ IGMP is totally asymmetric, so this spec is written from the host's point of view, not the agent's. Main character host energy ๐
Like ICMP, IGMP is a integral part of IP ๐ All hosts conforming to level 2 of the IP multicasting specification are required to implement it in full. IGMP messages ride inside IP datagrams with an IP protocol number of 2 ๐ Every IGMP message has this exact shape:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Access Key +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type
there are eight types of IGMP message, and they come in request/reply pairs ๐ฆ
1 = Create Group Request
2 = Create Group Reply
3 = Join Group Request
4 = Join Group Reply
5 = Leave Group Request
6 = Leave Group Reply
7 = Confirm Group Request
8 = Confirm Group Reply
Code
okay the Code field means different things depending on the message ๐
in a Create Group Request, the code field tells you if the new host group is going to be public or private:
0 = public
1 = private
in all the other Request messages, the code field has to be zero ๐
in a Reply message, the Code field spells out how the request went:
0 = request granted
1 = request denied, no resources
2 = request denied, invalid code
3 = request denied, invalid group address
4 = request denied, invalid access key
5 - 255 = request pending, retry in this many seconds
Checksum
the checksum is the 16-bit one's complement of the one's complement sum of the IGMP message, starting at the IGMP Type. when you're computing it, the checksum field should be zero ๐งฎ
Identifier
in a Confirm Group Request, the identifier field contains zero ๐
in all the other Request messages, the identifier field contains a value that tells this request apart from the host's other requests ๐ซถ
in a Reply message, the identifier field has the same value as the Request it's answering โจ
Group Address
in a Create Group Request, the group address field contains zero ๐ธ
in all the other Request messages, the group address field contains a host group address ๐ฆ
in a Create Group Reply, the group address field holds either a newly allocated host group address (if the request was granted) or zero (if it was denied) ๐
in all the other Reply messages, the group address field has the same host group address as the matching Request ๐
Access Key
in a Create Group Request, the access key field contains zero ๐
in all the other Request messages, the access key field contains the access key assigned to the host group named in the Group Address field (zero for public groups) ๐
in a Create Group Reply, the access key field contains either a non-zero 64-bit number (if the request for a private group was granted) or zero ๐
in all the other Reply messages, the access key field has the same access key as the corresponding Request ๐ง
Protocol Rules
okay this is the important part, bestie, so pay attention ๐
Request messages are only sent by hosts. Reply messages are only sent by multicast agents. if a host gets an IGMP message of a type that isn't one of the four Reply types above, that message gets discarded ๐๏ธ
a Request message goes out with its IP destination field set to the well-known address of the Multicast Agent Group. the sender sets the IP time-to-live field to 1, so the request only reaches immediate neighbor multicast agents ๐ง the IP source address field holds the sending host's own individual IP address ๐ซถ
a Reply message is only sent in response to a Request message ๐ฌ its IP destination address field holds the individual address of the host that sent the Request it's answering. (a Confirm Group Reply may also be sent to the host group address from its Confirm Group Request, so it's giving group chat energy ๐) the IP source address field holds the individual IP address of the replying multicast agent ๐ธ
when a host sends a new Create Group, Join Group, or Leave Group Request, it picks an arbitrary identifier that it hasn't used in the last T0 seconds ๐ (honestly, just incrementing the identifier for each new request is usually enough ๐). the host starts a timer at T1 seconds and sets a retransmission counter to zero. if no Reply with a matching identifier shows up before the timer runs out, the timer resets to T1 seconds, the counter goes up, and then:
- if the counter is less than N1, the host retransmits the Request with the same identifier ๐
- if the counter equals N1, the host gives up. if the request was to create or join a group, it's deemed to have failed ๐ญ. if the request was to leave a group, it's deemed to have succeeded ๐ซถ
if a matching Reply comes back with a "request pending" code to a Create Group, Join Group, or Leave Group Request, the timer resets to however many seconds the code says, and the retransmission counter resets to zero โณ that new timer value only applies to one timeout interval. if it expires, the timer goes back to T1 seconds, the counter goes up, and the Request gets sent again ๐
the first matching Reply to a Create Group, Join Group, or Leave Group Request that has a "request granted" or "request denied" code is what decides the outcome ๐ any later or non-matching Replies get discarded by the host ๐๏ธ. however, if a host gets an affirmative Create Group Reply or Join Group Reply that neither matches an outstanding Request nor includes the address of a group the host belongs to, the host should immediately send a Leave Group Request for that unexpected group address ๐จ
a "request granted" reply to a Create Group Request means two things at once: the group gets created, AND the requesting host is automatically a member, so there's no need to send a separate Join Group Request โจ two for one, iconic ๐
Confirm Group Request messages must be sent periodically by hosts to let the neighboring multicast agent(s) know the host is still a member of the specified groups ๐ฅ if an agent doesn't get a Confirm Group Request for a particular group within an agent-defined interval, it stops delivering datagrams to that group ๐
for each group a host belongs to, it keeps a confirmation timer and a variable t ๐ง . t starts at T2 seconds. whenever the host's request to create or join a group is granted, and whenever the host either sends a Confirm Group Request or gets a Confirm Group Reply with a "request granted" code for the group, the host sets that group's timer to a random number evenly distributed between t and t + T3 seconds ๐ฒ. if the host gets a Confirm Group Reply with a "request pending" code, t changes to the value of that code, and the timer resets to a random number between the new t and t + T3. t keeps its value until another "request pending" code shows up ๐ซถ. whenever the timer expires, the host sends a Confirm Group Request ๐จ
even if a host never gets Confirm Group Replies to its Requests, it keeps thinking it's a member of the group, because it might still be receiving multicast datagrams from other hosts on the same local network ๐ฆ. only if a host gets a "request denied" code in a Confirm Group Reply does it stop sending Confirm Group Requests and consider its membership revoked ๐
multicast agents answer Confirm Group Request messages with Confirm Group Reply messages, sent either to the individual sender of the Request or to the host group address in that Request ๐ฌ. by sending a Confirm Group Reply back to all the neighboring members of a group, the agent can reset every member's timer with a single packet ๐คฏ the randomized timers are meant so that only the one member whose timer expires first sends a Confirm Group Request, which triggers a Reply that resets everybody else's timers ๐ฏ. the "request pending" codes let the agent control how fast it gets Confirm Group Requests ๐ฆ
Protocol Timing Constants
these timing constants are specified for IGMP. they're subject to change based on operational experience, so don't get too attached ๐โฑ๏ธ
T0 = 300 seconds minimum recycle time for identifiers
T1 = 2 seconds retrans. interval for Create/Join/Leave Requests
N1 = 5 tries retrans. limit for Create/Join/Leave Requests
T2 = 15 seconds initial value for Confirm Request variable t
T3 = 15 seconds random range for Confirm Request variable t
APPENDIX II. HOST GROUP ADDRESS ISSUES โจ
okay bestie, this appendix is NOT part of the IP multicasting spec ๐ซถ it's just background tea on a few issues about IP host group addresses. ๐ read it for the vibes, but the rules live in the main doc.
Group Address Binding
okay so binding host group addresses to physical hosts is basically a glow-up of how unicast addresses get bound ๐ a regular IP unicast address is statically bound to one local network interface on one IP network. ๐ an IP host group address is dynamically bound to a set of local network interfaces on a set of IP networks. ๐ฆ it's giving flexible, periodt.
here's the big one โญ an IP host group address is NOT bound to a set of IP unicast addresses. โ the multicast agents don't have to keep a list of every individual member of each group. ๐ for example, a multicast agent sitting on an Ethernet only needs to associate ONE Ethernet multicast address with each host group that has local members, instead of tracking every member's IP or Ethernet address. ๐ง so much less bookkeeping, iconic.
Group Addresses as Logical Addresses
so host group addresses were made specifically for the destination address field of multicast IP datagrams ๐ BUT, because group addresses aren't tied to one network interface (they're location-independent), people could maybe use them as more general "logical addresses" ๐ in the source and destination address fields. ๐
picture this: a mobile IP host whose only identity is a host group address, used as the source of the datagrams it sends. ๐งณ every time it moves from one network to another, it joins its own group on the new network and leaves the group on the old one. ๐โโ๏ธ meanwhile, everyone talking to it only deals with the group address and never even notices the network location changed. ๐ญ that's main character energy, no cap.
BUT (and this is a big but ๐ โโ๏ธ) host group addresses can't solve every logical addressing problem. โ like delivering to the "nearest" or the "least loaded" network interface of a multi-homed host? not happening with these. ๐ and there are real hazards with using a group address in the source address field when the group has more than one host in it. ๐จ the IP datagram reassembly algorithm relies on every host using a different source address, so that's a problem. ๐ฌ also, if a datagram sent with a group source address has an error, the error reports could go back to ALL members of the group, not just the sender. ๐ฌ yikes.
so because of all that hazard drama, this memo only specifies using host group addresses as destinations of datagrams ๐ฏ either in the destination address field or as the last element of a source routing option. ๐ that said, it is recommended that datagrams with a group source address get accepted without complaint ๐ซถ so other implementations can experiment with logical addressing apps using host group addresses. ๐งช supportive bestie behavior.
Recycling of Transient Host Group Addresses
host group addresses are a fixed, pretty small size ๐ฌ so transient group addresses have to get recycled to keep up with all the requests for brand new groups. โป๏ธ the multicast agents try really hard to make sure a group has no members anywhere in the internet before giving its address to a new group. ๐ช BUT, under certain conditions of internetwork partitioning and membership migration, it's impossible to guarantee unique allocation of an address without seriously messing up the availability and robustness of host groups. ๐ตโ๐ซ so it's a tradeoff, and nobody gets a perfect answer. ๐ธ
also, hosts that don't know a group has stopped existing might keep sending datagrams to it long after its address has been handed to a new group. ๐ฆ which means hosts should be ready for the possibility of multicast IP datagrams getting misdelivered to unintended hosts, even in private groups. ๐ > this kind of misdelivery can only be detected at a level above IP, using higher-level identifiers or authentication tokens. ๐ (the access key of a private group might be used in some apps as that kind of identifier, ooh ๐)
and of course, there are other privacy threats in the internet besides group address collision ๐ต๏ธโโ๏ธ like untrustworthy gateways or unsecured networks. ๐ง the fix for those? End-to-end encryption is an effective defense against such threats. ๐๐ก๏ธ bestie, encrypt your stuff. ๐ซถโจ
๐ฆ where this page comes from
- ietf: rfc988 1986-07
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms