1、CCNA实验手册百思学网络,领先科技 -1- HTTP:/WWW.BESTXUE.CN 百思学网络,领先科技 -2- HTTP:/WWW.BESTXUE.CN 目 录 实验1. 通过CONSOLE口控制路由器和交换机.-3- 实验2. 熟悉路由器和交换机各种模式.-6- 实验3. 配置一台路由器当做PC. . . .-7- 实验4. 熟悉熟悉实验拓扑和基本配置. . . .8- 实验5. CDP(思科发现协议). . .-14- 实验6. 学会使用Ping、Traceroute、Telnet、SSH. . .-19- 实验7. CISCO路由器,交换机密码恢复. . .-24- 实验8. IO
2、S软件备份、升级与NVRAM备份. . .-26- 实验9. 交换机VLAN、TRUNK、VTP配置. . .-33- 实验10. 配置生成树(Spanning Tree). . .-41- 实验11. PVST+(每个VLAN的生成树PVST加). . .-45- 实验12. Configuring Link Aggregation with EtherChannel. . .-51- 实验13. 用3台交换机验证PVST实验. . .-52- 实验14. 配置交换机的端口安全(1). . .-60- 实验15. 配置交换机的端口安全(2). . .-62- 实验16. 用路由器实现VLAN
3、之间的访问. . .-64- 实验17. 三层交换机实现VLAN之间的互访. . .-67- 实验18. 静态路由. . .-70- 实验19. RIP配置. . .-72- 实验20. 配置EIGRP. . .-74- 实验21. 配置单区域OSPF. . .-75- 实验22. 配置标准、扩展、命令ACL实验. . .-77- 实验23. 静态NAT 、动态NAT、PAT的配置. . .-80- 实验24. PPP的配置. . .-83- 实验25. 配置帧中继. . .-84- 百思学网络,领先科技 -3- HTTP:/WWW.BESTXUE.CN 实验1. 通过 CONSOLE 口控制
4、路由器和交换机 一、通过 console 口控制设备(图) 1. 使用 SecureCRT(图) 百思学网络,领先科技 -4- HTTP:/WWW.BESTXUE.CN 登录后界面显示: 2.使用 wisdows 的超级终端(图) 百思学网络,领先科技 -5- HTTP:/WWW.BESTXUE.CN 3.如果是通过笔记本电脑且笔记本没有 com 口的情况下可以使用 usb-serial 的转接头(图) 百思学网络,领先科技 -6- HTTP:/WWW.BESTXUE.CN 实验2. 熟悉路由器和交换机各种模式 一、熟悉路由器和交换机各种模式(本实验用一台路由器就可以完成) Router /用
5、户模式 Router# /特权模式(也叫 enable 模) Router(config-if)# /接口模式 Router(config-router)# /router 模式 Router(config-line)# /line 模式 Router(config-subif)# /子接口模式 Router /用户模式 Routerenable /在用户模式敲入 enable 进入特权模式(也叫 enable 模式) Router#disable /在特权模式敲入 disable 退出到用户模式 Routerenable /在用户模式敲入 enable 进入特权模式 Router#confi
6、gure terminal /在特权模式敲入 configure terminal 进入到配置模式 Router(config)#interface ethernet 0/0 /在配置模式敲入“interface+接口类型+接口编号”进入接口模式 Router(config-if)#exit /敲入 exit 退出接口模式 Router(config)#router rip /敲入“router + 路由协议”进入 router 模式 Router(config-router)#exit /退出 router 模式 Router(config)#line console 0 /进入 line
7、模式 Router(config-line)#end /从 line 模式退出(任何时候敲入 end 会退出到特权模式) Router#conf t Router(config)#interface ethernet 0/0.1 /进入子接口模式 Router(config-subif)#end /任何时候敲入 end 会退出到特权模式 Router# 注:有关路由器或交换机各种模式的应用后面的章节中会讲到.这里先认识一下就可以. 百思学网络,领先科技 -7- HTTP:/WWW.BESTXUE.CN 实验3. 配置一台路由器当作 PC 做实验时通常用路由器当作 PC 使用,用来测试网络的连通
8、性等。 步骤:(本例子中的当作 PC 的路由器接口为 Ethernet 0) 1 关闭路由器的路由功能 2 设置接口 IP 地址 3 配置默认网关 4 检查 Router#conf t Router(config)#host PC1 PC1(config)#no ip routing -注:关闭路由器的路由功能 PC1(config)#interface ethernet 0 PC1(config-if)#ip address 11.1.1.4 255.255.255.0 -注:设置接口 IP 地址并启用 PC1(config-if)#no shutdown PC1(config-if)#ex
9、it PC1(config)#ip default-gateway 11.1.1.1 -注:配置默认网关 PC1(config)#end PC1#show ip int brief Interface IP-Address OK? Method Status Protocol Ethernet0 11.1.1.4 YES TFTP up up Serial0 unassigned YES TFTP administratively down down Serial1 unassigned YES TFTP administratively down down PC1#show ip route
10、 Default gateway is 11.1.1.1 -注: Show ip route 可以看到网关 在路由器中关闭路由功能、配置 IP 地址、网关就可以作为 PC 来用了。 百思学网络,领先科技 -8- HTTP:/WWW.BESTXUE.CN 实验4. 熟悉实验拓扑和基本配置 一、实验拓扑和各设备共同常用配置(可以复制再粘贴到设备中) Enable Conf t Enable secret cisco /设置 enable 的密码为 cisco Enable password cisco1 /设置 enable 的密码为 cisco1,不能和 enable secret 设置的密码相
11、同 No ip domain-lookup /关掉域名查找功能 service password-encryption /对口令进行加密 ,加密 console 口或 VTY 或是 enable password 设置的密码, 密码不再显示明文 Line console 0 /设置 console 口 Password cisco /设置 console 口密码为 cisco Login /启用密码 No exec-timeout /操作会话不会超时 logging synchronous /配置时光标跟随, 阻止那些烦人的控制台信息来打断你当前的输入,从而使输入信 息显得更为简单易读. li
12、ne vty 0 4 /设置 VTY Password cisco Login No exec-timeout logging synchronous 注:VTY (虚拟终端) 在网络操作系统(包括 Cisco IOS)中接受 telent 或 ssh 连接的一个逻辑接口。 以下可以直接复制再粘贴到路由器或交换机 Enable Conf t Enable secret cisco No ip domain-lookup service password-encryption Line console 0 Password cisco Login No exec-timeout logging
13、synchronous line vty 0 4 Password cisco Login No exec-timeout logging synchronous 百思学网络,领先科技 -9- HTTP:/WWW.BESTXUE.CN 实验拓扑: 二、根据以上拓扑配置各设备的 IP 地址,其中 SW1,SW2,PC1,PC2,PC3 要设置网关。 1、 配置 PC1 Routerenable Router#conf t Router(config)#no ip routing /关闭路由器的路由功能 Router(config)#hostname PC1 /命令主机名 PC1(config)#
14、interface ethernet 0 /进入 ethernet 0 接口模式 PC1(config-if)#ip address 11.1.1.4 255.255.255.0 /配置 IP 地址 PC1(config-if)#no shutdown /启用接口 PC1(config-if)#exit /退出到配置模式 PC1(config)#ip default-gateway 11.1.1.1 /配置 PC1 的默认网关 PC1(config)#end /退出到 enable 模式 PC1# 2、 配置 PC2 Routerenable Router#conf t Router(conf
15、ig)#no ip routing /关闭路由器的路由功能 Router(config)#hostname PC2 /命令主机名 PC2(config)#interface ethernet 0 /进入 ethernet 0 接口模式 PC2(config-if)#ip address 22.1.1.4 255.255.255.0 /配置 IP 地址 PC2(config-if)#no shutdown /启用接口 PC2(config-if)#exit /退出到配置模式 PC2(config)#ip default-gateway 22.1.1.2 /配置 PC1 的默认网关 PC2(con
16、fig)#end /退出到 enable 模式 3、 配置 PC3 Routerenable 配置SW1的IP和网关 Interface vlan 1 Ip address 11.1.1.2 255.255.255.0 No shutdown Ip default-gateway 11.1.1.1 配置SW2的IP和网关 Interface vlan 1 Ip address 11.1.1.3 255.255.255.0 No shutdown Ip default-gateway 11.1.1.1 百思学网络,领先科技 -10- HTTP:/WWW.BESTXUE.CN Router#con
17、f t Router(config)#no ip routing /关闭路由器的路由功能 Router(config)#hostname PC3 /命令主机名 PC3(config)#interface ethernet 0 /进入 ethernet 0 接口模式 PC3(config-if)#ip address 33.1.1.4 255.255.255.0 /配置 IP 地址 PC3(config-if)#no shutdown /启用接口 PC3(config-if)#exit /退出到配置模式 PC3(config)#ip default-gateway 33.1.1.3 /配置 PC
18、1 的默认网关 PC3(config)#end /退出到 enable 模式 PC3# 4、 配置 R1 Routerenable Router#conf t Router(config)#hostname R1 R1(config)#int ethernet 0/0 R1(config-if)#ip add 11.1.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int s0/0 R1(config-if)#ip add 12.1.1.1 255.255.255.0 R1(config-if
19、)#clock rate 9600 /DCE 端要配置时钟速率 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int s0/1 R1(config-if)#ip add 13.1.1.1 255.255.255.0 R1(config-if)#clock rate 9600 /DCE 端要配置时钟速率 R1(config-if)#no shutdown R1(config-if)#end R1# 5、 配置 R2 Routerenable Router#conf t Router(config)#hostname R2 R2(c
20、onfig)#int ethernet 0/0 R2(config-if)#ip add 22.1.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int s0/0 R2(config-if)#ip add 12.1.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int s0/1 R2(config-if)#ip add 23.1.1.2 255.255.255.0 R2(config-if)#
21、clock rate 9600 /DCE 端要配置时钟速率 R2(config-if)#no shutdown R2(config-if)#end 百思学网络,领先科技 -11- HTTP:/WWW.BESTXUE.CN R2# 6、 配置 R3 Routerenable Router#conf t Router(config)#hostname R3 R3(config)#int ethernet 0/0 R3(config-if)#ip add 33.1.1.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(co
22、nfig)#int s0/0 R3(config-if)#ip add 13.1.1.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int s0/1 R3(config-if)#ip add 23.1.1.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#end R3# 7、 配置 SW1 Switchenable Switch#conf t Switch(config)#host SW1 SW1(config)#interface v
23、lan 1 SW1(config-if)#ip address 11.1.1.2 255.255.255.0 SW1(config-if)#no shutdown SW1(config-if)#exit SW1(config)#ip default-gateway 11.1.1.1 SW1(config)#end SW1# 8、 配置 SW2 Switchenable Switch#conf t Switch(config)#host SW2 SW2(config)#interface vlan 1 SW2(config-if)#ip address 11.1.1.3 255.255.255.
24、0 SW2(config-if)#no shutdown SW2(config-if)#exit SW2(config)#ip default-gateway 11.1.1.1 SW2(config)#end SW2# 三、验证拓扑中各设备的配置是否正确和设备的接口状态(up 还是 down) 1、验证 PC1 PC1#show ip int brief /查看本路由器各接口基本配置,包括 IP 地址,接口状态等 Interface IP-Address OK? Method Status Protocol Ethernet0 11.1.1.4 YES manual up up Serial0 unassigned YES unset administratively
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1