虚链路:是指一条通过一个非骨干区域连接到骨干区域的链路。
虚链路一般用于:
v 通过一个非骨干区域连接一个区域到骨干区域。
v 通过一个非骨干区域连接一个分段的骨干区域两边的部分区域。
配置虚链路规则:
v 虚链路必须配置在两台路由器之间。
v 虚链路所经过的区域必须拥有全部的路由信息。
v 传送区域不能是一个末梢区域和NSSA区域。
v 虚链路的稳定性取决于其经过的区域的稳定性。
v 虚链路有助于提供逻辑冗余。
CISCO思科OSPF相关命令:
命令
描述
(config)# router ospf 110
创建并进入OSPF进程
(config-router)# router-id 1.1.1.1
配置RouterID
(config-router)# network 网段 反掩码 Area0(区域号)
宣告网段
(config-router)# area 1 stub
配置区域为末梢区域
(config-router)# area 1 stub no-summary
配置区域为完全末梢区域
(config-router)# redistribut rip subnets
将RIP重分发到OSPF中
(config-router)# redistribut ospf metric 5
将OSPF重分发到RIP中
(config-router)# default-information originate
默认路由重分发
(config-router)# area 2 nssa
配置区域为NSSA区域
(config-router)# area 2 nssa no-summary
配置区域为完全NSSA区域
(config-router)# area 2 nssa default-information-originate
NSSA区域默认路由重分发
(config-router)# area 1 range 192.168.0.0 255.255.0.0
区域间路由汇总
(config-router)# summary-address 192.168.0.0 255.255.0.0
外部路由汇总
(config-router)# area 1(要穿越的区域) virtual-links 1.1.1.1(对端的RrouterID)
虚链路
(config-if)# ip ospf priority 1
配置OSPF接口优先级
(config-if)# ip ospf cost 19
配置OSPF接口成本
# show ip ospf neighbor
查看邻居表
# show ip ospf neighbor detail
查看邻居表摘要信息
# show ip ospf
查看OSPF配置
# show ip ospf interface type number
查看接口的数据结构
# show ip ospf interface brief
查看接口的摘要信息
# show ip ospf interface
查看接口的信息
# clear ip ospf precesses
清楚OSPF
# show ip ospf database
查看链路数据库状态
# show ip ospf adj
查看OSPF邻接信息
# show ip ospf packet
查看每个OSPF数据包信息
注:当接口Priority优先级为0时,表示不参与DR与BDR的选举。
华为H3C相关命令:
[huawei] router id 1.1.1.1
配置RrouterID
[huawei] ospf
[huawei-ospf-1] area 0
配置区域
[huawei-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[huawei-ospf-1-area-0.0.0.0] stub
[huawei-ospf-1-area-0.0.0.0] stub no-summay
[huawei-ospf-1-area-0.0.0.0] nssa
[huawei] display ospf peer
查看OSPF邻居状态
[huawei-ospf-1] import-route static type 1
导入静态路由
[huawei] display ospf abr-asbr
查看ABR/ASBR的信息
[huawei-Eth0/0/0] ospf dr-priority 1
[huawei] dispaly ospf interface
查看OSPF接口状态
本文转自 触动的风 51CTO博客,原文链接:http://blog.51cto.com/10978134/1904185