Internet Group Management Protocol (IGMP), which allows all systems on a physical network to know the multicast group in which the host is currently located. Multicast routers need this information to know which ports multicast data packets should be forwarded. IGMP is defined in RFC 1112.
IGMP has a fixed message length and no data is available. The protocol field of the IGMP packet in the IP header is 2.
Figure 1 shows the 8-byte IGMP Message format.
Figure 1 Field Format of IGMP packets
If the IGMP type is 1, it indicates that a query packet is sent by the multicast router. If the IGMP type is 2, it indicates that the report packet is sent by the host. The group type is D type IP address. In the query message, the group type is set to 0, and in the report message, the Group address is the group address to participate in.
IGMP report and query:
Multicast routers use IGMP packets to record the changes of group members in the network connected to the vro. The rules are as follows ():
- When the first process is added to a group, the host sends an IGMP report. If multiple processes of a host are added to the same group, only one IGMP report is sent. The report is sent to the same interface where the process joins the group;
- When a process leaves a group, the host does not send an IGMP report, even if the last process in the group leaves. When the host knows that there are no members in the group, it will not send report messages in the IGMP query that it receives subsequently;
- The multicast router regularly sends an IGMP query report to check whether any host contains multicast group processes;
- The host sends an IGMP report to respond to an IGMP query.
Figure 2 shows two IGMP packets. One is the report sent by the host, and the other is the query sent by the router. The router is requesting each host on that interface to describe each multicast group it joins.
Figure 2 IGMP report and query