Skip to main content
ssriswadpong
Staff & Editor
Staff & Editor
April 13, 2022

Technical Tip: Monitor OSPF neighbor states and state changes using SNMP

  • April 13, 2022
  • 0 replies
  • 3498 views
Description

This article describes how to monitor OSPF neighbor states and neighbor events via SNMP using OID 1.3.6.1.2.1.14.10.1.6.

Scope FortiGate.
Solution

 The related OID:

 

OSPF-MIB:ospf.ospfNbrTable.ospfNbrEntry.ospfNbrState 1.3.6.1.2.1.14.10.1.6

 

The state of the relationship with this neighbor:

 

  • down (1),
  • attempt (2),
  • init (3),
  • twoWay (4),
  • exchangeStart (5),
  • exchange (6),
  • loading (7),
  • full (8)


The result comes from the output of the command.


get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 ExStart/ - 00:00:38 10.100.1.2 DialUP(tun-id:10.100.1.2)

 

OSPF-MIB:ospf.ospfNbrTable.ospfNbrEntry.ospfNbrEvents 1.3.6.1.2.1.14.10.1.7

 

Description:

 

The number of times this neighbor relationship has changed state, or an error has occurred.


The result comes from the output of the command.

 

get router info ospf neighbor detail
Neighbor 2.2.2.2, interface address 10.100.1.2
In the area 0.0.0.0 via interface DialUP(tun-id:10.100.1.2)
Neighbor priority is 1, State is ExStart, 4 state changes
DR is 0.0.0.0, BDR is 0.0.0.0
Options is 0x02 (*|-|-|-|-|-|E|-)

 

The following is an example of an snmpwalk to 1.3.6.1.2.1.14.10.1 and how the values are reflected in the output:

 

snmpwalk -v 2c -c LabCommunity 10.9.12.104 .1.3.6.1.2.1.14.10.1
iso.3.6.1.2.1.14.10.1.1.10.100.1.2.0.1 = IpAddress: 10.100.1.2  <----- Neighbor IP address.
iso.3.6.1.2.1.14.10.1.2.10.100.1.2.0.1 = INTEGER: 0
iso.3.6.1.2.1.14.10.1.3.10.100.1.2.0.1 = IpAddress: 2.2.2.2  <----- Neighbor ID.
iso.3.6.1.2.1.14.10.1.4.10.100.1.2.0.1 = INTEGER: 2
iso.3.6.1.2.1.14.10.1.5.10.100.1.2.0.1 = INTEGER: 1
iso.3.6.1.2.1.14.10.1.6.10.100.1.2.0.1 = INTEGER: 5 <----- Neighbor State exchangeStart.
iso.3.6.1.2.1.14.10.1.7.10.100.1.2.0.1 = Counter32: 4  <----- State changes.
iso.3.6.1.2.1.14.10.1.8.10.100.1.2.0.1 = Gauge32: 0
iso.3.6.1.2.1.14.10.1.9.10.100.1.2.0.1 = INTEGER: 0
iso.3.6.1.2.1.14.10.1.10.10.100.1.2.0.1 = INTEGER: 1
iso.3.6.1.2.1.14.10.1.11.10.100.1.2.0.1 = INTEGER: 2
iso.3.6.1.2.1.14.10.1.12.10.100.1.2.0.1 = INTEGER: 1
iso.3.6.1.2.1.14.10.1.13.10.100.1.2.0.1 = Gauge32: 0
iso.3.6.1.2.1.14.10.1.14.10.100.1.2.0.1 = INTEGER: 0