The mac-learning smart vlan enable command enables flexible MAC address learning in a specified VLAN.
The undo mac-learning smart vlan enable command disables flexible MAC address learning in a specified VLAN.
By default, flexible MAC address learning is disabled in a VLAN.
mac-learning smart vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> enable
undo mac-learning smart vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> enable
Parameter | Description | Value |
---|---|---|
vlan-id1 | Specifies the start VLAN ID. | The value is an integer ranging from 1 to 4094. |
to vlan-id2 | Specifies the end VLAN ID. | The value is an integer ranging from 1 to 4094. The value of vlan-id2 must be greater than the value of vlan-id1. |
Usage Scenario
Enterprises usually adopt the ring or tree network topology to construct enterprise networks. Both network topologies require that devices at the convergence layer be able to learn a large number of MAC addresses in the case of enormous number of attached users.
As the number of attached users keeps growing, the specification of MAC entries supported by the devices cannot meet the need. As a result, MAC addresses of some users cannot be learned, and the packets of these users are broadcast in the VLAN, wasting network bandwidth and affecting the network performance.
To prevent the preceding problem, you can run the mac-learning smart vlan enable command in the system view to enable flexible MAC address learning in a VLAN. When less than three interfaces in the VLAN are Up, the system automatically disables MAC address learning in the VLAN, avoiding unnecessary resource consumption due to MAC address learning.
Prerequisites
Precautions
The system will delete the MAC entries after enabling flexible MAC address learning in the specified VLAN. When the number of Up interfaces in the VLAN exceeds 2, the system automatically enables MAC address learning in the VLAN. If a VLAN is configured as a MUX VLAN or is used as the outer VLAN in VLAN stacking or VLAN mapping configuration, flexible MAC address learning does not take effect in the VLAN.
If the mac-learning smart vlan command is run more than once, all configurations take effect.