中级会员 
 精华: 0
 积分: 348
 帖子: 41  威望: 123 点 金钱: 81 币 贡献: 51 点 经验: 02级
 阅读权限: 30
 注册: 2007-8-18
 状态:
|
1#
大 中
小 发表于 2007-11-13 10:00 只看该作者
实验OSPF虚链路扩充骨干区域
实验OSPF虚链路扩充骨干区域
Ospf非骨干区域必须与骨干区域相连,所以我们采用虚链路,使area1 ,area2为骨干区域area 0,非骨干区域area 2 与之逻辑上相连,以达到扩充骨干区域的目的
以下为物理TOPO图
以下为实际效果图:
配置如下:
r2#
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
!
interface Serial2/0
ip address 12.1.1.2 255.255.255.0
!
router ospf 10
router-id 2.2.2.2
network 2.2.2.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
r1#
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
!
interface Serial2/0
ip address 13.1.1.1 255.255.255.0
!
router ospf 10
router-id 1.1.1.1
area 1 virtual-link 3.3.3.3
network 1.1.1.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 1
!
r3#
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 13.1.1.3 255.255.255.0
!
interface Serial2/0
ip address 35.1.1.3 255.255.255.0
!
router ospf 10
router-id 3.3.3.3
area 1 virtual-link 1.1.1.1
area 3 virtual-link 5.5.5.5
network 3.3.3.0 0.0.0.255 area 1
network 13.1.1.0 0.0.0.255 area 1
network 35.1.1.0 0.0.0.255 area 3
!
r5#
interface Loopback0
ip address 5.5.5.5 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 35.1.1.5 255.255.255.0
!
interface Serial2/0
ip address 45.1.1.5 255.255.255.0
!
router ospf 10
router-id 5.5.5.5
area 3 virtual-link 3.3.3.3
network 5.5.5.0 0.0.0.255 area 2
network 35.1.1.0 0.0.0.255 area 3
network 45.1.1.0 0.0.0.255 area 2
!
r4#
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 45.1.1.4 255.255.255.0
!
router ospf 10
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 2
network 45.1.1.0 0.0.0.255 area 2
!
正常情况下,无虚链路时,R4的路由表为:
r4#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
4.0.0.0/24 is subnetted, 1 subnets
C
4.4.4.0 is directly connected, Loopback0
5.0.0.0/24 is subnetted, 1 subnets
O
5.5.5.0 [110/65] via 45.1.1.5, 00:01:44, Serial1/0
45.0.0.0/24 is subnetted, 1 subnets
C
45.1.1.0 is directly connected, Serial1/0
增加虚链路后,看R4路由表:
r4#
sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
1.0.0.0/24 is subnetted, 1 subnets
O IA
1.1.1.0 [110/193] via 45.1.1.5, 00:06:24, Serial1/0
35.0.0.0/24 is subnetted, 1 subnets
O IA
35.1.1.0 [110/128] via 45.1.1.5, 00:06:24, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
O IA
2.2.2.0 [110/257] via 45.1.1.5, 00:06:24, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
O IA
3.3.3.0 [110/129] via 45.1.1.5, 00:06:24, Serial1/0
4.0.0.0/24 is subnetted, 1 subnets
C
4.4.4.0 is directly connected, Loopback0
5.0.0.0/24 is subnetted, 1 subnets
O
5.5.5.0 [110/65] via 45.1.1.5, 00:06:24, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
O IA
12.1.1.0 [110/256] via 45.1.1.5, 00:06:24, Serial1/0
13.0.0.0/24 is subnetted, 1 subnets
O IA
13.1.1.0 [110/192] via 45.1.1.5, 00:06:24, Serial1/0
45.0.0.0/24 is subnetted, 1 subnets
C
45.1.1.0 is directly connected, Serial1/0
可以看到:
R4有其他区域的路由,而它与骨干区域相隔2个区域,所以达到了扩充骨干区域的目的。
|