How to determine which interfaces are connected to the backbone
The OID that identifies which areas to which the interfaces of a device are connected uses the following format:
<OSPF MIB OID>.<OSPF interface IP address>.<OSPF addressLess interface flag>
The index for the OID is <OSPF interace IP address>.<OSPF addressLess interface flag>.
So, to check the OID containing the OSPF interfaces area ID, you need to find the OID with the following components:
<OSPF MIB OID> = .1.3.6.1.2.1.14.7.1.3
<OSPF interface IP address> = x.x.x.x
<OSPF addressLess interface flag> = a
It would look like the following in the SNMP MIB walk:
.1.3.6.1.2.1.14.7.1.3.x.x.x.x.a: <value>
In the SNMP MIB walk output above, <value> represents the area ID that the interface is connected. For the backbone, the <value> will be 0. For any other area ID, the <value> will be calculated as follows:
((a*256+b)*256+c)*256+d
where a,b,c,d come from the area ID.
For example, an area ID of 1.2.3.4 would have a <value> of a=1, b=2, c=3, d=4 and be calculated as follows:
(1*256+2)*256+3)*256+4) = 1540
For example consider an interface on IP address 10.16.21.45, where the interface is not IP addressless and the interface is connected to area 0.0.0.0, the SNMP MIB walk output for this device would be the following:
1.3.6.1.2.1.14.7.1.3.10.16.21.45.0: 0
If a device does have an IP addressless interface, then the <OSPF interface IP address> will be the interface IfIndex, and the <OSPF addressLess interface flag> will be set to 1.
For example lets assume we have a device that is an area boarder router (ABR) and it has an interface that is IP addressless that is connected to the backbone. Lets say this interface has an IfIndex = 5. Then the ospfIfAreaId oid would have the following components:
<OSPF MIB OID> = .1.3.6.1.2.1.14.7.1.3
<OSPF interface IP address> = <IfIndex> = w.x.y.z
<OSPF addressLess interface flag> = a
It would look like the following in the MIB walk: .1.3.6.1.2.1.14.7.1.3.w.x.y.z.a: <value>
For our example the values of the components would be as follows:
<OSPF MIB OID> = .1.3.6.1.2.1.14.7.1.3
<OSPF interace IP address> = <IfIndex> = 0.0.0.5
<OSPF addressLess interface flag> = 1
So the ospfIfAreaId would look like the following in the SNMP MIB walk:
.1.3.6.1.2.1.14.7.1.3.0.0.0.5.1: 0
When the issue described by this article is encountered, look for OIDs with the following formats:
.1.3.6.1.2.1.14.7.1.3.W.X.Y.Z.1: 0
OR
.1.3.6.1.2.1.14.7.1.3.W.X.Y.Z.0: 0
If neither of these formats are present, then the device is not correctly configured and the Smarts alert is correct.