发布时间: 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理论知识