为防止网络设备滥用,网络设备对用户身份进行认证
(一)口令认证分类
(1)Console口令
(2)AUX口令
(3)VTY(virtual teletype)口令
(4)user口令
(5)privilege-level口令
(二)Console口令认证
Router# config terminal
Enter configuration commands,one per line. End with CTRL/Z.
Router(config)# line console 0
Router(config-line)# login
Router(config-line)# password console-password
Router(config-line)# ^Z
Router#
(三)口令认证配置
(1)Console口令认证配置
line con 0
password console-password
login
(2)AUX口令认证配置
line aux 0
password aux-password
login
(3)VTY口令认证配置
line vty 0 4
password vty-password
login
(四)认证协议
AAA(Authentication Authorization Accounting)网络安全管理机制(认证、授权、计费)
认证协议 | 说明 | |
1 | TACACS+(Terminal Access Controller Access Control System终端访问控制器访问控制系统)认证 | 要求用户提供用户名和口令进行认证,认证通过后再进行授权操作和审计 |
2 | RADIUS(Remote Authentication Dial In User Service)认证 | RADIUS认证过程简单,认证与授权结合,不能分离 |
(五)TACACS+认证(AUX或VTY)
Router# config terminal
Enter configuration commands,one per line. End with CTRL/Z.
Router(config)# aaa new-model
Router(config)# tacacs-server host X.Y.Z.10
# 服务器IP
Router(config)# tacacs-server key MyTACACSkey
# 服务器秘钥
Router(config)# aaa authentication login default group tacacs+ local
Router(config)# line aux 0
Router(config-line)# login authentication default
Router(config-line)# exit
Router(config)# line vty 0 4
Router(config-line)# login authentication default
Router(config-line)# ^Z
Router#
(六)RADIUS认证
Router# config terminal
Enter configuration commands,one per line. End with CTRL/Z.
Router(config)# aaa new-model
Router(config)#
radius-server
host X.Y.Z.5
Router(config)#
radius-server
key MyRADIUSkey
Router(config)# aaa authentication login default group
radius
local
Router(config)# line
con
0
Router(config-line)# login authentication default
Router(config-line)# exit
Router(config)# line vty 0 4
Router(config-line)# login authentication default
Router(config-line)# ^Z
Router#