1、实验一 路由器基本配置一、实验设备 一台路由器,一台PC,配置线一条。二、实验要求1. 更改路由器名称为RA2. 设置password为cisco1,secret为cisco2,vty为cisco3,并要求所有密码都加密。3. 关闭域名查找,命令输入同步。4. 配置以太网口的IP为202.119.249.2195. 设置登陆提示信息6. 对串行口进行描述(描述信息为:welcome to lixin lab)7. 将上述信息保存到tftp server8. 将实验过程配置写在记事本中进行粘贴。9. 配置VTY访问权限。10. 禁止路由器进行域名解析。三、实验步骤RouterenableRout
2、er#configure terminal Router(config)#hostname RA 设置路由器名 RA(config)#enable password cisco1 设置密码RA(config)#enable secret cisco2 设置加密密码RA (config)#no ip domain-lookup 关闭域名查找(当我们打错命令时,不会去查找DNS,造成延时)RA (config)#line console 0RA (config-line)#logging synchronous 命令输入达到同步(信息提示不会打断你的输入)RA (config-line)#exec
3、-timeout 0 0 设置永久不超时RA (config-line)#exitRA(config)#line vty 0 4RA(config-line)#(enable)password cisco3 设置vty密码RA(config-line)#exitRA(config)#service password-encryption 对密码加密RA(config)#int fastEthernet 0/0RA(config-if)#ip address 202.119.249.1 255.255.255.0 对以太网口fa0/0配置IPRA(config-if)#no shutdown 开
4、启端口RA(config-if)#exitRA(config)#banner motd & welcome welcome to ccna lab! & 设置登陆提示信息RA(config)#int fa0/1RA(config-if)#description this is a fast port 描述端口信息RA(config)#copy running-config tftp 把信息保存到tftp四、实验截图五、实验体会通过此次实验,我觉得在这次实验中自己有很大的收获,在本次实验中不仅让我了解到了路由器的基本配置,并且提高了我的动手解决实际问题的能力和实践能力。同时还学习到了关于路由器配
5、置的命令,知道了如何配置密码,我认为这是一个自己挺感兴趣的地方,其次是自己能熟练使用超级终端对路由器进行配置了,掌握了路由器的基本连接和配置。最后感谢张老师对我们的指导。实验二 OSPF单区域一、 实验设备三台28系列型号路由器通过串口相连。二、 实验要求3台路由器分别命名为Router0 ,Router1和Router2,路由器之间通过串口连接,采用V.35 DCE/DTE电缆。将电缆的DCE端连接到Router1的串口Serial 0上,PC1的IP地址和缺省网关分别为172.16.1.2和172.16.1.1,PC2的IP地址和缺省网关分别为172.16.4.2和172.16.4.1,网
6、络掩码都是255.255.255.0 。第一步:在路由器Router1上配置接口的IP地址和串口上的时钟频率。直连全通!Router0上的配置Router0#conf tRouter0(config)#int s0/0/1Router0(config-if)#ip add 172.16.3.2 255.255.255.0Router0(config-if)#clock rate 64000Router0(config-if)#no shutdownRouter0(config-if#exitRouter0(config)#int fa0/0Router0(config-if)#ip add 1
7、72.16.4.1 255.255.255.0Router1上的配置Router1(config)#int s0/0/1Router1(config-if)#ip add 172.16.3.1 255.255.255.0Router1(config-if)#clock rate 64000Router1(config-if)#no shutdownRouter1(config-if)#exitRouter1(config)#int s0/0/0Router1(config-if)#ip add 172.16.2.2 255.255.255.0Router2上的配置Router2(config)
8、#int s0/0/0Route2r(config-if)#ip add 172.16.2.1 255.255.255.0Router2(config-if)#clock rate 64000Router2(config-if)#no shutdownRouter2(config-if)#exitRouter2(config)#int f0/0Router2(config-if)#ip add 172.16.1.1 255.255.255.0第二步:在路由器Router0,Router1,Router2上配置ospf路由协议Router0(config)#router ospf 10Route
9、r0(config-router)#network 172.16.4.0 255.255.255.0 area 0Router0(config-router)#network 172.16.3.0 255.255.255.0 area 0Router1(config)#router ospf 10Router1(config-router)#network 172.16.3.0 255.255.255.0 area 0Router1(config-router)#network 172.16.2.0 255.255.255.0 area 0Router2(config)#router ospf
10、 10Router2(config-router)#network 172.16.2.0 255.255.255.0 area 0Router2(config-router)#network 172.16.1.0 255.255.255.0 area 0第三步:测试网络的连通性用PC0 ping PC2结果显示网络是连通的【注意事项】 有学生把子网写成255.255.0.0,导致网络不通 网关不要忘了填写。 有学生没用no shut开启端口导致实验失败。 在PT中实验,配置完要稍等一会再测试。 学会使用 show ip int bri ; show run; show int 端口;分段pin
11、g来排除故障。 通过这次实验,我了解到了OSPF是一种链路状态路由选择协议。所谓链路状态是指路由器接口的状态,如UP,DOWN,IP及网络类型等。链路状态信息通过链路状态公告(LSA)发布到网上的每台路由器。每台路由器通过LSA信息建立一个关于网络的拓扑数据库。OSPF执行两个层次:骨干区域和非骨干区域,OSPF用COST(成本)作为计量值。通过此次实验,我收获了很多,不仅让我了解到了OSPF单区域,并且提高了我的动手解决实际问题的能力和实践能力。实验三 静态路由&CDP协议三台路由连接5个网段,配置静态路由和缺省路由。R2为DCE端。enRouter#conf tRouter(config)
12、# hostname R1R1(config)#int fa0/1 进入fa0/1端口R1(config-if)#ip address 192.168.0.1 255.255.255.0 添加fa0/1口的IPR1(config-if)#no shutdown 打开fa0/1端口R1(config-if)#exitR1(config)#int s1/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config)#ip route 0.0.0.0 0.0.0.0 192.168
13、.1.2 添加缺省路由Router(config)# hostname R2R2 (config)#int fa0/1 R2 (config-if)#ip address 192.168.4.1 255.255.255.0 R2 (config-if)#no shutdown R2 (config-if)#exitR2 (config)#int s1/0 NR2 (config-if)#ip address 192.168.1.2 255.255.255.0 R2 (config-if)#clock rate 56000 设置时钟R2 (config)#int s1/1 R2 (config-
14、if)#ip address 192.168.2.1 255.255.255.0 R2 (config-if)#clock rate 56000 R2 (config-if)#no shut R2 (config)#ip route 192.168.0.0 255.255.255.0 192.168.1.1 添加静态路由R2 (config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 添加静态路由Router(config)# hostname R3R3(config)#int fa0/1 R3 (config-if)#ip address
15、192.168.3.1 255.255.255.0 R3 (config-if)#no shutdown R3 (config-if)#exitR3 (config)#int s1/0 R3 (config-if)#ip address 192.168.2.2 255.255.255.0 R3 (config-if)#no shut R3 (config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1 添加缺省路由在R2上操作:R2 #show cdp neighbors 查看邻居汇总信息R2 #show cdp neighbors detail 查看所有邻居的详细
16、信息R2 #show cdp 显示CDP信息R2 #show cdp traffic 显示CDP所用的数据包的信息R2 #show cdp entry * 显示所有相邻路由器的所有信息R2 #un all 关闭所有DEBUG信息R2 #(config)#cdp run 启动CDP协议R2 #show cdp interface (端口) 显示该端口的CDP信息 R2 #clear cdp counter 清除CDP计数器R2 #debug cdp packet 启动CDP数据包调试模式1. DCE应该在路由器2的的两个接口上都配置时钟频率。2. 如果把R1作为DCE,就只需要配置一个接口的时钟频率了。3. 电脑的网关地址需要设置正确。 通过这次的实验,我认识了路由器的结构,端口及配置线缆,同时学会了进行路由器的简单初始化配置,掌握简单的路由器配置命令,熟悉了路由器各种模式的切换和使用。熟悉路由器的基本配置是实验之前必须要会,只有这样到后面才可以更顺利的完成实验。实验中同时也发生了一些问题,主要是第一次上手做这样的网络实验生疏的原因吧。不过在老师以及同学的帮助下,这些问题都一一解决了。还有就是细节的问题,有的时候一些很小的细节,就决定了实验的顺利执行,而要找起来又十分的麻烦,这会让人显得很没有耐心。例如打错命令的字母等。