The Internet Group Management Protocol (IGMP) is used by IPv4 hosts and adjacent routers to establish multicast group memberships. Different versions of IGMP provide varying capabilities for managing these memberships.
IGMPv2 introduced the ability for hosts to send "leave group" messages when they wish to unsubscribe from a multicast group. This feature allows for more efficient management of multicast group memberships by enabling routers to promptly stop forwarding multicast traffic to subnets where there are no interested receivers.
When a host leaves a multicast group in an IGMPv2-enabled network, the following process occurs:
Leave Message Sent: The host sends an IGMP leave message to the all-routers multicast address (224.0.0.2).
Query by Router: Upon receiving the leave message, the router sends a group-specific query to determine if there are any remaining members of the multicast group on the local subnet.
Group Membership Determination: If no hosts respond to the query within a specified time, the router concludes that there are no remaining members and ceases forwarding multicast traffic for that group to the subnet.
This mechanism reduces unnecessary multicast traffic and optimizes network performance.
In contrast, IGMPv1 does not have a leave group message; routers must rely on a timeout period to determine the absence of group members, leading to increased leave latency.
For more detailed information on IGMPv2 and its leave group mechanism, refer to the Cisco documentation on IGMP.