Wired and wireless users are connected to the enterprise network through switches and APs connected to the switches respectively, but users can access the enterprise network only after being authenticated. AP information is not stored on the authentication server. Therefore, the AP does not need to be authenticated.
[SwitchA] radius-server template rd1 [SwitchA-radius-rd1] radius-server authentication 192.168.100.100 1812 [SwitchA-radius-rd1] radius-server accounting 192.168.100.100 1813 [SwitchA-radius-rd1] radius-server shared-key cipher Huawei@2014 [SwitchA-radius-rd1] quit
[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 realtime 15 //Set the interval of real-time accounting to 15 minutes.
[SwitchA-aaa-accounting-acco1] quit
[SwitchA-aaa] domain isp [SwitchA-aaa-domain-isp] authentication-scheme abc [SwitchA-aaa-domain-isp] accounting-scheme acco1 [SwitchA-aaa-domain-isp] radius-server rd1 [SwitchA-aaa-domain-isp] quit [SwitchA-aaa] quit
[SwitchA] domain isp
[SwitchA] aaa [SwitchA-aaa] authentication-scheme noauthen [SwitchA-aaa-authen-noauthen] authentication-mode none [SwitchA-aaa-authen-noauthen] quit
[SwitchA-aaa] domain ap_noauthen [SwitchA-aaa-domain-ap_noauthen] authentication-scheme noauthen [SwitchA-aaa-domain-ap_noauthen] quit [SwitchA-aaa] quit
[SwitchA] access-context profile enable //Enable the user context identification function. [SwitchA] access-context profile name ap_access //Create a user context profile. [SwitchA-access-context-ap_access] if-match vlan-id 100 //Configure the VLAN-based identification policy. [SwitchA-access-context-ap_access] quit [SwitchA] access-author policy name ap_noauthen //Create the user authentication event authorization policy. [SwitchA-access-author-ap_noauthen] match access-context-profile ap_access action access-domain ap_noauthen //Configure an access user's authentication domain based on the user context profile. [SwitchA-access-author-ap_noauthen] quit [SwitchA] access-author policy ap_noauthen global //Apply the user authentication event authorization policy.
[SwitchA] authentication unified-mode
By default, the unified mode is used. After the NAC mode is changed, the device automatically restarts.
[SwitchA] mac-access-profile name m1 [SwitchA-mac-access-profile-m1] quit
By default, an 802.1X access profile uses the EAP authentication mode. Ensure that the RADIUS server supports EAP; otherwise, the server cannot process 802.1X authentication request packets.
[SwitchA] dot1x-access-profile name d1 [SwitchA-dot1x-access-profile-d1] quit
[SwitchA] authentication-profile name p1 [SwitchA-authen-profile-p1] mac-access-profile m1 //Bind a MAC access profile. [SwitchA-authen-profile-p1] dot1x-access-profile d1 //Bind an 802.1X access profile. [SwitchA-authen-profile-p1] quit
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-Gigabitethernet0/0/1] authentication-profile p1 //Bind a authentication profile and enable 802.1X + MAC address authentication. [SwitchA-Gigabitethernet0/0/1] quit