This section describes IGMPv1, IGMPv2, and IGMPv3 as well as their comparison.
By sending IGMP Query messages to hosts and receiving IGMP Report messages and Leave messages from hosts, a multicast router can identify the receivers (multicast group members) on each network segment. If a host is identified to be a receiver, the multicast router forwards the corresponding multicast data to the network segment; if no host is identified to be a receiver, the multicast router forwards no multicast data. Note that each host can decide whether to join or leave a multicast group.
As shown in Figure 1, the IGMP-enabled Router A periodically sends IGMP Query messages automatically. All hosts (Host A, Host B, and Host C) on the same Router A can receive these IGMP Query messages.
When a host receives an IGMP Query message, the processing flow is as follows:
If the host joins multicast group G, then during the response period specified by Router A, the host randomly replies with an IGMP Report message for G to Router A.
After receiving the IGMP Report message, Router A records information about G and starts a timer for G (or refreshes the timer if it has already started). In this way, Router A can interrupt multicast traffic to G as soon as it detects that no hosts are responding. Then, Router A forwards multicast traffic to the network segment where the host interface that is connected to Router A is located.
If a host does not join a multicast group, the host does not respond to the IGMP Query message from Router A.
When a host joins a multicast group, the processing flow is as follows:
After the host joins multicast group G, the host sends an IGMP Report message for G to Router A. In this way, Router A is notified to update its multicast group information. Then, the subsequent IGMP Report messages of the host are sent in response to IGMP Query messages of Router A.
When a host leaves a multicast group, the processing flow is as follows:
If the host decides to leave multicast group G, the host sends an IGMP Leave message for G to Router A. After receiving the IGMP Leave message, Router A triggers a query on G to identify receivers on that particular segment of the network. After the query ends, if Router A receives no IGMP Report message for G, Router A deletes the information about G and stops forwarding the multicast traffic for G to that part of the network.
IGMPv1, like IGMPv2, manages multicast groups based on the query and response mechanism (the exchange of IGMP Query messages and IGMP Report messages). However, there are differences between IGMPv1 and IGMPv2. For example, when using IGMPv1: a host does not send an IGMP Leave message when leaving a multicast group; a host does reply to an IGMP Report message when receiving an IGMP Query message; an IGMP router deletes the record of a multicast group when the timer for maintaining members in the multicast group expires.
In IGMPv2, the IGMP Report messages sent by hosts only contain information about the multicast group. After a host sends the IGMP Report message for a multicast group to the IGMP router, the router informs the multicast forwarding module. Then, the multicast forwarding module can correctly forward multicast data to the host as soon as it is received.
IGMPv2 features the Report message suppression mechanism, which reduces the repetitive IGMP report messages on the network.
After a host joins multicast group G, the host receives an IGMP Query message from the router, and randomly selects a timer value between 0 and the maximum response time (specified in the IGMP Query message). When the timer expires, the host sends the IGMP Report message for G to the router. However, if the host receives an IGMP Report message from another host in G before the timer expires, Host A does not send the IGMP Report message for G to the router.
When a host leaves the multicast group G, the host sends the IGMP Leave message of G to the router. Because of the Report message suppression mechanism in IGMPv2, the router cannot determine whether another host joins G. Therefore, the router triggers a query on G. If another host joins G, the host sends the IGMP Report message for G to the router.
If the router sends a query on G for several times, but receives no IGMP Report message, the router does not record information about G and stops forwarding multicast data for G to that segment of the network.
The IGMP querier and non-querier can both process the IGMP Report message, while only the querier is responsible for forwarding it. However, the IGMP non-querier cannot process the IGMP Leave message.
IGMPv2 messages carry information about the multicast group, but not information about the multicast source. Therefore, IGMPv2 hosts can only join a specific multicast group, but not the multicast source/group. In IGMPv3, this problem is solved. That is, IGMPv3 hosts cannot only join a specific multicast group, but also a specific multicast source/group. The IGMPv3 message from a host may contain multiple records of multicast groups, with each multicast group record containing multiple multicast sources.
On the router side, the querier sends IGMP Query messages and receives IGMP Report and Leave messages. These exchanges allow the router to identify which multicast group on the network segment contains receivers, and to forward the multicast data to the network segment. The following information shows that in IGMPv3, multicast group records can be filtered in either include mode or exclude mode:
In include mode:
The multicast source in the activated state requires the router to forward its data.
The multicast source in the deactivated state is deleted by the router and data forwarding for the multicast source is ceased.
In exclude mode:
The multicast source in the activated state is in the collision domain. That is, the multicast source data is forwarded regardless of whether hosts on the relevant network segment require the data.
The multicast source in the deactivated state requires no data forwarding.
The multicast source data that is not recorded in the multicast group should be forwarded.
Compared with IGMPv2, IGMPv3 has no Report message suppression mechanism. As a result, all hosts joining the multicast group must reply with IGMP Report messages when receiving IGMP Query messages.
In IGMPv3, the multicast sources can be selected. Therefore, the IGMPv3-enabled device adds the designated multicast source and group query along with the common query and multicast group query. This process ensures that the router can identify whether receivers of a specified multicast source exist.
The comparison between IGMPv1 and IGMPv2 is as follows:
IGMPv1 |
IGMPv2 |
Advantages of IGMPv2 over IGMPv1 |
|---|---|---|
IGMPv1 has no IGMP Leave messages. |
IGMPv2 provides IGMP Leave messages. |
IGMPv2 can manage members of multicast groups effectively. |
IGMPv1 provides only General Query messages. |
IGMPv2 provides General Query messages and Group-specific Query messages. |
The multicast group can be selected directly, and the selection is more precise. |
The comparison between IGMPv2 and IGMPv3 is as follows:
IGMPv2 |
IGMPv3 |
Advantages of IGMPv3 over IGMPv2 |
|---|---|---|
The message contains the multicast group information, rather than the multicast source information. |
A message contains not only the multicast group information, but also the multicast source information. |
The multicast source can be selected directly, and the selection is more precise. |
A message contains the record of a multicast group. |
A message contains records of multiple multicast groups. |
The number of IGMP messages is reduced on the network segment. |
The IGMP Query message of a specified multicast group features no re-transmission mechanism. |
The IGMP Query message of a specified multicast group and a specified multicast source features the re-transmission mechanism. |
The multicast information maintained by the non-querier and querier can be kept consistent better. |