Configuration Guide
IP Multicast Routing Configuration Guide
15 min
igmp snooping igmp snooping introduction introduction igmp snooping (internet group management protocol snooping) is a network switch technology used to intelligently manage the transmission of multicast data in multicast communication according to the actual needs of the receiver (host or router) igmp snooping works by listening to igmp messages on the network, learns which devices are interested in specific multicast groups, and uses this information to decide on which ports to forward multicast data igmp is a protocol used in ipv4 networks to manage multicast membership between hosts and routers hosts can send igmp messages to notify routers which multicast groups they are interested in, and routers maintain multicast membership tables based on these messages igmp snooping, on the other hand, is the technology that implements this management mechanism on layer 2 switches basic concepts basic concepts member port member port a member port, also known as a multicast group member port, represents a port on a layer 2 multicast device that faces the member side of a multicast group a member port generated by the protocol is called a dynamic member port an interface that receives an igmp report message is identified as a dynamic member port by the layer 2 multicast device manually configured member ports are called static member ports these ports listen to igmp messages sent by hosts to learn which multicast groups the hosts are interested in based on this information, the switch can decide to forward multicast data to those member ports router port router port a router port is an interface on a layer 2 multicast device that faces the side of a layer 3 multicast device (dr or igmp querier) router ports generated by the protocol are called dynamic router ports interfaces that receive igmp universal group query messages with a source address other than 0 0 0 0 or pim hello messages (messages sent outward by the pim interface of a layer 3 multicast device for the purpose of discovering and maintaining neighbor relationships) are considered dynamic router ports manually configured router ports are called static router ports explanation of principle explanation of principle the switch running igmp snooping handles different igmp actions in the following specific ways universal group query messages universal group query messages the igmp querier periodically sends igmp universal group query messages to all hosts and routers in this network segment to query what multicast groups are members of this network segment upon receipt of an igmp universal group query message, the switch forwards it out through all ports in the vlan except the receiving port and does the following for the interface that receives the message resets the aging timer of the dynamic router port if it is already included in the router port list if this dynamic router port is not already included in the router port list, add it to the router port list and start the aging timer reporting membership reporting membership in the following two cases, the host sends an igmp membership report message to the igmp querier when a host that is a member of a multicast group receives an igmp query message, it replies with an igmp membership report message if a host wants to join a multicast group, it proactively sends an igmp membership report message to the igmp querier to declare joining the multicast group when it receives an igmp membership report message, the switch forwards it through all router ports in the vlan, resolves the address of the multicast group that the host wants to join from the message, and does the following for the receiving port of the message if the forwarding table entry corresponding to the multicast group does not exist, it creates the forwarding table entry, and adds the port as a dynamic member port if the forwarding table entry corresponding to the multicast group does not exist, create the forwarding table entry, add the port as a dynamic member port to the outgoing port list, and start its aging timer if the forwarding table entry corresponding to the multicast group already exists, but its outgoing port list does not contain this port, add the port as a dynamic member port to the outgoing port list, and start its aging timer if the forwarding table entry corresponding to the multicast group already exists if the forwarding table entry corresponding to the multicast group already exists and the dynamic member port is included in its outgoing port list, reset its aging timer leaving a multicast group leaving a multicast group when a host running igmpv2 or igmpv3 leaves a multicast group, it notifies the multicast router that it has left a multicast group by sending an igmp leave group message if the switch does not exist for that multicast group, it resets its aging timer if the switch does not have a forwarding table entry corresponding to this multicast group, or if the port is not included in the list of outgoing ports for the forwarding table entry corresponding to this multicast group, the switch does not forward this message to any port and discards it directly if the forwarding table entry corresponding to this multicast group exists and the port is included in the list of outgoing ports of the forwarding table entry corresponding to this multicast group, the switch forwards the message through all router ports in the vlan at the same time, since it is not known whether there are other members of the multicast group under the receiving port, the switch does not immediately remove the port from the outgoing port list of the forwarding table entry corresponding to the multicast group, but resets its aging timer igmp snooping configuration igmp snooping configuration configuring basic igmp snooping functionality configuring basic igmp snooping functionality table 1 configuring basic igmp snooping functionality table 1 configuring basic igmp snooping functionality purpose command description enter global configuration view configure terminal configure trap action for igmp igmp enable 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 source address ip address configure igmp snooping port aging time configure 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 table 2 configuring igmp snooping port aging time table 2 configuring igmp snooping port aging time purpose command description enter global configuration view configure terminal enter the vlan view vlan id configure the igmp snooping general query interval igmp snooping querier interval value configure the igmp snooping maximum response time igmp snooping querier max response time value configure the igmp snooping specific query interval igmp snooping querier last member interval value configure the igmp snooping robustness factor igmp snooping robustness value enable enable fast leave on member interfaces 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 table 3 enabling fast leave on member interfaces table 3 enabling fast leave on member interfaces purpose command description enter the interface view interface { ethernet interface name | link aggregation lag id } enable fast leave on member interface igmp snooping prompt leave enable enable igmp snooping proxy function enable 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 table 4 enabling igmp snooping proxy function table 4 enabling igmp snooping proxy function purpose command description enter global configuration view configure terminal enter the vlan view vlan id enable igmp snooping function igmp snooping enable enable igmp snooping proxy function igmp snooping proxy enable typical configuration example typical configuration example 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 create vlans and add member interfaces sonic(config)# vlan 100 sonic(config vlan 100)# igmp snooping enable sonic(config)# interface ethernet 0/1 sonic(config if 0/1)# switchport access vlan 100 sonic(config)# interface ethernet 0/2 sonic(config if 0/2)# switchport access vlan 100 sonic(config)# interface ethernet 0/3 sonic(config if 0/3)# switchport access vlan 100 verify configuration (1) check multicast group information sonic# show igmp snooping l2mc table vlan id src address group address port type mode \ 100 0 0 0 0 224 1 1 1 0/2 dynamic forward 100 0 0 0 0 224 1 1 1 0/3 dynamic forward 100 0 0 0 0 225 1 1 1 0/2 dynamic forward 100 0 0 0 0 225 1 1 1 0/3 dynamic forward (2) 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
