The mac-address aging-time command sets the aging time of dynamic MAC address entries.
The undo mac-address aging-time command restores the default aging time of dynamic MAC address entries.
By default, the aging time of dynamic MAC address entries is 300 seconds.
Parameter |
Description |
Value |
---|---|---|
aging-time |
Specifies the aging time of dynamic MAC address entries. |
The value is 0 or an integer that ranges from 10 to 1000000, in seconds. The default value is 300. The value 0 indicates that dynamic MAC address entries will not be aged out. |
Usage Scenario
The network topology changes frequently, and the switch will learn many MAC addresses. You can run the mac-address aging-time command to set a proper aging time for dynamic MAC address entries so that aged MAC address entries are deleted from the MAC address table. This reduces MAC address entries in the MAC address table.
The system starts an aging timer for each dynamic MAC address entry. If a dynamic MAC address entry is not updated within a certain period (twice the aging time), the entry is deleted. If the entry is updated within this period, the aging timer of this entry is reset. If the aging time is short, the switch is sensitive to network changes.
When setting the aging time of dynamic MAC address entries, follow these rules:
Precautions
Dynamic MAC address entries are lost after system restart. Static MAC address entries and blackhole MAC address entries are not aged or lost.
If the aging time is 0, dynamic MAC address entries will not be aged out. In this case, MAC address entries increase sharply and the MAC address table will be full quickly.
If you run the mac-address aging-time command multiple times, only the latest configuration takes effect.