OSPF中virtual-link

简介:
在大规模网络中,我们通常划分区域减少资源消耗,并将拓扑的变化本地化。
由于实际环境的限制,不能物理的将其他区域环绕骨干区域,可以采用虚连接的方式逻辑的连接到骨干区域
实验拓扑:

163815857.png

 

163854391.png

参照上面图和表配置各接口地址,并测试连通(不懂的地方参考我的上一篇文章《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 ,如需转载请自行联系原作者

相关文章
|
2天前
|
网络协议
network的使用(DHCP,BGP,OSPF,RIP使用network的异同)
network的使用(DHCP,BGP,OSPF,RIP使用network的异同)
4 0
|
3天前
|
存储 网络协议 算法
|
3天前
|
安全 数据安全/隐私保护 网络架构
TP-Link路由器桥接设置
TP-Link路由器桥接设置
35 0
|
网络协议 网络架构
TP-LINK路由器如何设置DHCP
TP-LINK路由器如何设置DHCP
2003 0
TP-LINK路由器如何设置DHCP
|
网络协议 网络架构
OSPF中的次优外部路由——Forwarding Address
在OSPF中外部路由是从ASBR(自治系统边界路由器)中导进来的(第五类的LSA)
312 0
OSPF中的次优外部路由——Forwarding Address
|
网络协议 网络架构