The igmp-snooping learning vlan command enables an interface to dynamically learn forwarding entries of VLAN.
The undo igmp-snooping learning vlan command disables an interface from dynamically learning forwarding entries of VLAN.
By default, an interface is enabled to dynamically learn forwarding entries.
Parameter | Description | Value |
---|---|---|
vlan-id1 | Specifies a start VLAN ID. |
The value is an integer ranging from 1 to 4094. |
to vlan-id2 | Specifies an end VLAN ID. If you do not specify to vlan-id2 interfaces are added only to the VLAN specified by vlan-id1. |
The value is an integer ranging from 1 to 4094. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN ID range. |
all | Indicates that dynamic forwarding entry learning is enabled in all the VLANs to which a specific interface belongs. |
- |
Usage Scenario
After you run the igmp-snooping learning vlan command to enable an interface dynamically to learn forwarding entries, the interface can both be added to a multicast group statically and learn forwarding entries dynamically based on received IGMP Report messages. After the interface is disabled from dynamically learning forwarding entries, you can only add the interface to a multicast group statically.If the igmp-snooping learning vlan command is run more than once, all configurations take effect.
<HUAWEI> system-view [~HUAWEI] igmp-snooping enable [*HUAWEI] vlan 3 [*HUAWEI-vlan3] igmp-snooping enable [*HUAWEI-vlan3] quit [*HUAWEI] vlan 4 [*HUAWEI-vlan4] igmp-snooping enable [*HUAWEI-vlan4] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] portswitch [*HUAWEI-GigabitEthernet0/1/0] port link-type trunk [*HUAWEI-GigabitEthernet0/1/0] port trunk allow-pass vlan 3 to 4 [*HUAWEI] undo igmp-snooping learning vlan 3 to 4