天天看点

H3C用户入网配置(radius、domain、802.1x)0 介绍1. 创建radius方案2. 创建ISP域3. 配置全局802.1x认证和全局MAC认证4. 配置端口802.1x认证和端口MAC认证

文章目录

  • 0 介绍
  • 1. 创建radius方案
  • 2. 创建ISP域
  • 3. 配置全局802.1x认证和全局MAC认证
  • 4. 配置端口802.1x认证和端口MAC认证

0 介绍

​ 配置入网:客户通过用户名密码提交登录,接入交换机将用户名密码和mac地址提交给radius服务器通过AAA进行认证,向交换机返回确认信息,交换机向DHCP服务器申请ip地址,将该端口从vlan1添加到相应vlan中。

相关概念:

Radius 远程接入验证服务器,也就是认证用的

AAA 就是Radius服务器实现的功能:验证,计费和授权

AAA 就是验证,计费和授权功能 ,一般指向 Radius服务器,由Radius服务器实现,也就是说radius服务器通过AAA协议进行认证、计费授权。

802.1x最早期是用在无线网络的验证协议,现在好多校园网都使用这种验证方式,是AAA的一种技术,包含于AAA。802.1x不同于AAA,要么配置成不启用,要么配置成启用,设置后,可以根据终端(可安装管理客户端)的情况,动态将其所在的端口启用或禁用或分配到不同的vlan,是交换机与客户端之间的认证协议。而AAA是服务器端的应用的协议

dot1x是802.1x的缩写,没有区别。

端口有mac认证或者用户名密码的认证,一些哑终端(摄像头)需要MAC认证,此处试验端口同时配置了802.1x和mac认证。

**交换就版本:**H3C s5130 V7

[test]dis version
H3C Comware Software, Version 7.1.070, Release 6126P20
Copyright (c) 2004-2018 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5130S-28P-EI uptime is 0 weeks, 2 days, 3 hours, 23 minutes
Last reboot reason : User reboot

Boot image: flash:/s5130s_ei-cmw710-boot-r6126p20.bin
Boot image version: 7.1.070, Release 6126P20
  Compiled Apr 03 2018 11:00:00
System image: flash:/s5130s_ei-cmw710-system-r6126p20.bin
System image version: 7.1.070, Release 6126P20
  Compiled Apr 03 2018 11:00:00
           

1. 创建radius方案

创建radius方案

# 创建radius方案rd
[test]radius scheme rd  
# 设置radius认证服务器地址(主)
# 设置radius审计服务器地址(主)
# 设置radius认证服务器地址(备)
# 设置radius审计服务器地址(备)
[test-radius-rd]primary authentication 10.14.71.28 
[test-radius-rd]primary accounting 10.14.71.28
[test-radius-rd]secondary authentication 10.18.14.16
[test-radius-rd]secondary accounting 10.18.14.16
# 设置交换机与radius认证服务器的通信密码
# 设置交换机与radius审计服务器的通信密码
[test-radius-rd]key authentication simple 123456
[test-radius-rd]key accounting simple 123456
# 交换机发送给radius服务器的用户名验证不带ISP域 
[test-radius-rd]user-name-format without-domain
# 实时计费的时间间隔
[test-radius-rd]timer realtime-accounting 30
           

2. 创建ISP域

# 创建test.com ISP域
# 缺省ISP域,所有登录时没有提供ISP域名的用户都属于这个域
[test]domain test.com  
[test-isp-test.com]exit
[test]domain default enable test.com
# 进入test.com域
# 这个域中的所有lan-access用户通过radius方案sgcc进行认证
# 这个域中的所有lan-access用户通过radius方案sgcc进行审计
[test]domai test.com
[test-isp-test.com]authentication lan-access radius-scheme sgcc
[test-isp-test.com]authorization lan-access radius-scheme sgcc
           

一些默认配置,或者V3/V5中的配置

access-limit disable   # 关闭允许介入设备的最大数
idle-cut disable  # 关闭ISP域用户空闲产生的流量过小时会被强制下线
state active  # 指定当前ISP域活动状态,缺省就是开启的
           

3. 配置全局802.1x认证和全局MAC认证

dot1x 全局配置,进入接口配置,如果没有全局配置,则接口配置不生效

全局开启802.1x认证

# 开启全局802.1x
# 设置认证方式为EAP
[test]dot1x  
[test]dot1x authentication-method eap  
# 以下是一些属性配置,可以查文档,大部分为一些时间设置
[test]dot1x timer quiet-period 10
[test]dot1x timer tx-period 60
[test]dot1x timer supp-timeout 120
[test]dot1x timer handshake-period 60
[test]dot1x timer reauth-period 7000
[test]dot1x retry 3
[test]dis dot1x
           

开启全局MAC认证

[test]mac-authentication  # 开启全局mac地址认证
[test]mac-authentication domain test.com  #ISP域用户也使用mac认证的方式
           

4. 配置端口802.1x认证和端口MAC认证

# 设置成access,缺省也是access,可以不打这个命令
[test-GigabitEthernet1/0/2]port link-type access 
# 开启端口的dot1x
# 开启dot1x单播功能
# 开启端口802.1x重新认证,设备根据dot1x timeer reauth-period设定的时间对端口用户定期认证
# 关闭握手功能,防止设备定期检测端口用户状态,防止不适用就断网
# 关闭组播功能
[test-GigabitEthernet1/0/2]dot1x
[test-GigabitEthernet1/0/2]dot1x unicast-trigger 
[test-GigabitEthernet1/0/2]dot1x re-authenticate 
[test-GigabitEthernet1/0/2]undo dot1x handshake 
[test-GigabitEthernet1/0/2]undo dot1x multicast-trigger 
# 开启端口的mac认证方式
[test-GigabitEthernet1/0/2]mac-authentication
# 绑定ip与mac地址,mac地址只能用固定的ip,而且被绑定在该端口,后续网线不在该端口则无法分配ip地址,所以一般不会配置此命令 
#[test-GigabitEthernet1/0/2]ip verify source ip-address mac-address 
           

继续阅读