22
Disabling MAC address learning on an interface
When global MAC address learning is enabled, you can disable MAC address learning on a single
interface.
To disable MAC address learning on an interface:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter interface view.
•
Enter Layer 2 Ethernet interface
view:
interface
interface-type
interface-number
•
Enter Layer 2 aggregate
interface view:
interface bridge-aggregation
interface-number
N/A
3.
Disable MAC address
learning on the interface.
undo mac-address mac-learning
enable
By default, MAC address
learning on the interface is
enabled.
Disabling MAC address learning on a VLAN
When global MAC address learning is enabled, you can disable MAC address learning on a
per-VLAN basis.
To disable MAC address learning on a VLAN:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable global MAC address
learning.
mac-address mac-learning
enable
By default, global MAC address
learning is enabled.
3.
Enter VLAN view.
vlan
vlan-id
N/A
4.
Disable MAC address
learning on the VLAN.
undo mac-address
mac-learning enable
By default, MAC address learning
on the VLAN is enabled.
Configuring the aging timer for dynamic MAC
address entries
For security and efficient use of table space, the MAC address table uses an aging timer for each
dynamic MAC address entry. If a dynamic MAC address entry is not updated before the aging timer
expires, the device deletes the entry. This aging mechanism ensures that the MAC address table can
promptly update to accommodate latest network topology changes.
A stable network requires a longer aging interval, and an unstable network requires a shorter aging
interval.
An aging interval that is too long might cause the MAC address table to retain outdated entries. As a
result, the MAC address table resources might be exhausted, and the MAC address table might fail
to update to accommodate the latest network changes.