1、佛山科学技术学院实验报告实验名称 组建局域网 实验项目 路由器的基本配置一、实验目的1、 掌握路由器常用端口的配置方法;2、 掌握配置路由器的常用命令;3、 理解 RIP 协议的传播、分析、挑选路由,来实现路由发现、路由选择、路由切换等功能;4、 掌握 RIP 动态路由信息协议的配置方法;二、实验内容(注:拓扑图中的路由器型号可换成虚拟实验系统的 2501,路由器 A 可)1、 根据下图所示的实验环境和网络拓扑图, 对各个路由器进行端口配置, 注明每个端口的 IP 地址, 写出详细的命令清单;2、 测试各路由器及主机间的连通性;3、 配置完成后,选择网络中任何一个路由器,用命令 show ip
2、 route,记下显示结果,并对该结果进行分析与论述。三、实验过程及结果分析(要求对配置情况进行截图及必要分析)如图设置:给每台电脑设置 IP 和网关:配置路由器:Router0:Router1:代码如下:Router0:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname wenyu1wenyu1(config)#int fa0/0wenyu1(config-if)#ip add 192.168.1.4 255.255.255.0weny
3、u1(config-if)#no shutwenyu1(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upwenyu1(config-if)#int se0/1/0wenyu1(config-if)#ip add 192.168.2.1 255.255.255.0wenyu1(config-if)#clock rate 56000w
4、enyu1(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/1/0, changed state to downwenyu1(config-if)#exwenyu1(config)#router ripwenyu1(config-router)#network 192.168.1.0wenyu1(config-router)#network 192.168.2.0wenyu1(config-router)#%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up%LINEPR
5、OTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to upwenyu1(config-router)#wx% Invalid input detected at marker.wenyu1(config-router)#exwenyu1(config)#exwenyu1#%SYS-5-CONFIG_I: Configured from console by consolewenyu1#ping 192.168.3.1Type escape sequence to abort.Sending 5, 100-b
6、yte ICMP Echos to 192.168.3.1, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 1/9/13 mswenyu1#ping 192.168.3.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/ma
7、x = 1/3/11 mswenyu1#wenyu1enwenyu1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E
8、- EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Se
9、rial0/1/0R 192.168.3.0/24 120/1 via 192.168.2.2, 00:00:26, Serial0/1/0wenyu1#Router1:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname wenyu2wenyu2(config)#int fa0/0wenyu2(config-if)#ip add 192.168.3.4 255.255.255.0wenyu2(config-if)#no shutwenyu
10、2(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upwenyu2(config-if)#int se0/1/0wenyu2(config-if)#ip add 192.168.2.2 255.255.255.0wenyu2(config-if)#clock rate 56000This command applies only t
11、o DCE interfaceswenyu2(config-if)#no shutwenyu2(config-if)#%LINK-5-CHANGED: Interface Serial0/1/0, changed state to upwenyu2(config-if)#exwenyu2(config)#%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to upwenyu2(config)#router ripwenyu2(config-router)#network 192.168.3.0w
12、enyu2(config-router)#network 192.168.2.0wenyu2(config-router)#exwenyu2(config)#exwenyu2#%SYS-5-CONFIG_I: Configured from console by consolewenyu2#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:.!Success rate is 80 percent (4/5), roun
13、d-trip min/avg/max = 11/11/11 mswenyu2#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/11 mswenyu2#wenyu2enwenyu2#show ip routeCodes: C - connected, S - static, I - IGRP
14、, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 120/1 via 192.168.2.1, 00:00:21, Serial0/1/0C 192.168.2.0/24 is directly connected, Serial0/1/0C 192.168.3.0/24 is directly connected, FastEthernet0/0wenyu2#四、实验总结