【路由器上的配置】
1、 enable AAA:
Router(config)#aaa new-model
2、Configuring TACACS+ and RADIUS clients:
对TACACS+:
Router(config)#tacacs-server host ip-address
Router(config)#tacacs-server key word
对RADIUS:
Router(config)#radius-server host ip-address
Router(config)#radius-server key word
3、Configuring AAA authentication:
Router(config)#aaa authentication type {default|list-name} method1 […[method4]]
type分为:login、enable、ppp、local-override、arap、nasi、password-prompt和username-prompt,其中常用的为前面四个。
login:为想进入到EXEC命令行模式的用户认证。
enable:决定用户是否可以访问特权级命令级。
ppp:在运行PPP的串行口上指定认证。
local-override:用于某些特殊用户(如系统管理员)快速登录,先使用本地数据库,如果失败再使用后面的认证方式。
List type分两种,一种是default,一种是命名list。用来指代后面的认证方式列表method1 […[method4]]
不同的type对应不同的Method,后面的认证方式只有当前面的认证方式返回了一个出错信息时使用(最多四种Method),而不是在前面的认证失败时使用。一般分为以下几种:
4、Configuring AAA authorization:
Router(config)#aaa authorization type {default|list-name} method1 […[method2]]
type分为:
Method分为:
List type与authentication一样分两种:default和命名list
5、Configuring AAA accounting:
Router(config)#aaa accounting type {default|list-name} Record-type method1 […[method2]]
type分为:
Record-type分为:
Method分为:group tacacs+和group radius
List type与authentication一样,分为:default和命名list
【配置示例】
(RADIUS的authentication配置与下相似,可选做,但其不能实行authorization)
Building configuration...
Current configuration : 4102 bytes
!
version 12.2
aaa new-model
!
!
aaa authentication login TELNET group tacacs+ local enable none
aaa authorization exec TELNET group tacacs+ local
aaa accounting exec TELNET start-stop group tacacs+
aaa accounting commands 15 TELNET start-stop group tacacs+
aaa accounting network TELNET start-stop group tacacs+
aaa accounting connection TELNET start-stop group tacacs+
aaa accounting system default start-stop group tacacs+
aaa session-id common
enable password 7 070C285F4D060D00161F
!
tacacs-server host 10.2.0.1
tacacs-server key ciscoteam
privilege configure level 7 snmp-server host
privilege configure level 7 snmp-server enable
privilege configure level 7 snmp-server
privilege exec level 7 ping
privilege exec level 7 configure terminal
privilege exec level 7 configure
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
insecure
authorization exec TELNET
accounting connection TELNET
accounting commands 15 TELNET
accounting exec TELNET
logging synchronous
login authentication TELNET
transport input telnet
!
no scheduler allocate
end