BSCI第二章实验(人邮自学指南BSCI)

www.net130.com     日期:2006-7-16    浏览次数:
出处:思科 思索

环境及拓扑图说明请参看[原创]BSCI第一章实验2之任务2(人邮自学指南BSCI)里的说明

本次实验目的主要是研究RIP V1 V2下路由选择的特性.
任务一:清除配置,这个没什么可多说的,主要是删除P1R1  P1 R2上的默认路由.
任务二:在P1R1/R2/R3/R4上启用RIP V1,这个也比较简单,注意书上要求 R1/2/3/4都显式申明使用V1,最终路由器的路由表如下:

 

P1R1:
r1-2514#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, 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 default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    1.0.0.0/8 is directly connected, Loopback0
     172.31.0.0/24 is subnetted, 1 subnets
C       172.31.1.0 is directly connected, Serial0
     10.0.0.0/24 is subnetted, 4 subnets
R       10.1.3.0 [120/1] via 10.1.1.3, 00:00:04, Ethernet0
R       10.1.2.0 [120/1] via 10.1.0.2, 00:00:20, Serial1
C       10.1.1.0 is directly connected, Ethernet0
C       10.1.0.0 is directly connected, Serial1

P1R3:
r3-2514#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, 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 default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    3.0.0.0/8 is directly connected, Loopback0
R    172.31.0.0/16 [120/1] via 10.1.1.1, 00:00:00, Ethernet0
     10.0.0.0/24 is subnetted, 4 subnets
C       10.1.3.0 is directly connected, Serial1
R       10.1.2.0 [120/1] via 10.1.3.4, 00:00:02, Serial1
C       10.1.1.0 is directly connected, Ethernet0
R       10.1.0.0 [120/1] via 10.1.1.1, 00:00:00, Ethernet0

从P1R3 ping 10.254.0.5的结果是:
*Mar  1 01:37:59.951: IP: s=10.1.1.3 (local), d=10.254.0.5, len 100, unroutable.
*Mar  1 01:38:01.951: IP: s=10.1.1.3 (local), d=10.254.0.5, len 100, unroutable.

很显然不可能PING通,调试结果表明路由器没有到达10.254.0.5的路由条目,为什么会没有呢?
在上面的配置中,我们启用的是RIP V1版本,这是个分类路由选择协议,在跨越网络边界的时候,路由器会自动汇总成主类网络,所以说BBR1路由器,也就是我们这里的R5路由器的E0口所属的10.254.0.0/24网络,再通告道P1R1时候被自动汇总了成了10.0.0.0/8,所以P1R1不会有具体的10.254.0.0/24这个条目了,而只有红色的那部分.同时RIP V1,当路由器没有跨越网络边界通告路由时候,路由器会用自己接道更新的接口所属网络分类的掩码来套用到更新上,因此这个时候必须注意同一主类下的子网必须使用统一相同的掩码,否则路由器就会套用错误,本实验掩码都是255.255.255.0所以路由器套用正确,可以正确认识象10.1.1.0/ 10.1.2.0 /10.1.3.0/ 10.1.0.0这样的子网,请看上面的蓝色部分.
好了,上面总结下来就是路由器没有到目标网络的路由,那么书上在此步骤中提出了使用default-information originate注入一条静态路由,这个命令的作用其实就是向直连的其他路由器中注入一条通过自己的静态路由(是向其他人的路由表里注入,自己的路由表里不会有),但是我们这个实验环境由于网夹1里的路由器构成了一个环路,当P1R1启用该命令后,自己的路由表里也会有静态路由产生,^_^,为什么会有大家自己思考吧(观察R1上的静态路由,会发现,静态路由不停的变,一会通过这个口 一会通过那个口,而且度量值也在不停的变,仔细观察的话,还会发现有的条目会到最大跳数,为什么会不停的变,可以结合RIP的水平分割来理解下.这个地方很有趣),由于静态路由不停的翻动,就算是碰巧当前默认路由走的路径是对的话,也可以这么说如果按照书上的先关闭ip classless的话,还是PING不通,为什么?因为在关闭ip classless时候,在分类路由协议情况下,路由器如果首先发现有匹配的主类网络存在,那么路由器就会很笨的认为它知道了该主类网络下的所有子网,路由器此时不再会通过默认路由发送数据包,当然如果没有首先发现有主类存在那就会通过默认路由的.

任务三:
在任务三中,书上打开了IP classless特性,由于上面我说,默认路由在我们这个有环路的实验环境下,很难遇到当前每个路由器的默认路由走的路正好是从r3--r1--r5这一顺序,我在多次测试PING的情况下才遇到了一次返回U提示的(返回U提示表示PING包有路径出去了,但没接到返回包,也就是路由不可达了.)

r3-2514#ping 10.254.0.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.5, timeout is 2 seconds:
...U.
Success rate is 0 percent (0/5)

那么为什么这个时候数据包有去的路径没回的路径呢?分析BBR1,BBR1路由器上不会有10.1.1.0/24这样的具体网络,如下
r5-2501#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, 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 default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 172.31.1.1 to network 0.0.0.0

C    5.0.0.0/8 is directly connected, Loopback0
     172.31.0.0/24 is subnetted, 1 subnets
C       172.31.1.0 is directly connected, Serial0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.254.0.0 is directly connected, Ethernet0
R*   0.0.0.0/0 [120/7] via 172.31.1.1, 00:00:00, Serial0
因为从P1R1过来的路由更新是跨网络的,刚才上面说了 跨网络时候RIP是要自动汇总成主类的,就汇成10.0.0.0/8了,而BBR1的e0口分配的地址是10.254.0.5 BBR1路由器会认为10.0.0.0/8网络是个直连网络,所以路由器BBR1不知道将返回信息送到哪,这里有人会问,不是有默认路由了吗??对是有,但是刚才上面说了,分类路由在主类一旦存在的情况下是不会去找默认路由的,就算没有子网能匹配它也不找,丢弃.

本新闻共2页,当前在第1页  1  2  

相关新闻
推荐文章