一 OSPF邻居down故障原因
本类故障的常见原因主要包括:
二 故障定位步骤
1、通过日志查看OSPF邻居Down的原因
执行display logbuffer size buffersize命令,查看如下日志信息。
如果日志信息如下:
CE12800 %%01 ospfv2comm/6/NBR_CHANGE(l):VS=0-CID=[UINT];
Neighbor changes event:neighbor status changed.
(ProcessId=[UINT], NbrIpAddr=[IPADDR], NbrEvent=[UINT],
NbrPreviousState=[UINT], NbrCurrentState=[UINT])
说明是邻居状态改变导致,重点关注关键字NbrEvent,此关键字记录的是OSPF邻居Down的原因。
OSPF邻居Down的原因一般会有以下几种:
如果日志信息如下:
CE12800 %%01 ospfv2comm/6/OSPF_RESET(l):
VS=%u-CID=[UINT];
OSPF process or area reset.
(CompCID=[UINT], Parameter=[UINT],
ResetReason=[UINT])
表示执行了reset ospf process的操作,可以获取操作记录或查看日志中是否有此操作。
2、检查链路是否故障
请执行ping命令和在接口视图下执行display this interface命令,检查设备链路是否故障(包括传输设备故障)。如果链路正常,请执行步骤3。
3、检查CPU利用率是否过高
请执行display cpu命令检查故障设备的CPU利用率是否过高。如果CPU利用率过高会导致OSPF无法正常收发协议报文从而导致邻居振荡。
如果CPU利用率过高则先解决此问题,关闭一些不必要的功能,否则执行步骤4。
4、检查接口状态是否为Up
请执行display interface [ interface-type [ interface-number ] ]命令查看接口物理层状态,如果接口物理层状态为Down请先处理接口故障问题。
(1)如果接口物理层状态是Up,请执行display ospf interface查看接口在OSPF协议下状态是否为正常状态(即接口状态为DR、BDR、DROther或P2P等正常状态)。
<HUAWEI> display ospf interface
OSPF Process 1 with Router ID 10.1.1.1
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
Interface IP Address Type State Cost Pri
Vlanif50 192.168.1.1 Broadcast DR 1 1
(2)如果OSPF下的接口为Down,请执行命令display ospf cumulative检查OSPF进程下使能的接口数是否超出了当前版本OSPF的规格,如果超出规格则减少OSPF使能的接口数。
<HUAWEI> display ospf cumulative
OSPF Process 1 with Router ID 10.1.1.1
Cumulations
IO Statistics
Type Input Output
Hello 0 86
DB Description 0 0
Link-State Req 0 0
Link-State Update 0 0
Link-State Ack 0 0
ASE: (Disabled)
LSAs originated by this router
Router: 1
Network: 0
Sum-Net: 0
Sum-Asbr: 0
External: 0
NSSA: 0
Opq-Link: 0
Opq-Area: 0
Opq-As: 0
LSAs Originated: 1 LSAs Received: 0
Routing Table:
Intra Area: 1 Inter Area: 0 ASE: 0
Up Interface Cumulate: 1
Neighbor Cumulate:
=======================================================
Neighbor cumulative data. (Process 1)
-------------------------------------------------------
Down: 0 Init: 0 Attempt: 0 2-Way: 0
Exstart: 0 Exchange: 0 Loading: 0 Full: 1
Retransmit Count:1
Neighbor cumulative data. (Total)
-------------------------------------------------------
Down: 0 Init: 0 Attempt: 0 2-Way: 0
Exstart: 0 Exchange: 0 Loading: 0 Full: 1
Retransmit Count:1
如果OSPF下的接口状态正常,即接口状态为DR、BDR、DROther或P2P等正常状态时,请执行步骤5。
5、检查两端IP地址是否在同一网段
请执行display interface interface-type [ interface-number ]命令查看两端接口的IP地址。
6、检查各接口的MTU是否一致
如果在接口上使能了ospf mtu-enable,则要求接口的MTU一致,否则OSPF邻居无法协商成功。请接口视图下执行display this interface命令查看接口MTU信息。
7、检查各接口的优先级是否非零
对于Broadcast和NBMA类型的网段,各接口的优先级至少有一个是非零的,以确保能够正确的选举出DR,否则两边的邻居状态只能达到2-Way。
执行命令display ospf interface,查看接口的优先级。
<HUAWEI> display ospf interface
OSPF Process 1 with Router ID 10.1.1.1
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
Interface IP Address Type State Cost Pri
Vlanif50 192.168.1.1 Broadcast P-2-P 1 1
8、检查两端OSPF的配置是否有错误
a、检查两端OSPF RouterID配置是否冲突
<HUAWEI> display ospf brief
OSPF Process 1 with Router ID 10.1.1.1
OSPF Protocol Information
如果冲突则修改配置,否则继续执行以下检查。
b、检查两端OSPF Area配置是否一致
<HUAWEI> display ospf interface
OSPF Process 1 with Router ID 10.1.1.1
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
Interface IP Address Type State Cost Pri
Vlanif50 192.168.1.1 Broadcast BDR 1 1
c、检查两端OSPF的其他配置是否一致
每10秒钟执行一次命令display ospf error,持续5分钟。
<HUAWEI> display ospf error
OSPF Process 1 with Router ID 10.1.1.1
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 0 : 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
扫描二维码