文章作者:姜南(Slyar) 文章来源:Slyar Home (www.slyar.com) 转载请注明,谢谢合作。
【实验环境】
C3640-IK9O3S-M Version 12.4(10)
【实验目的】
多进程双向重分布解决OSPF区域分割问题
【实验拓扑】
【实验描述】
Area 2与Area 0没有直接相连,通过在R2上创建不同的OSPF进程分别宣告S0/0和S0/1,然后互相重分布解决区域分割问题。
【实验步骤】
1、R1基本配置
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
ip address 12.0.0.1 255.255.255.0
clock rate 64000
!
router ospf 110
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 12.0.0.0 0.0.0.255 area 1
!
2、R2基本配置
!
interface Serial0/0
ip address 12.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 23.0.0.1 255.255.255.0
clock rate 64000
!
3、R3基本配置
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/1
ip address 23.0.0.2 255.255.255.0
!
router ospf 110
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 2
network 23.0.0.0 0.0.0.255 area 2
!
4、在R2上创建OSPF 110,在Area 1上宣告12.0.0.0/24网段
router ospf 110
router-id 2.2.2.2
network 12.0.0.0 0.0.0.255 area 1
5、在R2上创建OSPF 120,在Area 2上宣告23.0.0.0/24网段
router ospf 120
//不同的OSPF进程需要配置不同的Router-ID
router-id 2.2.2.23
network 23.0.0.0 0.0.0.255 area 2
6、向OSPF 110中重分布OSPF 120的路由条目
router ospf 110
//使用E1类型进行重分布
redistribute ospf 120 metric-type 1 subnets
7、向OSPF 120中重分布OSPF 110的路由条目
router ospf 120
redistribute ospf 110 metric-type 1 subnets
8、检查R1路由表
//可以看到Area 2的路由条目以E1出现在路由表中
R1#sh ip ro
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O E1 3.3.3.3 [110/129] via 12.0.0.2, 00:13:08, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
O E1 23.0.0.0 [110/128] via 12.0.0.2, 00:13:08, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial0/0
9、检查R3路由表
//可以看到Area 0和Area 1的路由条目以E1出现在路由表中
R3#sh ip ro
1.0.0.0/32 is subnetted, 1 subnets
O E1 1.1.1.1 [110/129] via 23.0.0.1, 00:13:20, Serial0/1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
O E1 12.0.0.0 [110/128] via 23.0.0.1, 00:13:20, Serial0/1