Authentication:用于验证用户的访问,如login access,ppp network access等。
Authorization:在Autentication成功验证后,Authorization用 于限制用户可以执行什么操作,可以访问什么服务。
Accouting:记录Authentication及Authorization的 行为。

Part I.安全协议

1>Terminal Access Controller Access Control System Plus (TACACS+)
Cisco私有的协议。加密整个发给tacacs+ server的消息,用户的keys。
支持模块化AAA,可以将不同的AAA功能分布于不同的AAA Server甚至不同的 安全协议,从而可以实现不同的AAA Server/安全协议实现不同的AAA功能。
配置命令:
Router(config)# tacacs-server host IP_address [single-connection] [port {port_#}] [timeout {seconds}] [key {encryption_key}]
Router(config)# tacacs-server key {encryption_key} 注:
(1)single-connection:为Router与AAA Server的会话始终保留一条TCP链接,而不是默认的每次会话都打开/关闭TCP链接。
(2)配置两个tacacs-server host命令可以实现tacacs+的 冗余,如果第一个server fail了,第二个server可 以接管相应的服务。第一个tacacs-server host命令指定的server为主,其它为备份。
(3)配置inbound acl时需要permit tacacs+的TCP port 49。
(4) 如果两个tacacs-server使用不同的key,则需要 在tacacs-server host命令中指定不同的encryption_key,否 则可以使用tacacs-server key统一定制。但tacacs-server host命令中的key定义优先于tacacs-server key命令。
Troubleshooting:
命令:
#show tacacs
#debug tacacs 关于TACACS+的操作信息。
#debug tacacs events 比debug tacacs更详细的信息,包括router上运行的 TACACS+ processes消 息。

Router# show tacacs
Tacacs+ Server            : 10.0.0.10/49              
Socket opens:          3             
Socket closes:          3             
Socket aborts:          0             
Socket errors:          0           
Socket Timeouts:          0   
Failed Connect Attempts:          0        
Total Packets Sent:          42        
Total Packets Recv:          41          
Expected Replies:          0  
No current connection

2>Remote Authentication Dial-In User Service (RADIUS)
RADIUS是一个开放的 标准,定义于RFC 2865和2865。
RADIUS使用一个共享的密钥,并且只加密用户的keys,而 不是TACACS+的整个AAA消息。用户 的keys不会明文在网络上传递。

RADIUS应 用范围:
(1)使用multiple vendors设备,并且需要一个单独的安全协议用于AAA。
(2)需要实现资源记录,如跟踪用户登录router多 长时间及用户访问网络多长时间。
(3)smart card authentication systems只支持RADIUS。
(4)在 用户初始化访问一个设备时,对他进行preauthentication。
RADIUS的使用限制:
(1) 不支 持Apple Talk's Remote Access Protocol(ARAP),the NetBIOS Frame Control Protocol(NBFCP),NetWare's Asynchronous Serveices Interface(NASI)及X.25 PAD链接。
(2)RAIUDS不 支持模块化AAA操作,即只可以使用RADIUS来 完成全部的AAA操作。
(3)只支 持one-way authentication.不支持two-way authentication(如:两个router之 间的PPP CHAP Authentication).
(4)RADIUS将Authentication及Authorization功 能集成为"Authentication"。

配 置命令:
Router(config)# radius-server host IP_address [auth-port {port_#}] [acct-port {port_#}] [timeout {seconds}] [retransmit {retries}] [key {key_value}] [alias {hostname | IP_address}]
Router(config)# radius-server timeout {seconds}
Router(config)# radius-server retransmit {retries}
Router(config)# radius-server key {key_value}
注:
(1)RADIUS Server daemon监听Authentication消息默认使用UDP 1645.Authorization消息默认使用UDP 1646.
(2)配置inbound acl以permit UDP 1645/1646。
(3)RFC 2026中指出,RADIUS也可能使用UDP 1812/1813,一些新的RADIUS Server同时监听UDP 1645/1646及UDP 1812/1813。 所以配置router inbound acl以permit相 应的端口。
(4)RADIUS默认timeout为5s,retransmit为3.

Troubleshooting:
show radius statistics
debug radius [brief]
加上brief参数功能类似于debug tacacs命 令,不加则类似于debug tacacs event命令。
Router# show radius statistics
                          Auth.      Acct.       Both          
Maximum inQ length:        NA         NA          1        
Maximum waitQ length:        NA         NA          1        
Maximum doneQ length:        NA         NA          1        
Total responses seen:         5          0          5      
Packets with responses:         5          0          5   
Packets without responses:         0          0          0  
Average response delay(ms):      1880          0       1880  
Maximum response delay(ms):      6540          0       6540   
Number of Radius timeouts:         0          0          0        
Duplicate ID detects:         0          0          0

3>Kerberos

其 中TACACS+及RADIUS全面支持AAA。Kerberos只支持Authentication。

Item
TACACS+
RADIUS
Comparison
Connection
TCP
UDP
UDP has less overhead; however, with TCP, TACACS+ more quickly can detect a failed server and switch over to a backup. TCP can do this by having the router look for an RST (closed connection) message or by using TCP keepalives.
Encryption
Payload
Passwords
TACACS+ is more secure because it encrypts the entire payload, which includes all user and AAA message information; RADIUS encrypts only passwords, so everything else, including usernames and other account information, is sent in clear text.
Authentication and authorization
Separate
Combined
RADIUS combines authentication and authorization functions, which means that you must use the same server or group for these functions. TACACS+ separates them, giving you more control over the server that handles these functions.
WAN protocols
PPP, ARAP, NetBIOS, NASI, and X.25 PAD
PPP and SLIP
TACACS+ is better suited for remote-access situations that involve multiple dialup protocols, whereas RADIUS supports only PPP and SLIP.
Router command authorization
Yes
No
TACACS+ enables you to control what commands an authenticated user can execute on a router; RADIUS does not.
Accounting
Basic
Advanced
The one big advantage that RADIUS has over TACACS+ is its robust accounting, which is why many ISPs use it to monitor PPP connections.

Part II. Server Groupings

默认使用tacacs-server host或radius-server host命令配置的AAA Server都是按命令出现的顺序分为主/备服 务器,可以使用aaa group server radius/tacacs+命令覆盖实现部分 配置的host做为验证server。同时 可以实现不同的aaa group实现不同的AAA功 能,如group1实现Authentication,group2实现Authorization等。
配置命令:
Router(config)# aaa group server radius | tacacs+ {group_name}
Router(config-sg)# server {IP_address | hostname} [auth-port {port_#}] [acct-port {port_#}]
注:
(1)不能在aaa group server中 混合使用多种安全协议。

Part III. Authentication

router支持authentication以 下两种基本的访问模式。
1>Character mode:用户通过console, auxiliary, TTY, or VTY线路获得到router的 user或privileged EXEC访问。
2>Packet mode:用户通过使用 PPP, SLIP, ARAP, NASI, NetBIOS, or X.25 PAD等远程访问协议建立一个data-link layer链 接。

Method lists:
指定一系列的认证方式。如group tacacs+,group radius,local,none等。
每个authentication命令最多只能 同时使用4种认证methods。

认证的结果:
Success:此method可达,且用户通过验证。
Fail:此mothod可达,但用户验证失败。
Error:有 两种情况
(1)此mothod中指定的aaa server group中 的一个AAA Server不可达,第二个AAA Server被尝试。
(2) 此mothod指定的方式不存在,或AAA group中 的所有的servers都不可达。
注:
1>如果router试图访问的所有mothods结果都是unsuccessful,则router acl会自动deny以后的authentication request。
2>如 果指定的mothod是local,且没有 与用户提供的用户名相匹配的username,则验证结果为Error。

Authtication Command Syntax:
aaa authtication login {认证列表名称} {验证方 法}
{认 证列表名称}
default:默 认的authentication认证方式。
name:指 定特定的认证方式列表,实现更具体的认证。
{验证方法}
enable使用enable帐号密码验证
group:使用Server Group验证
krb5:使用kerberos V验证
krb5-telnet:使 用kerberos V验证telnet
line:使 用线路密码验证
local:使用本地帐号密码验证
local-case:使 用本地帐号密码验证(区分大小写)
none:不进行验证

aaa authentication enable default {验 证方法}
{验 证方法}
enable
group
line
none

aaa authentication ppp {认证列表名称} {验证 方法}
{认 证列表名称}
default:默 认的authentication认证方式。
name:指 定特定的认证方式列表,实现更具体的认证。
{验证方法}
group
if-needed:如 果用户已经通过tty线路身份验证,则在此不验证用户身份,直接通过
krb5
local-case
local
none

Authtication Configuration:
Router(config)# aaa new-model
Router(config)# aaa authentication login {default | list_name} method1 [method2...]
Router(config)# aaa authentication enable default method1 [method2...]
Router(config)# line [aux | console | tty | vty] start_line_# [end_line_#]
Router(config-line)# login authentication {default | list_name}
Router(config-line)# timeout login response {seconds}

Method Keyword
Description
enable
The password in the enable secret or enable password commands is used to perform the authentication.
line
The line password command, on the line that the user is trying to access, is used to perform authentication.
local
The username commands are used to perform authentication.
local-case
The username commands are used to perform authentication. However, the username that the user enters is treated as case sensitive.
none
No authentication is performed.
group radius
All configured RADIUS servers can be used to perform authentication.
group tacacs+
All configured TACACS+ servers can be used to perform authentication.
group group_name
Only servers in the specified aaa group server command are used to perform authentication.
注:
1>aaa authentication login:User EXEC Authentication
2>aaa authentication enable:Privileged EXEC Authentication
3>timeout值 为cisco router等待多长时间将此认证method认 为是error。默认timeout为30s,取值范围1~300s。
4>上图列出的methods,aaa authentication enable不支持local和local-case。

Username and Password Prompts:
默认用户登录时,cisco会 给出这样的提示符:
Username:
Password:
可以使用以 下命令修改这些默认的提示:
Router(config)# aaa authentication username-prompt {prompt_string} Router(config)# aaa authentication password-prompt {prompt_string}
注:
TACACS+/RADIUS Server也支持修改默认的提示符,如果同时配置aaa authentication username-prompt/password-prompt命令和TACACS+/RADIUS Server配置,则cisco优先使用TACACS+/RADIUS Server配置的prompt。

Login Banners
可以使用aaa来代替默认用banner命令配置的登录提示消 息:
Router(config)# aaa authentication banner {stop_character message stop_character} 注:最多支持2996个 字符。
也可以修改用户在输入无效的用户名/密 码时的提示:
Router(config)# aaa authentication fail-message {stop_character message stop_character}
注:最多支持2996个字符。

Login Attempts:
默认cisco router允许用户尝试3次登录,最后disconnect用户的链接。可以 使用以下命令修改允许尝试的次数:
Router(config)# aaa authentication attempts login {#_of_attempts} 注:
1>可配置的次数为1~25。
2>推荐将网络外接设备的login attempts次数修改为1,这样可以减少对密码暴力破解的机会。

Authentication Troubleshooting
Router# debug aaa authentication

Part IV. Authorization

Authorization Command Syntax:
aaa authorization {授权类型} {授权列表名称} {授 权方法}
{授权类型}
auth-proxy:当用户成功通过authentication后, 此method允许用户通过router/firewall建 立到链接的其它网络的多个链接,具体的的链接数在AAA Server端配置实现。
commands:限制用户可以在router上 执行的命令。
config-commands:限制用户可以在router上执行的配置命令。
exec:限制 用户到router的EXEC访问。其主要 用于dialup环境,用户使用PPP的PAP/CHAP认证方式,在通过认证后通过router访 问网络,此处可以限制其在通过认证后,只能实现网络访问,而不能EXEC到router。
network:当用户通过authentication并获得一个EXEC,其 就可以在一个dailup接口上建立一个PPP/SLIP连 接。此method用于限制此种行为。
reverse-access:在 通过authentication后,此method可 以限制用户使用router的虚拟终端反向telnet到 其它设备上。
ipmobile:配置对mobile链 接的授权。
configuration:限制对AAA服 务的配置。
{授权列表名称}
default:默认的authentication认 证方式。
name:指定特定的认证方式列表,实现更具体的认证。
{授权方法}
group
if-authtication:如果用户通过了authentication,则允许它执行相应的操作。
local
none

Authorization Configuration:
Router(config)# aaa authorization commands {level_#} {default | list_name} [method1 [method2...]]
Router(config)# line [aux | console | tty | vty] start_line_# [end_line_#]
Router(config-line)# authorization commands {level_#} {default | list_name}

Method Keyword
Description
local
The username commands are used to perform authorization.
none
No authorization is performed. This parameter is typically not used.
group radius
All configured RADIUS servers can be used to perform authorization.
group tacacs+
All configured TACACS+ servers can be used to perform authorization.
group group_name
Only servers in the specified aaa group server command are used to perform authorization.

Configuration Mode Command Authorization:
一般情况使用aaa authorization后,用户执行的每个命令都被aaa限制执行,这可能对configure termianl模式的命令有一些影响,可以使用下面命令使aaa authorization忽略对configure termianl模式的命令的限制:
Router(config)# no aaa authorization config-commands

Authorization Troubleshooting
Router# debug aaa authorization


Part V. Accounting

配置accouting主 要有两部分:
1>type of accouting:记录哪些信息。
2>method:将记录的信息发送到哪。

Accouting Command Syntax:
aaa accouting {统计类型} {统计列表名称} {统计记录方式} {统计方法}
{统计类型}

commands {level}:记 录用户执行的所有的命令,包括privilege/configuration mode命令。
connection:记录router通过Telnet, LAT, TN32760, PAD, and rlogin等方式建立的到其它设备的链接 信息。信息包括建立链接的用户名,日期/时间及在建立的链接上执行的命令。
exec:记录router的EXEC会话信息。信息包括用户名,会话起始日期和时间,用户设备的IP。
network:记录dialup链接的信 息,如PPP/SLIP。信息包括相应链接的packets数 目及bytes数目。
resource:记 录dialup链接信息及phone call的 资源信息。
system:记录system-level事 件。如接口up/down,router reload,accouting被启用/禁止。
{统计列表名称}
default:默认的authentication认 证方式。
name:指定特定的认证方式列表,实现更具体的认证。
{统计记录方式}
start-stop:在事件开始和结束时都建立相应的记录。先执行后记录。
stop-only:只在事件结束时建立相应的记录。
none:禁 用对特定服务的记录。
wait -start:类似于start-stop,在事件开始和结束时都建立相应的记录。不同的是此模式只在成功链接到AAA Server并能实现记录时才允许用户执行相应的事件,否则等待。即:先记录后执行。(此模式在Cisco IOS 12.1及以后的版本中被移除,并不再支持)
{统 计方法}
group

Methods of Accounting:
RADIUS
TACACS+
注:
1>只 能使用以上两种method在aaa accouting中。
2>Cisco的RADIUS实现不能 实现aaa accouting,只能使用TACACS+。


Accouting Configuration:

Router(config)# aaa accounting {system | network | exec | connection | commands level_#} {default | list_name} {start-stop | stop-only | none} [method1 [method2...]]
Router(config)# line [aux | console | tty | vty] line_# [ending_line_#]
Router(config-line)# accounting {arap | commands level_# | connection | exec} {default | list_name}
Router(config)# interface type [slot_#/]port_#
Router(config-if)# ppp accounting {default | list_name}

Service Keyword
Description
system
Enables accounting to capture system-level events, such as an interface status changing or the router reloading (only the default method list is supported for this service)
network
Enables accounting for all network services, such as SLIP, PPP, NCP, and ARAP
exec
Enables accounting for EXEC sessions, listing what users logged in and when they logged into and out of the router
connection
Enables accounting for outbound connections from the router, such as Telnet and TN3270
commands level_#
Enables accounting for commands, listing the commands (and their privilege levels) that were executed by a user
resource
Enables accounting for dialup connections, listing resource information for them

Suppressing Null Username Records
当指定多种authentication mothods,并在最后使用none,且其它mothods都不可达,用户通过none成功登录router时,accouting仍然会产生一个相 应 的登录记录,不过没有相应的登录用户名信息,因为none method不需要提供任何登录信 息。这样的记录没有太大意义,可以使用以下命令来使aaa accouting不记录这样的事件:
Router(config)# aaa accounting suppress null-username

Enabling Broadcast Accounting:
aaa accouting初始的限制就是在使用多个AAA Accouting Server实现日志记录时,记录信息只会发给Primary AAA Accouting Server,并于Primary Accouting Server发送给其它Servers。
可以使用以下命令,在aaa accouting命 令中加入broadcast参数,将日志信息一次性的广播到所有的AAA Accouting Servers:
Router(config)# aaa accounting {system | network | exec | connection | commands level_#} {default | list_name} {start-stop | stop-only | (none} <broadcast> [method1 [method2...]]

Accounting Troubleshooting:
Router# debug aaa accounting
Router# show accounting
Router# show aaa user all

Part VI. IOS命令权限

所有有IOS命 令都被分为0~15的权限级别。
默 认Cisco Router只使用3个级 别:
0级:包括5个命令(disable,enable,exit,help,logou),现在未用于任何线路。
1级:用户EXEC模式,所有用户登录后的默认 级别。
15级:特权EXEC模式。

1>所有用户只可以执行其权限级别以下的命令。
2>指定用户权限级别。
username {name} privilege {level} password {password}
3>查 看用户权限级别。
show privilege
4>查 看用户当前权限级别可以执行的命令。
?
5>修 改特定命令的权限级别。
privilege {configure|exec} level {level} {command}

例:
username sense privilege 7 password test
privilege configure level 7 snap-server host
privilege configure level 7 snap-enable traps
privilege exec level 7 ping
privilege exec level 7 configure terminal

转载于:https://blog.51cto.com/yuxin/325467

Cisco AAA 详解相关推荐

  1. CCNP学习之路之AAA详解(authentication、Authorization、Accounting)

    Authentication:用于验证用户的访问,如login access,ppp network access等. Authorization:在Autentication成功验证后,Author ...

  2. 详解Cisco ACS AAA认证

    详解Cisco ACS AAA认证 近来,有些同学会问到关于AAA认证的问题,以及cisco ACS如何使用,那么今天我们就主要来讲一下关于这方面的知识. AAA代表Authentication.Au ...

  3. Cisco 3945路由器密码恢复,rommon模式操作详解

    Cisco 3945路由器密码恢复,rommon模式操作详解 在一次客户的网络出现故障,网络中断,排除故障的原因,发现到达路由器地址不通: 观察到路由器接口灯全部熄灭,电源状态正常: 然后使用cons ...

  4. (ASA) Cisco Web ××× 配置详解 [三部曲之一]

    (ASA) Cisco Web ××× 配置详解 [三部曲之一] 注意:本文仅对Web×××特性和配置作介绍,不包含SSL ×××配置,SSL ×××配置将在本版的后续文章中进行介绍.   首先,先来 ...

  5. Cisco ××× 完全配置指南-连载-IOS ×××阶段2连接详解

    Cisco ××× 完全配置指南-连载-IOS ×××阶段2连接详解 详细配置见附件 转载于:https://blog.51cto.com/xuanbo/151764

  6. cisco路由交换防火墙命令配置详解

    Cisco路由器交换机防火墙配置命令详解 1.交换机支持的命令 交换机基本状态 switch: ;ROM状态, 路由器是rommon> hostname> ;用户模式 hostname# ...

  7. Cisco mode键的作用详解

    当MODE按钮按下UTIL灯亮起的时候,右侧的那些端口灯就变成了系统繁忙程度的标尺,橙色的灯表示总的标尺度量,绿色则表示当前的负荷程度,通过他你可以方便的看到你交换机的负载大小. 当MODE按下DUP ...

  8. 思科关闭日志_详解Cisco(思科)路由器的故障日志

    思科公司是全球领先的网络解决方案供应商.Cisco的名字取自San Francisco(旧金山),那里有座闻名于世界的金门大桥.可以说,依靠自身的技术和对网络经济模式的深刻理解,思科成为了网络应用的成 ...

  9. 清默网络——CISCO ASA SSL ***详解

    CISCO ASA SSL ×××详解 清默网络 CCIE Team 制作清默网络 CCIE Team 制作oCisco ASAWebN××× 配置详解实验环境如拓朴图.在做实验之前让我们先来了解一下 ...

最新文章

  1. 生物识别包含人脸识别门禁之外还包含哪种识别种类
  2. Linux之scp命令实现远程服务器的文件拷贝
  3. go 函数参数nil_go内置函数make
  4. RequestMethod的参数的含义是?
  5. _Linux软件安装
  6. 硬件加速下webview切换闪屏_网页渲染性能优化 —— 性能优化下
  7. tomee_使用Vysper,TomEE和PrimeFaces将XMPP服务器嵌入JSF Web应用程序内部
  8. 自动化 测试框架部署(python3+selenium2)
  9. 跨域资源共享 CORS 详解
  10. libjpeg学习4:libjpeg-turbo之YUV
  11. php实现无限级分类(递归方法)
  12. mac 上mysql怎么卸载不了_mac上mysql怎么卸载不了
  13. ORA-07445ORA-00108错误案例
  14. Linux shell下的颜色含义
  15. 新东方java开发面试经历---现场面试(2021年1月)
  16. No matching provisioning profile found: Your build settings specify a provis...
  17. Cadence Allegro通孔PAD制作图文教程及视频演示
  18. 【Unity3D游戏开发】NGUI制作字体的三种方法 (二一)
  19. linux部署nestjs项目
  20. 迁移WSL时的报错:0x80073d21 此应用的发布者不允许将其移动到其他位置

热门文章

  1. 海康云台监控夜间彩色设置
  2. 解决matplotlib(plt)的中英文字体混显问题
  3. 使用高德地图api点聚合案例 (自定义样式)
  4. win7 资源管理器指向我的电脑
  5. DSBC176 3BSE019216R1​有综合保护器、电流表、电压表等器件​
  6. 微服务 Nacos 注册中心 基础配置
  7. html页面上传excel,HTML页面预览表格文件内容
  8. 独角数卡PHP自动化售货发卡网源码下载
  9. FactoryIO+ABB机器人+博图仿真实验程序
  10. 《离散数学》双语专业词汇表