The mld-snooping learning command disables an interface in VLANs to dynamically learn forwarding entries.
The undo mld-snooping learning command disables the function.
By default, interfaces in VLANs are enabled to dynamically learn forwarding entries.
Parameter | Description | Value |
---|---|---|
vlan-id1 | Specifies the start VLAN ID. |
The value is an integer that ranges from 1 to 4094. |
to vlan-id2 | Specifies the last VLAN ID. If to vlan-id2 is not specified, the interface is added only to the multicast group in the VLAN specified by vlan-id1. |
The value is an integer that ranges from 1 to 4094. vlan-id2 must be greater than vlan-id1. vlan-id1 and vlan-id2 specify a range of VLANs. |
all | Disables an interface in all VLANs to learn forwarding entries. |
- |
Usage Scenario
To enable an interface to dynamically learn forwarding entries in MLD Report messages received, run the mld-snooping learning command. After this command is run for an interface, the interface can be added to a multicast group manually. However, after the undo mld-snooping learning command is run for an interface, the interface cannot dynamically learn forwarding entries, but can still be added to a multicast group manually.
If the undo mld-snooping learning command is run more than once, all configurations take effect.<HUAWEI> system-view [~HUAWEI] mld-snooping enable [*HUAWEI] vlan 3 [*HUAWEI-vlan3] mld-snooping enable [*HUAWEI-vlan3] quit [*HUAWEI] vlan 4 [*HUAWEI-vlan4] mld-snooping enable [*HUAWEI-vlan4] quit [*HUAWEI] interface GigabitEthernet 0/1/1 [*HUAWEI-GigabitEthernet0/1/1] portswitch [*HUAWEI-GigabitEthernet0/1/1] port link-type trunk [*HUAWEI-GigabitEthernet0/1/1] port trunk allow-pass vlan 3 to 4 [*HUAWEI-GigabitEthernet0/1/1] mld-snooping learning vlan 3 to 4