公司WiFi谁拿到密码都能连?华为WAC配802.1X认证一人一号才能上网
无线网络天生开放,一个共享密码拍照就能传遍全公司:访客蹭网、离职员工照连不误,出了事还查不到人。华为官方文档的解法是 WPA2 + 802.1X + AES:无线用户的身份交给 RADIUS 服务器逐个认证,一人一套账号密码,认证通过才能访问网络。官方组网:某企业 DeviceA 作为 WAC 直连 AP,提供名为 “wlan-net” 的无线网络,WAC 兼做 DHCP 服务器为无线用户分配 10.23.101.0/24 网段地址。
本文的组网需求、配置思路与命令步骤,整理自华为官方发布的典型配置案例,参数可直接参考使用。
配置思路
五步:①配置WLAN基本业务,实现WAC与上下游网络互通和AP上线;②配置RADIUS认证参数;③配置802.1X接入模板,管理802.1X接入控制参数;④配置认证模板,管理NAC认证的相关配置;⑤配置WLAN业务参数,在VAP模板下绑定安全模板和认证模板等,对访问WLAN网络的STA进行接入控制。
怎么配
第1步,WAC 基础互通加 DHCP(管理 VLAN100、业务 VLAN101),再配到 RADIUS 服务器网段的静态路由:
[DeviceA] vlan batch 100 101
[DeviceA] interface 10ge 0/0/1
[DeviceA-10GE0/0/1] portswitch
[DeviceA-10GE0/0/1] port link-type trunk
[DeviceA-10GE0/0/1] port trunk pvid vlan 100
[DeviceA-10GE0/0/1] port trunk allow-pass vlan 100
[DeviceA-10GE0/0/1] quit
[DeviceA] dhcp enable
[DeviceA] interface vlanif 100
[DeviceA-Vlanif100] ip address 10.23.100.1 24
[DeviceA-Vlanif100] dhcp select interface
[DeviceA-Vlanif100] quit
[DeviceA] interface vlanif 101
[DeviceA-Vlanif101] ip address 10.23.101.1 24
[DeviceA-Vlanif101] dhcp select interface
[DeviceA-Vlanif101] quit
[DeviceA] ip route-static 10.23.200.0 255.255.255.0 10.23.101.2
第2步,AP 上线:新版本配 CAPWAP 源接口前需先完成安全凭证相关配置,官方示例先开不认证方式让 AP 上线、导入 AP 后再关掉:
[DeviceA] capwap dtls no-auth enable
[DeviceA] capwap source interface vlanif 100
[DeviceA] wlan
[DeviceA-wlan] ap-group name ap-group1
[DeviceA-wlan] ap-id 0 ap-mac 00e0-fc12-3456
[DeviceA-wlan-ap-0] ap-name area_1
[DeviceA-wlan-ap-0] ap-group ap-group1
[DeviceA-wlan-ap-0] quit
[DeviceA] undo capwap dtls no-auth enable
第3步,RADIUS 与 AAA:服务器模板、认证方案、计费方案、认证域 example.com:
[DeviceA] radius-server template radius_huawei
[DeviceA-radius-radius_huawei] radius-server authentication 10.23.200.1 1812
[DeviceA-radius-radius_huawei] radius-server accounting 10.23.200.1 1813
[DeviceA-radius-radius_huawei] radius-server shared-key cipher YsHsjx_202206mc@1
[DeviceA-radius-radius_huawei] quit
[DeviceA] aaa
[DeviceA-aaa] authentication-scheme scheme1
[DeviceA-aaa-authen-scheme1] authentication-mode radius
[DeviceA-aaa-authen-scheme1] quit
[DeviceA-aaa] accounting-scheme scheme2
[DeviceA-aaa-accounting-scheme2] accounting-mode radius
[DeviceA-aaa-accounting-scheme2] accounting realtime 15
[DeviceA-aaa-accounting-scheme2] quit
[DeviceA-aaa] quit
第4步,802.1X 接入模板与认证模板(接入模板默认就是 EAP 认证方式):
[DeviceA] dot1x-access-profile name d1
[DeviceA-dot1x-access-profile-d1] quit
[DeviceA] authentication-profile name p1
[DeviceA-authentication-profile-p1] dot1x-access-profile d1
[DeviceA-authentication-profile-p1] quit
第5步,WLAN 业务:安全策略 WPA2+802.1X+AES、SSID、VAP 模板绑定、AP 组引用:
[DeviceA] wlan
[DeviceA-wlan] security-profile name wlan-security
[DeviceA-wlan-sec-prof-wlan-security] security wpa2 dot1x aes
[DeviceA-wlan-sec-prof-wlan-security] quit
[DeviceA-wlan] ssid-profile name wlan-ssid
[DeviceA-wlan-ssid-prof-wlan-ssid] ssid wlan-net
[DeviceA-wlan-ssid-prof-wlan-ssid] quit
[DeviceA-wlan] vap-profile name wlan-vap
[DeviceA-wlan-vap-prof-wlan-vap] service-vlan vlan-id 101
[DeviceA-wlan-vap-prof-wlan-vap] security-profile wlan-security
[DeviceA-wlan-vap-prof-wlan-vap] ssid-profile wlan-ssid
[DeviceA-wlan-vap-prof-wlan-vap] authentication-profile p1
[DeviceA-wlan-vap-prof-wlan-vap] quit
[DeviceA-wlan] ap-group name ap-group1
[DeviceA-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 0
[DeviceA-wlan-ap-group-ap-group1] vap-profile wlan-vap wlan 1 radio 1
[DeviceA-wlan-ap-group-ap-group1] quit
配完怎么验证
官方判读标准:完成配置后,用户可通过无线终端搜索到SSID为wlan-net的无线网络;在STA上使用802.1X客户端进行认证,输入正确的用户名和密码后,STA认证成功,正常访问网络资源。客户端侧按官方要求以 PEAP 方式配置:手动添加 wlan-net,认证方式选 WPA2-企业、加密 AES,EAP 类型选 PEAP。
几个容易踩的坑
- RADIUS 服务器地址、端口号、共享密钥必须配置正确,并且和 RADIUS 服务器保持一致——密钥对不上,认证必然失败。
- 802.1X 接入模板默认采用 EAP 认证方式,RADIUS 服务器必须支持 EAP 协议,否则无法处理 802.1X 认证请求。
- accounting realtime 配置实时计费间隔:这里的计费不是真算费用,是通过计费报文维护终端的在线信息;间隔越小对设备和 RADIUS 服务器的性能要求越高,官方给了对照表——1
99 用户 3min、100499 用户 6min、500~999 用户 12min、1000 及以上用户不低于 15min。 - capwap dtls no-auth enable 只为让 AP 上线获取安全凭证,官方提醒 AP 正常上线后应及时 undo 关闭,避免未授权设备接入网络。
无线准入把的是内网的入口关,把住它比出了事再追责省心得多。贵州的企业做无线安全改造、准入系统落地,可以找诚鑫致达科技聊聊。各厂商设备的命令与默认参数存在差异,本文步骤与命令均出自华为官方文档,操作前请核对你的设备型号与软件版本。
源:华为AR路由器5700-6700-8000官方文档
企业存储选型参考|诚鑫致达科技
群晖在售企业级机型速览:RS2423RP+(12 盘位机架式,冗余电源) · SA3610(可扩充企业存储) · PAS7700(高可用双控) · FS6400(全闪存阵列)。选型评估、上门部署与数据迁移,搜「诚鑫致达」能找到我们。
发行说明(内部·勿外发)
来源链接:DeviceA-aaa-domain-example.com ;example.com
服务区域|贵州诚鑫致达
贵州群晖NAS、贵阳存储、数据备份、信创云盘或 IT 集成服务,可联系贵州诚鑫致达科技,服务范围覆盖贵州全省各市州。云南昆明企业 NAS 存储方案与备份容灾,支持远程与上门服务。