點這里看大圖
該選什么?這是群里朋友(CCIE_ing)問的一個問題.對此題目有人認為答案是C.解釋是:
EIGRP重分發(fā)到OSPF中后默認類型是E2,路由表中表現(xiàn)的到達計算機B的路由條目的開銷將不會變化(因為E2類型),所以數(shù)據(jù)包會通過OSPF區(qū)域中的3條路徑(因為不考慮自身的COST后,到達B計算機的開銷相同).
但是我對此表示迷惑,我認為選擇的是B
因為,盡管是E2類型,在OSPF區(qū)域中所有路由器上關于到達B計算機的條目開銷都不變,但是,OSPF區(qū)域本身自己是要選路的,最終數(shù)據(jù)是要通過B這個邊界路由器的,A路由器在將數(shù)據(jù)遞送到B路由器時候到底會選擇哪條路?路由器A到路由器B這個過程,我覺得這是OSPF內部自己的事情.
在B路由器重分發(fā)后,B將通過它右邊的3個接口向各自連接的路由器發(fā)送這條外部路由條目,這個條目將會這樣表述:
到達B計算機網(wǎng)絡通過我B路由器的右邊接口,所以在C/D/E上都將會出現(xiàn)到達B計算機網(wǎng)絡的條目,且開銷都是100,但是各自下一接口將會不同,C將通過B最上面的接口,D將通過中間那個接口,E將通過下面那個接口.然后C/D/E又各自都向自己的右側路由器通告這個路由條目,C通告給F,D通告給H,E通告給G,然后F,G再各自通告給H,最終完成通告,這其中的每一次再通告,COST開銷雖是不變的,但是下一個接口都會改變.因此,既然每次接口都會改變,那么H路由器就應該考慮通過哪個接口是最優(yōu)的.
(問了陜圖一個老師,用5類LSA就好解釋了,這個外部路由在OSPF數(shù)據(jù)庫里表現(xiàn)為5類LSA,5類LSA只是告訴通過ASBR可以到達外部AS,怎么到達這個ASBR就是OSPF內部事情了,在這里0區(qū)域中,ASBR會發(fā)出1類LSA來在本區(qū)域內告知其他路由器,這里假如0區(qū)域還外聯(lián)其他區(qū)域,那么在外聯(lián)其他區(qū)域的ABR將把這個1類LSA轉化成4類LSA)
為了驗證我的想法我做了如下實驗.
因為沒有這么多路由器,我簡化了拓撲,并用10M代替100M線路,用串口代替10M線路,根據(jù)開銷大概算了下,不會因為這樣的替換而影響實驗前提的同一.
實驗結果:
未分發(fā)前:
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
=============
重分發(fā)后
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到達目標網(wǎng)絡全部通過了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后,去往目標網(wǎng)絡的全部走R2的接口了,而我一旦啟用R1的E1接口,路由便又恢復成通過R3的接口.請見這個這個文本里的測試過程.200609151401294631.txt
下面的連接是整個環(huán)境的完整配置:
200609151402410220.txt
不知道整個過程是否有錯,我也擔心我是否陷入了思維定試,有不同觀點請點這里相互討論.謝謝.目的為了弄明白原理.
新聞熱點
疑難解答