思科网络技术实验2-1:升级到无类路由协议.docx
实验21:升级到无类路由协议【实验目的】:在本次实验中,你将安装路由信息协议第二版(RIPV2)。在完成本次实验之后,你需要完成下列任务: 连接到网络中所有的设备,并且对使用RIPV2布署完整的网络明确的概念。 理解RIPV2的一些特性,如支持缺省路由,可变长度的子网掩码(VLSM)和路由聚合。 理解VLSM怎么使网络更有效。【实验拓扑】:Migrating to a Classless Routing Protocol注意:图中X为所在机架编号,y为路由器编号。【实验帮助】:如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。【命令列表】:命令描述(config-router)ttdefault-information originate用RIP来发布缺省路由(config)ttip classless激活路由器使用无类路由(config)ttip route 0. 0. 0. 0 0. 0. 0. 0 172. 31. x. 3创建一条静态缺省路由(config-if)#ip summary-address rip 10. x. 0. 0 255. 255. 0. 0发布一条汇总路由。指定RIP应该发布哪一些网络(有类)(config-router)no auto-summary在边界路由器上进行自动汇总。(config) itrouter rip打开RIP路由协议(config-router)#version 1使用RIP vl(config-router)ttversion 2使用RIP v2【任务一】:探索有类路由选择。使用TELNET或者其他终端程序建立与路由器建立联接。记住在本实验中x是你的机架编号,y是你的路由 器编号。实验之前,请确保你的路由器配置与下列类似:P1R1 或 P1R2:hostname P1R1Iboot-start-markerboot-end-marker!no aaa new-modelip subnet-zerono ip domain lookupi*interface EthernetOip address 10. 1. 1. 1 255. 255. 255. 0f*interface SerialOip address 172. 31. 1. 1 255. 255. 255. 0encapsulation frame-relayframe-relay map ip 172. 31. 1.3 111 broadcastno frame-relay inverse-arpi*interface Serial1ip address 10. 1. 0. 1 255. 255. 255. 0clockrate 64000 ip route 0. 0. 0. 0 0. 0. 0. 0 172. 31. 1. 3no ip http serverno ip classlessP1R3 或 P1R4:hostname P1R3i boot-start-markerboot-end-markerino aaa new-modelip subnet-zerono ip domain lookupi *interface EthernetOip address 10. 1. 1. 3 255. 255. 255. 0i interface Serial0ip address 10. 1. 3. 3 255. 255. 255. 0shutdownclockrate 64000!interface Serial 1no ip addressshutdowni *no ip http serverip classless!line con 0exec-timeout 30 0logging synchronousline aux 0line vty 0 4login实验过程:第一步:在所有的路由器上配置使用RIP版本1,并发布网络(10. 0.0.0)和,在帧中继边界路由器上,同时发布B类网络172. 31.0. 0o第二步:使用命令version 1明确的指定使用RIPvl。缺省情况下,路由器发送和接收版本1和版本2的路由,设置路由器使用版本1以防止骨干路由器同时运行两种版本。第三步:使用show ip protocols命令,验证路由器是仅仅运行版本1。你的路由器输入应该与下表类似:PIRlttsh ip proRouting Protocol is ripSending updates every 30 seconds, next due in 24 secondsInvalid after 180 seconds, hold down 180,flushed after 240Outgoing updatefilter list for all interfaces is not setIncoming updatefilter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive version 1Interface Send Recv Triggered RIP Key-chainEthernetO 1 1SerialO 1 1Seriall 1 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:10. 0. 0.0Routing Information Sources: Gateway Distance Last Update 10. 1.0.2 120 00:00:19 172.31. 1.3 120 00:00:25 Distance: (default is 120)第四步:在内部路由器PxR4上,使用ping命令测试内部路由器与TFTP服务器之间连接的正确性。为什么PING TFTP服务器是不成功的,你的显示应该是下列类似P2R4#ping 10.254.0. 254Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.254.0.254, timeout is 2 seconds:Success rate is 0 percent (0/5) P2R4#第五步:有类路由选择的行为是寻找未知的路由在直连的有类网络(在这个例子中是10. 0.0.0,)和并不 考虑更为详细的路由。有类路由协议,例如RIPvl,在路由更新中并不交换子网掩码,只是简单的发布整 个有类网络。在边界路由器和BBR1之间的路由散布跨过了 172. 31. 0.0网络。因此,所有三个路由器汇总 了这个子网并在彼此之间广告网络10.0. 0.0。每一个路由器都认为自己有了路由到达这个网,并忽略这个 广告。你可以通过命令debug ip rip命令来进行验证。这个内部路由器因此并不能到达核心,因为它的路 由表中没有这个子网。请在内部路由器上显示路由表验证这个问题,尝试寻找网络10.254. 0.0。第六步:为了使内部路由器能够到达核心网络,边界路由器上将通过RIP散布缺省路由到内部路由器。首 先,在边界路由器上添加一条缺省静态路由,并在RIP配置模式下使用default-information orginate命 令。第七步:检查内部路由器的路由表。现在这里有路径了吗?记住,RIP的收敛是很慢的。即使这是一个很小的网络,在缺省路由出现在你的内部路由器之前,你也需要等待一些时间。为了强制RIP协议收敛, 你可以使用clear ip route *命令。收敛收后的路由表应该与下图类似:PlR4#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - ElGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2El - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, LI - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is 10. 1. 2. 2 to network 0. 0. 0. 0R 172.31.0.0/16 :120/1 via 10. 1.2. 2, 00:00:20, EthernetO10.0.0.0/24 is subnetted, 2 subnetsC 10.1.2.0 is directly connected, EthernetOR 10. 1.0.0 120/1 via 10. 1.2.2, 00:00:20, EthernetOR* 0. 0. 0. 0/0 120/8 via 10. 1.2.2, 00:00:20, EthernetO第八步:现在我们再使用PING命令来测试TFTP服务器与内部路由器之间的连接。这个PING至IJTFTP服务 器还是不成功的,为什么?你的显示应该与下列类似:P2R4#ping 10.254. 0. 254Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10. 254. 0.254, timeout is 2 seconds:Success rate is 0 percent (0/5) P2R4#【任务二】:探索无类的转发现在内部路由器仍然PING不通TFTP服务器的原因是有类路由的特性,就像刚才我们所讨论的,寻找一个 直连的有类网络(在这个例子中是10. 0.0.0)中的一个未知的路由,并没有考虑到缺省路由。有类路由协 议的特性引起了这个问题,那下面我们来发现无类路由的行为。实验过程:第一步:内部路由器不能到达TFTP服务器,是因为边界路由器使用了 no ip classless命令。有类路由的 行为只是在直连的有类网络(在这个例子中是10.0.0.0)以内查找未知的路由并且他不会考虑更为详细的 路由条目。第二步:激活IP classless在每一个路由器上,使路由器执行无类中行为第三步:测试内部路由器和TFTP服务器之间连接的正确性。第四步:尽管更改了路由器的行为,但是RIP vl还是一个有类路由协议并且还是在跨越帧中继网络时进行 自动汇总。这个路由器BBR1将没有路由返回或10. x. 2.0/24子网。为了弥补这点,使用RIP无类版本,RIP v2o另外,在边界路由器上关启自动汇总。第五步:等待一会,然后测试内部路由器与TFTP服务器的连通性。你的测试结果应该和下列类似: P2R4#ping 10.254.0. 254Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.254.0.254, timeout is 2 seconds: iuii Success rate is 0 percent (0/5)P2R4#【任务三】:优化无类路由,增加无类路由的扩展性 实验过程:第一步:从内部路由器,使用TELNET连接到BBRl(172.3Lx.3)。所有的你的路由器所有的网络都应该列 表在BBR1的路由表中,你的显示应该和下列类似: BBRlttsh ip routeCodes: C -connected,S - static,I- IGRP, R - RIP,M - mobile,B - BGPD -EIGRP,EX- EIGRPexternal, 0-OSPF, IA - OSPFinter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 El - OSPF external type 1, E2 - OSPF external type 2, E - EGPi -IS-IS,LI- IS-ISlevel-1, L2-IS-IS level-2, ia - IS-IS inter area* -candidatedefault,U - per-userstatic route, o- ODRGateway of last resort is not set172.31.0.0/24 is subnetted, 1 subnetsC 172.31.1.0 is directly connected, SerialOS 192. 168. 11.0/24 1/0 via 172.31. 1.210.0.0.0/24 is subnetted, 3 subnetsR120/1via172.31.1.2,00:00:08,SerialOR10. 1. 1.0120/1via172.31.1. 1,00:00:08,SerialOR120/1via172.31.1. 1,00:00:07,SerialO120/1 via 172. 31. 1.2, 00:00:07, SerialOC 10.254.0.0 is directly connected, EthernetOS 192. 168. 1. 0/24 1/0 via 172.31. 1. 1BBR1#第二步:随着网络的变大,一个大的路由表并不有效的,因为他需要更多内部来存储他们。如果第一条路 由都在路由表里,那么任何路由事件(如:抖动)必须是散布到整个网络中。路由汇总限制更新数据包和 最小化路由器的路由表。使用ip summary-address rip命令配置边界路由器去声明一个汇总路由10. x. 0. 0 255. 255. 0. 0到BBR1。你需要在哪里输入适当的命令呢?第三步:再一次查看BBR1的路由表。记住,RIP是慢的收敛的。你可能需要等待一些时间。即使这里是一 个小网络。在汇总路由出现在BBR1之前,你可能看到许多路由,但是最终的显示应该与下列类似:BBRlftsh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M 一 mobile, B - BGPD - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2El - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, LI - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRGateway of last resort is not set 172.31.0.0/24 is subnetted, 1 subnetsC 172.31.1.0 is directly connected, SerialOS 192. 168. 11.0/24 1/0 via 172.31. 1.2 10. 0. 0. 0/8 is variably subnetted, 2 subnets, 2 masksR 10. 1.0. 0/16 120/1 via 172.31. 1.2, 00:00:02, SerialO 120/1 via 172. 31. 1. 1, 00:00:02, SerialOC 10. 254. 0. 0/24 is directly connected, EthernetOS 192. 168. 1. 0/24 1/0 via 172.31. 1. 1BBR1#第四步:使用show ip protocols命令检查RIP的详细操作。你的显示结果应该与下列类似:PlR2#sh ip proRouting Protocol is ripSending updates every 30 seconds, next due in 26 secondsInvalid after 180 seconds, holddown 180, flushedafter 240Outgoing updatefilter list forall interfaces isnot setIncoming updatefilter list forall interfaces isnot setRedistributing:ripDefault versioncontrol: send version 2, receive version 2InterfaceSend Recv Triggered RIP Key-chainEthernetOSerialO 2Seriall 2Automaticnetwork summarization is not in effectAddress Summarization:Maximum path: 4Routing for Networks:10. 0. 0.0Routing Information Sources:Gateway Distance Last Update10. 1.0. 1 120 00:06:3510. 1.2.4 120 00:05:16*Mar 1 01:15:07.475: %SYS-5-C0NFIG I: Configured from console by console 120 00:00:22 Distance: (default is 120)P1R2#【实验验证】:成功完成整个实验,你需要完成下列任务: 你能够配置RIPv2和有并且对使用RIPV2布署完整的网络有明确的概念。 理解RIP v2支持缺省路由,VLSM和路由汇总 理解VLSM怎么使网络更有效。