Setting the Maximum Number of Secure MAC Addresses 1165Setting the MaximumNumber of SecureMAC AddressesWith port security enabled, more than one authenticated user is allowed on aport. The number of authenticated users allowed, however, cannot exceed thespecified upper limited.By setting the maximum number of secure MAC addresses allowed on a port, youcan■ Control the maximum number of users who are allowed access the networkthrough the port■ Control the number of secure MAC addresses that can be added with portsecurityThis configuration is different from that of the maximum number of MACaddresses that can be leaned by the port in MAC address management.Follow these steps to set the maximum number of secure MAC addresses allowedon a port:Setting the PortSecurity ModeBefore setting the port security mode, ensure that:■ 802.1x is disabled, the port access control method is macbased, and the portaccess control mode is auto.■ MAC authentication is disabled.Otherwise, you will see an error message and your configuration will fail.On the other hand, after setting the port security mode on a port, you cannotchange any of the above configurations.n ■ With port security disabled, you can configure the port security mode but yourconfiguration does not take effect.■ With port security enabled, you can change the port security mode of a portonly when the port is operating in noRestrictions mode, the default mode. Youcan use the undo port-security port-mode command to restore the defaultport security mode.■ You cannot change the port security mode of a port when any user is presenton the port.■ Configuration of port security mode and aggregation are mutually exclusive.You cannot configure both of them on a port.To do… Use the command… RemarksEnter system view system-view -Enter Ethernet port view interface interface-typeinterface-number-Set the maximum number ofsecure MAC addressesallowed on a portport-securitymax-mac-count count-valueRequiredNot limited by default