OSPF邻居无法建立的故障解决步骤如下:
网络环境
在图中的网络中配置OSPF协议,RouterA由版本5.30-23122004升级到RouterA-VRP5.30-23138007版本 。
OSPF组网图

配置完成后,发现RouterA和RouterB无法建立邻居关系 。
故障分析
步骤 1 在RouterB上执行display ospf error命令,可以看到Hello timer mismatch这项的数字增加很快 。
以RouterB的显示为例 。
[RouterB]display ospf error
-
-
- OSPF Process 1 with Router ID 2.2.2.2
-
- OSPF error statistics
- General packet errors:
-
- 0 : IP: received my own packet 0 : Bad packet
-
- 0 : Bad version 0 : Bad checksum
-
- 0 : Bad area id 0 : Drop on unnumbered interface
-
- 0 : Bad virtual link 0 : Bad authentication type
-
- 0 : Bad authentication key 0 : Packet too small
-
- 0 : Packet size > ip length 0 : Transmit error
-
- 0 : Interface down 0 : Unknown neighbor
- HELLO packet errors:
-
- 0 : Netmask mismatch 593 : Hello timer mismatch
-
- 0 : Dead timer mismatch 0 : Extern option mismatch
-
- 0 : Router id confusion 0 : Virtual neighbor unknown
-
- 0 : NBMA neighbor unknown 0 : Invalid Source Address
步骤 2 在RouterA和RouterB上分别执行display ospf brief命令,检查OSPF的概要信息,查看RouterA端口上OSPF状态,发现Hello时间为30秒,;查看RouterB端口上的ospf状态,发现Hell0时间为10秒 。
以RouterB的显示为例 。
- [RouterB]display ospf brief
-
- OSPF Process 1 with Router ID 2.2.2.2
-
- OSPF Protocol Information
- RouterID: 2.2.2.2 Border Router:
-
- Route Tag: 0
-
- Multi-VPN-Instance is not enabled
-
- Graceful-restart capability: disabled
-
- Helper support capability : not configured
-
- Applications Supported: MPLS Traffic-Engineering
-
- Spf-schedule-interval: 5 s
-
- Default ASE parameters: Metric: 1 Tag: 1 Type: 2
-
- Route Preference: 10
-
- ASE Route Preference: 150
-
- SPF Computation Count: 24
-
- RFC 1583 Compatible
-
- Retransmission limitation is disabled
-
- Area Count: 1 Nssa Area Count: 0
-
- ExChange/Loading Neighbors: 0
-
- Area: 0.0.0.0 (MPLS TE not enabled)
-
- Authtype: None Area flag: Normal
-
- SPF scheduled Count: 24
-
- ExChange/Loading Neighbors: 0
- Interface: 10.1.1.5 (GigabitEthernet1/0/0)
-
- Cost: 1 State: DR Type: Broadcast MTU: 1500
-
- Priority: 1
-
- Designated Router: 10.1.1.5
-
- Backup Designated Router: 0.0.0.0
-
- Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
这样,邻居之间的的Hello定时器的时间不一致,两者之间的邻居关系当然也就无法建立 。
----结束
处理步骤
在RouterA上执行以下操作 。
步骤 1 执行命令system-view,进入系统视图 。
步骤 2 执行命令interface interface-type interface-number,进入接口视图 。
步骤 3 执行命令ospf timer hello interval,配置接口发送Hello报文的时间间隔 。其中Hello时间为10s
步骤 4 执行命令return退回到用户视图,执行命令save命令,保存对配置的修改 。
OSPF邻居之间的Hello定时器的时间间隔要保持一致 。
Hello定时器的值与路由收敛速度、网络负荷大小成反比 。
在同一接口上失效时间应至少为Hello间隔时间的4倍 。
修改了网络类型后,Hello与Dead定时器都将恢复缺省值 。
----结束
完成上述操作后,RouterA和RouterB邻居关系可以正常建立,故障排除 。
案例总结
OSPF邻居无法建立的原因可能有以下几种:
1. 接口未使能OSPF协议 。
2.物理层、链路层故障 。
3.两端设备禁止OSPF协议报文,或者中间设备禁止OSPF协议报文 。
4.互联端口IP地址的子网掩码不一致 。
5.两端设备之间的的Hello定时器的时间不一致 。