{"id":6370,"date":"2026-05-04T12:10:34","date_gmt":"2026-05-04T12:10:34","guid":{"rendered":"http:\/\/docs.connexite.co.uk\/index.php\/docs\/connexite-documentation\/synapse-cli-documentation\/cli-configuring-802-1x-authentication\/"},"modified":"2026-05-04T12:19:09","modified_gmt":"2026-05-04T12:19:09","slug":"cli-configuring-802-1x-authentication","status":"publish","type":"docs","link":"https:\/\/docs.connexite.co.uk\/index.php\/docs\/network\/synapse-cli-documentation\/cli-configuring-802-1x-authentication\/","title":{"rendered":"Configuring 802.1X Authentication"},"content":{"rendered":"<h2 class=\"connexite-doc-h2\">Overview of 802.1X Authentication<\/h2>\n<p>The IEEE802 LAN\/WAN committee proposed the 802.1X protocol to solve the problem of wireless LAN network security. Later, the 802.1X protocol was widely used in Ethernet as a common access control mechanism for LAN ports, mainly to solve the problems of authentication and security in Ethernet. The 802.1X protocol is a port based network access control protocol. &quot;Port-based network access control&quot; means that, at the port level of the LAN access device, the access to the network resources is controlled through authentication for the connected user equipment. 802.1X Architecture The 802.1X system is a typical Client\/Server structure, as shown in Figure 3, including three entities: Client, Device and Authentication server. Figure 3 802.1X Authentication System Architecture<\/p>\n<ul class=\"connexite-doc-list\">\n<li>A client is an entity on a local area network that is authenticated by the device on the other end of the link. The client is generally a user terminal device, and the user can initiate 802.1X authentication by starting the client software. The client must support EAPOL (Extensible Authentication Protocol over LAN).<\/li>\n<li>The device side is another entity on the local area network that authenticates connected clients. The device side is usually a network device that supports the 802.1X protocol. It provides the client with a port to access the LAN. The port can be a physical port or a logical port.<\/li>\n<li>The authentication server is an entity that provides authentication services for the device. The authentication server is used for user authentication, authorization and accounting, usually a RADIUS (Remote Authentication Dial-In User Service) server.<\/li>\n<\/ul>\n<p>802.1X Authentication Method The 802.1X authentication system uses EAP (Extensible Authentication Protocol) to realize the exchange of authentication information between the client, the device and the authentication server.<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Between the client and the device, the EAP protocol packets use the EAPOL encapsulation format and are directly carried in the LAN environment.<\/li>\n<li>There are two ways to exchange information between the device and the RADIUS server. One is that the EAP protocol packet is relayed by the device, and is carried in the RADIUS protocol using the EAPOR (EAP over RADIUS) encapsulation format; the other is that the EAP protocol packet is terminated by the device. Packets with the PAP (Password Authentication Protocol) or CHAP (Challenge Handshake Authentication Protocol) attribute interact with the RADIUS server for authentication.<\/li>\n<\/ul>\n<p>802.1X Basic Concepts Controlled\/Uncontrolled Port The device side provides a port for the client to access the LAN. This port is divided into two logical ports: a controlled port and an uncontrolled port. Any frame arriving at this port is visible on both controlled and uncontrolled ports.<\/p>\n<ul class=\"connexite-doc-list\">\n<li>The uncontrolled port is always in a two-way connection state and is mainly used to transmit EAPOL protocol frames to ensure that the client can always send or receive authentication packets.<\/li>\n<li>The controlled port is in a bidirectional connection state in the authorized state and is used to transmit service packets; in the unauthorized state, it is forbidden to receive any packets from the client.<\/li>\n<\/ul>\n<p>Authorized\/Unauthorized Status The device uses the authentication server to authenticate the client that needs to access the LAN, and controls the authorization\/unauthorized status of the controlled port according to the authentication result (Accept or Reject). Figure 4 Shows the effect of different authorization states on the controlled port on packets passing through this port. The figure compares the port status of two 802.1X authentication systems. The controlled port of system 1 is in an unauthorized state (equivalent to opening the port switch), and the controlled port of system 2 is in an authorized state (equivalent to closing the port switch). Figure 4 Effects of Authorization Status on Controlled Ports The user can control the authorization status of the port through the access control mode configured under the port. The port supports the following three access control modes:<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Forced authorization mode (authorized-force): indicates that the port is always in an authorized state, allowing users to access network resources without authorization.<\/li>\n<li>Force unauthorized mode unauthorized-force): Indicates that the port is always in an unauthorized state and does not allow users to authenticate. The device does not provide authentication services for clients accessing through this port.<\/li>\n<li>Auto-identification mode (auto): indicates that the initial state of the port is an unauthorized state, only EAPOL packets are allowed to send and receive, and users are not allowed to access network resources; If the authentication is passed, the port switches to the authorized state, allowing the user to access network resources. This is also the most common case.<\/li>\n<\/ul>\n<h2 class=\"connexite-doc-h2\">Controlled Direction<\/h2>\n<p>In the unauthorized state, the controlled port can be set as one-way controlled and two-way controlled.<\/p>\n<ul class=\"connexite-doc-list\">\n<li>When two-way control is implemented, the transmission and reception of frames are prohibited;<\/li>\n<li>When unidirectional control is implemented, receiving frames from the client is prohibited, but sending frames to the client is allowed.<\/li>\n<\/ul>\n<p>Authentication process for 802.1X The 802.1X system supports EAP relay mode and EAP termination mode to interact with the remote RADIUS server to complete authentication. The following descriptions of the two authentication methods take the client&#039;s initiative to initiate authentication as an example.<\/p>\n<h2 class=\"connexite-doc-h2\">EAP Relay Mode<\/h2>\n<p>This method is specified by the IEEE 802.1X standard, and EAP (Extensible Authentication Protocol) is carried in other high-level protocols, such as EAP over RADIUS, so that the extensible authentication protocol packets can reach the authentication server through complex networks. Generally speaking, the EAP relay mode requires the RADIUS server to support EAP attributes: EAP-Message and Message-Authenticator, which are used to encapsulate EAP packets and protect RADIUS packets carrying EAP-Message respectively. The following takes EAP-MD5 as an example to introduce the basic business process, as shown in Figure5 Figure5 IEEE 802.1X EAP relay business process of authentication system The authentication process is as follows:<\/p>\n<ul class=\"connexite-doc-list\">\n<li>When the user needs to access the network, open the 802.1X client program, enter the username and password that have been applied and registered, and initiate a connection request (EAPOL-Start message).At this point, the client program will send a message requesting authentication to the device to start an authentication process.<\/li>\n<li>After receiving the data frame requesting authentication, the device will send a request frame (EAP-Request\/Identity message) to request the user&#039;s client program to send the entered username.<\/li>\n<li>The client program responds to the request from the device and sends the username information to the device through a data frame (EAP-Response\/Identity message). The device sends the data frame sent by the client through packet processing (RADIUS Access-Request message) to the authentication server for processing.<\/li>\n<li>After receiving the username information forwarded by the device, the RADIUS server compares the information with the username table in the database, finds the password information corresponding to the username, and encrypts it with a randomly generated encrypted word, and also send this encrypted word to the device through the RADIUS Access-Challenge message, and the device forwards it to the client program.<\/li>\n<li>After receiving the encrypted word (EAP-Request\/MD5 Challenge message) from the device, the client program uses the encrypted word to encrypt the password part (this encryption algorithm is usually irreversible), generate an EAP-Response\/MD5 Challenge packet, and send it to the authentication server through the device.<\/li>\n<li>The RADIUS server compares the received encrypted password information (RADIUS Access-Request message) with the local encrypted password information. If they are the same, the user is considered to be a legitimate user, and the authentication is passed. messages (RADIUS Access-Accept packets and EAP-Success packets).<\/li>\n<li>After receiving the authentication message, the device changes the port to the authorized state, allowing users to access the network through the port. During this period, the device will monitor the user&#039;s online status by periodically sending handshake messages to the client. By default, if the two handshake request packets are not answered by the client, the device will log the user offline, preventing the user from going offline due to abnormal reasons and the device cannot sense it.<\/li>\n<li>The client can also send an EAPOL-Logoff message to the device to actively request to log off. The device changes the port status from authorized to unauthorized, and sends an EAP-Failure packet to the client.<\/li>\n<\/ul>\n<h2 class=\"connexite-doc-h2\">Configuring<\/h2>\n<ul class=\"connexite-doc-list\">\n<li>Enabling\/disabling 802.1X Authentication Globally<\/li>\n<\/ul>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# dot1x enable<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no dot1x enable<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Enable and disable the 802.1X function globally.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x port-control auto<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x port-control auto<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">The port enables or disables the 802.1X function.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# radius-server host A.B.C.D auth-port &lt;0-65535&gt; acct-port &lt;0-65535&gt; key WORD<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no radius-server host A.B.C.D<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure authentication server information. The default authentication port is 1812 and the accounting port is 1813. Please ensure that the RADIUS server and the device management address communicate with each other.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x protocol-version &lt;1-2&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x protocol-version<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the version number of the EAPOL protocol on the specified port. Optional configuration, default is 2.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x quiet-period &lt;1-65535&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x quiet-period<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the hold time of the HELD state. Optional configuration, the unit is seconds, the default is 60.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x reauthentication<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x reauthentication<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">The re-authentication function is enabled on the configuration port. Optional configuration, disabled by default.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x reauthMax &lt;1-10&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x reauthMax<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the maximum number of times for port re-authentication. If the number of re-authentication requests exceeds the limit and there is no response, the port becomes unauthorized. Optional configuration, default 2 times.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x keytxenabled { disable | enable}<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the port key transfer function. Optional, disabled by default.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# dot1x timeout {re-authperiod &lt;1-4294967295&gt; | server-timeout &lt;1-65535&gt; | supp-timeout &lt;1-65535&gt; | tx-period &lt;1-65535&gt;}<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#no dot1x timeout {re-authperiod | server-timeout | supp-timeout | tx-period}<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the port timer time. Optional configuration, the default re-authentication period is 3600 seconds, the server timeout is 30 seconds, the client authentication timeout is 30 seconds, and the client request timeout is 30 seconds.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# mac-auth enable<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#no mac-auth enable<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Enable or disable the MAC authentication function globally.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# mac-auth {enable | disable}<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">The port enables or disables the MAC authentication function.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# mac-auth dynamic-vlan-creation {enable | disable}<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">The port enables or disables dynamic VLAN delivery of MAC authentication. The current version is not supported.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)# mac-auth auth-fail-action {drop-traffic | restrict-vlan &lt;2-4094&gt;}<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the behavior of MAC authentication failure. Optional configuration, default is drop-traffic: drop traffic. The current version is not supported.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# radius-server deadtime &lt;0-1440&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# no radius-server deadtime<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the RADIUS server death time.During the authentication process, the dead server will be automatically skipped, and the non-dead server will be selected for authentication. Optional configuration, the default is 0 minutes.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# radius-server key STRING<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# no radius-server key<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the RADIUS server default key. Optional configuration.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# radius-server retransmit &lt;1-100&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# no radius-server retransmit<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the RADIUS server retransmission times. Optional configuration, the default is 3 times.<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# radius-server timeout &lt;1- 60&gt;<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# no radius-server timeout<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Configure the RADIUS server timeout period. Optional configuration, the default is 5 seconds.<\/p>\n<h2 class=\"connexite-doc-h2\">Examples<\/h2>\n<p>802.1X Port Authentication Scenario \u200f \u2022 Requirement<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Requires authentication of access users on port GigabitEthernet0\/3 to control their access to the Internet.<\/li>\n<li>RADIUS server group IP address 1.1.1.2.<\/li>\n<li>Set the shared key to be used when the system exchanges packets with the RADIUS server as name.<\/li>\n<\/ul>\n<p>\u200f \u2022 Network Diagram Figure 6 802.1X Typical network diagram for 802.1x authentication<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Typical configuration example<\/li>\n<\/ul>\n<p>Device side:<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#dot1x enable<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#interface gigabitEthernet0\/3<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#dot1x port-control auto<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#exit<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#radius-server host 1.1.1.2 key name<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Server: Configure NAS authentication device 1.1.1.1 and communication key name. Add user account test password test. The corresponding authentication method needs to be supported, such as EAP-MSCHAPv2 Client: Enable 802.1X authentication client and log in with account test. The corresponding authentication method needs to be supported, such as the EAP-MSCHAPv2 method.<\/p>\n<h2 class=\"connexite-doc-h2\">MAC Authentication Scenario<\/h2>\n<p>\u200f \u2022 Requirement<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Requires authentication of access users on port GigabitEthernet0\/3 to control their access to the Internet.<\/li>\n<li>RADIUS server group IP address 1.1.1.2.<\/li>\n<li>Set the shared key when the system and the RADIUS server exchange messages as name.<\/li>\n<\/ul>\n<p>\u200f \u2022 Network Diagram Figure 7 Typical network diagram for MAC authentication<\/p>\n<ul class=\"connexite-doc-list\">\n<li>Typical configuration example<\/li>\n<\/ul>\n<p>Device side:<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)# mac-auth enable<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#interface gigabitEthernet0\/3<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#mac-auth enable<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config-if)#exit<\/code><\/pre>\n<pre class=\"connexite-doc-command\"><code>SWITCH(config)#radius-server host 1.1.1.2 key name<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Server: Configure NAS authentication device 1.1.1.1 and communication key name. Add the client MAC address as the user account and password to the user database. Client: Enable the 802.1X authentication client and log in with any account.<\/p>\n<h2 class=\"connexite-doc-h2\">Display Information<\/h2>\n<ul class=\"connexite-doc-list\">\n<li>Show 802.1X Port Authentication Information<\/li>\n<\/ul>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show dot1x all<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">802.1X Port-Based Authentication Enabled RADIUS server address: 1.1.1.2:1812 Next radius message id: 0 RADIUS client address: not configured 802.1X info for interface gigabitEthernet0\/6 portEnabled: true &#8211; portControl: Auto portStatus: Unauthorized &#8211; currentId: 1 protocol version: 2 reAuthenticate: disabled reAuthPeriod: 3600 abort:F fail:F start:F timeout:F success:F PAE: state: Connecting &#8211; portMode: Auto PAE: reAuthCount: 1 &#8211; rxRespId: 0 PAE: quietPeriod: 60 &#8211; reauthMax: 2 &#8211; txPeriod: 30 BE: state: Idle &#8211; reqCount: 0 &#8211; idFromServer: 0 BE: suppTimeout: 30 &#8211; serverTimeout: 30 CD: adminControlledDirections: in &#8211; operControlledDirections: in CD: bridgeDetected: false KR: rxKey: false KT: keyAvailable: false &#8211; keyTxEnabled: false<\/p>\n<pre class=\"connexite-doc-command\"><code>SWITCH#show bridge<\/code><\/pre>\n<p class=\"connexite-doc-command-desc\">Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out &#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Networking \u203a Switching \u203a Edge \u203a Synapse<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":6349,"menu_order":21,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[115,119,116],"class_list":["post-6370","docs","type-docs","status-publish","hentry","doc_tag-connexite","doc_tag-network","doc_tag-synapse-cli-documentation","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=6370"}],"version-history":[{"count":1,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6370\/revisions"}],"predecessor-version":[{"id":6418,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6370\/revisions\/6418"}],"up":[{"embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/docs\/6349"}],"wp:attachment":[{"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=6370"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.connexite.co.uk\/index.php\/wp-json\/wp\/v2\/doc_tag?post=6370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}