OSPF的高級配置(連載2)

R7#ping 31.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 31.1.1.2, timeout is 2 seconds:
!!.!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1872/1877/1888 ms
R7 可以Ping 通R6 ,現在已經實現了全網互通。

5、配置特殊區域:
 Area 1 爲完全NSSA區域,Area 3 配置爲 完全末梢區域
Area 1:
R2(config)#router os 110
R2(config-router)#area 1 nssa no-summary

R3(config)#router os 110
R3(config-router)#area 1 nssa

再次查看R3的路由表:
R3#show ip route
Gateway of last resort is 20.1.1.1 to network 0.0.0.0

   3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
   21.0.0.0/24 is subnetted, 1 subnets
C       21.1.1.0 is directly connected, FastEthernet0/0
   20.0.0.0/24 is subnetted, 1 subnets
C       20.1.1.0 is directly connected, FastEthernet1/0
   7.0.0.0/32 is subnetted, 1 subnets
R       7.7.7.7 [120/1] via 21.1.1.2, 00:00:09, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 20.1.1.1, 00:00:00, FastEthernet1/0

//通過R3的路由表可以看到,只有本區域的路由信息以及直連的外部自治系統的路由信息。且多出了一條默認路由來和其它的區域通信。

Area 3:

R5(config)#router os 110
R5(config-router)#area 3 stub no-summary

R6(config)#router os 110
R6(config-router)#area 3 stub

查看R6的路由表:
R6#show ip route
Gateway of last resort is 31.1.1.1 to network 0.0.0.0

   6.0.0.0/32 is subnetted, 1 subnets
C       6.6.6.6 is directly connected, Loopback0
   31.0.0.0/24 is subnetted, 1 subnets
C       31.1.1.0 is directly connected, FastEthernet1/0
O*IA 0.0.0.0/0 [110/2] via 31.1.1.1, 00:00:46, FastEthernet1/0

//可以看到在R6中只有本區域的路由信息,沒有本自治系統的其它區域的路由信息,在R6中也有一條默認路由。


6、地址彙總
ASBR彙總:

R7(config)#interface loo 1
R7(config-if)#ip add 100.1.1.1 255.255.255.0
R7(config-if)#interface loo 2
R7(config-if)#ip add 100.1.2.1 255.255.255.0
R7(config-if)#interface loo 3
R7(config-if)#ip add 100.1.3.1 255.255.255.0
R7(config-if)#interface loo 4
R7(config-if)#ip add 100.1.4.1 255.255.255.0
R7(config)#router rip
R7(config-router)#version 2
R7(config-router)#no auto-summary
R7(config-router)#network 100.1.1.0
R7(config-router)#network 100.1.2.0
R7(config-router)#network 100.1.3.0
R7(config-router)#network 100.1.4.0

再次查看R4的路由表:

R4#show ip route
   1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 11.1.1.1, 00:23:26, FastEthernet1/0
   2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 11.1.1.1, 00:23:26, FastEthernet1/0
   100.0.0.0/24 is subnetted, 4 subnets
O E2    100.1.4.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2    100.1.1.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2    100.1.3.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
O E2    100.1.2.0 [110/100] via 11.1.1.1, 00:00:29, FastEthernet1/0
   3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/4] via 11.1.1.1, 00:22:31, FastEthernet1/0
   4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
   21.0.0.0/24 is subnetted, 1 subnets
O E2    21.1.1.0 [110/100] via 11.1.1.1, 00:12:50, FastEthernet1/0
   20.0.0.0/24 is subnetted, 1 subnets
O IA    20.1.1.0 [110/3] via 11.1.1.1, 00:23:26, FastEthernet1/0
   5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 30.1.1.2, 00:51:43, FastEthernet0/0
   6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/3] via 30.1.1.2, 00:12:55, FastEthernet0/0
   7.0.0.0/32 is subnetted, 1 subnets
O E2    7.7.7.7 [110/100] via 11.1.1.1, 00:12:50, FastEthernet1/0
   10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/2] via 11.1.1.1, 00:23:31, FastEthernet1/0
   11.0.0.0/24 is subnetted, 1 subnets
C       11.1.1.0 is directly connected, FastEthernet1/0
   31.0.0.0/24 is subnetted, 1 subnets
O IA    31.1.1.0 [110/2] via 30.1.1.2, 00:13:12, FastEthernet0/0
   30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

//R4中我們可以看到已經學到了100網段。


R3(config)#router os 110
R3(config-router)#summary-address 100.1.0.0 255.255.252.0



再次查看R4的路由表:
R4#show ip route
   1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 11.1.1.1, 00:30:40, FastEthernet1/0
   2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 11.1.1.1, 00:30:40, FastEthernet1/0
   100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    100.1.4.0/24 [110/100] via 11.1.1.1, 00:07:43, FastEthernet1/0
O E2    100.1.0.0/22 [110/100] via 11.1.1.1, 00:00:10, FastEthernet1/0
   3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/4] via 11.1.1.1, 00:29:45, FastEthernet1/0
   4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
   21.0.0.0/24 is subnetted, 1 subnets
O E2    21.1.1.0 [110/100] via 11.1.1.1, 00:19:59, FastEthernet1/0
   20.0.0.0/24 is subnetted, 1 subnets
O IA    20.1.1.0 [110/3] via 11.1.1.1, 00:31:08, FastEthernet1/0
   5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 30.1.1.2, 00:59:24, FastEthernet0/0
   6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/3] via 30.1.1.2, 00:20:37, FastEthernet0/0
   7.0.0.0/32 is subnetted, 1 subnets
O E2    7.7.7.7 [110/100] via 11.1.1.1, 00:20:32, FastEthernet1/0
   10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/2] via 11.1.1.1, 00:31:13, FastEthernet1/0
   11.0.0.0/24 is subnetted, 1 subnets
C       11.1.1.0 is directly connected, FastEthernet1/0
   31.0.0.0/24 is subnetted, 1 subnets
O IA    31.1.1.0 [110/2] via 30.1.1.2, 00:20:54, FastEthernet0/0
   30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

//我們可以看到在R4中的100網段的路由條目已經進行了路由彙總。


ABR彙總:


R2(config-if)#interface loo 10
R2(config-if)#ip add 200.1.1.1 255.255.255.0
R2(config-if)#interfa loo 11
R2(config-if)#ip add 200.1.2.1 255.255.255.0
R2(config-if)#interface loo 12
R2(config-if)#ip add 200.1.3.1 255.255.255.0
R2(config-if)#interface loo 13
R2(config-if)#ip add 200.1.4.1 255.255.255.0

再次查看R4的路由表:
R4#show ip route
   200.1.4.0/32 is subnetted, 1 subnets
O IA    200.1.4.1 [110/3] via 11.1.1.1, 00:01:25, FastEthernet1/0
   1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 11.1.1.1, 00:44:05, FastEthernet1/0
   2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 11.1.1.1, 00:44:05, FastEthernet1/0
   100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    100.1.4.0/24 [110/100] via 11.1.1.1, 00:01:20, FastEthernet1/0
O E2    100.1.0.0/22 [110/100] via 11.1.1.1, 00:01:20, FastEthernet1/0
   3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/4] via 11.1.1.1, 00:43:10, FastEthernet1/0
   4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
   21.0.0.0/24 is subnetted, 1 subnets
O E2    21.1.1.0 [110/100] via 11.1.1.1, 00:01:22, FastEthernet1/0
   20.0.0.0/24 is subnetted, 1 subnets
O IA    20.1.1.0 [110/3] via 11.1.1.1, 00:44:02, FastEthernet1/0
   5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 30.1.1.2, 01:12:18, FastEthernet0/0
   200.1.1.0/32 is subnetted, 1 subnets
O IA    200.1.1.1 [110/3] via 11.1.1.1, 00:02:21, FastEthernet1/0
   6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/3] via 30.1.1.2, 00:33:31, FastEthernet0/0
   200.1.2.0/32 is subnetted, 1 subnets
O IA    200.1.2.1 [110/3] via 11.1.1.1, 00:02:01, FastEthernet1/0
   7.0.0.0/32 is subnetted, 1 subnets
O E2    7.7.7.7 [110/100] via 11.1.1.1, 00:01:22, FastEthernet1/0
   200.1.3.0/32 is subnetted, 1 subnets
O IA    200.1.3.1 [110/3] via 11.1.1.1, 00:01:51, FastEthernet1/0
   10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/2] via 11.1.1.1, 00:44:06, FastEthernet1/0
   11.0.0.0/24 is subnetted, 1 subnets
C       11.1.1.0 is directly connected, FastEthernet1/0
   31.0.0.0/24 is subnetted, 1 subnets
O IA    31.1.1.0 [110/2] via 30.1.1.2, 00:33:48, FastEthernet0/0
   30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0

//通過R4的路由表我們可以看到已經有了200網段的路由信息。

R2(config)#router os 110
R2(config-router)#area 1 range 200.1.0.0 255.255.252.0
 
R4#show ip route
   200.1.4.0/32 is subnetted, 1 subnets
O IA    200.1.4.1 [110/3] via 11.1.1.1, 00:07:30, FastEthernet1/0
   1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 11.1.1.1, 00:50:10, FastEthernet1/0
   2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 11.1.1.1, 00:50:10, FastEthernet1/0
   100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    100.1.4.0/24 [110/100] via 11.1.1.1, 00:01:43, FastEthernet1/0
O E2    100.1.0.0/22 [110/100] via 11.1.1.1, 00:01:43, FastEthernet1/0
   3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/4] via 11.1.1.1, 00:49:15, FastEthernet1/0
   4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
   21.0.0.0/24 is subnetted, 1 subnets
O E2    21.1.1.0 [110/100] via 11.1.1.1, 00:01:46, FastEthernet1/0
   20.0.0.0/24 is subnetted, 1 subnets
O IA    20.1.1.0 [110/3] via 11.1.1.1, 00:50:08, FastEthernet1/0
   5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 30.1.1.2, 01:18:24, FastEthernet0/0
   6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/3] via 30.1.1.2, 00:39:37, FastEthernet0/0
   7.0.0.0/32 is subnetted, 1 subnets
O E2    7.7.7.7 [110/100] via 11.1.1.1, 00:01:46, FastEthernet1/0
   10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/2] via 11.1.1.1, 00:50:12, FastEthernet1/0
   11.0.0.0/24 is subnetted, 1 subnets
C       11.1.1.0 is directly connected, FastEthernet1/0
   31.0.0.0/24 is subnetted, 1 subnets
O IA    31.1.1.0 [110/2] via 30.1.1.2, 00:39:54, FastEthernet0/0
   30.0.0.0/24 is subnetted, 1 subnets
C       30.1.1.0 is directly connected, FastEthernet0/0
O IA 200.1.0.0/22 [110/3] via 11.1.1.1, 00:01:51, FastEthernet1/0

//在R4的路由表中可以看到已經對200網段做了彙總。


二、 實驗總結:
虛鏈路:
     虛鏈路必須配置在兩臺ABR路由器之間
     傳送區域(傳送區域必須是標準區域)
     注意Router_id
彙總:
    ASBR:summary-address 彙總後的目標網段  子網掩碼
    ABR :area area_id range彙總後的目標網段  子網掩碼
重分發:
    必須在ASBR上進行,對兩個不同的自治系統進行互指。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章