• In a multicast network, multicast routers are used to route packets to all the computers that are having membership of a particular group.
• The multicast routers use the information from IGMP to determine which hosts are having membership of which group.
• A multicast router generally receives thousands of multicast packets that have to be transmitted to various groups. If a router has no knowledge about the group membership, it will broadcast packet to every host and this will increase the load on the network.
• In order to save the network from such a problem, a list of groups IS maintained when members of the group are present in the network.
• Thus, IGMP helps the multicast router to create and update this list.
• This protocol uses three different messages: query message, membership report and leave report.
Working of IGMP
• The multicast router of the network has a list of multicast address for which the network is having any member.
• There is one multicast router for each group that distributes multicast packet to members of that group. It means the network will have two multicast routers, if there are two multicast groups.
• A host or a multicast router can be a member of the group.
• When a host is having membership, it means that any process running on that host is a member of the group and when a router is having membership of group, it means one of the networks connected to the router is having membership of the group.
Joining a Group
• Both the host and a router can join a group.
• When a process on the host wants to join a group it sends the request to the host.
• The host adds the name of the process and group name to its list.
• If this is the first entry for that particular group, the host sends membership report message to the multicast router of the group.
• If it is not the first entry for the requested group there is no need of sending such a message.
Leaving a Group
• Whenever a host sees no process interested in a group, it sends a leave report message.
• The membership is not purged by the multicast router of the group, rather it immediately transmits query packets repeatedly to see if anyone still interested.
• If the response comes in the form of membership report message, the membership of the host or network is preserved.