区域间路由汇总和自治系统间路由汇总

拓扑图如下

 

配置:

R1interface Loopback0

 ip address 1.1.1.1 255.255.255.0

!

interface Loopback1

 ip address 1.1.2.2 255.255.255.0

!

interface Loopback2

 ip address 1.1.3.3 255.255.255.0

!

interface Serial1/0

 ip address 12.1.1.1 255.255.255.0

 serial restart-delay 0

!

router ospf 1

 log-adjacency-changes

 network 0.0.0.0 255.255.255.255 area 0

!

R2

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

 log-adjacency-changes

 area 0 range 1.1.0.0 255.255.0.0                                区域间汇总

 network 12.1.1.0 0.0.0.255 area 0

 network 23.1.1.0 0.0.0.255 area 1

R3

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

 log-adjacency-changes

 summary-address 4.4.0.0 255.255.0.0                          自治系统路由汇总

 redistribute rip subnets                                      重分发

 network 23.1.1.0 0.0.0.255 area 1

!

router rip

 version 2

 redistribute ospf 1 metric 2                                   重分发

 network 34.0.0.0

 no auto-summary

!

R4

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

 ip ospf network point-to-point

!

interface Loopback1

 ip address 4.4.5.5 255.255.255.0

 ip ospf network point-to-point

!

interface Loopback2

 ip address 4.4.6.6 255.255.255.0

 ip ospf network point-to-point

!

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

!

注明:

1、Ospf区域汇总在区域边界路由器(ABR)上做汇总

2、Ospf自治系统汇总在区域自治系统边界(ASBR)上做汇总