發布時間: 2017-06-16 15:24:08
首先需要使用的命令是Show ip ospf interface,這條命令輸出信息中能夠影響到OSPF鄰居關系建立的有幾個因素 :
1、接口是否UP,如果down掉的話請做鏈路檢查。
2、鏈路兩側OSPF路由器的區域是否一致,如果不一致請將區域改為一致
3、鏈路兩側OSPF路由器的接口的hello間隔是否一致,如果不一致請改為一致。
4、鏈路兩側OSPF路由器的接口IP掩碼是否一致。
若是遇到建立鄰居的對端設備無法登陸查看,如何是好!沒關系,教你使用debugging功能,看透協議傳輸的關鍵值。
首先第一步、在路由器上打開debugging信息顯示:<Huawei>terminal debugging
第二、指定監聽報文類型 <huawei> debugging ospf packet //使能對ospf報文的監聽
<huawei>debugging ospf packet
<huawei>
May 4 2017 16:20:32.653.1-08:00 huawei RM/6/RMDEBUG:
FileID: 0xd0178025 Line: 559 Level: 0x20
OSPF 1: SEND Packet. Interface: GigabitEthernet0/0/1
<huawei>
May 4 2017 16:20:32.653.2-08:00 huawei RM/6/RMDEBUG: Source Address: 10.5.40.3
0
<huawei>
May 4 2017 16:20:32.653.3-08:00 huawei RM/6/RMDEBUG: Destination Address: 224.
0.0.5
<huawei>
May 4 2017 16:20:32.653.4-08:00 huawei RM/6/RMDEBUG: Ver# 2, Type: 1 (Hello)
<huawei>
May 4 2017 16:20:32.653.5-08:00 huawei RM/6/RMDEBUG: Length: 44, Router: 10.5.
1.29
<huawei>
May 4 2017 16:20:32.653.6-08:00 huawei RM/6/RMDEBUG: Area: 0.0.0.2, Chksum: 0
<huawei>
May 4 2017 16:20:32.653.7-08:00 huawei RM/6/RMDEBUG: AuType: 02
<huawei>
May 4 2017 16:20:32.653.8-08:00 huawei RM/6/RMDEBUG: Key(ascii): * * * * * * *
*
<huawei>
May 4 2017 16:20:32.653.9-08:00 huawei RM/6/RMDEBUG: Net Mask: 255.255.255.0
<huawei>
May 4 2017 16:20:32.653.10-08:00 huawei RM/6/RMDEBUG: Hello Int: 10, Option: _
N_
<huawei>
May 4 2017 16:20:32.653.11-08:00 huawei RM/6/RMDEBUG: Rtr Priority: 1, Dead In
t: 40
<huawei>
May 4 2017 16:20:32.653.12-08:00 huawei RM/6/RMDEBUG: DR: 10.5.40.30
<huawei>
May 4 2017 16:20:32.653.13-08:00 huawei RM/6/RMDEBUG: BDR: 0.0.0.0
<huawei>
May 4 2017 16:20:32.653.14-08:00 huawei RM/6/RMDEBUG: # Attached Neighbors: 0
<huawei>
May 4 2017 16:20:32.653.15-08:00 huawei RM/6/RMDEBUG:
<huawei>
May 4 2017 16:20:32.823.1-08:00 huawei RM/6/RMDEBUG:
FileID: 0xd0178024 Line: 2236 Level: 0x20
OSPF 1: RECV Packet. Interface: GigabitEthernet0/0/1
<huawei>
May 4 2017 16:20:32.823.2-08:00 huawei RM/6/RMDEBUG: Source Address: 10.5.40.3
4
<huawei>
May 4 2017 16:20:32.823.3-08:00 huawei RM/6/RMDEBUG: Destination Address: 224.
0.0.5
<huawei>
May 4 2017 16:20:32.823.4-08:00 huawei RM/6/RMDEBUG: Ver# 2, Type: 1 (Hello)
<huawei>
May 4 2017 16:20:32.823.5-08:00 huawei RM/6/RMDEBUG: Length: 44, Router: 10.5.
1.33
<huawei>
May 4 2017 16:20:32.823.6-08:00 huawei RM/6/RMDEBUG: Area: 0.0.0.2, Chksum: 0
<huawei>
May 4 2017 16:20:32.823.7-08:00 huawei RM/6/RMDEBUG: AuType: 02
<huawei>
May 4 2017 16:20:32.823.8-08:00 huawei RM/6/RMDEBUG: Key(ascii): * * * * * * *
*
<huawei>
May 4 2017 16:20:32.823.9-08:00 huawei RM/6/RMDEBUG: Net Mask: 255.255.255.0
<huawei>
May 4 2017 16:20:32.823.10-08:00 huawei RM/6/RMDEBUG: Hello Int: 15, Option: _
N_
<huawei>
May 4 2017 16:20:32.823.11-08:00 huawei RM/6/RMDEBUG: Rtr Priority: 1, Dead In
t: 60
<huawei>
May 4 2017 16:20:32.823.12-08:00 huawei RM/6/RMDEBUG: DR: 10.5.40.34
<huawei>
May 4 2017 16:20:32.823.13-08:00 huawei RM/6/RMDEBUG: BDR: 0.0.0.0
<huawei>
May 4 2017 16:20:32.823.14-08:00 huawei RM/6/RMDEBUG: # Attached Neighbors: 0
<huawei>
May 4 2017 16:20:32.823.15-08:00 huawei RM/6/RMDEBUG:
<huawei>
<huawei>undo terminal debugging //使用完成記得要關閉debugging,避免資源占用。
由debugging監聽得出顯示,兩端之間的ospf hello time時間值不一致,導致的OSPF鄰居無法建立,此時,需修正其中一端的hello time時間為一致即可。雙方的HELLO報文中的hello間隔不一致。且根據輸出信息比對,可以判定其他影響OSPF建立鄰居的因素如:接口掩碼,區域號,區域類型設置都是相同的。
解決方案更改相應OSPF的配置,使其于建立OSPF的鄰居關系
system-view //進入配置修改模式
interface GigabitEthernet0/0/1 //進入接口視圖下
ospf timer hello 10 //將接口hello間隔修改為10秒
修改完成之后進行驗證
驗證命令:執行:dis ospf peer //查看鄰居是否正常建立。
在網絡排錯中,不僅僅是只有鏡像端口進行抓包分析,還可以直接在設備上對報文協議分析,使用強大的debugging功能就能做到快速定位故障點。高效快捷完成排錯。
上一篇: {思科CCNA-SEC}網絡監聽原理基礎
下一篇: zabbix理論知識