OSPF中非backbone區域被分割的解決方法

 
area 2被area 0和area 5分割,
 
 
預配置:
R1
 
 
R2
 
 
R3
 
 
R5
 
R4
 
按照拓撲啓用OSPF
R1
 
R2
 
R3
R4
 
R5
 
 
這時全網已經啓用了OSPF,我們只看R2和R5上路由表的狀態
 
 
R2(config-router)#
R2(config-router)#do sh 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, 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
     12.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O IA    12.12.5.5/32 [110/85] via 12.12.12.1, 00:05:18, Ethernet0/0
O IA    12.12.4.4/32 [110/65] via 12.12.24.4, 00:05:23, Serial0/1
O IA    12.12.3.3/32 [110/75] via 12.12.12.1, 00:05:23, Ethernet0/0
C       12.12.2.2/32 is directly connected, Loopback0
O IA    12.12.1.1/32 [110/11] via 12.12.12.1, 00:05:23, Ethernet0/0
C       12.12.12.0/24 is directly connected, Ethernet0/0
C       12.12.24.0/24 is directly connected, Serial0/1
O IA    12.12.34.0/24 [110/74] via 12.12.12.1, 00:05:24, Ethernet0/0
O IA    12.12.35.0/24 [110/84] via 12.12.12.1, 00:05:24, Ethernet0/0
O IA    12.12.50.0/24 [110/94] via 12.12.12.1, 00:00:41, Ethernet0/0
R2(config-router)#

R5(config-router)#do sh 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
     12.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
C       12.12.5.5/32 is directly connected, Loopback0
O       12.12.4.4/32 [110/75] via 12.12.35.3, 00:01:04, Ethernet0
O       12.12.3.3/32 [110/11] via 12.12.35.3, 00:01:04, Ethernet0
O IA    12.12.2.2/32 [110/85] via 12.12.35.3, 00:01:04, Ethernet0
O       12.12.1.1/32 [110/75] via 12.12.35.3, 00:01:04, Ethernet0
O IA    12.12.12.0/24 [110/84] via 12.12.35.3, 00:01:04, Ethernet0
O IA    12.12.24.0/24 [110/138] via 12.12.35.3, 00:01:04, Ethernet0

O       12.12.34.0/24 [110/74] via 12.12.35.3, 00:01:05, Ethernet0
C       12.12.35.0/24 is directly connected, Ethernet0
C       12.12.50.0/24 is directly connected, Ethernet1
 
雖然R2和R5的e0口在同一個區域,但是顯示收到對方路由狀態顯示爲O IA,這說明在R2和R5上都認爲是通過外部區域學到的路由,
 
解決方法
通過在R1到R5,R4到R5上建立GRE tunnel
 
 
 
 
 
這時R2和R5路由表的狀態
R2#sh 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, 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
     12.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O IA    12.12.5.5/32 [110/85] via 12.12.12.1, 00:01:29, Ethernet0/0
O IA    12.12.4.4/32 [110/65] via 12.12.24.4, 00:01:29, Serial0/1
O IA    12.12.3.3/32 [110/75] via 12.12.12.1, 00:01:29, Ethernet0/0
C       12.12.2.2/32 is directly connected, Loopback0
O IA    12.12.1.1/32 [110/11] via 12.12.12.1, 00:01:29, Ethernet0/0
C       12.12.12.0/24 is directly connected, Ethernet0/0
C       12.12.24.0/24 is directly connected, Serial0/1
O IA    12.12.34.0/24 [110/74] via 12.12.12.1, 00:01:30, Ethernet0/0
O IA    12.12.35.0/24 [110/84] via 12.12.12.1, 00:01:30, Ethernet0/0
O       12.12.50.0/24 [110/11131] via 12.12.12.1, 00:01:30,
Ethernet0/0

R5#sh 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
     12.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
C       12.12.5.5/32 is directly connected, Loopback0
O IA    12.12.4.4/32 [110/75] via 12.12.35.3, 00:01:40, Ethernet0
O IA    12.12.3.3/32 [110/11] via 12.12.35.3, 00:01:40, Ethernet0
O       12.12.2.2/32 [110/11122] via 12.12.12.1, 00:01:40, Tunnel0
O IA    12.12.1.1/32 [110/75] via 12.12.35.3, 00:01:40, Ethernet0
O       12.12.12.0/24 [110/11121] via 12.12.12.1, 00:01:40, Tunnel0
O       12.12.24.0/24 [110/11175] via 12.12.24.4, 00:01:40, Tunnel1
O IA    12.12.34.0/24 [110/74] via 12.12.35.3, 00:01:41, Ethernet0
C       12.12.35.0/24 is directly connected, Ethernet0
C       12.12.50.0/24 is directly connected, Ethernet1
 
 
這時路由表顯示的狀態說明,R2和R5的e0接口爲同一區域
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章