To enable 802.1X authentication, use the authentication port-control auto command.
When the client is successfully authenticated, the port changes to an authorized state, allowing all frames from the client. If authentication fails, the port stays in the unauthorized state, with the option to retry. If the authentication server is unreachable, the switch will resend the request; after multiple failed attempts, access is denied.
When a client logs off, it sends an EAPOL-logoff message, causing the port to revert to the unauthorized state. Additionally, if the port link state changes from up to down, the port returns to the unauthorized state.