Setting the Port Security ModeFollow these steps to set the port security mode:To do... Use the command... RemarksEnter system view —system-viewOptionalIn userLoginWithOUI mode, aport allows only one 802.1Xuser and one user whosesource MAC address containsa specified OUI to passauthentication at the sametime.Set the OUI value for userauthenticationport-security oui OUI-valueindex index-valueinterface interface-typeinterface-numberEnter Ethernet port view —port-security port-mode{ autolearn |mac-and-userlogin-secure |mac-and-userlogin-secure-ext | mac-authentication |mac-else-userlogin-secure |mac-else-userlogin-secure-ext | secure | userlogin |userlogin-secure |userlogin-secure-ext |userlogin-secure-or-mac |userlogin-secure-or-mac-ext| userlogin-withoui }RequiredBy default, a port operates innoRestriction mode. In thismode, access to the port is notrestricted.Set the port security modeYou can set a port securitymode as needed.z Before setting the port to operate in the autoLearn mode, be sure to set the maximum number ofsecure MAC addresses allowed on the port with the port-security max-mac-count command.z When the port operates in the autoLearn mode, you cannot change the maximum number ofsecure MAC addresses allowed on the port.z After you set the port security mode to autoLearn, you cannot configure any static or blackholeMAC addresses on the port.z After enabling port security, you can change the port security mode of a port only when the port isoperating in noRestriction mode, the default mode. To change the port security mode of a portoperating in any other mode, use the undo port-security port-mode command to restore thedefault port security mode first.If the port-security port-mode mode command has been executed on a port, none of the following canbe configured on the same port:z Maximum number of secure MAC addresses that the port can learnz Reflector port for port mirroringz Fabric portz Link aggregation15-9