Packet Tracer - 在思科路由器上配置 AAA 认证
拓扑图
地址分配表
设备
接口
IP 地址
子网掩码
默认网关
交换机端口
R1
G0/1
192.168.1.1
255.255.255.0
不适用
S1 F0SEO靠我/1
S0/0/0 (DCE)
10.1.1.2
255.255.255.252
不适用
不适用
R2
G0/0
192.168.2.1
255.255.255.0
不适用
S2 F0/2
S0/0/0
10.1.1.1
255SEO靠我.255.255.252
不适用
不适用
S0/0/1 (DCE)
10.2.2.1
255.255.255.252
不适用
不适用
R3
G0/1
192.168.3.1
255.255.255.0
不适用
S3 F0/5
SSEO靠我0/0/1
10.2.2.2
255.255.255.252
不适用
不适用
TACACS+ 服务器
NIC
192.168.2.2
255.255.255.0
192.168.2.1
S2 F0/6
RADIUS 服务器SEO靠我
NIC
192.168.3.2
255.255.255.0
192.168.3.1
S3 F0/1
PC-A
NIC
192.168.1.3
255.255.255.0
192.168.1.1
S1 F0/2
PC-B
NISEO靠我C
192.168.2.3
255.255.255.0
192.168.2.1
S2 F0/1
PC-C
NIC
192.168.3.3
255.255.255.0
192.168.3.1
S3 F0/18
目标
· SEO靠我 在 R1 上配置本地用户账户并使用本地 AAA 在控制台和 vty 线路上配置认证。
· 从 R1 控制台和 PC-A 客户端验证本地 AAA 认证。
· 使用 SEO靠我TACACS+ 配置基于服务器的 AAA 认证。
· 从 PC-B 客户端验证基于服务器的 AAA 认证。
· 使用 RADIUS 配置基于服务器的 AAA 认证。
· SEO靠我 从 PC-C 客户端验证基于服务器的 AAA 认证。
背景/ 场景
网络拓扑中显示路由器 R1、R2 和 R3。目前,所有管理安全性都基于对 启用加密密码的了解情况。您的任务是配置并测试本地和SEO靠我 基于服务器的 AAA 解决方案。
您将创建一个本地用户账户,并在路由器 R1 上配置本地 AAA 以测试控制台和 vty 登录。
o 用户 账户:Admin1,密码:admin1pa55
然后,您将SEO靠我使用 TACACS+ 协议,将路由器 R2 配置为支持基于服务器的 认证。已使用以下信息对 TACACS+ 服务器进行了预配置 :
o 客户端:R2 ,使用关键字 tacacspa55
o 用户 SEO靠我账户:Admin2,密码:admin2pa55
最后,您将使用 RADIUS 协议,将路由器 R3 配置为支持 基于服务器的认证。已使用以下信息对 RADIUS 服务器 进行了预配置:
o 客户端:SEO靠我R3 ,使用关键字 radiuspa55
o 用户 账户:Admin3,密码:admin3pa55
已使用 以下信息对路由器进行了预配置:
o 启用加密 密码:ciscoenpa55
o 使用 SEO靠我MD5 认证的 OSPF 路由协议,密码为:MD5pa55
注意:控制台和 vty 线路尚未 进行预配置。
注意:IOS 版本 15.3 使用 SCRYPT 作为 安全加密散列算法;但是,Packet TSEO靠我racer 中当前 支持的 IOS 版本使用 MD5。始终使用设备上提供的最安全的选项 。
第 1 部分:为 R1 上的控制台访问配置 本地 AAA 认证
步骤 1:测试 连接。
· 从 PCSEO靠我-A 对 PC-B 执行 ping 操作。
· 从 PC-A 对 PC-C 执行 ping 操作。
· 从 PC-B 对 PC-C 执行 ping 操作。
步骤 2:配置 R1 上的本地用户名。
配SEO靠我置用户名Admin1,使用加密 密码 admin1pa55。
R1(config)#username Admin1 secret admin1pa55
步骤 3:为 R1 上的控制台访问配置 本地 AAA SEO靠我认证。
在 R1 上启用 AAA 并为 控制台登录配置 AAA 认证以使用本地数据库。
R1(config)#aaa new-model
R1(config)#aaa authentication logiSEO靠我n default local
步骤 4:配置 线路控制台以使用定义的 AAA 认证方法。
在 R1 上启用 AAA 并为 控制台登录配置 AAA 认证以使用默认方法列表。
R1(config)#line coSEO靠我nsole 0
R1(config-line)#login authentication default
步骤 5:验证 AAA 认证方法。
使用本地数据库验证用户 EXEC 登录。
R1(config-liSEO靠我ne)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#exit
R1 con0 is now available
Press RESEO靠我TURN to get started.
************ AUTHORIZED ACCESS ONLY *************
UNAUTHORIZED ACCESS TO THIS DEVSEO靠我ICE IS PROHIBITED.
************ AUTHORIZED ACCESS ONLY *************
UNAUTHORIZED ACCESS TO THIS DEVICSEO靠我E IS PROHIBITED.
User Access Verification
Username: Admin1
Password: admin1pa55
R1>
第 2 部分:为 R1 上的 vty 线路配置SEO靠我 本地 AAA 认证
步骤 1:配置用于 SSH 的 域名和加密密钥。
使用 ccnasecurity.com 作为 R1 上的域名。R1(config)#ip domain-name ccnasecurSEO靠我ity.com
使用 1024 位创建 RSA 加密密钥。R1(config)#crypto key generate rsa
The name for the keys will be: R1.ccnaSEO靠我security.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose KSEO靠我eys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512SEO靠我]:1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
步骤 2:为 R1 上的 vty 线路配置 命名列表 ASEO靠我AA 认证方法。
配置名为 SSH-LOGIN 的命名列表, 以使用本地 AAA 认证登录。
R1(config)#aaa authentication login SSH-LOGIN local
步骤 3:配SEO靠我置 vty 线路以使用定义的 AAA 认证方法。
配置 vty 线路以使用定义的 AAA 认证方法并且 只允许 SSH 进行远程访问。
R1(config)#line vty 0 4
R1(config-lSEO靠我ine)#login authentication SSH-LOGIN
R1(config-line)#transport input ssh
R1(config-line)#end
步骤 4:验证 AAASEO靠我 认证方法。
从 PC-A 的 命令提示符验证 R1 的 SSH 配置。
C:\>ssh -l Admin1 192.168.1.1
Password: admin1pa55
R1>
第 3 部分:在 R2 上使用 TSEO靠我ACACS+ 配置 基于服务器的 AAA 认证
步骤 1:配置 一个名为 Admin 的备份本地数据库条目。
出于备份目的,配置本地用户名 Admin2 ,使用加密密码 admin2pa55。
R2(configSEO靠我)#username Admin2 secret admin2pa55
步骤 2:验证 TACACS+ 服务器配置。
点击“TACACS+ Server”(TACACS + 服务器)。在“ServicesSEO靠我”(服务)选项卡上点击AAA。请注意,显示 R2 的网络配置条目以及 Admin2 的用户设置条目。
步骤 3:在 R2 上配置 TACACS+ 服务器的具体详细信息。
在 R2上配置 AAA TACACS 服务器SEO靠我 IP 地址和密钥。
注意:不推荐使用命令 tacacs-server host 和 tacacs-server key。目前,Packet Tracer 不支持新 命令 tacacs server。
R2(coSEO靠我nfig)#tacacs-server host 192.168.2.2
R2(config)#tacacs-server key tacacspa55
步骤 4:为 R2 上的控制台访问配置 AAA 登SEO靠我录认证。
在 R2 上启用 AAA,并将所有登录配置为 使用 AAA TACACS+ 服务器进行认证。如果不可用,则使用 本地数据库。
R2(config)#username Admin2 secret adSEO靠我min2pa55
R2(config)#aaa authentication login default group tacacs+ local
步骤 5:配置 线路控制台以使用定义的 AAA 认证方法。SEO靠我
为控制台登录配置 AAA 认证以使用 默认的 AAA 认证方法。
R2(config)#line console 0
R2(config-line)#login authentication defaulSEO靠我t
步骤 6:验证 AAA 认证方法。
使用 AAA TACACS+ 服务器验证用户 EXEC 登录。
R2(config-line)#end
R2#
%SYS-5-CONFIG_I: Configured fSEO靠我rom console by console
R2#exit
R2 con0 is now available
Press RETURN to get started.
************ AUTHORSEO靠我IZED ACCESS ONLY *************
UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED.
User Access VerificatSEO靠我ion
Username: Admin2
Password: admin2pa55
R2>
第 4 部分:在 R3 上使用 TACACS+ 配置 基于服务器的 AAA 认证
步骤 1:配置 一个名为 Admin 的SEO靠我备份本地数据库条目。
出于备份目的,配置本地用户名 Admin3 ,使用加密密码 admin3pa55。
R3(config)#username Admin3 secret admin3pa55
步骤 2:验证 SEO靠我RADIUS 服务器的配置。
点击“RADIUS Server”(RADIUS 服务器)。在“Services(服务)”选项卡上点击 AAA。 请注意,显示 R3 的网络配置条目以及 Admin3的用户设置条目SEO靠我。
步骤 3:在 R3 上配置 RADIUS 服务器的具体详细信息。
在 R3 上配置 AAA RADIUS 服务器 IP 地址和密钥。
注意:不推荐使用命令 radius-server host 和 radius-SEO靠我server key。目前,Packet Tracer 不支持新 命令 radius server。
R3(config)#radius-server host 192.168.3.2
R3(config)SEO靠我#radius-server key radiuspa55
步骤 4:为 R3 上的控制台访问配置 AAA 登录认证。
在 R3上启用 AAA,并将所有登录配置为 使用 AAA RADIUS 服务器进行认证SEO靠我。如果不可用,则使用 本地数据库。
R3(config)#aaa new-model
R3(config)#aaa authentication login default group radius loSEO靠我cal
步骤 5:配置 线路控制台以使用定义的 AAA 认证方法。
为控制台登录配置 AAA 认证以使用 默认的 AAA 认证方法。
R3(config)#line console 0
R3(config-lSEO靠我ine)#login authentication default
步骤 6:验证 AAA 认证方法。
使用 AAA RADIUS 服务器验证用户 EXEC 登录。
R3(config-line)#end
RSEO靠我3#
%SYS-5-CONFIG_I: Configured from console by console
R3#exit
R3 con0 is now available
Press RETURN to SEO靠我get started.
************ AUTHORIZED ACCESS ONLY *************
UNAUTHORIZED ACCESS TO THIS DEVICE IS PSEO靠我ROHIBITED.
User Access Verification
Username: Admin3
Password: admin3pa55
R3>
步骤 7:检查结果。
完成比例应为 100%。点击 CheckSEO靠我 Results(检查结果)以查看反馈并验证已 完成的所需组件。
实验具体步骤:
R1:
R1>enPassword: ciscoenpa55R1#confConfiguring from terminalSEO靠我, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.R1(confiSEO靠我g)#username Admin1 secret admin1pa55R1(config)#aaa new-modelR1(config)#aaa authentication login defaSEO靠我ult localR1(config)#line console 0R1(config-line)#login authentication defaultR1(config-line)#endR1#SEO靠我%SYS-5-CONFIG_I: Configured from console by consoleR1#exitR1 con0 is now availablePress RETURN to geSEO靠我t started.*********** AUTHORIZED ACCESS ONLY *************UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHSEO靠我IBITED.************ AUTHORIZED ACCESS ONLY *************UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBSEO靠我ITED.User Access VerificationUsername: Admin1Password: admin1pa55R1>enPassword: ciscoenpa55R1#R1#conSEO靠我fConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per lineSEO靠我. End with CNTL/Z.R1(config)#ip domain-name ccnasecurity.comR1(config)#crypto key generate rsaThe naSEO靠我me for the keys will be: R1.ccnasecurity.comChoose the size of the key modulus in the range of 360 tSEO靠我o 2048 for yourGeneral Purpose Keys. Choosing a key modulus greater than 512 may takea few minutes.HSEO靠我ow many bits in the modulus [512]: 1024R1(config)#aaa authentication login SSH-LOGIN localR1(config)SEO靠我#line vty 0 4R1(config-line)#login authentication SSH-LOGINR1(config-line)#transport input sshR1(conSEO靠我fig-line)#endR1#R2配置:
R2>enPassword: ciscoenpa55R2#R2#confConfiguring from terminal, memory, or netwoSEO靠我rk [terminal]?Enter configuration commands, one per line. End with CNTL/Z.R2(config)#username Admin2SEO靠我 secret admin2pa55R2(config)#tacacs-server host 192.168.2.2R2(config)#tacacs-server key tacacspa55R2SEO靠我(config)#username Admin2 secret admin2pa55R2(config)#aaa authentication login default group tacacs+ SEO靠我localR2(config)#line console 0R2(config-line)#login authentication defaultR2(config-line)#endR2#%SYSSEO靠我-5-CONFIG_I: Configured from console by consoleR2#exitR2 con0 is now availablePress RETURN to get stSEO靠我arted.************ AUTHORIZED ACCESS ONLY *************UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBISEO靠我TED.User Access VerificationUsername: Admin2Password: admin2pa55R2>R3配置:
R3>enPassword: ciscoenpa55R3SEO靠我#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per SEO靠我line. End with CNTL/Z.R3(config)#username Admin3 secret admin3pa55R3(config)#radius-server host 192.SEO靠我168.3.2R3(config)#radius-server key radiuspa55R3(config)#aaa new-modelR3(config)#aaa authentication SEO靠我login default group radius localR3(config)#line console 0R3(config-line)#login authentication defaulSEO靠我tR3(config-line)#endR3#%SYS-5-CONFIG_I: Configured from console by consoleR3#exitR3 con0 is now avaiSEO靠我lableess RETURN to get started.************ AUTHORIZED ACCESS ONLY *************UNAUTHORIZED ACCESS SEO靠我TO THIS DEVICE IS PROHIBITED.User Access VerificationUsername: Admin3Password: admin3pa55R3>实验链接:httSEO靠我ps://pan.baidu.com/s/1F8suBBA48T6LcZUvFyBBoA?pwd=3612
提取码:3612
--来自百度网盘超级会员V2的分享
网站备案号:浙ICP备17034767号-2