首页 > 其他 > 详细

ACS对接华为 配置笔记

时间:2018-12-19 17:43:55      阅读:786      评论:0      收藏:0      [点我收藏+]
#配置管理员登录方式及认证方式。
[SwitchA] user-interface maximum-vty 3 //配置远程登录交换机的管理员最大数目为3
[SwitchA] user-interface vty 0 2 //进入3个管理员界面视图
[SwitchA-ui-vty0-2] authentication-mode aaa //配置管理员的认证方式为AAA
[SwitchA-ui-vty0-2] protocol inbound ssh //配置管理员的远程登录协议为SSH,即管理员必须通过Stelnet方式登录设备
[SwitchA-ui-vty0-2] quit

#配置本地SSH用户,以admin为例
[SwitchA] stelnet server enable //开启交换机的STelnet服务
[SwitchA] ssh authentication-type default password //配置SSH用户缺省采用密码认证
[SwitchA] ssh user admin //创建本地SSH用户admin
[SwitchA] ssh user admin authentication-type password //配置admin用户的认证方式为密码认证
[SwitchA] ssh user admin service-type stelnet //配置admin用户的登录方式为STelnet
[SwitchA] aaa
[SwitchA-aaa] local-user admin password irreversible-cipher huawei@567 //配置本地管理员admin的密码为huawei@567,作为ACS异常的本地备份
[SwitchA-aaa] local-user admin privilege level 0 //配置admin的用户级别为0
[SwitchA-aaa] local-user admin service-type ssh //配置admin的登录协议为SSH
[SwitchA-aaa] quit

一、交换机配置
配置管理员用户进行认证时SwitchA与ACS的对接参数。

1.创建管理员进行认证时采用的HWTACACS服务器模板hw
[SwitchA] hwtacacs-server template hw
[SwitchA-hwtacacs-hw] hwtacacs-server authentication 192.168.100.1 //指定ACS作为HWTACACS认证服务器
[SwitchA-hwtacacs-hw] hwtacacs-server authorization 192.168.100.1 //指定ACS作为HWTACACS授权服务器
[SwitchA-hwtacacs-hw] hwtacacs-server accounting 192.168.100.1
//指定ACS作为HWTACACS计费服务器*
[SwitchA-hwtacacs-hw] hwtacacs-server shared-key cipher Huawei@2014 //配置SwitchA与ACS通信的HWTACACS共享密钥为Huawei@2014
[SwitchA-hwtacacs-hw] undo hwtacacs-server user-name domain-included //配置SwitchA向ACS发送的报文中的管理员用户名不包含域名
[SwitchA-hwtacacs-hw] quit

2.创建认证方案hw
[SwitchA] aaa
[SwitchA-aaa] authentication-scheme hw
[SwitchA-aaa-authen-hw] authentication-mode hwtacacs local
//配置认证方式为HWTACACS,并配置本地认证方式作为备份
[SwitchA-aaa-authen-hw] quit

3.创建授权方案hw
[SwitchA-aaa] authorization-scheme hw
[SwitchA-aaa-author-hw] authorization-mode hwtacacs local
//配置授权方式为HWTACACS,并配置本地授权方式作为备份
[SwitchA-aaa-author-hw] authorization-cmd 0 hwtacacs
//配置级别为0的用户按命令行授权,授权方式为HWTACACS授权,可根据实际需求对指定级别的用户进行该配置
[SwitchA-aaa-author-hw] quit
4.创建计费方案hw
[SwitchA-aaa] accounting-scheme hw
[SwitchA-aaa-accounting-hw] accounting-mode hwtacacs //配置计费方案为HWTACACS方式
[SwitchA-aaa-accounting-hw] accounting start-fail online //配置当开始计费失败时,允许用户上线
[SwitchA-aaa-accounting-hw] quit

5.创建记录方案hw
[SwitchA-aaa] recording-scheme hw
[SwitchA-aaa-recording-hw] recording-mode hwtacacs hw //配置记录方案通过HWTACACS服务器模板hw将记录的信息发送给ACS
[SwitchA-aaa-recording-hw] quit
[SwitchA-aaa] cmd recording-scheme hw //记录用户在设备上执行过的命令

6.创建管理员的认证域hw
[SwitchA-aaa] domain hw
[SwitchA-aaa-domain-hw] authentication-scheme hw //指定认证方案为hw
[SwitchA-aaa-domain-hw] accounting-scheme hw //指定计费方案hw
[SwitchA-aaa-domain-hw] authorization-scheme hw //指定授权方案为hw
[SwitchA-aaa-domain-hw] hwtacacs-server hw //指定HWTACACS服务器模板为hw
[SwitchA-aaa-domain-hw] quit
[SwitchA-aaa] quit

7.配置对管理员用户进行认证。
[SwitchA] domain hw admin //配置hw域为交换机的默认管理认证域,所有的管理员用户登录到交换机时自动在该域下进行认证

8.配置普通接入用户进行认证时SwitchA与ACS的对接参数

8.1 将NAC配置模式切换成统一模式
说明:设备默认为统一模式。传统模式与统一模式相互切换后,管理员必须保存配置后重启设备,新配置模式的各项功能才能生效。

[SwitchA] authentication unified-mode

8.2 创建RADIUS服务器模板authentication。
[SwitchA] radius-server template authentication
[SwitchA-radius-authentication] radius-server authentication 192.168.100.1 1812 source ip-address 192.168.50.1 //配置ISE作为认证服务器
[SwitchA-radius-authentication] radius-server accounting 192.168.100.1 1813 source ip-address 192.168.50.1 //配置ISE作为计费服务器
[SwitchA-radius-authentication] radius-server shared-key cipher Huawei@2014 //配置RADIUS共享密钥为Huawei@2014
[SwitchA-radius-authentication] undo radius-server user-name domain-included //配置设备向ISE发送的报文中的用户名为用户原始输入的用户名,设备不对其进行修改
[SwitchA-radius-authentication] calling-station-id mac-format hyphen-split mode2 uppercase //配置RADIUS报文中calling-station-id属性字段中MAC地址的封装格式为xx-xx-xx-xx-xx-xx,并且使用大写格式
[SwitchA-radius-authentication] radius-attribute set Service-Type 10 auth-type mac //配置MAC认证时RADIUS属性Service-Type的值为10
[SwitchA-radius-authentication] quit

8.3配置RADIUS授权服务器。
[SwitchA] radius-server authorization 192.168.100.1 shared-key cipher Huawei@2014

8.4创建认证方案auth
[SwitchA] aaa
[SwitchA-aaa] authentication-scheme auth
[SwitchA-aaa-authen-auth] authentication-mode radius //配置认证方式为RADIUS
[SwitchA-aaa-authen-auth] quit
8.5创建计费方案acco
为了方便RADIUS服务器维护帐号的状态信息,例如上下线信息,强制帐号下线,计费模式必须配置为RADIUS。
[SwitchA-aaa] accounting-scheme acco
[SwitchA-aaa-accounting-acco] accounting-mode radius //配置计费方案为RADIUS方式
[SwitchA-aaa-accounting-acco] accounting realtime 3 //配置实时计费周期为3分钟
[SwitchA-aaa-accounting-acco] quit
8.6创建认证域domain
[SwitchA-aaa] domain domain
[SwitchA-aaa-domain-domain] authentication-scheme auth //指定认证方案为auth
[SwitchA-aaa-domain-domain] accounting-scheme acco //指定计费方案为acco
[SwitchA-aaa-domain-domain] radius-server authentication //指定RADIUS服务器模板为authentication
[SwitchA-aaa-domain-domain] quit
8.7创建服务器异常时,对用户授权采用的业务方案
[SwitchA-aaa] service-scheme down01 //创建对PC和IP话机授权采用的业务方案down01
[SwitchA-aaa-service-down01] user-vlan 30 //配置对PC用户授权VLAN 30
[SwitchA-aaa-service-down01] voice-vlan //配置对IP话机授权语音VLAN
[SwitchA-aaa-service-down01] quit
[SwitchA-aaa] service-scheme down02 //创建对AP授权采用的业务方案down02
[SwitchA-aaa-service-down02] user-vlan 40 //配置对AP授权VLAN 40
[SwitchA-aaa-service-down02] quit
8.8创建用户认证失败时,对其授权采用的业务方案fail
[SwitchA-aaa] service-scheme fail
[SwitchA-aaa-service-fail] user-vlan 50 //配置用户认证失败时加入VLAN 50
[SwitchA-aaa-service-fail] quit
[SwitchA-aaa] quit
配置对普通接入用户进行认证。
8.9 创建802.1X认证接入模板dot1x
说明:
802.1X接入模板默认采用EAP认证方式。请确保RADIUS服务器支持EAP协议,否则无法处理802.1X认证请求。

[SwitchA] dot1x-access-profile name dot1x
[SwitchA-dot1x-access-profile-dot1x] dot1x reauthenticate //配置对在线802.1X认证用户进行周期重认证功能
[SwitchA-dot1x-access-profile-dot1x] dot1x timer reauthenticate-period 120 //配置对在线802.1X认证用户重认证周期为120秒
[SwitchA-dot1x-access-profile-dot1x] authentication event client-no-response action authorize vlan 50 //配置用户在802.1X客户端无响应时的加入VLAN 50
[SwitchA-dot1x-access-profile-dot1x] quit
8.10创建IP话机和打印机等哑终端MAC认证接入模板mac
[SwitchA] mac-access-profile name mac
[SwitchA-mac-access-profile-mac] mac-authen reauthenticate //配置对在线MAC认证用户进行周期重认证功能
[SwitchA-mac-access-profile-mac] mac-authen timer reauthenticate-period 120 //配置对在线MAC认证用户重认证周期为120秒
[SwitchA-mac-access-profile-mac] quit
8.11创建AP MAC认证接入模板ap_mac
[SwitchA] mac-access-profile name ap_mac
[SwitchA-mac-access-profile-ap_mac] mac-authen username macaddress format without-hyphen //配置AP进行MAC认证的用户名为不带分隔符的MAC地址格式
[SwitchA-mac-access-profile-ap_mac] quit

8.12配置PC用户和IP话机的认证模板dot1x&mac
[SwitchA] authentication-profile name dot1x&mac
[SwitchA-authen-profile-dot1x&mac] dot1x-access-profile dot1x //指定802.1X接入模板为dot1x
[SwitchA-authen-profile-dot1x&mac] mac-access-profile mac //指定MAC接入模板为mac
[SwitchA-authen-profile-dot1x&mac] access-domain domain force //配置强制认证域为domain
[SwitchA-authen-profile-dot1x&mac] authentication event authen-fail action authorize service-scheme fail //配置PC用户和IP话机认证失败时采用业务方案fail进行授权
[SwitchA-authen-profile-dot1x&mac] authentication event authen-server-down action authorize service-scheme down01 //配置ISE服务器异常时采用业务方案down01对PC和IP话机进行授权
[SwitchA-authen-profile-dot1x&mac] authentication event authen-server-up action re-authen //配置当ISE恢复正常时,对用户进行重认证
[SwitchA-authen-profile-dot1x&mac] authentication dot1x-mac-bypass //配置MAC旁路认证功能
[SwitchA-authen-profile-dot1x&mac] quit
8.13配置AP的认证模板ap_auth
[SwitchA] authentication-profile name ap_auth
[SwitchA-authen-profile-ap_auth] mac-access-profile ap_mac //指定MAC接入模板为ap_mac
[SwitchA-authen-profile-ap_auth] access-domain domain force //配置强制认证域为domain
[SwitchA-authen-profile-ap_auth] authentication event authen-fail action authorize service-scheme fail //配置AP认证失败时采用业务方案fail进行授权
[SwitchA-authen-profile-ap_auth] authentication event authen-server-down action authorize service-scheme down02 //配置ISE服务器异常时采用业务方案down02对AP进行授权
[SwitchA-authen-profile-ap_auth] authentication event authen-server-up action re-authen //配置当ISE恢复正常时,对用户进行重认证
[SwitchA-authen-profile-ap_auth] undo authentication handshake //关闭设备对预连接用户和已授权用户之间的握手功能
[SwitchA-authen-profile-ap_auth] authentication mode multi-share //配置交换机与AP相连接口的用户接入模式为multi-share模式
[SwitchA-authen-profile-ap_auth] quit
说明:
当AP的报文转发模式为直接转发模式时,必须配置交换机与AP相连接口的用户接入认证模式为multi-share模式。

8.14在接口GE0/0/1和GE0/0/2上绑定认证模板dot1x&mac,使能MAC旁路认证。在接口GE0/0/3上绑定认证模板ap_mac,使能MAC认证。
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] authentication-profile dot1x&mac
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] authentication-profile dot1x&mac
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] authentication-profile ap_auth
[SwitchA-GigabitEthernet0/0/3] quit

二、ACS配置
1.登录ACS
2.配置普通接入用户
2.1 创建组:Users and Identity Stores > Identity Groups”,例如创建了ap_group和pc_group
2.2 创建用户并加入组:“Users and Identity Stores > Internal Identity Stores > Users”,例如创建了用户pc1,并加入pc_group
2.3 创建主机并加入组:“Users and Identity Stores > Internal Identity Stores > Hosts”例创建把ap1的mac地址接入到ap_group
2.4 创建群组:“Users and Identity Stores > Identity Groups”,例创建了管理器群组admin
2.5 创建管理员并加入到管理员组:Users and Identity Stores > Internal Identity Stores > Users,例如创建admin并加入到admin组。

3.添加认证设备
“Network Resources > Network Devices and AAA Clients”,指定ACS与接入设备之间的交互协议为RADIUS和TACACS

4.配置普通接入用户授权模板
Policy Elements > Authorization and Permissions > Network Access > Authorization Profiles”,在“Common Tasks”页签中指定Vlan 。

5.配置管理员用户授权模板
Policy Elements > Authorization and Permissions > Device Administration > Shell Profiles”,在“Common Tasks”中的Default Privilege 中指定用户级别。例如创建level0和level15两个授权用户级别。
6.创建授权命令行模板
Policy Elements > Authorization and Permissions > Device Administration > Command Sets”,例如我创建了名称为L0,允许display ver ,dis dev ,dis men 的权限,如下图:
技术分享图片
创建了名称为L15,勾选“Permit any command that is not in the table below”,允许所有命令。
7.配置普通接入用户认证和授权策略
“Access Policies > Access Services”,单击右侧操作区域下方“Create”,新建接入服务模板“ACS”,Step1配置完成后单击右下方“下一步”进入Step2,配置允许用户进行认证的协议,配置完成后单击右下方“Finish”。
在弹出的对话框中单击“Yes”,进入“Access Policies > Access Services > Service Selection Rules”页面,选择“Rule based result selection”,单击下方“Create”,在弹窗的对话框中创建接入服务规则“RADIUS”,匹配RADIUS协议之后进入“ACS”模板进行认证和授权,配置完成后单击下方“OK”。单击下方“∧”将该接入服务规则调整至第一条,认证时优先匹配该规则,单击下方“Save Changes”保存。
8.配置允许用户进行认证的过滤条件
Access Policies > Access Services > ACS > Identity”,在右侧操作区域上方选择“Rule based result selection”,单击右下方“Customize”配置允许用户进行认证的过滤条件,此处选择“Device IP Address”即可,配置完成后单击“OK”保存。
9.配置802.1X认证和MAC认证用户的认证规则
例如:
“802.1x”和“MAC”,配置Conditions:“Device IP Address”为192.168.50.1,配置Results:“Identity Source”选择Internal Users,配置完成后单击“OK”,单击“Save Changes”保存配置。
10.新建群组授权策略
“Access Policies > Access Services > ACS > Authorization”,单击右下方“Customize”配置授权条件,该举例中选择“Identity Group”即可,配置完成后单击“OK”,再单击“Save Changes”保存。
单击下方“Create”,新建群组pc_group1的授权策略“pc_group1_result”,选择授权条件“Identity Group”为“pc_group1”,授权结果“Results”为“data_vlan”,单击“OK”,再单击“Save Changes”保存配置。

11.配置管理员用户认证和授权策略HWTACACS
Access Policies > Access Services”,单击右侧操作区域下方“Create”,创建认证和授权策略模板“HWTACACS”,Step1配置完成之后单击右下方“下一步”进入Step2,配置允许用户进行认证的协议,配置完成单击右下方“Finish”。
技术分享图片

在弹出的对话框中单击“Yes”,进入“Access Policies > Access Services > Service Selection Rules”页面,选择“Rule based result selection”,单击下方“Create”,在弹窗的对话框中创建接入服务规则“HWTACACS”,配置Conditions:“Protocol match Tacas”,配置Results:“Service:HWTACACS”,配置完成后单击下方“OK”。单击下方将该接入服务规则调整至第一条,认证时优先匹配该规则,单击下方“Save Changes”保存。

12.配置允许HWTACACS用户进行认证的过滤条件
“Access Policies > Access Services > HWTACACS > Identity”,在右侧操作区域上方选择“Rule based result selection”,单击右下方“Customize”,配置允许用户进行认证的过滤条件,此处选择“Device IP Address”即可,配置完成后单击“OK”保存。
单击下方“Create”,创建管理员的认证规则“admin”,配置Conditions:“Device IP Address = 192.168.50.1”,配置Results:“Identity Source:Internal Users”,配置完成后单击“OK”,单击“Save Changes”保存配置。
Access Policies > Access Services > HWTACACS > Authorization”,单击右下方“Customize”,配置对用户进行授权的过滤条件,“Customize Conditions” Selected “Identity Group”和“System:UserName”,“Customize Results” Selected “Shell Profiles”和“Command Sets”,配置完成单击“OK”,再单击“Save Changes”保存。
单击下方“Create”,创建管理员“diagnose”的授权策略“diagnose_policy”,配置“Conditions”:“Identity Group in All Groups:admin”、“System:UserName equals diagnose”,配置Results:“Shell Profile:PRIVILEGE_LEVEL_15”、“Command Sets:All”,单击“OK”,再单击“Save Changes”保存配置。

    参考华为文档http://support.huawei.com/hedex/pages/EDOC1100037158AZH0823J/04/EDOC1100037158AZH0823J/04/resources/dc/dc_cfgcase_nac_1032u.html

ACS对接华为 配置笔记

原文:http://blog.51cto.com/748290/2332927

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!