Configuration Guide
IP Multicast Configuration
IGMP Snooping Configuration
19 min
introduction introduction igmp snooping (internet group management protocol snooping) is a network switch technology used to intelligently manage the transmission of multicast data based on the actual needs of receivers (hosts or routers) during multicast communication igmp snooping listens to igmp messages on the network to understand which devices are interested in specific multicast groups and makes decisions on which ports to forward multicast data based on this information igmp is a protocol used in ipv4 networks to manage multicast group membership relationships between hosts and routers hosts can notify routers about their interest in specific multicast groups by sending igmp messages, and routers maintain multicast group membership tables based on these messages igmp snooping is the technology that implements this management mechanism on switches explanation of principles explanation of principles in igmp, ports have two roles member ports member ports refer to the switch ports connected to host devices such as computers, routers, etc these ports listen to igmp messages sent by hosts to determine which multicast groups the hosts are interested in based on this information, the switch can decide which member ports to forward multicast data to router ports router ports are switch ports connected to routers routers are responsible for providing multicast services to multiple subnets in the network router ports listen to igmp messages sent by routers to determine which multicast groups the router is a member of switches forward multicast data to these ports so that routers can distribute multicast data across various subnets the specific handling of different igmp actions by switches running igmp snooping is as follows general group query messages when the switch receives igmp general group query messages, it forwards them out through all ports in the vlan except the receiving port for the receiving port, the switch handles it as follows if the dynamic router port is already included in the router port list, its aging timer is reset if the dynamic router port is not yet included in the router port list, it is added to the router port list, and its aging timer is started membership report messages when hosts receive igmp query messages or want to join a multicast group, they send igmp membership report messages to the igmp querier when the switch receives igmp membership report messages, it forwards them out through all router ports in the vlan for the receiving port, the switch handles it as follows if there is no forwarding table entry for the multicast group, one is created, and the port is added as a dynamic member port to the outgoing port list, and its aging timer is started if there is an existing forwarding table entry for the multicast group but the port is not included in the outgoing port list, the port is added as a dynamic member port to the outgoing port list, and its aging timer is started if there is an existing forwarding table entry for the multicast group and the port is already included in the outgoing port list as a dynamic member port, its aging timer is reset leaving multicast groups when hosts running igmpv2 or igmpv3 leave multicast groups, they send igmp leave group messages to notify the multicast router that they are leaving a specific multicast group if the switch does not have a forwarding table entry for the multicast group or if the port is not included in the outgoing port list for the corresponding multicast group, the switch does not forward the leave group message to any port and discards it directly if there is a forwarding table entry for the multicast group and the port is included in the outgoing port list for the corresponding multicast group, the switch forwards the leave group message out through all router ports in the vlan additionally, since the switch does not know if there are other members of the multicast group on the receiving port, it does not immediately remove the port from the outgoing port list for the multicast group instead, it resets the aging timer for the port igmp snooping configuration igmp snooping configuration configuring static multicast configuring static multicast configuring static multicast member configuring static multicast member operation command description enter the vlan view vlan id enable igmp snooping function igmp snooping enable enter the system configuration view configure configure a static router port vlan mroute vlan id ethernet interface name configure a static member port interface l2mc static group ethernet interface name vlan id ip address interface name interface name vlan id vlan id of the interface ip address the multicast group address that the interface statically joins display and maintenance display and maintenance operation command view igmp enablement information show vlan igmp snooping \[vlan id vlan id ] display igmp snooping router port information show vlan mrouter view membership information for multicast groups show l2 multicast table check the aging time for igmp snooping router ports show vlan mrouter aging display aging time for all dynamic member ports show multicast membership interval igmp snooping configuration igmp snooping configuration configuring basic igmp snooping functionality configuring basic igmp snooping functionality operation command description enter the vlan view vlan id enable igmp snooping function igmp snooping enable enable igmp snooping querier igmp snooping querier enable configure the source address for igmp queries igmp snooping querier ip ip address configuring igmp snooping port aging time configuring igmp snooping port aging time after receiving different igmp protocol messages, the device starts aging timers for member ports with different durations when member ports of the device receive report messages from downstream hosts, the port aging time is set to robustness factor × general query interval + maximum response time when member ports of the device receive leave messages from downstream hosts, the port aging time is set to specific query interval × robustness factor operation command description enter the vlan view vlan id configure the igmp snooping general query interval igmp snooping query interval value configure the igmp snooping maximum response time igmp snooping query max response time value configure the igmp snooping specific query interval igmp snooping last member query interval value configure the igmp snooping robustness factor igmp snooping robustness value enabling fast leave on member interfaces enabling fast leave on member interfaces fast leave on a port means that when the switch receives an igmp leave message from a host indicating it is leaving a multicast group, the switch immediately removes that port from the outgoing port list for the corresponding forwarding table entry subsequently, when the switch receives a specific igmp query message for that multicast group, it will no longer forward it out of that port operation command description enter the interface view interface ethernet id enable fast leave on member interface prompt leave enable enabling igmp snooping proxy function enabling igmp snooping proxy function when there are numerous member hosts in the network or when member hosts frequently join/leave multicast groups, a large number of igmp join/leave messages may be generated, resulting in significant processing pressure on the access devices to reduce the number of igmp join and leave messages received by upstream devices, igmp snooping proxy functionality can be configured on edge devices to allow them to act as proxies for downstream hosts to send join and leave messages to upstream devices handling of join messages upon receiving a join message for a multicast group on a port, if a forwarding table entry exists for that group and its outgoing port list already includes the dynamic member port, reset the aging timer for that entry if a forwarding table entry exists for the multicast group but its outgoing port list does not include the port, add the port as a dynamic member port to the outgoing port list and start its aging timer if no forwarding table entry exists for the multicast group on the device, create one, add the port as a dynamic member port to the outgoing port list, start its aging timer, and send a report message for that group to all router ports handling of leave messages upon receiving a leave message for a multicast group on a port, send a specific query message for that group to the port only send a leave message for the group to all router ports when removing the last member port from the corresponding forwarding table entry for that multicast group handling of general group query messages upon receiving a general group query message, forward it to all ports in the vlan except the receiving port generate report messages based on locally maintained group membership relationships and forward them to all router ports simultaneously operation command description enter the vlan view vlan id enable igmp snooping function igmp snooping enable enable igmp snooping proxy function igmp snooping proxy enable configuration example configuration example static multicast configuration example static multicast configuration example network requirements network requirements router through the device connected to the user network, the network has a, b, c three users, where only two users a and b need to receive multicast data from multicast group 224 1 1 1, c does not need to receive procedure procedure create a vlan and add member interfaces sonic(config)# vlan 100 sonic(config)# port group ethernet 1 4 sonic(config port group 1 4)# switchport access vlan 100 enable igmp snooping on the interface and add interfaces ethernet2, 3 to the multicast group in a static manner sonic(config)# interface ethernet 1 sonic(config if 1)# igmp snooping enable sonic(config)# interface ethernet 2 sonic(config if 2)# igmp snooping enable sonic(config)# interface ethernet 3 sonic(config if 3)# igmp snooping enable sonic(config)# interface ethernet 4 sonic(config if 4)# igmp snooping enable sonic(config)# interface l2mc static group ethernet 2 100 224 1 1 1 sonic(config)# interface l2mc static group ethernet 3 100 224 1 1 1 verify configuration verify configuration view multicast group information sonic# show l2 multicast table total l2 multicast forwarding group counters 2 (source,group) interface vlan \ (0 0 0 0, 224 1 1 1) ethernet2 100 ethernet3 100 send a multicast message with destination ip 224 1 1 1 to confirm that only a and b can receive the multicast message and c cannot receive the multicast message igmp snooping configuration igmp snooping configuration network requirements network requirements router connects to user network as igmp querier through device, there are two users in the network, pc a and pc b igmp snooping is running on device, multicast source sends data to multicast group 224 1 1 1,225 1 1 1 procedure procedure create vlans and add member interfaces sonic(config)# vlan 100 sonic(config vlan 100)# igmp snooping enable sonic(config)# port group ethernet 1 3 sonic(config port group 1 3)# switchport access vlan 100 verify configuration verify configuration view multicast group information sonic# show l2 multicast table total l2 multicast forwarding group counters 2 (source,group) interface vlan \ (0 0 0 0, 224 1 1 1) ethernet2 100 ethernet3 100 (0 0 0 0, 225 1 1 1) ethernet2 100 ethernet3 100 send multicast messages with destination ip 224 1 1 1 and 225 1 1 1 respectively to confirm that a and b can receive the multicast messages
