S6500 交换机 802.1x 基于端口认证的典型配置
一、 组网需求:
PC-A、PC-B 通过集线器连接到 S65-A 的 E1/0/1 端口,分别配置静态 IP 地址
10.0.0.1/24、10.0.0.2/24。网关设置为 S65-A 的 VLAN 虚接口地址 10.0.0.254/24,
端口 e1/0/1 属于该 VLAN。配置 802.1x 协议进行访问控制,认证方式采用远端
认证,配置 Radius 服务器作为认证服务器和计费服务器,服务器 IP 地址为
10.0.10.1/24。配置相应路由协议,保证交换机到 Radius 服务器路由可达。
二、组网图:
三、配置步骤:
1. 在全局配置模式下启动 802.1x 协议:
[S6500] dot1x
2. 在端口配置模式下启动 802.1x 协议:
[S6500-GigabitEthernet1/1] dot1x
3. 在全局配置模式下设置交换机 S65-A 的端口认证模式为 portbased;
[S6500-GigabitEthernet1/1] dot1x port-method portbased
4. 在全局配置模式下添加 Radius 认证方案 h3c,并配置 Radius 服务器
的相关参数:
[S6500]radius scheme huawei
[S6500-radius-h3c]primary authentication 10.0.10.1
[S6500-radius-h3c]primary accounting 10.0.10.1
[S6500-radius-h3c]key authentication expert
[S6500-radius-h3c]key accounting expert
[S6500-radius-h3c]user-name-format without-domain
5. 在全局配置模式下添加认证域 h3c.com,并为该域指定对应的 Radius
认证方案为 h3c:
[S6500]domain h3c.com
[S6500-isp-h3c.com]radius-scheme h3c
6. 在交换机上配置路由协议保证交换机到 Radius 服务器路由可达。
7. 在 Radius 服务器上添加用户 user,密码为 pass,并配置 NAS 密钥
为 expert。
8. PC-A 向 S6500 交换机发送认证请求(可以使用 H3C 客户端软件,也
可以使用 Windows 自带 802.1x 认证客户端软件),输入用户名为
user@h3c.com,密码为 pass。
9. 查看用户连接信息可看到结果,PC-A 和 PC-B 都可以使用网络资源。
[S6500] display connection
10. PC-A 主动发起注销请求,此时 PC-A 与 PC-B 都不能使用网络资源。
四、配置关键点:
需要在 Radius 服务器上设置认证端口为 1812,计费端口 1813。