The default behavior for a Layer 2 switch is to forward multicast traffic to
every port in the VLAN on which the traffic was received. Therefore, a switch
between a requesting host and a multicast router will forward a multicast flow
intended for a single host out all switch ports on the same VLAN as the
receiving host. IGMP snooping is an IP multicast constraining mechanism for
switches. It examines IGMP frames so that multicast traffic is not forwarded
out all VLAN ports but only those over which hosts sent IGMP message toward the
router.
IGMP snooping runs on a Layer 2 switch. The switch snoops the content of the
IGMP join and leave messages sent between the hosts and the router. When the
switch sees an IGMP report from a host to join a particular multicast group,
the switch creates a CAM table entry associating the port number where that
message was seen to the Layer 2 multicast address for the group that the host
joined. When the frames of the multicast flow arrive at the switch with the
destination multicast MAC address, they are forwarded down only those ports
where the IGMP messages were snooped, and associated CAM table entries were
created. When the switch snoops the IGMP leave group message from a host, the
switch removes the table entry.