You can configure port security and 802.1X on the same interfaces. Port security secures the MAC addresses that 802.1X authenticates.
802.1X processes packets before port security processes them, so when you enable both on an interface, 802.1X is already preventing
inbound traffic on the interface from unknown MAC addresses.
When you enable 802.1X and port security on the same interface, port security continues to learn MAC addresses by the sticky
or dynamic method, as configured. Additionally, depending on whether you enable 802.1X in single-host mode or multiple-host
mode, one of the following occurs:
- Single host mode
Port security learns the MAC address of the authenticated host.
- Multiple host mode
Port security drops any MAC addresses learned for this interface by the dynamic method and learns the MAC address of the first
host authenticated by 802.1X.
If a MAC address that 802.1X passes to port security would violate the applicable maximum number of secure MAC addresses,
the device sends an authentication failure message to the host.
The device treats MAC addresses authenticated by 802.1X as though they were learned by the dynamic method, even if port security
previously learned the address by the sticky or static methods. If you attempt to delete a secure MAC address that has been
authenticated by 802.1X, the address remains secure.
If the MAC address of an authenticated host is secured by the sticky or static method, the device treats the address as if
it were learned by the dynamic method, and you cannot delete the MAC address manually.
Port security integrates with 802.1X to reauthenticate hosts when the authenticated and secure MAC address of the host reaches
its port security age limit. The device behaves differently depending upon the type of aging, as follows:
Port security notifies 802.1X and the device attempts to reauthenticate the host. The result of reauthentication determines
whether the address remains secure. If reauthentication succeeds, the device restarts the aging timer on the secure address;
otherwise, the device drops the address from the list of secure addressees for the interface.
Port security drops the secure address from the list of secure addresses for the interface and notifies 802.1X. The device
attempts to reauthenticate the host. If reauthentication succeeds, port security secures the address again.