[Sysname-GigabitEthernet1/0/1] port-security port-mode secure
# Change the port security mode of port GigabitEthernet 1/0/1 to userLogin.
[Sysname-GigabitEthernet1/0/1] undo port-security port-mode
[Sysname-GigabitEthernet1/0/1] port-security port-mode userlogin
port-security timer autolearn aging
Syntax
port-security timer autolearn aging time-value
undo port-security timer autolearn aging
View
System view
Default level
2: System level
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.
Description
Use port-security timer autolearn aging to set the secure MAC aging timer. The timer applies to all sticky
or dynamic secure MAC addresses.
Use undo port-security timer autolearn aging to restore the default.
By default, secure MAC addresses never age out.
Related commands: display port-security and port-security mac-address security.
Examples
# Set the secure MAC aging timer to 30 minutes.
<Sysname> system-view
[Sysname] port-security timer autolearn aging 30
port-security timer disableport
Syntax
port-security timer disableport time-value
undo port-security timer disableport
View
System view
Default level
2: System level
Parameters
time-value: Specifies the silence period during which the port remains disabled, in seconds. It is in the
range of 20 to 300.
139