点这里看大图
该选什么?这是群里朋友(CCIE_ing)问的一个问题.对此题目有人认为答案是C.解释是:
EIGRP重分发到OSPF中后默认类型是E2,路由表中表现的到达计算机B的路由条目的开销将不会变化(因为E2类型),所以数据包会通过OSPF区域中的3条路径(因为不考虑自身的COST后,到达B计算机的开销相同).
但是我对此表示迷惑,我认为选择的是B
因为,尽管是E2类型,在OSPF区域中所有路由器上关于到达B计算机的条目开销都不变,但是,OSPF区域本身自己是要选路的,最终数据是要通过B这个边界路由器的,A路由器在将数据递送到B路由器时候到底会选择哪条路?路由器A到路由器B这个过程,我觉得这是OSPF内部自己的事情.
在B路由器重分发后,B将通过它右边的3个接口向各自连接的路由器发送这条外部路由条目,这个条目将会这样表述:
到达B计算机网络通过我B路由器的右边接口,所以在C/D/E上都将会出现到达B计算机网络的条目,且开销都是100,但是各自下一接口将会不同,C将通过B最上面的接口,D将通过中间那个接口,E将通过下面那个接口.然后C/D/E又各自都向自己的右侧路由器通告这个路由条目,C通告给F,D通告给H,E通告给G,然后F,G再各自通告给H,最终完成通告,这其中的每一次再通告,COST开销虽是不变的,但是下一个接口都会改变.因此,既然每次接口都会改变,那么H路由器就应该考虑通过哪个接口是最优的.
(问了陕图一个老师,用5类LSA就好解释了,这个外部路由在OSPF数据库里表现为5类LSA,5类LSA只是告诉通过ASBR可以到达外部AS,怎么到达这个ASBR就是OSPF内部事情了,在这里0区域中,ASBR会发出1类LSA来在本区域内告知其他路由器,这里假如0区域还外联其他区域,那么在外联其他区域的ABR将把这个1类LSA转化成4类LSA)
为了验证我的想法我做了如下实验.
因为没有这么多路由器,我简化了拓扑,并用10M代替100M线路,用串口代替10M线路,根据开销大概算了下,不会因为这样的替换而影响实验前提的同一.
点击查看大图实验结果:
未分发前:
r1:
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 5 subnets
C 10.0.2.0 is directly connected, Serial1
C 10.0.3.0 is directly connected, Ethernet0
C 10.0.1.0 is directly connected, Ethernet1
O 10.0.4.0 [110/20] via 10.0.3.3, 00:01:22, Ethernet0
O 10.0.5.0 [110/84] via 10.0.3.3, 00:01:22, Ethernet0
r2
Gateway of last resort is not set
C 2.0.0.0/8 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 5 subnets
C 10.0.2.0 is directly connected, Serial1
O 10.0.3.0 [110/74] via 10.0.2.1, 00:01:51, Serial1
O 10.0.1.0 [110/74] via 10.0.2.1, 00:01:51, Serial1
O 10.0.4.0 [110/74] via 10.0.5.4, 00:01:51, Serial0
C 10.0.5.0 is directly connected, Serial0
r3
Gateway of last resort is not set
C 3.0.0.0/8 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 5 subnets
O 10.0.2.0 [110/74] via 10.0.3.1, 00:02:08, Ethernet0
C 10.0.3.0 is directly connected, Ethernet0
O 10.0.1.0 [110/20] via 10.0.3.1, 00:02:08, Ethernet0
C 10.0.4.0 is directly connected, Ethernet1
O 10.0.5.0 [110/74] via 10.0.4.4, 00:02:08, Ethernet1
r4
Gateway of last resort is not set
C 4.0.0.0/8 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial1
D 172.16.2.0 [90/2297856] via 172.16.1.5, 00:08:31, Serial1
10.0.0.0/24 is subnetted, 5 subnets
O 10.0.2.0 [110/84] via 10.0.4.3, 00:02:24, Ethernet0
O 10.0.3.0 [110/20] via 10.0.4.3, 00:02:24, Ethernet0
O 10.0.1.0 [110/30] via 10.0.4.3, 00:02:24, Ethernet0
C 10.0.4.0 is directly connected, Ethernet0
C 10.0.5.0 is directly connected, Serial0
r5
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial1
C 172.16.2.0 is directly connected, Loopback0
C 192.168.0.0/24 is directly connected, Ethernet0
=============
重分发后
r1
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
O E2 172.16.1.0 [110/100] via 10.0.3.3, 00:19:26, Ethernet0
O E2 172.16.3.0 [110/100] via 10.0.3.3, 00:03:31, Ethernet0
这里看出,R1到达目标网络全部通过了R3路由器的接口
10.0.0.0/24 is subnetted, 5 subnets
C 10.0.2.0 is directly connected, Serial1
C 10.0.3.0 is directly connected, Ethernet0
C 10.0.1.0 is directly connected, Ethernet1
O 10.0.4.0 [110/20] via 10.0.3.3, 00:19:26, Ethernet0
O 10.0.5.0 [110/84] via 10.0.3.3, 00:19:27, Ethernet0
r2
Gateway of last resort is not set
C 2.0.0.0/8 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
O E2 172.16.1.0 [110/100] via 10.0.5.4, 00:20:22, Serial0
O E2 172.16.3.0 [110/100] via 10.0.5.4, 00:04:26, Serial0
10.0.0.0/24 is subnetted, 5 subnets
C 10.0.2.0 is directly connected, Serial1
O 10.0.3.0 [110/74] via 10.0.2.1, 00:20:22, Serial1
O 10.0.1.0 [110/74] via 10.0.2.1, 00:20:22, Serial1
O 10.0.4.0 [110/74] via 10.0.5.4, 00:20:22, Serial0
C 10.0.5.0 is directly connected, Serial0
r3
Gateway of last resort is not set
C 3.0.0.0/8 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
O E2 172.16.1.0 [110/100] via 10.0.4.4, 00:20:44, Ethernet1
O E2 172.16.3.0 [110/100] via 10.0.4.4, 00:04:49, Ethernet1
10.0.0.0/24 is subnetted, 5 subnets
O 10.0.2.0 [110/74] via 10.0.3.1, 00:20:44, Ethernet0
C 10.0.3.0 is directly connected, Ethernet0
O 10.0.1.0 [110/20] via 10.0.3.1, 00:20:44, Ethernet0
C 10.0.4.0 is directly connected, Ethernet1
O 10.0.5.0 [110/74] via 10.0.4.4, 00:20:45, Ethernet1
r4
Gateway of last resort is not set
C 4.0.0.0/8 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial1
D 172.16.3.0 [90/2195456] via 172.16.1.5, 00:05:12, Serial1
10.0.0.0/24 is subnetted, 5 subnets
O 10.0.2.0 [110/84] via 10.0.4.3, 00:21:08, Ethernet0
O 10.0.3.0 [110/20] via 10.0.4.3, 00:21:08, Ethernet0
O 10.0.1.0 [110/30] via 10.0.4.3, 00:21:08, Ethernet0
C 10.0.4.0 is directly connected, Ethernet0
C 10.0.5.0 is directly connected, Serial0
r5
Gateway of last resort is not set
5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial1
C 172.16.3.0 is directly connected, Ethernet0
10.0.0.0/24 is subnetted, 5 subnets
D EX 10.0.2.0 [170/3072256] via 172.16.1.4, 00:02:24, Serial1
D EX 10.0.3.0 [170/3072256] via 172.16.1.4, 00:02:24, Serial1
D EX 10.0.1.0 [170/3072256] via 172.16.1.4, 00:02:24, Serial1
D EX 10.0.4.0 [170/3072256] via 172.16.1.4, 00:02:25, Serial1
D EX 10.0.5.0 [170/3072256] via 172.16.1.4, 00:02:25, Serial1
为了避免实验自身问题,我特意关闭了R1上的E0来测试R1的S1接口是否能正常路由,测试结果表明,我关闭E0后,去往目标网络的全部走R2的接口了,而我一旦启用R1的E1接口,路由便又恢复成通过R3的接口.请见这个这个文本里的测试过程.200609151401294631.txt
下面的连接是整个环境的完整配置:
200609151402410220.txt
不知道整个过程是否有错,我也担心我是否陷入了思维定试,有不同观点请点这里相互讨论.谢谢.目的为了弄明白原理.