华为交换机举例:配置802.1X认证(AAA采用RADIUS方式)(认证点部署在汇聚交换机)
华为交换机举例:配置802.1X认证(AAA采用RADIUS方式)(认证点部署在汇聚交换机)
组网需求
如图3-50所示,某公司办公区内终端通过DeviceB接入公司内部网络。DeviceB作为接入交换机通过接口10GE1/0/1与汇聚交换机DeviceA上的接口10GE1/0/2相连。
为了满足企业的高安全性需求,使用802.1X认证并通过RADIUS服务器对办公区内终端进行认证,并且为便于维护、减少认证点数量,将认证点部署在汇聚交换机DeviceA的接口10GE1/0/2上。
图3-50 配置802.1X认证组网图
本例中Interface1、Interface2分别代表10GE1/0/1、10GE1/0/2。

配置注意事项
802.1X认证场景中,如果使能802.1X认证的设备和用户之间存在二层交换机,则需要在二层交换机上配置802.1X认证报文二层透明传输功能,否则用户无法认证成功。802.1X认证报文经过的所有接口都需要配置该功能。
操作步骤
配置注意事项
802.1X认证场景中,如果使能802.1X认证的设备和用户之间存在二层交换机,则需要在二层交换机上配置802.1X认证报文二层透明传输功能,否则用户无法认证成功。802.1X认证报文经过的所有接口都需要配置该功能。
操作步骤
在配置DeviceB上,配置802.1X报文透传功能。下行接口以10GE1/0/2为例,其他下行接口配置与其类似。
<HUAWEI> system-view
[HUAWEI] sysname DeviceB
[DeviceB] l2protocol-tunnel user-defined-protocol 802.1X protocol-mac 0180-c200-0003 group-mac 0100-0000-0002
[DeviceB] interface 10ge 1/0/1
[DeviceB-10GE1/0/1] l2protocol-tunnel user-defined-protocol 802.1X enable
[DeviceB-10GE1/0/1] port link-type trunk
[DeviceB-10GE1/0/1] port trunk allow-pass vlan 20
[DeviceB-10GE1/0/1] quit
[DeviceB] interface 10ge 1/0/2
[DeviceB-10GE1/0/2] l2protocol-tunnel user-defined-protocol 802.1X enable
[DeviceB-10GE1/0/2] port link-type access
[DeviceB-10GE1/0/2] port default vlan 20
[DeviceB-10GE1/0/2] quit
配置DeviceA。
# 配置DeviceA VLAN。
<HUAWEI> system-view
[HUAWEI] sysname DeviceA
[DeviceA] vlan batch 10 20
[DeviceA] interface 10ge 1/0/1
[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 10ge 1/0/2
[DeviceA-10GE1/0/2] port link-type trunk
[DeviceA-10GE1/0/2] port trunk allow-pass vlan 20
[DeviceA-10GE1/0/2] quit
[DeviceA] interface vlanif 10
[DeviceA-Vlanif10] ip address 192.168.1.10 24
[DeviceA-Vlanif10] quit
[DeviceA] interface vlanif 20
[DeviceA-Vlanif20] ip address 192.168.2.10 24
[DeviceA-Vlanif20] quit
# 配置AAA。
创建并配置RADIUS服务器模板“rd1”。
[DeviceA] radius-server template rd1
[DeviceA-radius-rd1] radius-server authentication 192.168.1.30 1812
[DeviceA-radius-rd1] radius-server accounting 192.168.1.30 1813
[DeviceA-radius-rd1] radius-server shared-key cipher YsHsjx_202206mc@1
[DeviceA-radius-rd1] quit
创建AAA认证方案“abc”并配置认证方式为RADIUS。
[DeviceA] aaa
[DeviceA-aaa] authentication-scheme abc
[DeviceA-aaa-authen-abc] authentication-mode radius
[DeviceA-aaa-authen-abc] quit
创建AAA计费方案“scheme2”并配置计费方式为RADIUS。
[DeviceA-aaa] accounting-scheme scheme2
[DeviceA-aaa-accounting-scheme2] accounting-mode radius
[DeviceA-aaa-accounting-scheme2] accounting realtime 15
[DeviceA-aaa-accounting-scheme2] quit
创建认证域“example.com”,并在其上绑定AAA认证方案“abc”、计费方案“scheme2”与RADIUS服务器模板“rd1”。
[DeviceA-aaa] domain example.com
[DeviceA-aaa-domain-example.com] authentication-scheme abc
[DeviceA-aaa-domain-example.com] accounting-scheme scheme2
[DeviceA-aaa-domain-example.com] radius-server rd1
[DeviceA-aaa-domain-example.com] quit
[DeviceA-aaa] quit
测试用户是否能够通过RADIUS模板的认证。(已在RADIUS服务器上配置了测试用户test,用户密码YsHsjx_2022061)
[DeviceA] test-aaa test YsHsjx_2022061 radius-template rd1
Info: Account test succeeded.
# 配置802.1X认证。
配置802.1X接入模板“d1”。
802.1X接入模板默认采用EAP认证方式。请确保RADIUS服务器支持EAP协议,否则无法处理802.1X认证请求。
[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
配置认证模板“p1”,并在其上绑定802.1X接入模板“d1”、指定认证模板下用户的强制认证域为“example.com”、指定用户接入模式为多用户单独认证接入模式、最大接入用户数为100。
[DeviceA] authentication-profile name p1
[DeviceA-authen-profile-p1] dot1x-access-profile d1
[DeviceA-authen-profile-p1] access-domain example.com force
[DeviceA-authen-profile-p1] authentication mode multi-authen max-user 100
[DeviceA-authen-profile-p1] quit
# 在接口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客户端,输入用户名和密码,开始认证。
如果用户输入的用户名和密码验证正确,客户端页面会显示认证成功信息。用户即可访问网络。
用户上线后,管理员可在设备上执行命令display access-user access-type dot1x查看在线802.1X用户信息。
配置文件
- DeviceB的配置文件
# sysname DeviceB # vlan batch 20 # l2protocol-tunnel user-defined-protocol 802.1X protocol-mac 0180-c200-0003 group-mac 0100-0000-0002 # interface 10GE 1/0/1 l2protocol-tunnel user-defined-protocol 802.1X enable port link-type trunk port trunk allow-pass vlan 20 # interface 10GE 1/0/2 l2protocol-tunnel user-defined-protocol 802.1X enable port link-type access port default vlan 20 # return
- DeviceA的配置文件
# sysname DeviceA # vlan batch 10 20 # authentication-profile name p1 dot1x-access-profile d1 access-domain example.com force authentication mode multi-authen max-user 100 # radius-server template rd1 radius-server shared-key cipher %+%##!!!!!!!!!"!!!!"!!!!*!!!!Cd/`W03KjAwAqn64E<\TxGC_SOri<2BP\A+!!!!!2jp5!!!!!!B!!!!Oe2HMc->XMa#TLDZUaJBFJtm#XVj*E:S*|(N7`J1B:3QY!!!!!!!!!!!!!!!%+%# radius-server authentication 192.168.1.30 1812 weight 80 radius-server accounting 192.168.1.30 1813 weight 80 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 20 authentication-profile p1 # interface vlanif 10 ip address 192.168.1.10 255.255.255.0 # interface vlanif 20 ip address 192.168.2.10 255.255.255.0 # aaa authentication-scheme abc authentication-mode radius accounting-scheme scheme2 accounting-mode radius accounting realtime 15 domain example.com authentication-scheme abc accounting-scheme scheme2 radius-server rd1 # dot1x-access-profile name d1 dot1x timer client-timeout 30 # return
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 华为交换机举例:配置802.1X认证(AAA采用RADIUS方式)(认证点部署在汇聚交换机)
作者: 小编
| 手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm