On the network shown in Figure 1, to meet the enterprise's high security requirements, 802.1X authentication is configured and a RADIUS server is deployed to authenticate terminals in the office area. To facilitate maintenance and reduce the number of authentication points, the authentication point is deployed on GE0/0/2 of SwitchA (aggregation switch). To simplify the configuration, users use the 802.1X client on Windows to perform certificate authentication and access the network. Additionally, user accounts are maintained on the AD server.
The RADIUS authentication and accounting keys configured on the RADIUS server must be the same as the shared key of the RADIUS server configured on the device.
Configure network connectivity to ensure that devices are routable to each other.
Configure AAA to implement RADIUS authentication, authorization, and accounting for users.
Configure 802.1X authentication for users.
# On SwitchA, create VLANs, configure the allowed VLANs on interfaces, and configure a static route destined for servers.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 10 20 [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 20 [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface vlanif 10 [SwitchA-Vlanif10] ip address 10.2.1.1 24 [SwitchA-Vlanif10] quit [SwitchA] interface vlanif 20 [SwitchA-Vlanif20] ip address 10.1.1.1 24 [SwitchA-Vlanif20] quit [SwitchA] ip route-static 0.0.0.0 0.0.0.0 10.2.1.2
# On SwitchB, configure transparent transmission of 802.1X packets and add interfaces to VLAN 20.
SwitchB is a Layer 2 access switch. To ensure that 802.1X authentication can be performed for users, configure transparent transmission of 802.1X packets on SwitchB. In this example, SwitchB is an S5720-LI, S5735-L, S5735S-L, and S5735S-L-M.
[SwitchB] l2protocol-tunnel user-defined-protocol 802.1X protocol-mac 0180-c200-0003 group-mac 0100-0000-0002 [SwitchB] vlan batch 20 [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] l2protocol-tunnel user-defined-protocol 802.1X enable [SwitchB-GigabitEthernet0/0/2] bpdu enable [SwitchB-GigabitEthernet0/0/2] port link-type access [SwitchB-GigabitEthernet0/0/2] port default vlan 20 [SwitchB-GigabitEthernet0/0/2] quit [SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] l2protocol-tunnel user-defined-protocol 802.1X enable [SwitchB-GigabitEthernet0/0/1] bpdu enable [SwitchB-GigabitEthernet0/0/1] port link-type trunk [SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 [SwitchB-GigabitEthernet0/0/1] quit
# Configure the interface VLANIF 20 to assign IP addresses to users through DHCP and specify a DNS server address in the interface address pool.
[SwitchA] dhcp enable [SwitchA] interface vlanif 20 [SwitchA-Vlanif20] dhcp select interface [SwitchA-Vlanif20] dhcp server dns-list 10.2.1.5 [SwitchA-Vlanif20] quit
[SwitchA] radius-server template rd1 [SwitchA-radius-rd1] radius-server authentication 10.2.1.6 1812 [SwitchA-radius-rd1] radius-server accounting 10.2.1.6 1813 [SwitchA-radius-rd1] radius-server shared-key cipher Huawei@2014
# Enable automatic detection.
[SwitchA-radius-rd1] radius-server testuser username test1 password cipher abc@123 [SwitchA-radius-rd1] quit
[SwitchA] radius-server authorization 10.2.1.6 shared-key cipher Huawei@2014
[SwitchA] aaa [SwitchA-aaa] authentication-scheme abc [SwitchA-aaa-authen-abc] authentication-mode radius [SwitchA-aaa-authen-abc] quit
[SwitchA-aaa] accounting-scheme acco1 [SwitchA-aaa-accounting-acco1] accounting-mode radius [SwitchA-aaa-accounting-acco1] accounting start-fail online [SwitchA-aaa-accounting-acco1] quit
[SwitchA-aaa] domain adser.com [SwitchA-aaa-domain-adser.com] authentication-scheme abc [SwitchA-aaa-domain-adser.com] accounting-scheme acco1 [SwitchA-aaa-domain-adser.com] radius-server rd1 [SwitchA-aaa-domain-adser.com] quit [SwitchA-aaa] quit
[SwitchA] authentication unified-mode
By default, the unified mode is enabled. After you change the NAT mode between common and unified, the device automatically restarts.
[SwitchA] dot1x-access-profile name d1 [SwitchA-dot1x-access-profile-d1] dot1x authentication-method eap [SwitchA-dot1x-access-profile-d1] dot1x timer client-timeout 30 [SwitchA-dot1x-access-profile-d1] quit
[SwitchA] authentication-profile name p1 [SwitchA-authen-profile-p1] dot1x-access-profile d1 [SwitchA-authen-profile-p1] access-domain adser.com force [SwitchA-authen-profile-p1] quit
[SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] authentication-profile p1 [SwitchA-GigabitEthernet0/0/2] quit
This step is required if the 802.1X client uses PEAP authentication and Validate server certificate in the Protected EAP Properties dialog box is selected.
An 802.1X client can use EAP-TLS or PEAP authentication. For details, see "Configuring the Standard 802.1X Client Provided by the Operating System" in Agile Controller-Campus Product Documentation.
Click the local connection and choose Properties. Then click the Authentication tab.
Select Enable IEEE 802.1X authentication, set the network authentication method to Microsoft: Smart Card or other certificate, and click Settings.
Click the local connection and choose Properties. Then click the Authentication tab.
Select Enable IEEE 802.1X authentication, set the network authentication method to Microsoft: Protected EAP (PEAP), and click Settings.
If Validate Server Certificate under When connecting: is selected, you need to import certificates to Agile Controller-Campus in advance.