ConnexOne provide virtual copy of your modbus slaves
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. "Port-based network access control" 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
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.
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.
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:
In the unauthorized state, the controlled port can be set as one-way controlled and two-way controlled.
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's initiative to initiate authentication as an example.
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:
SWITCH(config)# dot1x enable
SWITCH(config)#no dot1x enable
Enable and disable the 802.1X function globally.
SWITCH(config-if)# dot1x port-control auto
SWITCH(config-if)#no dot1x port-control auto
The port enables or disables the 802.1X function.
SWITCH(config)# radius-server host A.B.C.D auth-port <0-65535> acct-port <0-65535> key WORD
SWITCH(config)#no radius-server host A.B.C.D
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.
SWITCH(config-if)# dot1x protocol-version <1-2>
SWITCH(config-if)#no dot1x protocol-version
Configure the version number of the EAPOL protocol on the specified port. Optional configuration, default is 2.
SWITCH(config-if)# dot1x quiet-period <1-65535>
SWITCH(config-if)#no dot1x quiet-period
Configure the hold time of the HELD state. Optional configuration, the unit is seconds, the default is 60.
SWITCH(config-if)# dot1x reauthentication
SWITCH(config-if)#no dot1x reauthentication
The re-authentication function is enabled on the configuration port. Optional configuration, disabled by default.
SWITCH(config-if)# dot1x reauthMax <1-10>
SWITCH(config-if)#no dot1x reauthMax
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.
SWITCH(config-if)# dot1x keytxenabled { disable | enable}
Configure the port key transfer function. Optional, disabled by default.
SWITCH(config-if)# dot1x timeout {re-authperiod <1-4294967295> | server-timeout <1-65535> | supp-timeout <1-65535> | tx-period <1-65535>}
SWITCH(config-if)#no dot1x timeout {re-authperiod | server-timeout | supp-timeout | tx-period}
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.
SWITCH(config)# mac-auth enable
SWITCH(config)#no mac-auth enable
Enable or disable the MAC authentication function globally.
SWITCH(config-if)# mac-auth {enable | disable}
The port enables or disables the MAC authentication function.
SWITCH(config-if)# mac-auth dynamic-vlan-creation {enable | disable}
The port enables or disables dynamic VLAN delivery of MAC authentication. The current version is not supported.
SWITCH(config-if)# mac-auth auth-fail-action {drop-traffic | restrict-vlan <2-4094>}
Configure the behavior of MAC authentication failure. Optional configuration, default is drop-traffic: drop traffic. The current version is not supported.
SWITCH(config)# radius-server deadtime <0-1440>
SWITCH(config)# no radius-server deadtime
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.
SWITCH(config)# radius-server key STRING
SWITCH(config)# no radius-server key
Configure the RADIUS server default key. Optional configuration.
SWITCH(config)# radius-server retransmit <1-100>
SWITCH(config)# no radius-server retransmit
Configure the RADIUS server retransmission times. Optional configuration, the default is 3 times.
SWITCH(config)# radius-server timeout <1- 60>
SWITCH(config)# no radius-server timeout
Configure the RADIUS server timeout period. Optional configuration, the default is 5 seconds.
802.1X Port Authentication Scenario • Requirement
• Network Diagram Figure 6 802.1X Typical network diagram for 802.1x authentication
Device side:
SWITCH(config)#dot1x enable
SWITCH(config)#interface gigabitEthernet0/3
SWITCH(config-if)#dot1x port-control auto
SWITCH(config-if)#exit
SWITCH(config)#radius-server host 1.1.1.2 key name
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.
• Requirement
• Network Diagram Figure 7 Typical network diagram for MAC authentication
Device side:
SWITCH(config)# mac-auth enable
SWITCH(config)#interface gigabitEthernet0/3
SWITCH(config-if)#mac-auth enable
SWITCH(config-if)#exit
SWITCH(config)#radius-server host 1.1.1.2 key name
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.
SWITCH#show dot1x all
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 – portControl: Auto portStatus: Unauthorized – currentId: 1 protocol version: 2 reAuthenticate: disabled reAuthPeriod: 3600 abort:F fail:F start:F timeout:F success:F PAE: state: Connecting – portMode: Auto PAE: reAuthCount: 1 – rxRespId: 0 PAE: quietPeriod: 60 – reauthMax: 2 – txPeriod: 30 BE: state: Idle – reqCount: 0 – idFromServer: 0 BE: suppTimeout: 30 – serverTimeout: 30 CD: adminControlledDirections: in – operControlledDirections: in CD: bridgeDetected: false KR: rxKey: false KT: keyAvailable: false – keyTxEnabled: false
SWITCH#show bridge
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out ———+——+——+——+———–+– —————+—–+———+