The mld-snooping enable command enables MLD snooping globally or in a VLAN.
The undo mld-snooping enable command disables MLD snooping globally or in a VLAN.
By default, MLD snooping is disabled.
# System view
mld-snooping enable [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
undo mld-snooping enable [ vlan { all | { vlan-id1 [ to vlan-id2 ] } &<1-10> } ]
# VLAN view
mld-snooping enable
undo mld-snooping enable
Parameter |
Description |
Value |
---|---|---|
vlan vlan-id1 [ to vlan-id2 ] |
Disables MLD snooping on the specified VLANs. vlan-id1 and vlan-id2 identify a range of VLANs. If VLAN IDs are specified, MLD snooping is enabled in the specified VLANs. If no VLAN ID is specified, MLD snooping is enabled globally. |
The values of vlan-id1 and vlan-id2 are integers that range from 1 to 4094. vlan-id2 must be larger than vlan-id1. |
all |
Disables MLD snooping on all VLANs. |
- |
Usage Scenario
MLD snooping runs on a Layer 2 device between a Layer 3 multicast device and hosts, and listens on multicast protocol packets exchanged between the Layer 3 device and hosts to maintain a Layer 2 multicast forwarding table. The Layer 2 device manages and controls Layer 2 multicast forwarding based on this forwarding table.
Before configuring MLD snooping, enable global MLD snooping using the mld-snooping enable command in the system view. Other MLD snooping configuration commands can be used only after global MLD snooping is enabled.
You can enable MLD snooping in multiple VLANs by using the mld-snooping enable command in the system view.
Precautions
After MLD snooping is enabled in a VLAN, IPv6 Layer 3 multicast cannot be configured on the corresponding VLANIF interface. To use the two functions simultaneously, configure IPv6 Layer 3 multicast on the VLANIF interface before enabling MLD snooping in the VLAN.
After you run the undo mld-snooping enable command to disable global MLD snooping, all MLD snooping configurations on the switch are deleted. After you run the mld-snooping enable command to enable global MLD snooping again, the switch uses the default MLD snooping configuration.
For the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, the multicast functions (both Layer 2 and Layer 3 multicast functions) conflict with the flow control function.
# Enable global MLD snooping.
<HUAWEI> system-view [HUAWEI] mld-snooping enable
# Enable MLD snooping in multiple VLANs in the system view.
<HUAWEI> system-view [HUAWEI] mld-snooping enable [HUAWEI] mld-snooping enable vlan 2 to 10
<HUAWEI> system-view [HUAWEI] vlan 10 [HUAWEI-vlan10] mld-snooping enable