查看完整版本: OSPF虚链路现象分析

一身有你 2007-11-10 09:41

OSPF虚链路现象分析

[b][font=Arial][size=3]OSPF虚链路现象分析[2007-8-8修订版][/size][/font][/b]
[font=Arial][b][size=3][color=#ff0000]添加内容见5楼回帖[/color][/size][size=1]
[/size][/b][/font]

本文档目的:在等级二的实验手册P44上的逻辑图的基础上,[color=#0000ff]更深入理解虚链路的逻辑[/color];弄清楚本实验中的R3在逻辑上到底是什么位置;看懂实验手册的逻辑图,看清楚实验手册上,那条虚线两端接口所属的区域。
实验设计:
[img=480,234]http://www.one-tom.com/bbs/uploads/20070325_140705_XY004.png[/img]

配置设计:
R1#show run
Building configuration...
!
hostname 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
!
router ospf 10
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
!
end
R2#show run
Building configuration...

!
hostname R2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
!
interface Serial1/1
ip address 12.1.1.2 255.255.255.0
!
router ospf 10
log-adjacency-changes
area 1 virtual-link 3.3.3.3
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 1
!
end
R3#show run
Building configuration...
Current configuration : 1081 bytes
!
hostname R3
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 34.1.1.3 255.255.255.0
!
interface Serial1/1
ip address 23.1.1.3 255.255.255.0
!
router ospf 10
area 1 virtual-link 2.2.2.2
network 23.1.1.0 0.0.0.255 area 1
network 34.1.1.0 0.0.0.255 area 2
!
end
R4#show run
Building configuration...
Current configuration : 1039 bytes
!
hostname R4
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/1
ip address 34.1.1.4 255.255.255.0
!
router ospf 10
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 2
network 34.1.1.0 0.0.0.255 area 2
!
end
实验现象:
R1#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
     34.0.0.0/24 is subnetted, 1 subnets
O IA    34.1.1.0 [110/192] via 12.1.1.2, 00:00:48, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/193] via 12.1.1.2, 00:00:48, 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:00:48, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0
R2#show ip ro   
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
     34.0.0.0/24 is subnetted, 1 subnets
O IA    34.1.1.0 [110/128] via 23.1.1.3, 00:01:54, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/65] via 12.1.1.1, 00:01:54, Serial1/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/129] via 23.1.1.3, 00:01:54, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.1.1.0 is directly connected, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/1
R3#show ip ro
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
     34.0.0.0/24 is subnetted, 1 subnets
C       34.1.1.0 is directly connected, Serial1/0
     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/129] via 23.1.1.2, 00:03:41, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
O       4.4.4.0 [110/65] via 34.1.1.4, 00:04:31, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.1.1.0 is directly connected, Serial1/1
     12.0.0.0/24 is subnetted, 1 subnets
O       12.1.1.0 [110/128] via 23.1.1.2, 00:03:41, Serial1/1
R4#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
     34.0.0.0/24 is subnetted, 1 subnets
C       34.1.1.0 is directly connected, Serial1/1
     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/193] via 34.1.1.3, 01:03:18, Serial1/1
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.1.1.0 [110/128] via 34.1.1.3, 01:04:07, Serial1/1
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.1.1.0 [110/192] via 34.1.1.3, 01:03:18, Serial1/1
***[color=#0000ff]请注意R3路由表的路由条目[/color]***全部是本区域路由
***[color=#0000ff]在看R2的路由条目[/color]***O IA    34.1.1.0 [110/128] via 23.1.1.3, 00:01:54, Serial1/0
                                          O IA    4.4.4.0 [110/129] via 23.1.1.3, 00:01:54, Serial1/0
下面我们分析虚链路的逻辑
实验现象分析:
1、ospf若设计成标准的两层机构,虚链路的作用就是恢复逻辑上的两层结构
2、配置虚链路后,R3上的路有表中的路由都是O,没有O IA。[color=#0000ff]说明在逻辑上,R3有属于Aear0的接口。逻辑上认为,这台路由器是主干区域连接其他区域的ABR。[/color]所以R3所连接的非主干区域的路由器R4可学到主干区域的路由条目。

从路由表上看一切迹象证明逻辑上是这样的,
[img=516,220]http://www.one-tom.com/bbs/uploads/20070325_140745_XY005.png[/img]
页: [1]
查看完整版本: OSPF虚链路现象分析