205
with the MAC authentication delay function. For more information about MAC authentication delay, see
"MAC authentication commands."
Examples
# Enable port security and configure port GigabitEthernet 2/1/1 to operate in secure mode.
<Sysname> system-view
[Sysname] port-security enable
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] port-security port-mode secure
# Change the port security mode of port GigabitEthernet 2/1/1 to userLogin.
[Sysname-GigabitEthernet2/1/1] undo port-security port-mode
[Sysname-GigabitEthernet2/1/1] port-security port-mode userlogin
Related commands
• display port-security
• port-security max-mac-count
port-security timer autolearn aging
Use port-security timer autolearn aging to set the secure MAC aging timer.
Use undo port-security timer autolearn aging to restore the default.
Syntax
port-security timer autolearn aging time-value
undo port-security timer autolearn aging
Default
Secure MAC addresses do not age out.
Views
System view
Predefined user roles
network-admin
Parameters
time-value: Sets the aging timer in minutes for secure MAC addresses. The value is in the range of 0 to
129600. To disable the aging timer, set the timer to 0.
Usage guidelines
The timer applies to all sticky secure MAC addresses and those automatically learned by a port.
A short aging time improves port access security and port resource utility but affects online user stability.
Set an appropriate secure MAC address aging timer according to your device performance and the
network environment.
Examples
# Set the secure MAC aging timer to 30 minutes.
<Sysname> system-view
[Sysname] port-security timer autolearn aging 30