Joining and leaving a multicast group by using IGMP
This section describes the behavior of IGMP version 2.
IGMP allows a network host to inform a router that it is interested in receiving a particular multicast stream.
To begin, the multicast group is assigned a multicast address (that is, an IP address in the 184.108.40.206/4 class D address space). Hosts register to receive the stream join the group by sending an IGMP Report to the upstream multicast router. The router then adds that group to the list of multicast groups that should be forwarded onto the local subnet.
The router does not maintain state about which hosts on the subnet are to receive traffic for the group. Instead, the router continues to send traffic to the subnet until either a timeout value expires or there are no more hosts in that group on the subnet.
When a host no longer wants to receive multicast traffic, it sends the router an IGMP Leave message. After receiving this message, the router sends a query to the local subnet to determine whether any group members remain, sending the message to all hosts on the subnet, at the multicast All-Hosts address (220.127.116.11). If any host responds, the router continues to send to the group; if not, the router removes the multicast group from its forwarding list and stops sending to the group.