Table of Contents Traceroute
TCP/IP Tutorial and Technical Overview

2.7 Internet Group Management Protocol (IGMP)

IGMP is a standard protocol with STD number 5 which also includes IP (see Internet Protocol (IP)) and ICMP (see Internet Control Message Protocol (ICMP)). Its status is recommended and it is described in RFC 1112.

Note: IP and ICMP are required.

IGMP is best regarded as an extension to ICMP and occupies the same place in the IP protocol stack. (3)

See Multicasting for an introduction to multicasting.

2.7.1 IGMP Messages

ICMP messages are sent in IP datagrams. The IP header will always have a Protocol number of 2, indicating IGMP and a Type of Service of zero (routine). The IP data field will contain the 8-byte IGMP message in the format shown in Figure - ICMP Message Format.

Figure: ICMP Message Format


4-bit IP version. Always 1.
Specifies a query or a report.
Specifies a query sent by a multicast router.
Specifies a report sent by a host.
A 16-bit checksum calculated as for ICMP.
Class D Address
This is zero for a request, and is a valid multicast group address for a report.

2.7.2 IGMP Operation

Systems participating in IGMP fall into two types: hosts and multicast routers.

As described in Multicasting, in order to receive multicast datagrams, a host must join a host group. When a host is multi-homed, it may join any group on one or more of its interfaces (attached subnets). The multicast messages that the host receives from the same group on two different subnets may be different. For example is the group for ``all hosts on this subnet'', so the messages received on one subnet will always be different for this group from those on another. Multiple processes on a single host may be listening for messages for a multicast group on a subnet. If this is the case, the host joins the group once only, and keeps track internally of which processes are interested in that group.

To join a group, the host sends a report on an interface. The report is addressed to the multicast group of interest. Multicast routers on the same subnet receive the report and set a flag to indicate that at least one host on that subnet is a member of that group. No host has to join the all hosts group (; membership is automatic. Multicast routers have to listen to all multicast addresses (that is, all groups) in order to detect such reports. The alternatives would be to use broadcasts for reports or to configure hosts with unicast addresses for multicast routers.

Multicast routers regularly, but infrequently (RFC 1112 mentions one-minute intervals), send out a query to the all hosts multicast address. Each host which still wishes to be a member of one or more groups replies once for each group of interest (but never the all hosts group, since membership is automatic). Each reply is sent after a random delay to ensure that IGMP does not cause bursts of traffic on the subnet. Since routers do not care how many hosts are members of a group and since all hosts which are members of that group can hear each other replying, any host which hears another claim membership of a group will cancel any reply that it is due to send in order to avoid wasting resources. If no hosts claim membership of a group within a specified interval, the multicast router decides that no host is a member of the group. When a host or a multicast router receives a multicast datagram, its action is dependent upon the TTL value and the destination IP address.

A datagram sent with a TTL value of zero is restricted to the source host.
A datagram with a TTL value of one reaches all hosts on the subnet which are members of the group. Multicast routers decrement the value to zero, but unlike unicast datagrams, they do not report this with an ICMP Time Exceeded message. Expiration of a multicast datagram is a normal occurrence.
All hosts which are members of the group and all multicast routers receive the datagram. The action of the routers depends on the multicast group address. -
This range is intended for single-hop multicasting applications only. Multicast routers will not forward datagrams with destination IP addresses in this range.

It may seem at first as though a host need not bother reporting its membership of a group in this range since multicast routers will not forward datagrams from other subnets. However, the report also informs other hosts on the subnet that the reporting host is a member if the group. The only group which is never reported is because all hosts know that the group consists of all hosts on that subnet.

Datagrams with other values for the destination address are forwarded as normal by the multicast router: it decrements the TTL value by at least one second as usual.

This allows a host to locate the nearest server which is listening on a multicast address using what is called an expanding ring search. The host sends out a datagram with a TTL value of 1 (same subnet) and waits for a reply. If none is received, it tries a TTL value of 2, then 3, and so on. Eventually it will find the closest server. (4)

Table of Contents Address Resolution Protocol (ARP)