3Com S7902E Command Reference Manual - page 1878
1-12
View
Interface view
Default Level
2: System level
Parameters
autolearn
: Operates in autoLearn mode.
mac-authentication
: Operates in macAddressWithRadius mode.
mac-else-userlogin-secure
: Operates in macAddressElseUserLoginSecure mode.
mac-else-userlogin-secure-ext
: Operates in macAddressElseUserLoginSecureExt mode.
secure
: Operates in secure mode.
userlogin
: Operates in userLogin mode.
userlogin-secure
: Operates in userLoginSecure mode.
userlogin-secure-ext
: Operates in userLoginSecureExt mode.
userlogin-secure-or-mac
: Operates in macAddressOrUserLoginSecure mode.
userlogin-secure-or-mac-ext
: Operates in macAddressOrUserLoginSecureExt mode.
userlogin-withoui
: Operates in userLoginWithOUI mode.
Description
Use the
port-security port-mode
command to set the port security mode of a port.
Use the
undo port-security port-mode
command to restore the default.
By default, a port operates in noRestrictions mode, where port security does not take effect.
Note that:
z
Configuration of port security mode on a port is mutually exclusive with the configuration of 802.1X
authentication, port access control method, port access control mode, and MAC authentication on
the port.
z
With port security enabled, you can change the port security mode of a port only when the port is
operating in noRestrictions mode, the default mode. You can use the
undo port-security
port-mode
command to restore the default port security mode.
z
Before configuring the port security mode to autoLearn, be sure to configure the maximum number
of secure MAC addresses allowed on the port by using the
port-security max-mac-count
command.
z
You cannot change the port security mode of a port with users online.
Related commands:
display port-security
.
Examples
# Enable port security and configure the port security mode of port GigabitEthernet 2/0/1 as secure.
[Sysname] port-security enable
[Sysname] interface gigabitethernet 2/0/1
[Sysname-GigabitEthernet2/0/1] port-security port-mode secure
# Change the port security mode of port GigabitEthernet 2/0/1 to userLogin.