AAA基本配置思路流程图
配置任务 | 说明 | |
---|---|---|
配置AAA方案 | 配置本地用户 | 四者至少选其一 |
配置RADIUS方案 | ||
配置HWTACACS方案 | ||
配置LDAP方案 | ||
在ISP域中配置实现AAA的方法 | 创建ISP域 | 必选 |
配置ISP域的属性 | 可选 | |
配置ISP域的AAA认证方法 | 三者至少选其一 | |
配置ISP域的AAA授权方法 | ||
配置ISP域的AAA计费方法 | ||
配置RADIUS session control功能 | 可选 | |
配置RADIUS DAE服务器功能 | 可选 | |
配置RADIUS协议报文的DSCP优先级 | 可选 | |
配置RADIUS属性转换功能 | 可选 | |
限制同时在线的最大用户连接数 | 可选 | |
配置NAS-ID与VLAN的绑定 | 可选 | |
配置设备ID | 可选 |
一、华为
1.1 本地认证
aaa
local-user user1 password irreversible-cipher Example@123
local-user user1 service-type ssh ter
local-user user1 privilege level 15
1.2 RADIUS认证
radius-server template 1
radius-server authentication 10.1.6.6 1812
radius-server accounting 10.1.6.6 1813
radius-server shared-key cipher Example@123
quit
aaa
authentication-scheme sch1
authentication-mode radius local
quit
aaa
accounting-scheme acc1
accounting-mode radius
accounting start-fail online
aaa
domain example.com
authentication-scheme sch1
accounting-scheme acc1
radius-server 1
domain example.com admin
1.3 HWTACACS认证
hwtacacs enable
hwtacacs-server template template1
hwtacacs-server authentication 10.1.6.6 49
hwtacacs-server authorization 10.1.6.6 49
hwtacacs-server accounting 10.1.6.6 49
hwtacacs-server shared-key cipher Hello@1234
aaa
authentication-scheme sch1
authentication-mode hwtacacs local
aaa
authorization-scheme sch2
authorization-mode hwtacacs local
aaa
accounting-scheme sch3
accounting-mode hwtacacs
accounting start-fail online
aaa
domain example.com
hwtacacs-server template1
authentication-scheme sch1
authorization-scheme sch2
accounting-scheme sch3
domain example.com admin
二、华三
2.1 本地认证
local-user admin
password cipher xxx
authorization-attribute level 3
service-type ssh ter
操作 | 命令 | 说明 | |
---|---|---|---|
进入系统视图 | system-view | - | |
添加本地用户,并进入本地用户视图 | local-user user-name [ class { manage | network } ] | 缺省情况下,不存在本地用户 | |
(可选)设置本地用户的密码 | 对于网络接入类(network)本地用户 | password { cipher | simple } string | 非FIPS模式下: 缺省情况下,不存在本地用户密码,即本地用户认证时无需输入密码,只要用户名有效且其它属性验证通过即可认证成功 FIPS模式下: 缺省情况下,不存在本地用户密码,但本地用户认证时不能成功 |
对于设备管理类(manage)本地用户 | 非FIPS模式下: password [ { hash | simple } string__ ] FIPS模式下: password |
||
(可选)设置本地用户的描述信息 | description text | 缺省情况下,未配置本地用户的描述信息 仅网络接入类本地用户支持 |
|
设置本地用户可以使用的服务类型 | 对于网络接入类(network)本地用户 | service-type lan-access | 缺省情况下,本地用户不能使用任何服务类型 |
对于设备管理类(manage)本地用户 | 非FIPS模式下: service-type { ftp | { http | https | ssh | telnet | terminal } * } FIPS模式下: service-type { https | ssh | terminal } * |
||
(可选)设置本地用户的状态 | state { active | block } | 缺省情况下,本地用户处于活动状态,即允许该用户请求网络服务 | |
(可选)设置使用当前本地用户名接入设备的最大用户数 | access-limit max-user-number | 缺省情况下,不限制使用当前本地用户名接入的用户数 由于FTP/SFTP/SCP用户不支持计费,因此FTP/SFTP/SCP用户不受此属性限制 |
|
(可选)设置本地用户的绑定属性 | bind-attribute { ip ip-address | location interface interface-type interface-number__ | mac mac-address | vlan __vlan-id } * | 缺省情况下,未设置本地用户的任何绑定属性 | |
(可选)设置本地用户的授权属性 | authorization-attribute { acl acl-number | idle-cut minutes | session-timeout minutes | user-profile profile-name__ | user-role role-name__ | vlan vlan-id | work-directory directory-name } * | 缺省情况下,授权FTP/SFTP/SCP用户可以访问的目录为设备的根目录,但无访问权限。由用户角色为network-admin或者level-15的用户创建的本地用户被授权用户角色network-operator | |
(可选)设置设备管理类本地用户的密码管理属性 | 密码老化时间 | password-control aging aging-time | 缺省情况下,采用本地用户所属用户组的密码管理策略 仅设备管理类的本地用户支持本地用户密码管理功能 |
密码最小长度 | password-control length length | ||
密码组合策略 | password-control composition type-number type-number [ type-length type-length ] | ||
密码的复杂度检查策略 | password-control complexity { same-character | user-name } check | ||
用户登录尝试次数以及登录尝试失败后的行为 | password-control login-attempt login-times [ exceed { lock | lock-time time | unlock } ] | ||
(可选)设置本地用户所属的用户组 | group group-name | 缺省情况下,本地用户属于用户组system | |
(可选)设置本地用户的有效期 | validity-datetime { from __start-date start-time to expiration-date expiration-time | from start-date start-time | to expiration-date expiration-time__ } | 缺省情况下,未限制本地用户的有效期,该用户始终有效 仅网络接入类本地用户支持 |
2.2 RADIUS认证
radius scheme zhunru
primary authentication x.x.x.x key cipher xxx
primary accounting x.x.x.x key cipher xxx
secondary authentication x.x.x.x key cipher xxx
secondary accounting x.x.x.x key cipher xxx
timer realtime-accounting 15
user-name-format without-domain
nas-ip x.x.x.x
domain test1
authentication default radius-scheme zhunru
authorization default radius-scheme zhunru
accounting default radius-scheme zhunru
access-limit disable
state active
idle-cut enable 5 10240
self-service-url disable
domain default enable test1
2.3 HWTACACS认证
hwtacacs scheme test1
primary authentication x.x.x.x
primary authorization x.x.x.x
primary accounting x.x.x.x
key authentication xxx
key authorization xxx
key accounting xxx
user-name-format without-domain
domain test1
authentication default hwtacacs-scheme test1
authorization default hwtacacs-scheme test1
accounting default hwtacacs-scheme test1
access-limit disable
state active
idle-cut enable 5 10240
self-service-url disable
domain default enable test1