IGMP snooping is designed to prevent hosts on a local network from receiving traffic for a multicast group they have not explicitly joined. If the switch does not run IGMP snooping, it broadcasts multicast packets at Layer 2. However, if IGMP snooping is enabled, switch forwards multicast packets only to specified host ports based on the Layer 2 multicast forwarding table.
IGMP snooping is a basic Layer 2 multicast function that forwards and controls the link layer multicast data. IGMP snooping runs on a Layer 2 multicast device and analyzes IGMP messages exchanged between a Layer 3 device and hosts to set up and maintain a Layer 2 multicast forwarding table. The Layer 2 multicast device forwards multicast packets based on this Layer 2 multicast forwarding table.
After a Layer 2 multicast forwarding table is set up, the Layer 2 multicast device searches the multicast forwarding table for outbound ports of multicast data packets according to the VLAN IDs and destination addresses (group addresses) of the packets. If there is an outbound port for the multicast data packet, the Layer 2 multicast device forwards the packet to the corresponding multicast group member port. If no outbound port is found, the multicast data packet will be dropped by the Layer 2 multicast device. However, the Layer 2 multicast device will forward the unknown multicast packet to the other router ports if there are other router ports other than the one on which it is received.
For more information about IGMP snooping, please refer to RFC 4541.