路由器故障:OSPF鄰居無法建立
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定時器的時間不一致。
【編輯推薦】