该选什么?这是群里朋友(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
下面的连接是整个环境的完整配置:
不知道整个过程是否有错,我也担心我是否陷入了思维定试,有不同观点请点这里相互讨论.谢谢.目的为了弄明白原理.
附:这里有一位NET130朋友做的关于E1/E2分发不同情况的实验,对于同一网络作分发,在执行分发的路由器上是要对同一网络进行管理距离比较的,这很容易理解,这个路由器不可能同时保存到达同一网络的不同distance的路由,分发的路由器只能选择保存管理距离小的(从分发来的和直接学习到的比较)。具体请看试验PDF:
文章评论
You are correct, I've repeated your experiment and the get same result as yours. The E2 ospf route is calculated from LSA type 5, which only specify the ASBR router-id. As a result the path selection is also governed by the path cost between the router and the ASBR.
Test Equipment
Cisco 26xx + Cisco 17xx with IOS 12.3
我认为答案是B,新的文档中答案就是B!
如果是在答题,我会选择B。如果是在梦游,我会选D。
理由嘛,我觉得有两个考点需要考虑。一个是重分发后默认E2进来,LSA5。另一个考点是load balance。这个麻烦,所以我觉得思科笔试也就是想问问大家第一个问题,而不用涉及第二个。load balance还是需要参考转发模式,cef配置等问题,所以,D也不是没有道理,不过这就把问题弄大了。再声明一下,我是在梦游状态下答D哦。现在可以统一的是,ospf并不走最慢的那条,但是,我现在没条件做实验,希望楼主有时间做一下那个load balance方面的设想。感谢。
尽管是E2类型的LSA5,但是B会发出一个第四种类型的LSA,指示如何到达ASBR,这会影响到H的选路,就会有两条等值的到B的路由,但是如果H配置了ip route-cache,就会按照每目的地址的方式,也就是走其中一条,因为实际上发往PC-B的包只查找了一次路由表,以后的包是查cache表,找到接口和封装的二层包头。另一种负载均衡就是每次都查路由表,这样路由表中两条路由表项会交替使用,就会按照每包路由的方式,走两条路线
4类不是ASBR发出的 而是ABR发出的.
5楼的你一个问题搞清楚了再说话吧
呵呵 作个实验看看吧 你看你能在ASBR连接的那个区域看到TYPE4么
如果没办法作实验,看看书,书上有很明确图例.
4类 汇总LSA 由区域边界路由器(ABR)产生(ABR收到ASBR的1类LSA后发出)。4类LSA标识ASBR,并提供一条前往该ASBR的路由。将会在整个主干区域传输。链路状态ID为其描述的ASBR的RID(用来鉴别router 的IP地址,Cisco通过使用回环接口的最高的IP地址来鉴别router.如果回环接口没有配置IP地址,OSPF将选择所有物理接口中最高的IP地址)
when eigrp redistributed into ospf domain,ASBR create type 5 LSA(default)E2.LSA type 5 packet only include external network prefix and netmask,advertising router ID(ASBR) and cost to external network.
then ABR resent the LSA ,which received with recalculating cost according to enternal type, into arear 0.if it is E1,ABR process cost.if it's E2,ABR don't care about cost to external network.so,r1 just decide to select which ASBR to external network.how to asbr by LSA TYPE 4
http://bbs.net130.com/showthread.php?t=166395
在该文中已经做了说明