Querying IP OSPF Neighbor Details
You need to make two DME requests to view the same information found in the show ip ospf neighbors
output. One request for the neighbor-related statistics (ospfAdjStats) and the other for dynamically learned endpoints (ospfAdjEp).
Querying IP OSPF Neighbor Details (DME Request 1)
Querying IP OSPF Neighbor Details (DME Request 1)
GET http://<IP_Address>/api/mo/sys/ospf/inst-1/dom-default/if-[eth1/38]/adj-2.2.2.2.json
{
"totalCount": "1",
"imdata": [
{
"ospfAdjEp": {
"attributes": {
"area": "0.0.0.0",
"bdr": "12.2.1.2",
"bfdSt": "down",
"dbdOptions": "66",
"dn": "sys/ospf/inst-1/dom-default/if-[eth1/38]/adj-2.2.2.2",
"dr": "12.2.1.1",
"flags": "all-dbds-acked,all-dbds-sent",
"helloOptions": "2",
"id": "2.2.2.2",
"ifId": "0",
"name": "",
"operSt": "full",
"peerIp": "12.2.1.2",
"peerName": "",
"prio": "1"
}}}]}
GET http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/ospf-items/inst-items/Inst-list=1/dom-items/Dom-list=default/if-items/If-list=eth1%2F38/adj-items/AdjEp-list=2.2.2.2
<AdjEp-list>
<id>2.2.2.2</id>
<adjstats-items>
<dbdSeqNum>598158479</dbdSeqNum>
<deadTimerExpTs>2018-01-05T15:59:47.584+00:00</deadTimerExpTs>
<lastNonHelloPktTs>2018-01-05T15:35:59.200+00:00</lastNonHelloPktTs>
<lastStChgTs>2018-01-05T15:05:39.557+00:00</lastStChgTs>
<lsaReqRexmitCnt>0</lsaReqRexmitCnt>
<outstandingLsaCnt>0</outstandingLsaCnt>
<reqLsaCnt>0</reqLsaCnt>
<stChgCnt>5</stChgCnt>
</adjstats-items>
<area>0.0.0.0</area>
<bdr>12.2.1.2</bdr>
<bfdSt>down</bfdSt>
<dbdOptions>66</dbdOptions>
<dr>12.2.1.1</dr>
<flags>all-dbds-acked,all-dbds-sent</flags>
<gr-items>
<helperAge>0</helperAge>
<helperExitQual>none</helperExitQual>
<helperSt>not-helping</helperSt>
</gr-items>
<helloOptions>2</helloOptions>
<ifId>0</ifId>
<name/>
<operSt>full</operSt>
<peerIp>12.2.1.2</peerIp>
<peerName/>
<prio>1</prio>
</AdjEp-list>
This DME request displays the dynamically learned endpoints for a neighbor.
Note: The property information for this example was added in Release 9.3(3).
ospfAdjEp Properties
The following table contains information about the ospfAdjEp properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name Data Type Description Values area ospf:AreaId
(address:IPv4)OSPF adjacency operational area ID bdr ospf:DesigAddr
(address:Ip)Backup designated router address(BDR) Value must match ipv4 or ipv6 known format bfdSt ospf:BfdOperSt
(scalar:Enum8)Operational Bidirectional Forwarding Detection(BFD) State SELECTION: dbdOptions ospf:Options
(scalar:Uint32)Peer options from database descriptor(DBD) packet RANGE: [0, 4294967295] dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. dr ospf:DesigAddr
(address:Ip)Designated router address(DR) Value must match ipv4 or ipv6 known format flags ospf:AdjFlags
(scalar:Bitmask16)Adjacency flags can be master-self,all-dbds-sent,all-dbds-acked and peer-gr-helper SELECTION: helloOptions ospf:Options
(scalar:Uint32)Peer options from hello packet RANGE: [0, 4294967295] id ospf:AdjId
(ip:RtrId)OSPF adjacency neighbor's router id ifId ospf:AdjIfId
(scalar:Uint32)Neighbor's interface id RANGE: [0, 4294967295] name naming:Name256
(string:Basic)The name of the object. operSt ospf:AdjOperSt
(scalar:Enum8)Operational state of OSPF adjacency SELECTION: peerIp address:Ip Adjacency peer IP address Value must match ipv4 or ipv6 known format peerName string:Basic OSPf adjacency Neighbor name A sequence of characters prio ospf:DesigPrio
(scalar:UByte)Operational neighbor priority
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Querying IP OSPF Neighbor Details (DME Request 2)
Querying IP OSPF Neighbor Details (DME Request 2)
GET http://<IP_Address>/api/mo/sys/ospf/inst-1/dom-default/if-[eth1/38]/adj-2.2.2.2/adjstats.json
{
"totalCount": "1",
"imdata": [
{
"ospfAdjStats": {
"attributes": {
"dbdSeqNum": "598158479",
"deadTimerExpTs": "2018-01-05T16:10:04.878+00:00",
"dn": "sys/ospf/inst-1/dom-default/if-[eth1/38]/adj-2.2.2.2/adjstats",
"lastNonHelloPktTs": "2018-01-05T16:06:20.123+00:00",
"lastStChgTs": "2018-01-05T15:05:39.557+00:00",
"lsaReqRexmitCnt": "0",
"outstandingLsaCnt": "0",
"reqLsaCnt": "0",
"stChgCnt": "5"
}}}]}
This DME request displays the neighbor-related statistics (ospfAdjStats).
Note: This example was added in Cisco NX-OS Release 7.0(3)I7(3).
CLI Output switch# show ip ospf neighbors
OSPF Process ID 1 VRF default
Total number of neighbors: 1
Neighbor IDPri StateUp TimeAddressInterface
2.2.2.21 FULL/BDR00:00:16 12.2.1.2Eth1/38
CLI Output switch# show ip ospf neighbors 2.2.2.2 detail
Neighbor 2.2.2.2, interface address 12.2.1.2
Process ID 1 VRF default in area 0.0.0.0 via interface Ethernet1/38
State is FULL, 5 state changes, last change 00:58:08
Neighbor priority is 1
DR is 12.2.1.1 BDR is 12.2.1.2
Hello options 0x2,dbd options 0x42
Last non-hello packet received 00:27:48
Dead timer due in 00:00:40
Note: The property information for this example was added in Release 9.3(3).
ospfAdjStats Properties
The following table contains information about the ospfAdjStats properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name Data Type Description Values dbdSeqNum ospf:Counter32
(scalar:Uint32)Database descriptor(DBD) sequence number RANGE: [0, 4294967295] deadTimerExpTs scalar:Date Timestamp of the dead timer expiry DATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. lastNonHelloPktTs scalar:Date Timestamp of the last non hello packet received DATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z lastStChgTs scalar:Date Timestamp of the latest state change DATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z lsaReqRexmitCnt ospf:Counter32
(scalar:Uint32)Number of retransmissions of LSA request RANGE: [0, 4294967295] outstandingLsaCnt ospf:Counter32
(scalar:Uint32)Number of outstanding LSAs from last request RANGE: [0, 4294967295] reqLsaCnt ospf:Counter32
(scalar:Uint32)Number of link-state advertisement(LSAs) on request list RANGE: [0, 4294967295] stChgCnt ospf:Counter32
(scalar:Uint32)Number of states changed during OSPF adjacency RANGE: [0, 4294967295]
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide: