网络拓扑图显示了路由器R1、R2和R3。目前,所有管理安全性都基于enable secret密码。您的任务是配置并测试本地及基于服务器的AAA解决方案。
您将在路由器R1上创建一个本地用户账户,并配置本地AAA以测试控制台和vty登录:
注意:尽管IOS版本15.3使用了更为安全的加密哈希算法SCRYPT,但在Packet Tracer当前支持的IOS版本中仍使用MD5。请始终在您的设备上使用最安全的选项。
步骤1:测试连通性
步骤2:在R1上配置本地用户名
R1(config)# username Admin1 secret admin1pa55
步骤3:在R1上为控制台访问配置本地AAA认证
R1(config)# aaa new-model R1(config)# aaa authentication login default local
步骤4:配置控制台线路使用定义的AAA认证方法
R1(config)# line console 0 R1(config-line)# login authentication default
步骤5:验证AAA认证方法
通过以上配置后,可以在R1的控制台上用Admin1账户和对应的密码admin1pa55进行登录,验证本地AAA身份验证是否生效。
步骤1:配置域名和加密密钥以配合SSH使用 a. 在R1上将ccnasecurity.com设置为域名。 b. 创建一个1024位的RSA加密密钥。
R1(config)#ip domain-name ccnasecurity.com R1(config)# crypto key generate rsa
R1(config)# crypto key generate rsa
The name for the keys will be: R3.ccnasecurity.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
步骤2:为R1上的vty线路配置命名列表AAA认证方法
R1(config)# aaa authentication login SSH-LOGIN local
步骤3:配置vty线路使用定义的AAA认证方法
R1(config)# line vty 0 4 R1(config-line)# transport input ssh R1(config-line)# login authentication SSH-LOGIN
步骤4:验证AAA认证方法
步骤1:配置备用本地数据库条目(Admin)
R2(config)# username Admin2 secret admin2pa55
步骤2:验证TACACS+服务器配置
步骤3:在R2上配置TACACS+服务器详细信息
注意:尽管tacacs-server host
和 tacacs-server key
命令已过时,但目前Packet Tracer暂不支持新命令tacacs server
。此处依然使用旧命令进行配置。
R2(config)# tacacs-server host 192.168.2.2 R2(config)# tacacs-server key tacacspa55
步骤4:为R2的控制台访问配置AAA登录认证
R2(config)# aaa new-model R2(config)# aaa authentication login default group tacacs+ local
步骤5:配置控制台线路使用定义的AAA认证方法
R2(config)#line console 0 R2(config-line)#login authentication default
由于之前已经全局配置了AAA和TACACS+,此处不再需要单独配置console线路。
步骤6:验证AAA认证方法
步骤1:配置备用本地数据库条目(Admin)
R3(config)# username Admin3 secret admin3pa55
步骤2:验证RADIUS服务器配置
步骤3:在R3上配置RADIUS服务器详细信息
注意:虽然radius-server host
和 radius-server key
命令可能已过时,但当前Packet Tracer版本暂不支持新的radius server
命令。此处仍使用旧命令进行配置。
R3(config)# radius-server host 192.168.3.2 R3(config)# radius-server key radiuspa55
步骤4:为R3的控制台访问配置AAA登录认证
R3(config)# aaa new-model R3(config)# aaa authentication login default group radius local
步骤5:配置控制台线路使用定义的AAA认证方法
R3(config)#line console 0 R3(config-line)#login authentication default
由于之前已经全局配置了AAA和RADIUS,此处不再需要单独配置console线路。
步骤6:验证AAA认证方法
步骤7:检查结果