Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain-lookup
Router(config)#line console 0
Router(config-line)#no exec-t
Router(config-line)#logg syn
3640(config)#host R3640
R3640(config)#int e1/0
R3640(config-if)#ip add 192.168.10.3 255.255.255.0
R3640(config-if)#no sh
R3640(config-if)#end
*Mar 1 00:02:02.499: %SYS-5-CONFIG_I: Configured from console by console
R3640#ping 192.168
*Mar 1 00:02:03.659: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to up
*Mar 1 00:02:04.659: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R3640#ping 192.168.10.1
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
.!!!!
Enter configuration commands, one per line. End with CNTL/Z.
R3640(config)#aaa ?
new-model Enable NEW access control commands and functions.(Disables OLD
commands.)
R3640(config)#aaa authentication login ? 当用户登录时启用AAA认证功能,并且定义认证时调用的名字是默认的”default”,还是自己随便定义1个
WORD Named authentication list.
default The default authentication list.
enable Use enable password for authentication. 使用特权密码
group Use Server-group 使用Radius或者Tacacs+协议
krb5 Use Kerberos 5 authentication. 使用Kerberos
krb5-telnet Allow logins only if already authenticated via Kerberos V
Telnet.
line Use line password for authentication. 使用线路认证方式
local Use local username authentication. 使用本地认证方式,需配置用户名和密码
local-case Use case-sensitive local username authentication.
none NO authentication. 不做认证
R3640(config)#username nousername secret nopassword
AAA Authentication debugging is on
R3640#
*Mar 1 00:38:49.347: AAA: parse name=tty130 idb type=-1 tty=-1
*Mar 1 00:38:49.347: AAA: name=tty130 flags=0x11 type=5 shelf=0 slot=0 adapter=0 port=130 channel=0
*Mar 1 00:38:49.347: AAA/MEMORY: create_user (0x637810BC) user='nousername'(登录的用户名和密码) ruser='NULL' ds0=0 port='tty130' rem_addr='192.168.10.1'(PC IP地址) authen_type=ASCII service=ENABLE priv=15 initial_task_id='0', vrf= (id=0)
*Mar 1 00:38:49.351: AAA/AUTHEN/START (509980843): port='tty130' list='' action=LOGIN service=ENABLE 输入enable (没有enable密码)
*Mar 1 00:38:49.351: AAA/AUTHEN/START (509980843): non-console enable - default to enable password
*Mar 1 00:38:49.351: AAA/AUTHEN/START (509980843): Method=ENABLE
R3640#
*Mar 1 00:38:49.351: AAA/AUTHEN(509980843): can't find any passwords 没有发现enable 密码
*Mar 1 00:38:49.351: AAA/AUTHEN(509980843): Status=ERROR (认证状态发生错误)
*Mar 1 00:38:49.351: AAA/AUTHEN/START (509980843): no methods left to try
*Mar 1 00:38:49.351: AAA/AUTHEN(509980843): Status=ERROR
*Mar 1 00:38:49.351: AAA/AUTHEN/START (509980843): failed to authenticate 认证失败,原因是没有配置enable密码
*Mar 1 00:38:49.355: AAA/MEMORY: free_user (0x637810BC) user='nousername' ruser='NULL' port='tty130' rem_addr='192.168.10.1' authen_type=ASCII service=ENABLE priv=15 vrf= (id=0)
R3640#
Password:
% Access denied
Password:
% Password: timeout expired!
% Error in authentication.
R3640#
*Mar 1 00:51:30.667: AAA: parse name=tty130 idb type=-1 tty=-1
*Mar 1 00:51:30.667: AAA: name=tty130 flags=0x11 type=5 shelf=0 slot=0 adapter=0 port=130 channel=0
*Mar 1 00:51:30.667: AAA/MEMORY: create_user (0x63D5B984) user='nousername' ruser='NULL' ds0=0 port='tty130' rem_addr='192.168.10.1' authen_type=ASCII service=ENABLE priv=15 initial_task_id='0', vrf= (id=0)
*Mar 1 00:51:30.667: AAA/AUTHEN/START (2028066283): port='tty130' list='' action=LOGIN service=ENABLE
*Mar 1 00:51:30.671: AAA/AUTHEN/START (2028066283): non-console enable - default to enable password
*Mar 1 00:51:30.671: AAA/AUTHEN/START (2028066283): Method=ENABLE
R3640#
*Mar 1 00:51:30.671: AAA/AUTHEN(2028066283): Status=GETPASS 认证通过
R3640#
*Mar 1 00:51:37.599: AAA/AUTHEN/CONT (2028066283): continue_login (user='(undef)')
*Mar 1 00:51:37.599: AAA/AUTHEN(2028066283): Status=GETPASS
*Mar 1 00:51:37.599: AAA/AUTHEN/CONT (2028066283): Method=ENABLE
*Mar 1 00:51:37.623: AAA/AUTHEN(2028066283): Status=PASS
*Mar 1 00:51:37.623: AAA/MEMORY: free_user (0x63D5B984) user='NULL' ruser='NULL' port='tty130' rem_addr='192.168.10.1' authen_type=ASCII service=ENABLE priv=15 vrf= (id=0)
R3640#
R3640#
*Mar 1 00:51:30.667: AAA: parse name=tty130 idb type=-1 tty=-1
*Mar 1 00:51:30.667: AAA: name=tty130 flags=0x11 type=5 shelf=0 slot=0 adapter=0 port=130 channel=0
*Mar 1 00:51:30.667: AAA/MEMORY: create_user (0x63D5B984) user='nousername' ruser='NULL' ds0=0 port='tty130' rem_addr='192.168.10.1' authen_type=ASCII service=ENABLE priv=15 initial_task_id='0', vrf= (id=0)
*Mar 1 00:51:30.667: AAA/AUTHEN/START (2028066283): port='tty130' list='' action=LOGIN service=ENABLE
*Mar 1 00:51:30.671: AAA/AUTHEN/START (2028066283): non-console enable - default to enable password
*Mar 1 00:51:30.671: AAA/AUTHEN/START (2028066283): Method=ENABLE
R3640#
*Mar 1 00:51:30.671: AAA/AUTHEN(2028066283): Status=GETPASS
R3640#
*Mar 1 00:51:37.599: AAA/AUTHEN/CONT (2028066283): continue_login (user='(undef)')
*Mar 1 00:51:37.599: AAA/AUTHEN(2028066283): Status=GETPASS
*Mar 1 00:51:37.599: AAA/AUTHEN/CONT (2028066283): Method=ENABLE
*Mar 1 00:51:37.623: AAA/AUTHEN(2028066283): Status=PASS
*Mar 1 00:51:37.623: AAA/MEMORY: free_user (0x63D5B984) user='NULL' ruser='NULL' port='tty130' rem_addr='192.168.10.1' authen_type=ASCII service=ENABLE priv=15 vrf= (id=0)