OSPF外部路由彙總

9

2010-10-28_105043 

需求:R4RIP網絡的路由重發布進OSPF,並且OSPF內看到RIP過來的一條彙總路由

注意這裏RIP網絡內的路由器都要關閉自動彙總,下面實驗結果可顯示在沒有關閉自動彙總的輸出:

配置:

R1

interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface FastEthernet0/0
no ip address
shutdown
duplex half
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0

 

router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 12
network 12.1.1.1 0.0.0.0 area 12

R2

interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 23.1.1.1 255.255.255.0
serial restart-delay 0

router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.2 0.0.0.0 area 12
network 23.1.1.1 0.0.0.0 area 0

R3

interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 34.1.1.1 255.255.255.0
serial restart-delay 0

router ospf 1
router-id 3.3.3.3
log-adjacency-changes
summary-address 4.1.0.0 255.255.252.0
redistribute rip metric 300 subnets
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.2 0.0.0.0 area 0
!
router rip
version 2
redistribute ospf 1 metric 5
network 34.0.0.0
no auto-summary

 

R4

interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Loopback1
ip address 4.1.1.1 255.255.255.0
!
interface Loopback2
ip address 4.1.2.1 255.255.255.0
!
interface Loopback3
ip address 4.1.3.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 34.1.1.2 255.255.255.0
serial restart-delay 0

router rip
version 2
network 4.0.0.0
network 34.0.0.0
no auto-summary

驗證配置:

沒有在R4上關閉自動彙總時的顯示結果:

R1#show ip route

Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
O E2    34.1.1.0 [110/300] via 12.1.1.2, 00:03:40, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 12.1.1.2, 00:17:56, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 12.1.1.2, 00:12:36, Serial1/0
O E2 4.0.0.0/8 [110/300] via 12.1.1.2, 00:00:52, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.1.1.0 [110/128] via 12.1.1.2, 00:14:05, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0

RIP網絡—R3和R4都關閉了自動彙總後:

R1#show ip route

Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
O E2    34.1.1.0 [110/300] via 12.1.1.2, 00:07:59, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 12.1.1.2, 00:22:14, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 12.1.1.2, 00:16:54, Serial1/0
     4.0.0.0/24 is subnetted, 4 subnets
O E2    4.4.4.0 [110/300] via 12.1.1.2, 00:04:11, Serial1/0
O E2    4.1.1.0 [110/300] via 12.1.1.2, 00:04:11, Serial1/0
O E2    4.1.3.0 [110/300] via 12.1.1.2, 00:04:11, Serial1/0
O E2    4.1.2.0 [110/300] via 12.1.1.2, 00:04:11, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.1.1.0 [110/128] via 12.1.1.2, 00:18:28, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0

在R3—ASBR路由器上進行外部路由彙總

summary-address 4.1.0.0 255.255.252.0

查看確認路由表

R1#show ip route

Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
O E2    34.1.1.0 [110/300] via 12.1.1.2, 00:14:38, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 12.1.1.2, 00:28:54, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 12.1.1.2, 00:23:34, Serial1/0
     4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    4.4.4.0/24 [110/300] via 12.1.1.2, 00:10:51, Serial1/0
O E2    4.1.0.0/22 [110/300] via 12.1.1.2, 00:00:19, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.1.1.0 [110/128] via 12.1.1.2, 00:25:03, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章