205
To do… Use the command… Remarks
Set the limit of port security on the
number of MAC addresses
port-security max-mac-count
count-value
Required
Not limited by default
NOTE:
The port security’s limit on the number of MAC addresses on a port is independent of the MAC learnin
limit described in MAC address table configuration
in the
Layer 2—LAN Switching Configuration Guide
.
Setting the port security mode
Configuration prerequisites
Before you set a port security mode for a port, complete the following tasks:
• Disable 802.1X and MAC authentication.
• Check that the port does not belong to any aggregation group or service loopback group.
• If you are configuring the autoLearn mode, set port security’s limit on the number of MAC addresses.
You cannot change the setting when the port is operating in autoLearn mode.
NOTE:
• You can specify a port security mode when port security is disabled, but your configuration cannot take
effect.
• You cannot change the port security mode of a port when online users are present.
Configuration procedure
Follow these steps to enable a port security mode:
To do… Use the command… Remarks
Enter system view system-view —
Set an OUI value for user
authentication
port-security oui oui-value index
index-value
Required for the userlogin-withoui
mode
Not configured by default.
To set multiple OUI values, repeat this
step.
Enter Layer 2 Ethernet
interface view
interface interface-type
interface-number
—