飞翔灬吾爱的Blog
华为 | AC6005+dot1x认证关键代码
2018-7-25 fishyoung

今天进行了华为AC6005+dot1x安全认证,也算成功,把中间的关键代码做一个笔记保留下来,对于以后自己查看是一个帮助。

一、实验目的

掌握 WLAN 认证模板的配置方式

掌握配置 WEP 认证的方法

掌握配置 WPA/WPA2 PSK 认证的方法

掌握配置 WPA/WPA2 EAP 认证的方法

二、实验拓扑图

三、实验任务配置

1.省略基础配置

比如说:前期的规划,vlan,网关,端口等的配置。

2.配置 WPA EAP 认证

[hide]WLAN 的 EAP 认证架构需要三个组件来实现:客户端、认证者、认证服务器。

假设前期我们搭建好了Radius服务器实验中我们用到的认证服务器为 111.111.111.111,radius 的密码是:fishyoung,认证服务器已经配置好客户端和创建测试账号,用户:fishyoung 密码:fishyoung。

1)在 AC 上配置 radius 认证服务器和认证计费方案

[AC1]radius-server template fishyoung        #创建radius服务器模板
[AC1-radius-huawei]radius-server authentication 111.111.111.111 1812  #radius认证服务器地址为111.111.111.111,认证端口1812
[AC1-radius-huawei]radius-server accounting 111.111.111.111 1813
[AC1-radius-huawei]radius-server shared-key cipher fishyoung    #设置预共享密钥fishyoung

2)配置 AAA 方案,测试 AAA 的配置

[AC1-aaa]authentication-scheme fishyoung                              #创建认证方案
[AC1-aaa-authen-radius]authentication-mode radius        #认证模式为radius
[AC1-aaa-authen-radius]quit
[AC-aaa] accounting-scheme fishyoung                                    #创建计费方案
[AC-aaa-accounting-radius] accounting-mode radius         #计费模式为radius
[AC-aaa-accounting- radius] accounting realtime 15                #设置计费周期15分钟
[AC-aaa-accounting- radius] quit
[AC1-aaa]domain default                                                           #创建域,使用默认的
[AC1-aaa-domain-default]authentication-scheme fishyoung   #绑定认证方案
[AC1-aaa-domain-default]radius-server fishyoung                   #绑定radius服务器模板
[AC1]test-aaa fishyoung fishyoung radius-template fishyoung     #测试账号密码是否可以登陆
[AC1]
Info: Account test succeed.

3)配置接入模板 dot1x-access-profile name fishyoung     

[AC1]dot1x-access-profile name fishyoung                #创建dot1x模板
[AC1-dot1x-access-profile-fishyoung]quit

4)配置认证模板 authentication-profile name fishyoung

认证模板通过接入模板指定用户接入方式;绑定 RADIUS 认证的认证方案、计费方案和服务器模板指定使用 RADIUS 认证。

[AC1]authentication-profile name fishyoung         #创建认证模板
[AC1-authentication-profile-auth_dot1x]dot1x-access-profile fishyoung       #应用dot1x模板
[AC1-authentication-profile-auth_dot1x]authentication-scheme fishyoung        #应用认证方案
[AC1-authentication-profile-auth_dot1x]accounting-scheme fishyoung
[AC1-authentication-profile-auth_dot1x]radius-server fishyoung     #绑定radius服务器模板
[AC1-authentication-profile-auth_dot1x]quit

5)配置安全模板 security-profile name fishyoung,定义加密方式为 ccmp,认证方式为dot1x eap

[AC1]wlan
[AC1-wlan-view]security-profile name fishyoung
[AC1-wlan-sec-prof-fishyoung]security wpa2 dot1x aes
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC1-wlan-sec-prof-fishyoung]quit

6)配置 VAP 模板 fishyoung引用安全模板和认证模板

[AC1]wlan
[AC1-wlan-view]vap-profile name fishyoung
[AC1-wlan-vap-prof-fishyoung]security-profile fishyoung
[AC1-wlan-vap-prof-fishyoung]authentication-profile fishyoung
   Warning: This action may cause service interruption. Continue?[Y/N]y
[AC1-wlan-vap-prof-fishyoung]quit

[/hide]四、结果验证

手机打开wlan进行账号登陆测试,如果没有问题,利用账号和密码可以顺利登陆上去。

评论:
asdada
2020-02-10 22:40 回复
i want read it.我正需要此方法
蓝月弯刀
2019-01-08 16:26 回复
我正需要此方法