21.三层技术之OSPF相关命令---虚链路(3)
虚链路:是指一条通过一个非骨干区域连接到骨干区域的链路。虚链路一般用于: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-originateNSSA区域默认路由重分发
(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相关命令:
命令描述
router id 1.1.1.1配置RrouterID
ospf创建并进入OSPF进程
area 0配置区域
network 192.168.1.0 0.0.0.255宣告网段
stub配置区域为末梢区域
stub no-summay配置区域为完全末梢区域
nssa配置区域为NSSA区域
display ospf peer查看OSPF邻居状态
import-route static type 1导入静态路由
display ospf abr-asbr查看ABR/ASBR的信息
ospf dr-priority 1配置OSPF接口优先级
dispaly ospf interface查看OSPF接口状态
页:
[1]