1 场景需求
要求公司用户接入WLAN网络,使用802.1X客户端进行认证,输入正确的用户名和密码后可以无线上网。且在覆盖区域内移动发生漫游时,不影响用户的业务使用。
2 组网需求
如下拓扑规划图:
- AC组网方式:旁挂二层组网。
- DHCP部署方式:AC作为DHCP服务器为AP分配IP地址,SwitchB作为DHCP服务器为STA分配IP地址。
- 业务数据转发方式:直接转发。
- WLAN认证方式:WPA-WPA2+802.1X+AES。

3 数据规划
无线配置规划数据表如下:

4 配置思路
1)配置AP、AC和周边网络设备之间实现网络互通。
2)配置AC和SwitchB分别给AP和STA分配IP地址。
3)配置AP在AC上线。
4)配置AC上的802.1X认证。
5)配置第三方服务器。
5 配置过程
5.1 配置网络设备互联互通
# 配置接入交换机SwitchA的接口GE0/0/1和GE0/0/2加入VLAN100和VLAN101
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100 101
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 100
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101
[SwitchA-GigabitEthernet0/0/1] port-isolate enable
[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 100 101
[SwitchA-GigabitEthernet0/0/2] quit# 配置汇聚交换机SwitchB的接口
- GE0/0/1加入VLAN100和VLAN101
- GE0/0/2加入VLAN100和VLAN102
- GE0/0/3加入VLAN103
- GE0/0/4加入VLAN104
创建VLANIF102、VLANIF103和VLANIF104接口,并配置下一跳为Router的缺省路由
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 100 to 104
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 102
[SwitchB-GigabitEthernet0/0/2] quit
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] port link-type trunk
[SwitchB-GigabitEthernet0/0/3] port trunk pvid vlan 103
[SwitchB-GigabitEthernet0/0/3] port trunk allow-pass vlan 103
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface gigabitethernet 0/0/4
[SwitchB-GigabitEthernet0/0/4] port link-type trunk
[SwitchB-GigabitEthernet0/0/4] port trunk pvid vlan 104
[SwitchB-GigabitEthernet0/0/4] port trunk allow-pass vlan 104
[SwitchB-GigabitEthernet0/0/4] quit
[SwitchB] interface vlanif 102
[SwitchB-Vlanif102] ip address 10.23.102.1 24
[SwitchB-Vlanif102] quit
[SwitchB] interface vlanif 103
[SwitchB-Vlanif103] ip address 10.23.103.2 24
[SwitchB-Vlanif103] quit
[SwitchB] interface vlanif 104
[SwitchB-Vlanif104] ip address 10.23.104.1 24
[SwitchB-Vlanif104] quit
[SwitchB] ip route-static 0.0.0.0 0.0.0.0 10.23.104.2# 配置AC的接口GE0/0/1加入VLAN100和VLAN102,创建VLANIF102接口,并配置指向RADIUS服务器的静态路由。
<AC6605> system-view
[AC6605] sysname AC
[AC] vlan batch 100 101 102
[AC] interface gigabitethernet 0/0/1
[AC-GigabitEthernet0/0/1] port link-type trunk
[AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 102
[AC-GigabitEthernet0/0/1] quit
[AC] interface vlanif 102
[AC-Vlanif102] ip address 10.23.102.2 24
[AC-Vlanif102] quit
[AC] ip route-static 10.23.103.0 24 10.23.102.1# 配置Router的接口GE0/0/1的IP地址,并配置指向STA网段的静态路由。
<Huawei> system-view
[Huawei] sysname Router
[Router] interface gigabitethernet 0/0/1
[Router-GigabitEthernet0/0/1] ip address 10.23.104.2 24
[Router-GigabitEthernet0/0/1] quit
[Router] ip route-static 10.23.101.0 24 10.23.104.15.2 配置DHCP服务器
分别配置AC作为DHCP服务器为AP分配IP地址,SwitchB作为DHCP服务器为STA分配IP地址
# 在AC上配置VLANIF100接口为AP提供IP地址。
[AC] dhcp enable
[AC] interface vlanif 100
[AC-Vlanif100] ip address 10.23.100.1 24
[AC-Vlanif100] dhcp select interface
[AC-Vlanif100] quit# 在SwitchB上配置VLANIF101接口为STA提供IP地址。
[SwitchB] dhcp enable
[SwitchB] interface vlanif 101
[SwitchB-Vlanif101] ip address 10.23.101.1 24
[SwitchB-Vlanif101] dhcp select interface
[SwitchB-Vlanif101] quit5.3 配置AC中无线部分
# 创建AP组,用于将相同配置的AP都加入同一AP组中。
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。
[AC-wlan-view] regulatory-domain-profile name default
[AC-wlan-regulate-domain-default] country-code cn
[AC-wlan-regulate-domain-default] quit
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] regulatory-domain-profile default
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu
e?[Y/N]:y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit# 配置AC的源接口。
[AC] capwap source interface vlanif 100# 在AC上将AP导入
根据AP背面的MAC地址进行离线导入,并将其加入前面创建的AP组,这里AP的MAC地址为:00-E0-FC-64-42-B0,这里将AP部署在1号区域,命名此AP为area_1。
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 0 ap-mac 00-E0-FC-64-42-B0
[AC-wlan-ap-0] ap-name area_1
[AC-wlan-ap-0] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configuration
s of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-0] quit# 配置AP射频的信道和功率
先关闭AP射频`0的信道和功率自动调优功能,并配置AP射频0的信道和功率:
[AC-wlan-view] ap-id 0
[AC-wlan-ap-0] radio 0
[AC-wlan-radio-0/0] calibrate auto-channel-select disable
[AC-wlan-radio-0/0] calibrate auto-txpower-select disable
[AC-wlan-radio-0/0] channel 20mhz 6
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/0] eirp 127
[AC-wlan-radio-0/0] quit再关闭AP射频1的信道和功率自动调优功能,并配置AP射频1的信道和功率:
[AC-wlan-ap-0] radio 1
[AC-wlan-radio-0/1] calibrate auto-channel-select disable
[AC-wlan-radio-0/1] calibrate auto-txpower-select disable
[AC-wlan-radio-0/1] channel 20mhz 149
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/1] eirp 127
[AC-wlan-radio-0/1] quit
[AC-wlan-ap-0] quit5.4 在AC上配置802.1X认证
5.4.1 配置RADIUS认证参数
# 创建RADIUS服务器模板
[AC] radius-server template wlan-net
[AC-radius-wlan-net] radius-server authentication 10.23.103.1 1812
[AC-radius-wlan-net] radius-server shared-key cipher huawei@123
[AC-radius-wlan-net] quit# 创建RADIUS方式的认证方案
[AC] aaa
[AC-aaa] authentication-scheme wlan-net
[AC-aaa-authen-wlan-net] authentication-mode radius
[AC-aaa-authen-wlan-net] quit5.4.2 配置802.1X接入模板
# 创建名为wlan-net的802.1X接入模板
[AC] dot1x-access-profile name wlan-net# 配置认证方式为EAP中继模式
[AC-dot1x-access-profile-wlan-net] dot1x authentication-method eap
[AC-dot1x-access-profile-wlan-net] quit5.4.3 创建认证模板
创建名为wlan-net的认证模板,并引用802.1X接入模板、认证方案和RADIUS服务器模板:
[AC] authentication-profile name wlan-net
[AC-authentication-profile-wlan-net] dot1x-access-profile wlan-net
[AC-authentication-profile-wlan-net] authentication-scheme wlan-net
[AC-authentication-profile-wlan-net] radius-server wlan-net
[AC-authentication-profile-wlan-net] quit5.4.4 配置WLAN业务参数
# 创建名为wlan-net的安全模板,并配置安全策略。
[AC] wlan
[AC-wlan-view] security-profile name wlan-net
[AC-wlan-sec-prof-wlan-net] security wpa-wpa2 dot1x aes
[AC-wlan-sec-prof-wlan-net] quit# 创建名为wlan-net的SSID模板,并配置SSID名称为wlan-net。
[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit# 创建名为wlan-net的VAP模板,配置业务数据转发模式为直接转发、业务VLAN,并且引用安全模板、认证模板和SSID模板。
[AC-wlan-view] vap-profile name wlan-net
[AC-wlan-vap-prof-wlan-net] forward-mode direct-forward
[AC-wlan-vap-prof-wlan-net] service-vlan vlan-id 101
[AC-wlan-vap-prof-wlan-net] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net] authentication-profile wlan-net
[AC-wlan-vap-prof-wlan-net] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net] quit# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板wlan-net的配置。
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 1
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit5.5 配置第三方服务器
5.5.1 WinRadius软件简介
WinRadius是一款基于标准RADIUS协议的认证、记账、记费商业软件,适用于国内的实际情况。它提供了拨号认证、记账和计费的功能,并且可以作为电信接入计费平台、公司远程拨号管理平台以及智能小区拨号平台。WinRadius支持多种电信业务模式,包括但不限于PPP、PPPoE、PPTP、VPN、VoIP、ADSL等。
WinRadius的功能强大且全面,它可以应用于电信运营商、ISP、证券、远程教育、宽带智能小区、VPN网络提供商以及VoIP提供商等多个领域。同时,WinRadius还支持多种接入设备厂商和型号,如CISCO、NORTEL、LUCENT、H3C、`华为等。
在软件使用中,RADIUS Client和RADIUS Server需要事先确定交互端口,常用的认证端口为1812,常用的计费端口为1813。WinRadius作为RADIUS Server软件,提供了Client发起的四种请求消息:认证请求、计费开始请求、计费中止请求和计费更新请求。此外,它还采用了对称加密方式,即事先约定的交互密钥Secret,以及用户名和密码等终端身份认证信息。
5.5.2 下载Radius服务器软件
这里下载WINDOWS环境上软件WinRadius,
下载地址:https:///NC086/WinRadius/releases/download/v4.0.0/WinRadius.rar
5.5.3 配置WinRadius服务器
1)添加用户
打开主界面,选择【操作】–>【添加账号】,在弹出的窗口中添加认证账号和密码等信息,完成后单击【确定】。

2)设置–系统–NAS密钥、认证端口和计费端口

点击确定,需要重启服务:
3)配置数据库
注:右键以管理员身份运行程序,否则会创建失败。

重启服务,提示正确信息如下:

4)测试配置
如下图,运行RadiusTest.exe进行测试:
这里用户名为happyfen,密码为123456,加密为happyfengtest,Radius服务器IP地址为本机,端口没有修改,为默认端口1813。

同时,在服务端可以看到用户happyfen认证通过:

6 客户端配置测试
以WIN10系统为例,开启无线认证:
【控制面板–>管理工具–>服务】,如下:
有线:Wired AutoConfig
无线:WLAN AutoConfig


根据提示输入用户名和密码,完成802.1X认证。
















