实验二十六、OSPF 虚连接的配置

一、 实验目的

1. 掌握多区域OSPF 虚连接的配置

2. 理解OSPF 虚连接的意义

二、 应用环境

在大规模网络中,我们通常划分区域减少资源消耗,并将拓扑的变化本地化。由于实际环境

的限制,不能物理的将其他区域环绕骨干区域,可以采用虚连接的方式逻辑的连接到骨干区

域。

三、 实验设备

1. DCR-1751 三台

2. CR-V35MT 一条

3. CR-V35FC 一条

四、 实验拓扑

实验二十六、OSPF 虚连接的配置_休闲

五、 实验要求

配置表

Router-A Router-B Router-C

S1/1(DCE) 192.168.1.1 S/1/0(DTE) 192.168.1.2 F0/0 192.168.2.2

F0/0 192.168.0.1 F0/0 192.168.2.1 E1/0 192.168.3.1

路由器A、B 为ABR

六、 实验步骤

第一步:参照实验三和上表配置各接口地址,并测试连通性

第二步:路由器A 的配置Router-A#conf

Router-A_config#router ospf 100

Router-A_config_ospf_100#network 192.168.0.0 255.255.255.0 area 3

Router-A_config_ospf_100#network 192.168.1.0 255.255.255.0 area 1

Router-A_config_ospf_100#^Z

第三步:路由器B 的配置

Router-B#conf

Router-B_config#router ospf 100

Router-B_config_ospf_100#network 192.168.1.0 255.255.255.0 area 1

Router-B_config_ospf_100#network 192.168.2.0 255.255.255.0 area 0

Router-B_config_ospf_100#^Z

第四步:路由器C 的配置

Router-C#conf

Router-C_config#router ospf 100

Router-C_config_ospf_100#network 192.168.2.0 255.255.255.0 area 0

Router-C_config_ospf_100#network 192.168.3.0 255.255.255.0 area 0

Router-C_config_ospf_100#^Z

第五步:查看路由器A 的邻居表

Router-A#sh ip ospf neighbor

----------------------------------------------------------------------------

OSPF process: 100

Virtual Link Neighbor

Neighbor ID Pri State DeadTime

AREA: 0

Neighbor ID Pri State DeadTime Neighbor Addr Interface

AREA: 1

Neighbor ID Pri State DeadTime Neighbor Addr Interface

192.168.2.1 1 FULL/- 38 192.168.1.2 Serial1/1

AREA: 3

Neighbor ID Pri State DeadTime Neighbor Addr Interface

我们看到路由器B 的ROUTER-ID 是 192.168.2.1

第六步:查看路由器B 的邻居表

Router-B#sh ip ospf neighbor

----------------------------------------------------------------------------

OSPF process: 100 Virtual Link Neighbor

Neighbor ID Pri State DeadTime

AREA: 0

Neighbor ID Pri State DeadTime Neighbor Addr Interface

192.168.3.1 1 FULL/BDR 36 192.168.2.2 FastEthernet0/

0

AREA: 1

Neighbor ID Pri State DeadTime Neighbor Addr Interface

192.168.1.1 1 FULL/- 32 192.168.1.1 Serial1/0

我们看到A 的ROUTER-ID 是 192.168.1.1

第七步:配置虚连接

Router-A#conf

Router-A_config#router ospf 100

Router-A_config_ospf_100#area 1 virtual-link 192.168.2.1 !注意是ROUTER-ID

Router-B_config#router ospf 100

Router-B_config_ospf_100#area 1 virtual-link 192.168.1.1 !注意是ROUTER-ID

第八步:查看虚连接

Router-A#sh ip ospf virtual-link

Virtual Link Neighbor ID 192.168.2.1 (UP)

TransArea: 1, Cost is 1600

Hello interval is 10, Dead timer is 40 Retransmit is 5

INTF Adjacency state is IPOINT_TO_POINT

Router-B#sh ip ospf virtual-link

Virtual Link Neighbor ID 192.168.1.1 (UP)

TransArea: 1, Cost is 1600

Hello interval is 10, Dead timer is 40 Retransmit is 5

INTF Adjacency state is IPOINT_TO_POINT