1、计网 实验报告3四 川 大 学 计 算 机 学 院、软 件 学 院实 验 报 告 学号:_ _ 姓名: 专业:计算机科学与技术 班级: 第 周 课程名称 计算机网络 实验课时4实验项目 RIPv2 配置WEB服务器配置实验实验时间2015.11.182015.11.25实验目的 理解 RIP 两个版本之间的区别,掌握如何配置 RIPv2实验环境 路由器 实验内容(算法、程序、步骤和方法) RIPv2 配置需求分析两台路由器通过快速以太网端口连接在一起,每个路由器上设置 2 个 Loopback 端口模拟子网,在所有端口运行 RIP 路由协议,实现所有子网间的互通。实验原理RIP 协议有两个版本
2、 RIPv1 和 RIPv2。RIPv1 属于有类路由协议,不支持 VLSM(变长子网掩码), RIPv1 是以广播的形式进行路由信息的更新的;更新周期为 30 秒。RIPv2 属于无类路由协议,支持 VLSM(变长子网掩码), RIPv2 是以组播的形式进行路由信息的更新的,组播地址是 224.0.0.9。 RIPv2 还支持基于端口的认证,提高网络的安全性。实验步骤第一步:配置两台路由器的主机名、接口 IP 地址RuijieenableRuijie#configure terminalEnter configuration commands, one per line. End with
3、CNTL/Z.Ruijie(config)#hostname RouterARouterA(config)#RouterA(config)#interface fastEthernet 0/0RouterA(config-if-FastEthernet 0/0)#ip address 192.168.1.1 255.255.255.0RouterA(config-if-FastEthernet 0/0)#no shutdownRouterA(config-if-FastEthernet 0/0)#exitRouterA(config)#RouterA(config)#interface loo
4、pback 0RouterA(config-if-Loopback 0)#*Nov 18 14:19:41: %LINK-3-UPDOWN: Interface Loopback 0, changed state to up.*Nov 18 14:19:41: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback 0, changed state to up. RouterA(config-if-Loopback 0)#ip address 172.16.1.1 255.255.255.0RouterA(config-if-Loopb
5、ack 0)#exitRouterA(config)#RouterA(config)#interface loopback 1RouterA(config-if-Loopback 1)#*Nov 18 14:20:27: %LINK-3-UPDOWN: Interface Loopback 1, changed state to up.*Nov 18 14:20:27: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback 1, changed state to up.RouterA(config-if-Loopback 1)#ip
6、address 172.16.2.1 255.255.255.0RouterA(config-if-Loopback 1)#exitMJY(config)#MJY(config)#interface fastEthernet 0/0MJY(config-if-FastEthernet 0/0)#ip address 192.168.1.2 255.255.255.0MJY(config-if-FastEthernet 0/0)#no shutdownMJY(config-if-FastEthernet 0/0)#exitMJY(config)#MJY(config)#interface loo
7、pback 0MJY(config-if-Loopback 0)#*Nov 18 14:17:05: %LINK-3-UPDOWN: Interface Loopback 0, changed state to up.*Nov 18 14:17:05: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback 0, changed state to up.MJY(config-if-Loopback 0)#ip address 10.1.1.1 255.255.255.0MJY(config-if-Loopback 0)#exitMJY(
8、config)#MJY(config)#interface loopback 1MJY(config-if-Loopback 1)#*Nov 18 14:17:53: %LINK-3-UPDOWN: Interface Loopback 1, changed state to up.*Nov 18 14:17:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback 1, changed state to up.MJY(config-if-Loopback 1)#ip address 10.2.2.1 255.255.255.0M
9、JY(config-if-Loopback 1)#exit第二步:在两台路由器上启用 RIPv2,但不关闭自动汇总RouterA(config)#router ripRouterA(config-router)#network 192.168.1.0RouterA(config-router)#network 172.16.1.0RouterA(config-router)#version 2RouterA(config-router)#exitMJY(config)#router ripMJY(config-router)#network 192.168.1.0MJY(config-rout
10、er)#network 10.0.0.0MJY(config-router)#version 2MJY(config-router)#exit第三步:查看路由表RouterA(config)#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external
11、type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate defaultGateway of last resort is no setR 10.0.0.0/8 120/1 via 192.168.1.2, 00:00:30, FastEthernet 0/0C 172.16.1.0/24 is directly connected, Loopback 0C 172.16.1.1/32 is local host. C 172
12、.16.2.0/24 is directly connected, Loopback 1C 172.16.2.1/32 is local host. C 192.168.1.0/24 is directly connected, FastEthernet 0/0C 192.168.1.1/32 is local host. MJY(config)#show ip routeCodes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1
13、, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate defaultGateway of last resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is loca
14、l host. C 10.2.2.0/24 is directly connected, Loopback 1C 10.2.2.1/32 is local host. R 172.16.0.0/16 120/1 via 192.168.1.1, 00:00:07, FastEthernet 0/0C 192.168.1.0/24 is directly connected, FastEthernet 0/0C 192.168.1.2/32 is local host.第四步:关闭自动路由汇总RouterA(config)#router ripRouterA(config-router)#no
15、auto-summaryRouterA(config-router)#endRouterA#*Nov 18 14:22:48: %SYS-5-CONFIG_I: Configured from console by consoleMJY(config)#router ripMJY(config-router)#no auto-summaryMJY(config-router)#endMJY#*Nov 18 14:20:19: %SYS-5-CONFIG_I: Configured from console by console第五步:查看 RIP 配置信息,路由表RouterA#show ip
16、 routeCodes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * -
17、 candidate defaultGateway of last resort is no setR 10.0.0.0/8 120/1 via 192.168.1.2, 00:01:20, FastEthernet 0/0C 172.16.1.0/24 is directly connected, Loopback 0C 172.16.1.1/32 is local host. C 172.16.2.0/24 is directly connected, Loopback 1C 172.16.2.1/32 is local host. C 192.168.1.0/24 is directly
18、 connected, FastEthernet 0/0C 192.168.1.1/32 is local host. 可以看到 RIP 路由表中已经学习到了子网的路由RouterA#show ip ripRouting Protocol is rip Sending updates every 30 seconds, next due in 22 seconds Invalid after 180 seconds, flushed after 120 seconds Outgoing update filter list for all interface is: not set Incom
19、ing update filter list for all interface is: not set Redistribution default metric is 1 Redistributing: Default version control: send version 2, receive version 2 Interface Send Recv FastEthernet 0/0 2 2 Loopback 0 2 2 Loopback 1 2 2 Routing for Networks: 172.16.0.0 255.255.0.0 192.168.1.0 255.255.2
20、55.0 Distance: (default is 120)在配置 RIPv2 版本后, RIP 路由器将只接收和发送版本 2 的更新报文RouterA#show ip rip database10.0.0.0/8 auto-summary10.0.0.0/8 1 via 192.168.1.2 FastEthernet 0/0 00:40 10.1.1.0/24 1 via 192.168.1.2 FastEthernet 0/0 00:10 10.2.2.0/24 1 via 192.168.1.2 FastEthernet 0/0 00:10 172.16.0.0/16 auto-su
21、mmary172.16.1.0/24 1 directly connected, Loopback 0172.16.2.0/24 1 directly connected, Loopback 1192.168.1.0/24 auto-summary192.168.1.0/24 1 directly connected, FastEthernet 0/0RouterA#show ip rip interfaceFastEthernet 0/0 is up, line protocol is up Routing Protocol: RIP Receive RIPv2 packets only S
22、end RIPv2 packets only Receive RIP packet: Enabled Send RIP packet: Enabled Send RIP supernet routes: Enabled Passive interface: Disabled Split horizon: Enabled BFD: Disabled V2 Broadcast: Disabled Multicast register: Registed Interface Summary Rip: Not Configured Authentication mode: TEXT IP interf
23、ace address: 192.168.1.1/24Loopback 0 is up, line protocol is up Routing Protocol: RIP Receive RIPv2 packets only Send RIPv2 packets only Receive RIP packet: Enabled Send RIP packet: Enabled Send RIP supernet routes: Enabled Passive interface: Disabled Split horizon: Enabled BFD: Disabled V2 Broadca
24、st: Disabled Multicast register: Registed Interface Summary Rip: Not Configured Authentication mode: TEXT IP interface address: 172.16.1.1/24Loopback 1 is up, line protocol is up Routing Protocol: RIP Receive RIPv2 packets only Send RIPv2 packets only Receive RIP packet: Enabled Send RIP packet: Ena
25、bled Send RIP supernet routes: Enabled Passive interface: Disabled Split horizon: Enabled BFD: Disabled V2 Broadcast: Disabled Multicast register: Registed Interface Summary Rip: Not Configured Authentication mode: TEXT IP interface address: 172.16.2.1/24MJY#show ip routeCodes: C - connected, S - st
26、atic, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate defaultGateway of last
27、resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is local host. C 10.2.2.0/24 is directly connected, Loopback 1C 10.2.2.1/32 is local host. R 172.16.0.0/16 120/1 via 192.168.1.1, 00:01:24, FastEthernet 0/0R 172.16.1.0/24 120/1 via 192.168.1.1, 00:00:24, FastEthernet 0/0R
28、172.16.2.0/24 120/1 via 192.168.1.1, 00:00:24, FastEthernet 0/0C 192.168.1.0/24 is directly connected, FastEthernet 0/0C 192.168.1.2/32 is local host. MJY#show ip ripRouting Protocol is rip Sending updates every 30 seconds, next due in 30 seconds Invalid after 180 seconds, flushed after 120 seconds
29、Outgoing update filter list for all interface is: not set Incoming update filter list for all interface is: not set Redistribution default metric is 1 Redistributing: Default version control: send version 2, receive version 2 Interface Send Recv FastEthernet 0/0 2 2 Loopback 0 2 2 Loopback 1 2 2 Rou
30、ting for Networks: 10.0.0.0 255.0.0.0 192.168.1.0 255.255.255.0 Distance: (default is 120)MJY#MJY#show ip rip dat10.0.0.0/8 auto-summary10.1.1.0/24 1 directly connected, Loopback 010.2.2.0/24 1 directly connected, Loopback 1172.16.0.0/16 auto-summary172.16.0.0/16 1 via 192.168.1.1 FastEthernet 0/0 0
31、1:20 172.16.1.0/24 1 via 192.168.1.1 FastEthernet 0/0 00:20 172.16.2.0/24 1 via 192.168.1.1 FastEthernet 0/0 00:20 192.168.1.0/24 auto-summary192.168.1.0/24 1 directly connected, FastEthernet 0/0MJY#show ip rip database10.0.0.0/8 auto-summary10.1.1.0/24 1 directly connected, Loopback 010.2.2.0/24 1 directly connected, Loopback 1172.16.0.0/16 auto-summary172.16.0.0/16 1 vi
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1