This article describes how to configure access policies (802.1X) on UniFi switches for wired clients. This article includes instructions on how to configure using the RADIUS server built-in to the UniFi Security Gateway and also UniFi Network configuration examples to point to your own authentication server.
- UniFi Switch
- UniFi Security Gateway
Table of Contents
- Network Diagram
- How to Enable the 802.1X Service on a Switch
- Differentiating 802.1X Port Modes
- How to Configure Fallback VLAN
- UniFi Network Application Configuration for Non-USG RADIUS Server
- Related Articles
The 802.1X standard has three components:
- Authenticators: Specifies the port or device that is sending messages to the RADIUS server before permitting system access.
- Supplicants: Specifies host connected to the port requesting access to the system services.
- Authentication Server: Specifies the external server, for example, the RADIUS server that performs the authentication on behalf of the authenticator, and indicates whether the user is authorized to access system services. The Port Access Control folder contains links to the following pages that allow you to view and configure 802.1X features on the system.
RADIUS Authentication and Authorization:
The process in which a client device is authorized with 802.1X goes as follows:
1. The client device is prompted for credentials.
2. User inputs credentials.
3. The client device sends a request on the data link layer to an authenticator to gain access to the network.
4. The authenticator device then sends a messaged called the "RADIUS Access Request" message to the configured RADIUS server.
5. The RADIUS server then returns one of three responses to the authenticator:
- Access-Reject: The user entered is denied all access either based on inability to provide correct identification or the user has been removed from the RADIUS server.
- Access-Challenge: The user needs additional information to authenticate such as secondary password, token, PIN, or card. This message is also used in more complex authentication where a secure tunnel is established between the user machine and RADIUS server.
- Access-Accept: The user is granted access to the network.
- Static IP to be used for the client.
- A specific address pool to be used for the client.
- Maximum time that a client can be authenticated.
- Access list parameters
- QoS specifics
- VLAN id to be used for the client (Dynamic VLAN).
How to Enable the 802.1X Service on a Switch
This option is found on the switch properties panel under Config > Services in the Security section when selecting an individual switch from the "Devices" section of the UniFi Network application.
Differentiating 802.1X Port Modes
- Auto: The port is unauthorized until a successful authentication exchange has taken place.
- Force Unauthorized: The port ignores supplicant authentication attempts and does not provide authentication services to the client
- Force Authorized: The port sends and receives normal traffic without client port-based authentication.
- MAC-Based: This mode allows multiple supplicants connected to the same port to each authenticate individually. Each host connected to the port must authenticate separately in order to gain access to the network. The hosts are distinguished by their MAC addresses.
Working with Port Profiles
Using port profiles for rapid deployment is recommended instead of applying 802.1X policies manually on each port.
- Navigate to Settings > Profiles > Switch Ports.
- Create a new profile with the desired 802.1X control.
How to Configure Fallback VLAN
The fallback VLAN is used when a client fails to authenticate with username and password or MAC authentication bypass. This setting is defined per-switch.
This option is found on the switch properties panel under Config > Services in the Security section when selecting an individual switch from the "Devices" section of the UniFi Network application. The Fallback option will appear once the 802.1X control option is enabled.
UniFi Network Application Configuration for Non-USG RADIUS Server
- Navigate to Settings > Profiles > RADIUS.
- Create a new RADIUS Profile with the information for the external RADIUS server.