187
When port security is enabled, you cannot manually enable 802.1X or MAC authentication, or
change the access control mode or port authorization state. The port security automatically modifies
these settings in different security modes.
Examples
# Enable port security and set port GigabitEthernet 3/0/1 in secure mode.
<Sysname> system-view
[Sysname] port-security enable
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] port-security port-mode secure
# Change the port security mode of port GigabitEthernet 3/0/1 to userLogin.
[Sysname-GigabitEthernet3/0/1] undo port-security port-mode
[Sysname-GigabitEthernet3/0/1] port-security port-mode userlogin
Related commands
display port-security
port-security timer autolearn aging
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.
Syntax
port-security timer autolearn aging
time-value
undo port-security timer autolearn aging
Default
Secure MAC addresses never age out.
Views
System view
Default command level
2: System level
Parameters
time-value
: Sets the aging timer in minutes for secure MAC addresses. The value range is 0 to
129600. To disable the aging timer, set the timer to 0.
Examples
# Set the secure MAC aging timer to 30 minutes.
<Sysname> system-view
[Sysname] port-security timer autolearn aging 30
Related commands
•
display
port-security
•
port-security mac-address security
port-security timer disableport
Use
port-security timer disableport
to set the silence period during which the port remains
disabled.