90When port security is enabled, you cannot enable 802.1X or MAC authentication, or change the accesscontrol mode or port authorization state. The port security automatically modifies these settings indifferent security modes.To enable port security:Step Command Remarks1. Enter system view. system-view N/A2. Enable port security. port-security enable By default, the port security isdisabled.You can use the undo port-security enable command to disable port security. Because it logs off theonline users, make sure no online users are present.Enabling or disabling port security resets the following security settings to the default:• 802.1X access control mode is MAC-based, and the port authorization state is auto.• Port security mode is noRestriction.For more information about 802.1X authentication and MAC authentication configuration, see"Configuring 802.1X" and "Configuring MAC authentication."Setting port security's limit on the number of secureMAC addresses on a portYou can set the maximum number of secure MAC addresses that port security allows on a port for thefollowing purposes:• Controlling the number of concurrent users on the port. For a port operating in a security mode thatperforms MAC authentication, 802.1X authentication, or both, the maximum number of concurrentusers on the port equals this limit or the limit of the authentication mode in use, whichever is smaller.• Controlling the number of secure MAC addresses on the port in autoLearn mode.The port security's limit on the number of secure MAC addresses on a port is independent of the MAClearning limit described in MAC address table configuration in Layer 2—LAN Switching ConfigurationGuide.To set the maximum number of secure MAC addresses allowed on a port:Step Command Remarks1. Enter system view. system-view N/A2. Enter interface view. interface interface-typeinterface-number N/A3. Set the maximum number ofsecure MAC addressesallowed on a port.port-security max-mac-countcount-valueBy default, port security does notlimit the number of secure MACaddresses on a port.