日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 综合教程 >内容正文

综合教程

Cisco AAA 详解

發(fā)布時(shí)間:2023/12/4 综合教程 27 生活家
生活随笔 收集整理的這篇文章主要介紹了 Cisco AAA 详解 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Authentication:用于驗(yàn)證用戶的訪問(wèn),如login access,ppp network access等。
Authorization:在Autentication成功驗(yàn)證后,Authorization用 于限制用戶可以執(zhí)行什么操作,可以訪問(wèn)什么服務(wù)。
Accouting:記錄Authentication及Authorization的 行為。

Part I.安全協(xié)議

1>Terminal Access Controller Access Control System Plus (TACACS+)
Cisco私有的協(xié)議。加密整個(gè)發(fā)給tacacs+ server的消息,用戶的keys。
支持模塊化AAA,可以將不同的AAA功能分布于不同的AAA Server甚至不同的 安全協(xié)議,從而可以實(shí)現(xiàn)不同的AAA Server/安全協(xié)議實(shí)現(xiàn)不同的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的會(huì)話始終保留一條TCP鏈接,而不是默認(rèn)的每次會(huì)話都打開(kāi)/關(guān)閉TCP鏈接。
(2)配置兩個(gè)tacacs-server host命令可以實(shí)現(xiàn)tacacs+的 冗余,如果第一個(gè)server fail了,第二個(gè)server可 以接管相應(yīng)的服務(wù)。第一個(gè)tacacs-server host命令指定的server為主,其它為備份。
(3)配置inbound acl時(shí)需要permit tacacs+的TCP port 49。
(4) 如果兩個(gè)tacacs-server使用不同的key,則需要 在tacacs-server host命令中指定不同的encryption_key,否 則可以使用tacacs-server key統(tǒng)一定制。但tacacs-server host命令中的key定義優(yōu)先于tacacs-server key命令。
Troubleshooting:
命令:
#show tacacs
#debug tacacs 關(guān)于TACACS+的操作信息。
#debug tacacs events 比debug tacacs更詳細(xì)的信息,包括router上運(yùn)行的 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是一個(gè)開(kāi)放的 標(biāo)準(zhǔn),定義于RFC 2865和2865。
RADIUS使用一個(gè)共享的密鑰,并且只加密用戶的keys,而 不是TACACS+的整個(gè)AAA消息。用戶 的keys不會(huì)明文在網(wǎng)絡(luò)上傳遞。

RADIUS應(yīng) 用范圍:
(1)使用multiple vendors設(shè)備,并且需要一個(gè)單獨(dú)的安全協(xié)議用于AAA。
(2)需要實(shí)現(xiàn)資源記錄,如跟蹤用戶登錄router多 長(zhǎng)時(shí)間及用戶訪問(wèn)網(wǎng)絡(luò)多長(zhǎng)時(shí)間。
(3)smart card authentication systems只支持RADIUS。
(4)在 用戶初始化訪問(wèn)一個(gè)設(shè)備時(shí),對(duì)他進(jìn)行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來(lái) 完成全部的AAA操作。
(3)只支 持one-way authentication.不支持two-way authentication(如:兩個(gè)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監(jiān)聽(tīng)Authentication消息默認(rèn)使用UDP 1645.Authorization消息默認(rèn)使用UDP 1646.
(2)配置inbound acl以permit UDP 1645/1646。
(3)RFC 2026中指出,RADIUS也可能使用UDP 1812/1813,一些新的RADIUS Server同時(shí)監(jiān)聽(tīng)UDP 1645/1646及UDP 1812/1813。 所以配置router inbound acl以permit相 應(yīng)的端口。
(4)RADIUS默認(rèn)timeout為5s,retransmit為3.

Troubleshooting:
show radius statistics
debug radius [brief]
加上brief參數(shù)功能類似于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

默認(rèn)使用tacacs-server host或radius-server host命令配置的AAA Server都是按命令出現(xiàn)的順序分為主/備服 務(wù)器,可以使用aaa group server radius/tacacs+命令覆蓋實(shí)現(xiàn)部分 配置的host做為驗(yàn)證server。同時(shí) 可以實(shí)現(xiàn)不同的aaa group實(shí)現(xiàn)不同的AAA功 能,如group1實(shí)現(xiàn)Authentication,group2實(shí)現(xiàn)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中 混合使用多種安全協(xié)議。

Part III. Authentication

router支持authentication以 下兩種基本的訪問(wèn)模式。
1>Character mode:用戶通過(guò)console, auxiliary, TTY, or VTY線路獲得到router的 user或privileged EXEC訪問(wèn)。
2>Packet mode:用戶通過(guò)使用 PPP, SLIP, ARAP, NASI, NetBIOS, or X.25 PAD等遠(yuǎn)程訪問(wèn)協(xié)議建立一個(gè)data-link layer鏈 接。

Method lists:
指定一系列的認(rèn)證方式。如group tacacs+,group radius,local,none等。
每個(gè)authentication命令最多只能 同時(shí)使用4種認(rèn)證methods。

認(rèn)證的結(jié)果:
Success:此method可達(dá),且用戶通過(guò)驗(yàn)證。
Fail:此mothod可達(dá),但用戶驗(yàn)證失敗。
Error:有 兩種情況
(1)此mothod中指定的aaa server group中 的一個(gè)AAA Server不可達(dá),第二個(gè)AAA Server被嘗試。
(2) 此mothod指定的方式不存在,或AAA group中 的所有的servers都不可達(dá)。
注:
1>如果router試圖訪問(wèn)的所有mothods結(jié)果都是unsuccessful,則router acl會(huì)自動(dòng)deny以后的authentication request。
2>如 果指定的mothod是local,且沒(méi)有 與用戶提供的用戶名相匹配的username,則驗(yàn)證結(jié)果為Error。

Authtication Command Syntax:
aaa authtication login {認(rèn)證列表名稱} {驗(yàn)證方 法}
{認(rèn) 證列表名稱}
default:默 認(rèn)的authentication認(rèn)證方式。
name:指 定特定的認(rèn)證方式列表,實(shí)現(xiàn)更具體的認(rèn)證。
{驗(yàn)證方法}
enable使用enable帳號(hào)密碼驗(yàn)證
group:使用Server Group驗(yàn)證
krb5:使用kerberos V驗(yàn)證
krb5-telnet:使 用kerberos V驗(yàn)證telnet
line:使 用線路密碼驗(yàn)證
local:使用本地帳號(hào)密碼驗(yàn)證
local-case:使 用本地帳號(hào)密碼驗(yàn)證(區(qū)分大小寫)
none:不進(jìn)行驗(yàn)證

aaa authentication enable default {驗(yàn) 證方法}
{驗(yàn) 證方法}
enable
group
line
none

aaa authentication ppp {認(rèn)證列表名稱} {驗(yàn)證 方法}
{認(rèn) 證列表名稱}
default:默 認(rèn)的authentication認(rèn)證方式。
name:指 定特定的認(rèn)證方式列表,實(shí)現(xiàn)更具體的認(rèn)證。
{驗(yàn)證方法}
group
if-needed:如 果用戶已經(jīng)通過(guò)tty線路身份驗(yàn)證,則在此不驗(yàn)證用戶身份,直接通過(guò)
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等待多長(zhǎng)時(shí)間將此認(rèn)證method認(rèn) 為是error。默認(rèn)timeout為30s,取值范圍1~300s。
4>上圖列出的methods,aaa authentication enable不支持local和local-case。

Username and Password Prompts:
默認(rèn)用戶登錄時(shí),cisco會(huì) 給出這樣的提示符:
Username:
Password:
可以使用以 下命令修改這些默認(rèn)的提示:
Router(config)# aaa authentication username-prompt {prompt_string} Router(config)# aaa authentication password-prompt {prompt_string}
注:
TACACS+/RADIUS Server也支持修改默認(rèn)的提示符,如果同時(shí)配置aaa authentication username-prompt/password-prompt命令和TACACS+/RADIUS Server配置,則cisco優(yōu)先使用TACACS+/RADIUS Server配置的prompt。

Login Banners
可以使用aaa來(lái)代替默認(rèn)用banner命令配置的登錄提示消 息:
Router(config)# aaa authentication banner {stop_character message stop_character} 注:最多支持2996個(gè) 字符。
也可以修改用戶在輸入無(wú)效的用戶名/密 碼時(shí)的提示:
Router(config)# aaa authentication fail-message {stop_character message stop_character}
注:最多支持2996個(gè)字符。

Login Attempts:
默認(rèn)cisco router允許用戶嘗試3次登錄,最后disconnect用戶的鏈接。可以 使用以下命令修改允許嘗試的次數(shù):
Router(config)# aaa authentication attempts login {#_of_attempts} 注:
1>可配置的次數(shù)為1~25。
2>推薦將網(wǎng)絡(luò)外接設(shè)備的login attempts次數(shù)修改為1,這樣可以減少對(duì)密碼暴力破解的機(jī)會(huì)。

Authentication Troubleshooting
Router# debug aaa authentication

Part IV. Authorization

Authorization Command Syntax:
aaa authorization {授權(quán)類型} {授權(quán)列表名稱} {授 權(quán)方法}
{授權(quán)類型}
auth-proxy:當(dāng)用戶成功通過(guò)authentication后, 此method允許用戶通過(guò)router/firewall建 立到鏈接的其它網(wǎng)絡(luò)的多個(gè)鏈接,具體的的鏈接數(shù)在AAA Server端配置實(shí)現(xiàn)。
commands:限制用戶可以在router上 執(zhí)行的命令。
config-commands:限制用戶可以在router上執(zhí)行的配置命令。
exec:限制 用戶到router的EXEC訪問(wèn)。其主要 用于dialup環(huán)境,用戶使用PPP的PAP/CHAP認(rèn)證方式,在通過(guò)認(rèn)證后通過(guò)router訪 問(wèn)網(wǎng)絡(luò),此處可以限制其在通過(guò)認(rèn)證后,只能實(shí)現(xiàn)網(wǎng)絡(luò)訪問(wèn),而不能EXEC到router。
network:當(dāng)用戶通過(guò)authentication并獲得一個(gè)EXEC,其 就可以在一個(gè)dailup接口上建立一個(gè)PPP/SLIP連 接。此method用于限制此種行為。
reverse-access:在 通過(guò)authentication后,此method可 以限制用戶使用router的虛擬終端反向telnet到 其它設(shè)備上。
ipmobile:配置對(duì)mobile鏈 接的授權(quán)。
configuration:限制對(duì)AAA服 務(wù)的配置。
{授權(quán)列表名稱}
default:默認(rèn)的authentication認(rèn) 證方式。
name:指定特定的認(rèn)證方式列表,實(shí)現(xiàn)更具體的認(rèn)證。
{授權(quán)方法}
group
if-authtication:如果用戶通過(guò)了authentication,則允許它執(zhí)行相應(yīng)的操作。
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后,用戶執(zhí)行的每個(gè)命令都被aaa限制執(zhí)行,這可能對(duì)configure termianl模式的命令有一些影響,可以使用下面命令使aaa authorization忽略對(duì)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:將記錄的信息發(fā)送到哪。

Accouting Command Syntax:
aaa accouting {統(tǒng)計(jì)類型} {統(tǒng)計(jì)列表名稱} {統(tǒng)計(jì)記錄方式} {統(tǒng)計(jì)方法}
{統(tǒng)計(jì)類型}

commands {level}:記 錄用戶執(zhí)行的所有的命令,包括privilege/configuration mode命令。
connection:記錄router通過(guò)Telnet, LAT, TN32760, PAD, and rlogin等方式建立的到其它設(shè)備的鏈接 信息。信息包括建立鏈接的用戶名,日期/時(shí)間及在建立的鏈接上執(zhí)行的命令。
exec:記錄router的EXEC會(huì)話信息。信息包括用戶名,會(huì)話起始日期和時(shí)間,用戶設(shè)備的IP。
network:記錄dialup鏈接的信 息,如PPP/SLIP。信息包括相應(yīng)鏈接的packets數(shù) 目及bytes數(shù)目。
resource:記 錄dialup鏈接信息及phone call的 資源信息。
system:記錄system-level事 件。如接口up/down,router reload,accouting被啟用/禁止。
{統(tǒng)計(jì)列表名稱}
default:默認(rèn)的authentication認(rèn) 證方式。
name:指定特定的認(rèn)證方式列表,實(shí)現(xiàn)更具體的認(rèn)證。
{統(tǒng)計(jì)記錄方式}
start-stop:在事件開(kāi)始和結(jié)束時(shí)都建立相應(yīng)的記錄。先執(zhí)行后記錄。
stop-only:只在事件結(jié)束時(shí)建立相應(yīng)的記錄。
none:禁 用對(duì)特定服務(wù)的記錄。
wait -start:類似于start-stop,在事件開(kāi)始和結(jié)束時(shí)都建立相應(yīng)的記錄。不同的是此模式只在成功鏈接到AAA Server并能實(shí)現(xiàn)記錄時(shí)才允許用戶執(zhí)行相應(yīng)的事件,否則等待。即:先記錄后執(zhí)行。(此模式在Cisco IOS 12.1及以后的版本中被移除,并不再支持)
{統(tǒng) 計(jì)方法}
group

Methods of Accounting:
RADIUS
TACACS+
注:
1>只 能使用以上兩種method在aaa accouting中。
2>Cisco的RADIUS實(shí)現(xiàn)不能 實(shí)現(xiàn)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
當(dāng)指定多種authentication mothods,并在最后使用none,且其它mothods都不可達(dá),用戶通過(guò)none成功登錄router時(shí),accouting仍然會(huì)產(chǎn)生一個(gè)相 應(yīng) 的登錄記錄,不過(guò)沒(méi)有相應(yīng)的登錄用戶名信息,因?yàn)閚one method不需要提供任何登錄信 息。這樣的記錄沒(méi)有太大意義,可以使用以下命令來(lái)使aaa accouting不記錄這樣的事件:
Router(config)# aaa accounting suppress null-username

Enabling Broadcast Accounting:
aaa accouting初始的限制就是在使用多個(gè)AAA Accouting Server實(shí)現(xiàn)日志記錄時(shí),記錄信息只會(huì)發(fā)給Primary AAA Accouting Server,并于Primary Accouting Server發(fā)送給其它Servers。
可以使用以下命令,在aaa accouting命 令中加入broadcast參數(shù),將日志信息一次性的廣播到所有的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命令權(quán)限

所有有IOS命 令都被分為0~15的權(quán)限級(jí)別。
默 認(rèn)Cisco Router只使用3個(gè)級(jí) 別:
0級(jí):包括5個(gè)命令(disable,enable,exit,help,logou),現(xiàn)在未用于任何線路。
1級(jí):用戶EXEC模式,所有用戶登錄后的默認(rèn) 級(jí)別。
15級(jí):特權(quán)EXEC模式。

1>所有用戶只可以執(zhí)行其權(quán)限級(jí)別以下的命令。
2>指定用戶權(quán)限級(jí)別。
username {name} privilege {level} password {password}
3>查 看用戶權(quán)限級(jí)別。
show privilege
4>查 看用戶當(dāng)前權(quán)限級(jí)別可以執(zhí)行的命令。
?
5>修 改特定命令的權(quán)限級(jí)別。
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

轉(zhuǎn)載于:https://blog.51cto.com/yuxin/325467

總結(jié)

以上是生活随笔為你收集整理的Cisco AAA 详解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。