华为举例:配置主备RADIUS服务器故障时用户802.1X认证逃生

华为举例:配置主备RADIUS服务器故障时用户802.1X认证逃生

组网需求

如图3-53所示,DeviceA作为某企业网络的接入设备,网络中部署了两台RADIUS服务器,企业内用户的认证方式为802.1X+RADIUS认证,认证成功后能够访问Internet。现在,管理员希望在RADIUS服务器故障的情况下,用户能够进入逃生,逃生时能够访问Internet;在RADIUS服务器故障恢复后,用户能够进行重认证,重新使用RADIUS服务器授权。

图3-53 配置主备RADIUS服务器故障时用户802.1X认证逃生组网图

本例中Interface1、Interface2分别代表10GE1/0/110GE1/0/2


操作步骤

配置注意事项

本举例主要介绍DeviceA上的NAC相关配置,RADIUS服务器配置这里不做相关说明。

RADIUS服务器上配置的RADIUS认证和计费密钥需与设备上配置的RADIUS服务器的共享密钥一致。

设备默认出接口的IP地址作为向RADIUS服务器发送RADIUS报文时使用的源IP地址,该IP地址需与RADIUS服务器上配置的设备IP地址一致。用户可以通过如下命令修改该IP地址:

执行命令radius-server authentication ip-address port source { interface-type interface-number | ip-address source-ip-address },配置RADIUS认证服务器,并指定与RADIUS认证服务器发送RADIUS报文时使用的源IP地址。

执行命令radius-server accounting ip-address port source { interface-type interface-number | ip-address source-ip-address },配置RADIUS计费服务器,并指定与RADIUS计费服务器发送RADIUS报文时使用的源IP地址。

执行命令authentication event authen-server-up action re-authen时,需同时执行命令radius-server testuser配置自动探测功能,否则认证服务器的状态由Down转变为Up时设备对处于逃生状态的用户无法进行重认证。

测试单个用户触发RADIUS服务器Down方法。

[DeviceA] radius-server dead-interval 7

[DeviceA] radius-server dead-count 1

执行命令test-aaa四次后,RADIUS服务器Down。


配置思路

配置网络互连互通,使得设备之间路由可达。

配置AAA,对用户进行RADIUS认证、授权、计费。

配置802.1X认证,并配置RADIUS服务器故障时的逃生权限和RADIUS服务器故障恢复时的重认证功能,实现用户认证逃生功能。

操作步骤

配置网络互连互通。

# 创建VLAN并配置接口允许通过的VLAN、IP地址。

<HUAWEI> system-view

[HUAWEI] sysname DeviceA

[DeviceA] vlan batch 10 20

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE1/0/1] portswitch

[DeviceA-10GE1/0/1] port link-type trunk

[DeviceA-10GE1/0/1] port trunk allow-pass vlan 10

[DeviceA-10GE1/0/1] quit

[DeviceA] interface vlanif 10

[DeviceA-Vlanif10] ip address 192.168.1.10 24

[DeviceA-Vlanif10] quit

[DeviceA] interface 10ge 1/0/2

[DeviceA-10GE1/0/2] portswitch

[DeviceA-10GE1/0/2] port link-type hybrid

[DeviceA-10GE1/0/2] port hybrid pvid vlan 20

[DeviceA-10GE1/0/2] port hybrid untagged vlan 20

[DeviceA-10GE1/0/2] quit

[DeviceA] interface vlanif 20

[DeviceA-Vlanif20] ip address 192.168.2.10 24

[DeviceA-Vlanif20] quit

# 配置到RADIUS服务器的路由,假设下一跳为192.168.1.1。

[DeviceA] ip route-static 10.7.66.0 255.255.255.0 192.168.1.1


配置AAA。

# 创建RADIUS服务器模板controller。

[DeviceA] radius-server template controller

# 配置RADIUS认证密钥、主备用RADIUS服务器和计费服务器的IP地址、端口和主备运算法则。

[DeviceA-radius-controller] radius-server authentication 10.7.66.66 1812 weight 80

[DeviceA-radius-controller] radius-server accounting 10.7.66.66 1813 weight 80

[DeviceA-radius-controller] radius-server authentication 10.7.66.67 1812 weight 40

[DeviceA-radius-controller] radius-server accounting 10.7.66.67 1813 weight 40

[DeviceA-radius-controller] radius-server algorithm master-backup

[DeviceA-radius-controller] radius-server shared-key cipher Huawei@123456789

# 配置自动探测功能。

[DeviceA-radius-controller] radius-server testuser username test1 password cipher abc@123

# 配置对状态为Down的RADIUS服务器的自动探测周期和探测报文的超时等待时间。(取值为缺省值)

[DeviceA-radius-controller] radius-server detect-server interval 60

[DeviceA-radius-controller] radius-server detect-server timeout 3

# 配置RADIUS认证请求报文的重传次数和周期。(取值为缺省值)

[DeviceA-radius-controller] radius-server retransmit 3 timeout 5

[DeviceA-radius-controller] quit

# 配置将RADIUS服务器标记为Down的条件。(取值为缺省值)

[DeviceA] radius-server dead-interval 5

[DeviceA] radius-server dead-count 2

[DeviceA] radius-server detect-cycle 2

[DeviceA] radius-server max-unresponsive-interval 300

# 配置认证方案auth,认证模式为RADIUS认证。

[DeviceA] aaa

[DeviceA-aaa] authentication-scheme auth

[DeviceA-aaa-authen-auth] authentication-mode radius

[DeviceA-aaa-authen-auth] quit

# 配置计费方案acc,计费模式为RADIUS计费。

[DeviceA-aaa] accounting-scheme acc

[DeviceA-aaa-accounting-acc] accounting-mode radius

[DeviceA-aaa-accounting-acc] quit

# 配置example域,在域下应用认证方案auth、计费方案acc、RADIUS服务器模板controller。

[DeviceA-aaa] domain example

[DeviceA-aaa-domain-example] authentication-scheme auth

[DeviceA-aaa-domain-example] accounting-scheme acc

[DeviceA-aaa-domain-example] radius-server controller

[DeviceA-aaa-domain-example] quit

[DeviceA-aaa] quit


配置802.1X认证。

# 配置802.1X接入模板d1、配置客户端认证超时时间为30秒。

[DeviceA] dot1x-access-profile name d1

[DeviceA-dot1x-access-profile-d1] dot1x authentication-method eap

[DeviceA-dot1x-access-profile-d1] dot1x timer client-timeout 30

[DeviceA-dot1x-access-profile-d1] quit

# 配置认证模板绑定802.1X接入模板d1、指定认证模板下用户的强制域为example。

认证模板下配置强制域之后,使用该认证模板的用户,无论用户名是否携带域名或携带何种域名,均在该域下进行认证。

[DeviceA] authentication-profile name p1

[DeviceA-authen-profile-p1] dot1x-access-profile d1

[DeviceA-authen-profile-p1] access-domain example force

[DeviceA-authen-profile-p1] quit

# 配置RADIUS服务器故障时的逃生权限和RADIUS服务器恢复后的重认证功能。以用户逃生时授权业务方案为例,其他授权信息的配置可参考(可选)配置用户逃生。

[DeviceA] acl 3001

[DeviceA-acl-adv-3001] rule 1 permit ip source 192.168.2.0 0.0.0.255

[DeviceA-acl-adv-3001] quit

[DeviceA] aaa

[DeviceA-aaa] service-scheme s1

[DeviceA-aaa-service-s1] acl-id 3001

[DeviceA-aaa-service-s1] quit

[DeviceA-aaa] quit

[DeviceA] authentication-profile name p1

[DeviceA-authen-profile-p1] authentication event authen-server-down action authorize service-scheme s1

[DeviceA-authen-profile-p1] authentication event authen-server-up action re-authen

[DeviceA-authen-profile-p1] quit

# 去使能预连接功能。

[DeviceA] undo authentication pre-authen-access enable

# 在接口10GE1/0/2上绑定认证模板p1,开启802.1X认证。其他与终端相连的接口的配置与之类似。

[DeviceA] interface 10ge 1/0/2

[DeviceA-10GE1/0/2] authentication-profile p1

[DeviceA-10GE1/0/2] quit


检查配置结果

用户启动终端后,进行802.1X认证。认证成功后,用户能够访问Internet。

主RADIUS服务器状态为Down时,通过备RADIUS服务器对用户授权,用户可以继续访问Internet。如果主备RADIUS服务器状态都为Down,用户进入逃生状态,可以访问指定的网络资源。

用户上线后,在DeviceA执行命令display access-user mac-address查看在线用户信息。

配置脚本

DeviceA的配置脚本

#
sysname DeviceA
#
undo authentication pre-authen-access enable 
authentication-profile name p1
 dot1x-access-profile d1
 access-domain example force
 authentication event authen-server-down action authorize service-scheme s1
 authentication event authen-server-up action re-authen
#
vlan batch 10 20
#
acl 3001 
 rule 1 permit ip source 192.168.2.0 0.0.0.255
#
aaa
 authentication-scheme auth    
  authentication-mode radius 
 accounting-scheme acc
  accounting-mode radius   
 service-scheme s1 
  acl-id 3001
 domain example            
  authentication-scheme auth
  accounting-scheme acc
  radius-server controller        
# 
radius-server template controller
 radius-server shared-key cipher %+%##!!!!!!!!!"!!!!"!!!!*!!!!SKvr${[Fs.3t@/5k|BENhEu>W(3\~XG!!D;!!!!!2jp5!!!!!!A!!!!3"pK8qv!}9M#(4$jGWvQF/R[CNe/+:W^jk8HUe&W%+%#
 radius-server accounting 10.7.66.66 1813 weight 80   
 radius-server accounting 10.7.66.67 1813 weight 40 
 radius-server authentication 10.7.66.66 1812 weight 80 
 radius-server authentication 10.7.66.67 1812 weight 40   
 radius-server testuser username test1 password cipher %+%##!!!!!!!!!"!!!!"!!!!*!!!!SKvr${[Fs.3t@/5k|BENhEu>W(3\~XG!!D;!!!!!2jp5!!!!!!A!!!!3"pK8qv!}9M#(4$jGWvQF/R[CNe/+:W^jk8HUe&W%+%#
#
dot1x-access-profile name d1
 dot1x timer client-timeout 30 
#
interface Vlanif10
 ip address 192.168.1.10 255.255.255.0
#
interface Vlanif20
 ip address 192.168.2.10 255.255.255.0
#
interface 10GE1/0/1
 port link-type trunk
 port trunk allow-pass vlan 10
#
interface 10GE1/0/2
 port link-type hybrid
 port hybrid pvid vlan 20
 port hybrid untagged vlan 20
 authentication-profile p1
#
ip route-static 10.7.66.0 255.255.255.0 192.168.1.1
#
return


1、本站资源长期持续更新。
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。

转载请保留出处:  www.zh-cjh.com珠海陈坚浩博客 » 华为举例:配置主备RADIUS服务器故障时用户802.1X认证逃生

作者: 小编


手机扫一扫,手机上查看此文章:

一切源于价值!

其他 模板文件不存在: ./template/plugins/comment/pc/index.htm

未雨绸缪、居安思危!

数据安全、有备无患!

注意操作、数据无价!

一切源于价值!