Enabling MLD Snooping
Context
Global MLD snooping must be enabled before other MLD snooping configurations can be performed. Enabling MLD snooping in a VLAN is required for other MLD snooping configurations to take effect in the VLAN. If MLD snooping is disabled in a VLAN, other MLD snooping configurations can be performed but do not take effect until MLD snooping is enabled in the VLAN.
By default, MLD snooping is disabled globally.
Procedure
- Run system-view
The system view is displayed.
- Run mld-snooping enable
MLD snooping is enabled globally.
- Run vlan vlan-id
The VLAN view is displayed.
- (Optional) Run l2-multicast forwarding-mode { ip | mac }
The multicast forwarding mode in the VLAN is set to IP address-based or MAC address-based forwarding.
By default, the IP address-based forwarding mode is used.
Set the multicast forwarding mode before enabling MLD snooping in the VLAN. The specified multicast forwarding mode takes effect only after MLD snooping is enabled.
A VLAN cannot be configured as a multicast VLAN after MAC address-based forwarding is configured in the VLAN using this command.
If the switch forwards multicast data packets based on MAC addresses, do not use a group address that maps to the same multicast MAC address as a multicast IP address reserved for a protocol. Otherwise, the protocol that uses the multicast IP address cannot run normally. For example, OSPF uses FF02::5 to send protocol packets. This multicast IP address maps to multicast MAC address 33-33-00-00-00-05. If multicast data packets are forwarded based on MAC addresses and use multicast IP address FF13::5 (also mapping to 33-33-00-00-00-05), the OSPF protocol cannot run normally.
- (Optional) Run l2-multicast router-port-discard
The switch is disabled from forwarding multicast data to router ports in a VLAN.
Before disabling the switch from forwarding multicast data to router ports in a VLAN, disable MLD snooping in the VLAN. After setting the forwarding mode, enable MLD snooping in the VLAN for the configuration to take effect.
- Run mld-snooping enable
MLD snooping is enabled in the VLAN.
To enable MLD snooping in multiple VLANs, run mld-snooping enable [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] command in the system view.
IGMP snooping cannot be used with N:1 (N > 1) VLAN mapping.