IGMP Snooping Technology Introduction IGMP Snooping IGMP is short for Internet Group Management Protocol Snooping (Internet Group Management Protocol Snooping). It is a multicast constraint mechanism running on a layer-2 device, used to manage and control multicast groups. IGMP Snooping: A layer-2 device that runs IGMP Snooping establishes a ing relationship between the port and the MAC multicast address by analyzing the received IGMP packets, the multicast data is forwarded based on the ing relationship. 1. When the layer-2 device does not run IGMP Snooping, multicast data is broadcast on the layer-2 device. When the layer-2 device runs IGMP Snooping, it is known that multicast data is not broadcast on the second layer, but is multicast on the second layer to the specified receiver. Figure 1 Comparison Between IGMP Snooping and IGMP Snooping on a layer-2 device: IGMP Snooping forwards information only to the desired receiver through layer-2 multicast, which brings the following benefits: l reduces the number of broadcast packets in the layer-2 network, saves network bandwidth; l enhances the security of multicast information; l facilitates separate billing for each host. Basic concepts of IGMP Snooping 1. as shown in Port 2 related to IGMP Snooping, Router A connects to the Multicast Source and runs IGMP Snooping on Switch A and Switch B respectively, host A and Host C are receiver hosts (group members ). Figure 2 combination of IGMP Snooping-related ports Figure 2 introduces the concept of IGMP Snooping-related ports: l Router Port (Router Port): layer-3 multicast device on the switch (DR or IGMP finder) ports on one side, such as the Ethernet1/1 ports of Switch A and Switch B. The vswitch records all the vro ports on the device in the vro port list. L Member Port (Member Port): Also known as the multicast group Member Port, indicates the Port on the vswitch facing the multicast group Member side, such as the Ethernet1/2 and Ethernet1/3 Ports of Switch, and port Ethernet1/2 of Switch B. The switch records all member ports on the device in the IGMP Snooping forwarding table. L The vro ports mentioned in this Article refer to the ports on the vswitch facing the multicast router, not the ports on the vro. L Unless otherwise specified, the vro/member ports mentioned in this article both include dynamic and static ports. L on a switch running IGMP Snooping, all the ports that receive the IGMP Universal Query packet or PIM Hello packet whose source address is not 0.0.0.0 will be regarded as dynamic router ports. 2. IGMP Snooping dynamic port aging timer Table 1 IGMP Snooping dynamic port aging timer description before timeout messages should be received after the switch action dynamic router port aging timer switch for each of its dynamic router ports start a timer, the timeout time is the aging time of the dynamic router port. When the source address is not 0.0.0.0, the IGMP universal group query packet or the PIM Hello packet deletes the port from the router port list, the dynamic member port aging timer is used as a port. when dynamically joining a multicast group, the switch starts a timer for the port, the timeout time is the aging time of the dynamic member port. The IGMP member relationship report packet removes the IGMP Snooping port from the IGMP Snooping forwarding table. The Aging Mechanism of the IGMP Snooping port is only for the dynamic port, and the static port never expires. The IGMP Snooping mechanism runs the IGMP Snooping switch to handle different IGMP actions as follows: the added or deleted ports described in this section are only for dynamic ports, static ports can only be added or deleted through corresponding configurations. 1. The universal group query IGMP queryer regularly sends IGMP universal group Query Packets to all hosts and routers (224.0.0.1) in the primary network segment to query the multicast group members in the CIDR block. When receiving an IGMP Universal Query packet, the switch forwards it through all the ports except the receiving ports in the VLAN and processes the receiving ports of the packet as follows: l if the dynamic router port is included in the vro port list, reset the aging timer. L if the dynamic router port is not included in the vro port list, add it to the vro port list and start its aging timer. 2. the host sends an igmp report to the igmp queryer when the multicast group receives the IGMP query packet. L if the host wants to join a multicast group, it will send an IGMP Membership report to the igmp queryer to declare the host to join the multicast group. When receiving the IGMP Membership report, the switch forwards all the router ports in the VLAN and resolves the multicast group address to which the host is to be added from the report, handle the receiving port of the message as follows: l if the forwarding table corresponding to the multicast group does not exist, create a forwarding table, add the port as a dynamic member port to the output port list and start its aging timer. l if the forwarding table corresponding to the multicast group already exists, however, if the output port list does not contain this port, add the port as a dynamic member port to the output port list and start its aging timer; l if the forwarding table corresponding to the multicast group already exists and the outgoing port list contains the dynamic member port, reset the aging timer. The switch does not forward the IGMP report packet through a non-router port, because according to the IGMP report Suppression Mechanism on the host, if a member host of the multicast group exists under a non-vro port, these hosts suppress their reports after receiving the report, as a result, the vswitch cannot know that there are members of the multicast group under these ports. 3. When a host that leaves the multicast group and runs IGMPv1, it does not send an IGMP departure packet. Therefore, the switch cannot immediately learn about the departure of the host. However, because the host does not send IGMP member relationship report messages after it leaves the multicast group, when the aging timer of the corresponding dynamic member port times out, the switch will delete the forwarding table corresponding to the port. When a host running IGMPv2 or IGMPv3 leaves the multicast group, it sends an IGMP departure packet to notify the multicast router that it has left a multicast group. When a vswitch receives an IGMP departure packet from a dynamic member port, it first determines whether the forwarding table corresponding to the multicast group to be left exists, and whether the output port list of the forwarding table corresponding to the multicast group contains the receiving port: l if the forwarding table corresponding to the multicast group does not exist, or the output port list of the forwarding table corresponding to the multicast group does not contain this port. The switch does not forward the packet to any port and directly discards it; l if the forwarding table entry corresponding to the multicast group exists and the outgoing port list of the forwarding table entry corresponding to the multicast group contains this port, the switch forwards the packet through all the router ports in the VLAN. At the same time, because you do not know whether the receiving port has other members of the multicast group, therefore, the switch does not immediately delete the port from the output port list of the forwarding table corresponding to the multicast group, but resets its aging timer. After the IGMP queryer receives the IGMP departure packet, it parses the address of the multicast group to which the host is to leave and sends the IGMP query packet to the multicast group through the receiving port. After receiving an IGMP query packet from a specific group, the switch forwards the packet through all the router ports in the VLAN and all the member ports in the multicast group. For the receiving port (assumed as a dynamic member port) of the IGMP departure group message, the switch is in the aging time: l if the host receives the IGMP member relationship report packet from the port in response to the query of the specific group, it indicates that there are members of the multicast group under the port, and the aging timer is reset; l if the host does not receive the IGMP member relationship report packet from the port in response to a specific group query, it indicates that the port does not have members of the multicast group, after the aging time times out, It is deleted from the output port list of the forwarding table corresponding to the multicast group. IGMP Snooping Proxying: By configuring IGMP Snooping Proxying (IGMP Snooping proxy) on edge devices, you can reduce the number of IGMP report messages and exit messages received by upstream devices, it effectively improves the overall performance of its upstream devices. A device with the IGMP Snooping Proxying function (IGMP Snooping proxy device) is equivalent to a host on its upstream device, while a downstream host is equivalent to a queryer. Although the IGMP Snooping proxy device is equivalent to a host on its upstream device, the IGMP Membership report Suppression Mechanism on the host does not take effect on the IGMP Snooping proxy device. Figure 3 IGMP Snooping Proxying networking Figure 3 shows that Switch A, as the IGMP Snooping proxy device, is A host for its upstream device Router, the proxy downstream host sends A report and an exit message to Router A, which is A queryer for its downstream host, proxy Router A sends A universal group query message and A specific group query message to the downstream host to maintain the group membership relationship. The IGMP Snooping proxy device processes IGMP packets in table 2. Table 2 IGMP Snooping proxy device IGMP Message Processing Method IGMP Message Type processing method after receiving a Universal Query packet, forward to all ports except the receiving ports in this VLAN. Report packets are generated based on the group members that are locally maintained, when a query packet of a specific group is sent to all vro ports and a query packet of a specific group is received for a multicast group, if the forwarding table corresponding to the Group contains a member port, if the multicast group's report packet is received from a port and the corresponding Forwarding Table item exists, if the dynamic member port exists in the output port list, the aging timer is reset. If the forwarding table corresponding to the group exists, but the output port list does not contain the port, add the port as a dynamic member port to the output port list and start its aging timer. If no forwarding table entry exists for this group, create a forwarding table entry, add the port as a dynamic member port to the output port list, start its aging timer, and then send the Group's report packet to all router ports to receive a multicast packet from a port After the departure packet of the group, send the query packet for the specific group to the port. Only when the last member port in the forwarding table corresponding to a multicast group is deleted, after the switch that supports the IGMP Snooping function enables layer-3 multicast routing, the processing of multicast protocol messages varies in different situations. The specific rules are as follows: (1) if only IGMP is enabled on the switch, or IGMP and PIM are enabled at the same time, general processing is performed. (2) If only PIM: l is enabled on the switch for IGMP packets, it is broadcast as an unknown packet in the VLAN; l for PIM Hello packets, the corresponding dynamic router port is maintained for it. (3) When IGMP is disabled on a vswitch: l if PIM is not enabled, delete all dynamic member ports and dynamic router ports; l if PIM is enabled, the dynamic member port is deleted, and only the dynamic router port is retained. (4) When PIM is disabled on a vswitch: l if IGMP is not enabled, delete the dynamic router port; l if IGMP is enabled, all dynamic member ports and dynamic router ports are retained.