IEEE 802.1x is a standard which facilitates access control between a client and a server. Before services can be provided to a client by a Local Area Network (LAN) or switch, the client connected to the switch port has to be authenticated by the authentication server which runs Remote Authentication Dial-In User Service (RADIUS).
The 802.1x authentication restricts unauthorized clients from connecting to a LAN through publicly-accessible ports. The 802.1x authentication is a client-server model. In this model, network devices have the following specific roles:
- 802.1x-based — Supported in all authentication modes. In 802.1x-based authentication, the authenticator extracts the Extensible Authentication Protocol (EAP) messages from the 802.1x messages or EAP over LAN (EAPoL) packets, and passes them to the authentication server, using the RADIUS protocol.
- MAC-based — Supported in all authentication modes. With Media Access Control (MAC)-based, the authenticator itself executes the EAP client part of the software on behalf of the clients seeking network access.
- Web-based — Supported only in multi-sessions modes. With web-based authentication, the authenticator itself executes the EAP client part of the software on behalf of the clients seeking network access.
Note: A network device can be either a client or supplicant, authenticator, or both per port.
The image below displays a network that have configured the devices according to the specific roles. In this example, an SG350X switch is used.
However, you can also configure some ports on your switch as supplicants. Once the supplicant credentials are configured on a specific port on your switch, you can directly connect the devices that are not 802.1x-capable so the devices would be able to access the secured network. The image below shows a scenario of a network that has configured a switch as a supplicant.
Guidelines in configuring 802.1x:
You can configure the switch as an 802.1x supplicant (client) on the wired network. An encrypted user name and password can be configured to allow the switch to authenticate using 802.1x.
On the networks that use IEEE 802.1x port-based network access control, a supplicant cannot gain access to the network until the 802.1x authenticator grants access. If your network uses 802.1x, you must configure 802.1x authentication information on the switch so that it can supply the information to the authenticator.
This article provides instructions on how to configure 802.1x supplicant credentials on your switch through the CLI.
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Note: To learn how to access an SMB switch CLI through SSH or Telnet, click here.
Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X switch is accessed through Telnet.
Step 2. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
Step 3. To define the name of an 802.1x credential structure and enter the dot1x credentials configuration mode, enter the following:
Note: The switch supports up to 24 credentials. In this example, cisco is used.
Step 4. (Optional) To remove the credential structure, enter the following:
Note: A used credential cannot be removed.
Step 5. To specify a username for an 802.1x credential structure, enter the following:
Note: In this example, switchuser is the specified username.
Step 6. (Optional) To remove the username, enter the following:
Step 7. To specify a password for an 802.1x credential structure, enter either of the following:
Note: In this example, the plaintext password C!$C0123456 is entered.
Step 8. (Optional) To remove the password, enter the following:
Step 9. (Optional) To add a description for the 802.1x credential structure, enter the following:
Note: In this example, the description used is sg350x-supplicant.
Step 10. (Optional) To remove the description, enter the following:
Step 11. Enter the end command to go back to the Privileged EXEC mode:
Step 12. (Optional) To display the configured 802.1x credentials, enter the following:
Step 13. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file by entering the following:
Step 14. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.
You should now have successfully configured an 802.1x credential on your switch through the CLI.
To apply the configured 802.1x supplicant credentials, you must configure 802.1x authentication information on the switch so that it can supply the information to the authenticator. Follow these steps to configure an 802.1x supplicant interface:
Step 1. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
Step 2. In the Global Configuration mode, enter the Interface Configuration context by entering the following:
Note: When the supplicant is enabled on an interface, the interface becomes an unauthorized. In this example, interface ge1/0/19 is being configured.
Step 3. To enable the dot1x supplicant role for the interface, enter the following:
Note: In this example, the previously created credential name is used which is cisco.
Step 4. Enter the end command to go back to the Privileged EXEC mode:
Step 5. To display the 802.1x status for the configured interface, use the show dot1x command in Privileged EXEC mode:
Note: In this example, the 802.1x information for interface ge1/0/19 is displayed.
You should now have successfully configured an 802.1x supplicant on an interface on your switch through the CLI.