Appendix I. Internet Group Management Protocol (IGMP)
The Internet Group Management Protocol (IGMP) is used between IP hosts and their immediate neighbour multicast agents to support the allocation of temporary group addresses and the addition and deletion of members of a group.
Like ICMP, IGMP is a required part of all IP implementations. IGMP messages are encapsulated in IP datagrams, with an IP protocol number of 2. IGMP messages are formatted similarly to ICMP messages and the different IGMP message types are given values distinct from ICMP message types, so that both protocols may share common implementation modules or, perhaps, be merged into a single protocol.
IGMP interactions take the form of request-response transactions. A request message is sent by hosts to the permanent group of all immediate neighbour multicast agents. Multicast agents reply to the IP source address of a request. If no reply is received within a (currently unspecified) timeout interval, a host retransmits its request, up to some (currently unspecified) maximum number of times. IGMP transactions are considered idempotent, so that multicast agents need not recognize and filter out duplicate requests nor buffer replies <4>.
The IGMP message formats and procedures are defined below, in the style used in the ICMP specification.
Create Group Request or Create Group Reply Message
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 | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Access Key +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IP Fields
Addresses
A Create Group Request message is sent with an individual IP address of the sending host as its source, and the well-known group address of the multicast agents as its destination.
The corresponding Create Group Reply is sent with those two addresses reversed.
IGMP Fields
Type
101 for Create Group Request
102 for Create Group Reply
Code
For a Create Group Request message, the Code field indicates if the group is to be restricted:
0 = unrestricted
1 = restricted
For a Create Group Reply message, the Code field specifies the outcome of the request:
0 = request approved
1 = request denied, no resources
Checksum
The checksum is the 16-bit one's complement of the one's complement sum of the IGMP message starting with the IGMP Type. For computing the checksum, the checksum field should be zero. This checksum may be replaced in the future.
Identifier
An identifier to aid in matching Request and Reply messages.
Sequence Number
A sequence number to aid in matching Request and Reply messages.
Group Address
For a Create Group Request message, a value of 0.
For a Create Group Reply message, either a newly allocated group address (if the request is approved) or a value of 0 (if denied).
Access Key
For a Create Group Request message, a value of 0.
For a Create Group Reply message, either a pseudo-random 64-bit number (if the request for a restricted group is approved) or 0.
Description
A Create Group Request message is sent to the the group of local multicast agents by a host wishing to allocate a new temporary group.
If no Reply message is received within t seconds, the Request is retransmitted. If no Reply is received after n transmissions, the request is deemed to have failed.
The first Reply message to arrive, if any, specifies the outcome of the request. The request may be denied because of lack of resources (e.g. no table space in gateways or all temporary addresses in use).
If the request is approved, the requesting host is considered to be the first and only current member of the new host group.
The Identifier and Sequence Number fields are used to match the Reply to the corresponding Request. The multicast agents may choose to use these values to minimize the chance of allocating more than one new group for a single request, for example when a Reply is lost and a Request is retransmitted. However, the multicast agents must be prepared to recover temporary group addresses without requiring explicit Leave Group Requests from all members; they may choose simply to allocate a new address for every retransmission and recover unused ones when needed <5>.