在大规模网络中,我们通常划分区域减少资源消耗,并将拓扑的变化本地化。
由于实际环境的限制,不能物理的将其他区域环绕骨干区域,可以采用虚连接的方式逻辑的连接到骨干区域
实验拓扑:
参照上面图和表配置各接口地址,并测试连通(不懂的地方参考我的上一篇文章《ospf多区域路由与rip区域的链接》)
路由器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: 2
Neighbor ID Pri State DeadTime Neighbor Addr Interface
--------------------------------------------------------------------
我们看到路由器B的ROUTER-ID是192.168.2.1
查看路由器B的邻居表
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
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.2.2 Serial1/0
--------------------------------------------------------------------
我们看到路由器A的ROUTER-ID是192.168.1.1
配置虚链接
Router-B_config#router ospf 100
Router-B_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
为了建立一条virtual-link,必须在virtual-link两端进行配置。
参数area-id为非0,因为virtual-link必须是一个非backbone,当然virtual-link
两端的area-id必须是相同的。
本文转自Tar0 51CTO博客,原文链接:http://blog.51cto.com/tar0cissp/1259778
,如需转载请自行联系原作者