交换机具有性能价格比高、高度灵活、相对简单、易于实现等特点。所以,以太网技术已成为当今最重要的一种局域网组网技术,网络交换机也就成为了最普及的交换机。下面是小编给大家整理的一些有关华为交换机aaa配置命令,希望对大家有帮助!
华为交换机aaa配置命令[Huawei]aaa
[Huawei-aaa]authentication-scheme ren_zheng 配置AAA认证方案名为ren_zheng
[Huawei-aaa-authen-aaa]authentication-mode radius local 配置AAA认证模式为先Radius,如无响应则本地认证
[Huawei-aaa-authen-aaa]quit
[Huawei-aaa]accounting-scheme ji_fei 配置AAA计费方案名为ji_fei
[Huawei-aaa-accounting-ji_fei]accounting-mode radius 配置AAA计费模式为Radius服务器计费
[Huawei-aaa-accounting-ji_fei]accounting start-fail offline 配置当开始计费失败时,将用户离线
[Huawei-aaa-accounting-ji_fei]quit
二、配置Radius模板[Huawei]radius-server template huawei_use 配置Raduis模板名为huawei_use
[Huawei-radius-huawei_use]radius-server authentication 192.168.1.254 1812 主radius认证服务地址和端口
[Huawei-radius-huawei_use]radius-server authentication 192.168.1.253 1812 secondary 备用认证服务器
[Huawei-radius-huawei_use]radius-server accounting 192.168.1.253 1812 主radius计费服务地址和端口
[Huawei-radius-huawei_use]radius-server accounting 192.168.1.253 1813 secondary 备用计费服务器
[Huawei-radius-huawei_use]radius-server shared-key cipher hello 配置设备与Radius通信的共享秘钥为hello
[Huawei-radius-huawei_use]radius-server retransmit 2 timeout 5 配置设备向Radius服务器发送请求报文的超时重传次数为2s,间隔为5s
[Huawei-radius-huawei_use]quit
三、在AAA用户域绑定要使用的AAA认证和Radius模板[Huawei]aaa
[Huawei-aaa]domain huawei 配置AAA域,名称huawei
[Huawei-aaa-domain-huawei]authentication-scheme ren_zheng 在域中绑定AAA认证方案
[Huawei-aaa-domain-huawei]accounting-scheme ji_fei 在域中绑定AAA计费方案
[Huawei-aaa-domain-huawei]radius-server huawei_use 在域中绑定Radius模板
[Huawei-aaa-domain-huawei]quit
检查命令:
[Huawei]display radius-server configuration template huawei_use
------------------------------------------------------------------------------
Server-template-name : huawei_use
Protocol-version : standard
Traffic-unit : B
Shared-secret-key : aaYOZ$V^P35NZPO3JBXBHA!!
Timeout-interval(in second) : 5
Primary-authentication-server : 192.168.1.254 :1812 :-LoopBack:NULL Source-IP:0.0.0.0
Primary-accounting-server : 192.168.1.254 :1813 :-LoopBack:NULL Source-IP:0.0.0.0
Secondary-authentication-server : 192.168.1.253 :1812 :-LoopBack:NULL Source-IP:0.0.0.0
Secondary-accounting-server : 192.168.1.253 :1813 :-LoopBack:NULL Source-IP:0.0.0.0
Retransmission : 2
Domain-included : YES
NAS-IP-Address : 0.0.0.0
Calling-station-id MAC-format : xxxx-xxxx-xxxx
------------------------------------------------------------------------------
[Huawei]
[Huawei]display domain name huawei
Domain-name : huawei
Domain-state : Active
Authentication-scheme-name : ren_zheng
Accounting-scheme-name : ji_fei
Authorization-scheme-name : -
Service-scheme-name : -
RADIUS-server-template : huawei_use
HWTACACS-server-template : -
[Huawei]
session 2 AAA+HWTACACS进行认证、授权、计费(默认所有使用TCP端口49)
拓扑不变
HWTACACS(Huawei Terminal Access Controller Access Control System)协议是华为对TACACS进行了扩展的协议
HWTACACS是在TACACS(RFC1492)基础上进行了功能增强的一种安全协议。该协议与RADIUS协议类似,主要是通过“客户端—服务器”模式与HWTACACS服务器通信来实现多种用户的AAA功能。
HWTACACS与RADIUS的不同在于:
l RADIUS基于UDP协议,而HWTACACS基于TCP协议。
l RADIUS的认证和授权绑定在一起,而HWTACACS的认证和授权是独立的。
l RADIUS只对用户的密码进行加密,HWTACACS可以对整个报文进行加密。
[Huawei]aaa
[Huawei-aaa]authentication-scheme ren_zheng 配置AAA认证方案名为ren_zheng
[Huawei-aaa-authen-aaa]authentication-mode hwtacacs local 配置AAA认证模式为先hwtacacs,如无响应则本地认证
[Huawei-aaa-authen-aaa]authentication-super hwtacacs super 接入用户进行提权时,先进行hwtacacs认证,如无响应再本地认证
[Huawei-aaa-authen-aaa]quit
[Huawei]aaa
[Huawei-aaa]authorization-scheme shou_quan 配置AAA授权方案名为ren_zheng
[Huawei-aaa-author-aaa]authorization-mode hwtacacs local 配置AAA授权模式为先hwtacacs,如无响应则本地授权
[Huawei-aaa-author-aaa]quit
[Huawei-aaa]accounting-scheme ji_fei 配置AAA计费方案名为ji_fei
[Huawei-aaa-accounting-ji_fei]accounting-mode hwtacacs 配置AAA计费模式为hwtacacs服务器计费
[Huawei-aaa-accounting-ji_fei]accounting start-fail offline 配置当开始计费失败时,将用户离线
[Huawei-aaa-accounting-ji_fei]accounting relaltime 3 配置对用户进行实时计费,计费间隔为3min
[Huawei-aaa-accounting-ji_fei]quit
二、配置hwtacacs模板[Huawei]hwtacacs-server template huawei_use 配置hwtacacs模板名为huawei_use
[Huawei-hwtacacs-huawei_use]hwtacacs-server authentication 192.168.1.254 49 主hwtacacs认证服务地址和端口
[Huawei-hwtacacs-huawei_use]hwtacacs-server authentication 192.168.1.253 49 secondary 备用认证服务器
[Huawei-hwtacacs-huawei_use]hwtacacs-server authorization 192.168.1.253 49 主hwtacacs授权服务地址和端口
[Huawei-hwtacacs-huawei_use]hwtacacs-server authorization 192.168.1.253 49 secondary 备用授权服务器
[Huawei-hwtacacs-huawei_use]hwtacacs-server accounting 192.168.1.253 49 主hwtacacs计费服务地址和端口
[Huawei-hwtacacs-huawei_use]hwtacacs-server accounting 192.168.1.253 49 secondary 备用计费服务器
[Huawei-hwtacacs-huawei_use]hwtacacs-server shared-key cipher hello 配置设备与hwtacacs通信的共享秘钥为hello
[Huawei-hwtacacs-huawei_use]quit
三、在AAA用户域绑定要使用的AAA认证和hwtacacs模板[Huawei]aaa
[Huawei-aaa]domain huawei 配置AAA域,名称huawei
[Huawei-aaa-domain-huawei]authentication-scheme ren_zheng 在域中绑定AAA认证方案
[Huawei-aaa-domain-huawei]authorization-scheme shou_quan 在域中绑定AAA认证方案
[Huawei-aaa-domain-huawei]accounting-scheme ji_fei 在域中绑定AAA计费方案
[Huawei-aaa-domain-huawei]hwtacacs-server huawei_use 在域中绑定hwtacacs模板
[Huawei-aaa-domain-huawei]quit
检查命令:
[Huawei]display hwtacacs-server template huawei_use
---------------------------------------------------------------------------
HWTACACS-server template name : huawei_use
Primary-authentication-server : 192.168.1.254:49:-
Primary-authorization-server : 192.168.1.254:49-
Primary-accounting-server : 192.168.1.254:49:-
Secondary-authentication-server : 192.168.1.253:49:-
Secondary-authorization-server : 192.168.1.253:49:-
Secondary-accounting-server : 192.168.1.253:49:-
Current-authentication-server : 192.168.1.254:49:-
Current-authorization-server : 192.168.1.254:49:-
Current-accounting-server : 192.168.1.254:49:-
Source-IP-address : 0.0.0.0
Shared-key : hello
Quiet-interval(min) : 5
Response-timeout-Interval(sec) : 5
Domain-included : Yes
Traffic-unit : B
---------------------------------------------------------------------------
Total 1,1 printed
[Huawei]
[Huawei]display domain name huawei
Domain-name : huawei
Domain-state : Active
Authentication-scheme-name : ren_zheng
Accounting-scheme-name : ji_fei
Authorization-scheme-name : shou_quan
Service-scheme-name : -
RADIUS-server-template : -
HWTACACS-server-template : huawei_use
[Huawei]