Internet Group Management Protocol (IGMP) is a network layer protocol that supports multicasting. The main task of the IGMP protocol is of managing the membership of the hosts in a multicast group. IGMP protocol is applicable between the host (active member of a multicast group) and the multicast router.
We have three versions of this IGMP protocol where the IGMPv3 is compatible with the older versions IGMPv1 and IGMPv2. In this section, we will discuss how the IGMP protocol manages the active and inactive members of a multicast group. We will also see the types of messages the IGMP protocol uses for this multicast communication.
Internet Group Management Protocol (IGMP)
IGMP protocol supports multicasting where the single sender sends a message to the group of hosts and we refer to this group as the multicast group. We have seen multicasting in our previous content multicast addresses. Even though the sender has to send a message to a group of hosts it sends only one message, it is the responsibility of the multicast routers to copy and forwarded the message to each host of the multicast group. Each host of the multicast group receives the message until any filter is applied at the receiving host.
To deliver the multicast packets to the hosts of a multicast group, the multicast router must have information about the list of multicast groups, at each of its interfaces where each group must have at least one loyal member. Once the multicast router collects this information it shares it with other multicast routers. So, this information has to be collected locally and globally.
IGMP protocol operates locally and helps multicast routers to collect this information for the network to which it is connected. However, globally this information is propagated to other routers with the help of multicast routing protocols.
So the main task of IGMP protocol is to manage the membership of the host in a multicast group. While managing the membership of a host or a router in a multicast group the protocol has to handle the following scenario.
1. Joining a Multicast Group
Whenever a process on the host computer wants to join a multicast group it informs the host on which it is running. The host enlists the name of requesting process and the name of a multicast group to which the process wants to join.
If the particular multicast group is requested for the first time the host sends the membership report message to become the member of that particular multicast group. If it is not the first time the group is requested, the host does not have to send a membership report message as it is already a member of this multicast group.
Note: The membership report message is sent twice just one after another within a very short interval as in case the first one is lost or damaged at least the second message would do.
2. Leaving a Multicast Group
If any of the processes running on the host computer is not interested in a specific multicast group it was interested in earlier, the host sends a leave group message to the multicast router. Even, if the router observes that all the networks connected to its interfaces are not interested in some specific multicast group then it must send a leave report for the corresponding group.
When a multicast router receives a leave report for a particular group it does not directly remove that group from its list. As there may be still some hosts interested in that specific group. So to confirm that if there is still any host, router, or network interested in this particular group the multicast router sends a special query message.
This special query message has a group Id or the multicast address referring to the enquired group and sets a specific time for the hosts to reply. If this specific duration no host or network claims its interest in the group the multicast router purge this group from its list.
3. Monitoring Membership
If a host or router wants to join a multicast group message to the multicast router and when it is not interested in the group it sends a leave report. Now if a host gets shutdown abruptly or is removed from the system the multicast router will never know whether it wants to be in the group or not as it will never receive a leave report from the specific host.
Well, there is a solution for it, the multicast router sends a general query message at a periodic interval to all hosts or routers. This enquire a host about all the groups it is involved in and the host has to answer for all the group it is involved in. The enquired host or router responds using the membership report message.
4. Delayed Response
When a router or a host receives a general query message it sets a timer using a random number between 1 and 10 seconds. Each host or router set the timer for each group it is involved in.
The host or router lets this timer expire before responding to the query message and this delay reduces the traffic. But how? Consider that the two hosts receiving the query message have an interest in the same group.
Now, host1 has set a timer of 4 seconds and host2 has set a timer of 3 seconds to respond to the same group they are interested in. The timer of host2 will expire first and it would send the membership report for the group. As this report is broadcasted host1 will get to know that there is no need to respond for this group and it cancels the corresponding timer. This we refer to as delayed response which reduces the traffic.
5. Query a Router
As we know there can be multiple multicast routers in a network so if each router will send a query message then there will be a lot of traffic on the network. So only one router in a network is assigned as query routers. Only this query router sends a query message. The multicast routers only receive the broadcasted response of the query message and update their group list. this helps in reducing the traffic.
Internet Group Management Protocol Messages
If we categorize the IGMP Messages then there are two kinds of IGMP messages the IGMP membership report message and IGMP membership query messages.
1. Membership Query
The query messages are sent by the query router of the network to enquire about the active members of a group. The query messages are further classified as:
- General Query Message: With this query message the router enquires host about all the groups the host is involved in.
- Group-Specific Query Message: With this query message the router enquires the host or router if there are interested in a specific multicast group.
- Group-Source Specific Query Message: With this query message the query router enquires the hosts or router if it is still interested in the specific multicast group coming from a specific source.
2. Membership Report
The receiving members of the multicast group send the membership report either in response to the membership query message or if they are registering the group for the first time.
3. Leave Group
The receiving members of the multicast group sent this message to the multicast router if they are not interested in a specific multicast group anymore.
So, this all about the Internet Group Management Protocol. We have seen how it supports multicasting. Few examples where IGMP protocol is in streaming videos or in web conferencing such as Zoom call or Google meet where once source addresses multiple host and routers. The IGMP messages are not sent directly over the network instead they are encapsulated IP packets at the network layer which is further encapsulated in frames at the data link layer.