RIP的汇总与不连续网络.doc

上传人:doc321 文档编号:12896037 上传时间:2021-12-07 格式:DOC 页数:8 大小:1.57MB
返回 下载 相关 举报
RIP的汇总与不连续网络.doc_第1页
第1页 / 共8页
RIP的汇总与不连续网络.doc_第2页
第2页 / 共8页
RIP的汇总与不连续网络.doc_第3页
第3页 / 共8页
RIP的汇总与不连续网络.doc_第4页
第4页 / 共8页
RIP的汇总与不连续网络.doc_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《RIP的汇总与不连续网络.doc》由会员分享,可在线阅读,更多相关《RIP的汇总与不连续网络.doc(8页珍藏版)》请在三一文库上搜索。

1、3.4 RIP的汇总和不连续网络实验连接图提要描述在RIPv2中存在的是自动汇总,虽然可以简化了路由表的条目,但是如果出现了不连续网络这样的情况,就会丢失路由信息。所以在用RIPv2的时候直接可以毫不犹豫的关闭掉。而在RIP v1中存在的叫做边界路由的问题。   边界就是在有类的网络中才会出现的 一种汇总的现象,介乎于两个主类 。而不连续网络就是同一个主网络或子网被另一网络隔断。实验目标:调试出自动汇总、手动汇总、边界汇总、不连续子网的现象,以及解决这些现象的办法。基本配置R1的配置R2的配置!hostname R1interface Serial1/1

2、ip address 12.1.1.1 255.255.255.0no shclock rate 64000!Router rip Version 2 Network 12.1.1.0!hostname R2interface Serial1/0ip address 12.1.1.2 255.255.255.0no sh!interface Serial1/1ip address 192.168.1.2 255.255.255.0no sh!Router ripVersion 2Network 12.1.1.0Network 192.168.1.0!R3的配置!hostname R3!inte

3、rface Loopback0 ip address 10.1.1.1 255.255.255.0!interface Loopback1 ip address 10.1.2.1 255.255.255.0!interface Loopback2 ip address 10.1.3.1 255.255.255.0!interface Loopback3 ip address 10.1.4.1 255.255.255.0!interface Serial1/0ip address 192.168.1.3 255.255.255.0no shclock rate 64000!router ripv

4、ersion 2network 10.1.1.0network 10.1.2.0network 10.1.3.0network 10.1.4.0network 192.168.1.0!调试配置及监测步骤首先R1、R2、R3都已经运行了RIPv2查看R1、R2、R3的路由表R1#show ip routeR 10.0.0.0/8 120/2 via 12.1.1.2, 00:00:23, Serial1/1 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.1.0 is directly connected, Serial1/1R 192.168.1.0/24

5、120/1 via 12.1.1.2, 00:00:23, Serial1/1R2#show ip routeR 10.0.0.0/8 120/1 via 192.168.1.3, 00:00:22, Serial1/1 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.1.0 is directly connected, Serial1/0C 192.168.1.0/24 is directly connected, Serial1/1R3#show ip route 10.0.0.0/24 is subnetted, 4 subnetsC 10.1.3.0

6、 is directly connected, Loopback2C 10.1.2.0 is directly connected, Loopback1C 10.1.1.0 is directly connected, Loopback0C 10.1.4.0 is directly connected, Loopback3R 12.0.0.0/8 120/1 via 192.168.1.2, 00:00:08, Serial1/0C 192.168.1.0/24 is directly connected, Serial1/0由以上三个路由表可以看到,学到的路由全部都是自动汇总的。 下面我们关

7、闭自动汇总看看:R1(config)#router ripR1(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#no auto-summaryR3(config)#router ripR3(config-router)#no auto-summary现在再看看各个路由表的情况:R1#show ip route 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksR 10.1.3.0/24 120/2 via 12.1.1.2, 00:00:21, Ser

8、ial1/1R 10.1.2.0/24 120/2 via 12.1.1.2, 00:00:21, Serial1/1R 10.1.1.0/24 120/2 via 12.1.1.2, 00:00:21, Serial1/1R 10.0.0.0/8 120/2 via 12.1.1.2, 00:00:21, Serial1/1R 10.1.4.0/24 120/2 via 12.1.1.2, 00:00:21, Serial1/1 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.1.0 is directly connected, Serial1/1R 19

9、2.168.1.0/24 120/1 via 12.1.1.2, 00:00:21, Serial1/1R2#show ip route 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksR 10.1.3.0/24 120/1 via 192.168.1.3, 00:00:17, Serial1/1R 10.1.2.0/24 120/1 via 192.168.1.3, 00:00:17, Serial1/1R 10.1.1.0/24 120/1 via 192.168.1.3, 00:00:17, Serial1/1R 10.0.0.0/

10、8 120/1 via 192.168.1.3, 00:02:08, Serial1/1R 10.1.4.0/24 120/1 via 192.168.1.3, 00:00:17, Serial1/1 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.1.0 is directly connected, Serial1/0C 192.168.1.0/24 is directly connected, Serial1/1R3#show ip route 10.0.0.0/24 is subnetted, 4 subnetsC 10.1.3.0 is direct

11、ly connected, Loopback2C 10.1.2.0 is directly connected, Loopback1C 10.1.1.0 is directly connected, Loopback0C 10.1.4.0 is directly connected, Loopback3 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksR 12.1.1.0/24 120/1 via 192.168.1.2, 00:00:14, Serial1/0R 12.0.0.0/8 120/1 via 192.168.1.2, 00:

12、02:04, Serial1/0C 192.168.1.0/24 is directly connected, Serial1/0对比前面没有关闭自动汇总,现在的路由表学到的全部是明细路由。等一些时间后再查看路由表,上面阴影的路由条目就会消失。当然我们也可以手动精确汇总,例如:把R3的10.1.1.1汇总成10.1.0.0/16R3(config)#int s1/0R3(config-if)#ip summary-address rip 10.1.0.0 255.255.0.0R2#show ip route 10.0.0.0/8 is variably subnetted, 5 subnet

13、s, 2 masksR 10.1.3.0/24 120/1 via 192.168.1.3, 00:00:16, Serial1/1R 10.1.2.0/24 120/1 via 192.168.1.3, 00:00:16, Serial1/1R 10.1.1.0/16 120/1 via 192.168.1.3, 00:00:16, Serial1/1R 10.1.1.0/24 120/1 via 192.168.1.3, 00:00:16, Serial1/1R 10.1.4.0/24 120/1 via 192.168.1.3, 00:00:16, Serial1/1可以看到R2多出了一

14、条10.1.1.0/16的路由,这就是手动汇总的精确路由下面我们看看各路由器运行RIPv1的边界汇总和不连续子网问题R1的配置R2的配置!hostname R1interface Serial1/1ip address 12.1.1.1 255.255.255.0no shclock rate 64000!Router rip Network 12.1.1.0!hostname R2interface Serial1/0ip address 12.1.1.2 255.255.255.0no sh!interface Serial1/1ip address 192.168.1.2 255.255

15、.255.0no sh!Router ripNetwork 12.1.1.0Network 192.168.1.0!R3的配置!hostname R3!interface Serial1/0ip address 192.168.1.3 255.255.255.0no shclock rate 64000!router ripnetwork 192.168.1.0!1:如果路由2边的主类网络号不相同的情况下,路由就会把一边的路由信息汇总转发出去。2:如果路由2边的主类网络号相同的情况下,路由会不做汇总直接转发出去。现在看看在边界路由R2上debug的情况R2#debug ip ripR2#*Ma

16、r 6 21:19:14.887: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (192.168.1.2)*Mar 6 21:19:14.887: RIP: build update entries*Mar 6 21:19:14.891: network 12.0.0.0 metric 1再看看R3的路由表:R3# show ip routeR 12.0.0.0/8 120/1 via 192.168.1.2, 00:00:26, Serial1/0C 192.168.1.0/24 is directly connected,

17、 Serial1/0由R2的debug信息和R3的路由表可以看到,R2在向R3发送路由信息时候,并没有把我们配置宣告的12.1.1.0/24网络通告给R3,而是通告主类网络12.0.0.0/8,与上面RIPv2没有关闭自动汇总发送的情况一样。这就是RIP发送路由更新跨越网络边界时,它会按照(A、B、C类)的掩码进行汇总,即边界汇总。现在我们看看R3上配置一个loopback4接口,地址为12.1.2.1/24,使它与12.1.1.0/24形成一个不连续网络的情况。且打开debug观察。R3(config)#interface loopback 4R3(config-if)#ip address

18、 12.1.2.1 255.255.255.0R3#debug ip ripR3#*Mar 6 21:40:51.267: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.168.1.3)*Mar 6 21:40:51.267: RIP: build update entries - suppressing null updateR3#*Mar 6 21:41:00.051: RIP: received v1 update from 192.168.1.2 on Serial1/0*Mar 6 21:41:00.055:

19、 12.0.0.0 in 1 hopsR3#show ip route 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksR 12.0.0.0/8 120/1 via 192.168.1.2, 00:00:49, Serial1/0C 12.1.2.0/24 is directly connected, Loopback4C 192.168.1.0/24 is directly connected, Serial1/0由debug信息可以看到R3仍然一直收到来自R1的更新,但当我们查看R3路由表时,更新的时间已经为49S,12.0.0.0/

20、8这条路由已经没有再周期更新了,过一些时间就出现possibly down。R3#show ip route 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksR 12.0.0.0/8 is possibly down,routing via 192.168.1.2, Serial1/0C 12.1.2.0/24 is directly connected, Loopback4C 192.168.1.0/24 is directly connected, Serial1/0大概4分钟之后,在R3的路由表就看不到R1通告过来的路由条目。R3#

21、show ip route 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.2.0 is directly connected, Loopback4C 192.168.1.0/24 is directly connected, Serial1/0出现上述的原因是R3的looback 4接口是直连接口,接受来自相同12.0.0.0的更新时,它会丢弃。只选择来自直连接口的路由。遇到这样的问题,我们可以通过设置辅助地址(第二地址)来解决,辅助地址要与不连续网络位于同一个主网络内,并且使用相同的子网掩码。下面我们在R2和R3上设置。R2(config)#int s1

22、/1R2(config-if)#ip address 12.1.3.1 255.255.255.0 secondaryR3(config)#int s1/0R3(config-if)#ip address 12.1.3.2 255.255.255.0 secondary再次观察R3的debug信息和路由表R3#debug ip rip*Mar 6 22:13:47.587: RIP: received v1 update from 192.168.1.2 on Serial1/0*Mar 6 22:13:47.587: 12.0.0.0 in 1 hops*Mar 6 22:13:47.587

23、: RIP: received v1 update from 12.1.3.1 on Serial1/0*Mar 6 22:13:47.591: 12.1.1.0 in 1 hopsR3#show ip route 12.0.0.0/24 is subnetted, 4 subnetsR 12.1.1.0 120/1 via 12.1.3.1, 00:00:10, Serial1/0R 12.0.0.0 120/1 via 192.168.1.2, 00:00:10, Serial1/0C 12.1.3.0 is directly connected, Serial1/0C 12.1.2.0

24、is directly connected, Loopback4C 192.168.1.0/24 is directly connected, Serial1/0可以看到现在的R3已经有了12.1.1.0/24的路由条目,当然R1也学到了12.1.3.0/24的路由条目R1#show ip route 12.0.0.0/24 is subnetted, 2 subnetsC 12.1.1.0 is directly connected, Serial1/1R 12.1.3.0 120/1 via 12.1.1.2, 00:00:12, Serial1/1R 192.168.1.0/24 120

25、/1 via 12.1.1.2, 00:00:12, Serial1/1测试一下R1和R3的互通性R1#ping 192.168.1.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 52/86/156 msR3#ping 12.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 64/98/132 ms留心观察会发现辅助地址不但解决了不连续网络的问题,而且也解决了边界汇总的问题。所以很多时候不连续网络和边界汇总是同时出现的。8 / 8文档可自由编辑打印

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1