Querying an OSPFv2 Instance

Querying an OSPFv2 Instance
GET http://<IP_Address>/api/node/mo/sys/ospf/inst-my_ospf.json?rsp-subtree=full
{
  "totalCount": "1",
  "imdata": [
    {
      "ospfInst": {
        "attributes": {
          "adminSt": "enabled",
          "childAction": "",
          "ctrl": "",
          "dn": "sys/ospf/inst-my_ospf",
          "memAlert": "normal",
          "modTs": "2016-12-13T02:57:36.789+00:00",
          "monPolDn": "uni/fabric/monfab-default",
          "name": "my_ospf",
          "operErr": "",
          "persistentOnReload": "true",
          "status": "",
          "uid": "0"
        },
        "children": [
          {
            "ospfDom": {
              "attributes": {
                "adjChangeLogLevel": "none",
                "adminSt": "enabled",
                "bwRef": "40000",
                "bwRefUnit": "mbps",
                "childAction": "",
                "ctrl": "",
                "defMetric": "unspecified",
                "discardRoute": "ext,int",
                "dist": "110",
                "downbitIgnore": "no",
                "maxEcmp": "8",
                "modTs": "2016-12-13T02:57:36.789+00:00",
                "monPolDn": "uni/fabric/monfab-default",
                "name": "default",
                "operRtrId": "0.0.0.0",
                "operSt": "down",
                "persistentOnReload": "true",
                "rfc1583Compat": "no",
                "rn": "dom-default",
                "rtrId": "0.0.0.0",
                "status": "",
                "uid": "0"
              },
              "children": [
                {
                  "ospfGr": {
                    "attributes": {
                      "childAction": "",
                      "ctrl": "complete",
                      "gracePeriod": "60",
                      "helper": "yes",
                      "modTs": "2016-12-13T02:57:36.789+00:00",
                      "persistentOnReload": "true",
                      "restartAge": "0",
                      "restartExitReason": "none",
                      "restartStatus": "not-restarting",
                      "rn": "gr",
                      "status": "",
                      "uid": "0"
                    }
                  }
                },
                {
                  "ospfArea": {
                    "attributes": {
                      "asbrCnt": "0",
                      "authType": "unspecified",
                      "brCnt": "0",
                      "childAction": "",
                      "cost": "1",
                      "ctrl": "",
                      "id": "0.0.0.10",
                      "lsaCksumSum": "0",
                      "modTs": "2016-12-14T22:38:25.014+00:00",
                      "monPolDn": "uni/fabric/monfab-default",
                      "nssaTransRole": "candidate",
                      "nssaTransSt": "elected",
                      "nssaTransStabIntvl": "40",
                      "persistentOnReload": "true",
                      "rn": "area-0.0.0.10",
                      "status": "",
                      "type": "regular",
                      "uid": "0"
                    },
                    "children": [
                      {
                        "ospfVLink": {
                          "attributes": {
                            "childAction": "",
                            "deadIntvl": "unspecified",
                            "helloIntvl": "10",
                            "modTs": "2016-12-14T22:38:25.014+00:00",
                            "monPolDn": "uni/fabric/monfab-default",
                            "nbrRtrId": "10.1.2.3",
                            "persistentOnReload": "true",
                            "rexmitIntvl": "5",
                            "rn": "vlink-10.1.2.3",
                            "status": "",
                            "uid": "0",
                            "xmitDelay": "1"
}}}]}}]}}]}}]}

Displays OSPF information.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

show ip ospf my_ospf

Note: The property information for this example was added in Release 9.3(3).


ospfInst Properties

The following table contains information about the ospfInst 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 NameData TypeDescriptionValues
adminStnw:AdminSt
(scalar:Enum8)
The administrative state of the object or policy.SELECTION:
1 - enabled
2 - disabled
DEFAULT: enabled
childAction
mo:ModificationChildAction
scalar:Bitmask32
Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • ctrlnw:InstCtrl
    (scalar:Bitmask64)
    The control state.SELECTION:
    1 - stateful-ha
    DEFAULT: unspecified
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    memAlertnw:MemAlertLevel
    (scalar:Enum8)
    Specifies the memory alert levelSELECTION:
    0 - normal
    1 - minor
    2 - major
    3 - critical
    DEFAULT: normal
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The object that represents the OSPF instance monitoring policy information.
    namenaming:Name256
    (string:Basic)
    The name of the object.
    MAX SIZE: 128
    operErrnw:OperErrQual
    (scalar:Bitmask64)
    Operational Errors QualifierSELECTION:
    1 - init-err
    2 - mem-err
    4 - ipc-err
    8 - int-err
    16 - sock-err
    32 - proto-err
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    uid
    scalar:Uint16
    A unique identifier for this object.


    ospfDom Properties

    The following table contains information about the ospfDom 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 NameData TypeDescriptionValues
    adjChangeLogLevelospf:AdjChangeLogLevel
    (scalar:Enum8)
    Adjacency change logging levelSELECTION:
    0 - none
    1 - brief
    2 - detail
    DEFAULT: none
    adminStnw:AdminSt
    (scalar:Enum8)
    Holds the administrative state of domainSELECTION:
    1 - enabled
    2 - disabled
    DEFAULT: enabled
    bwRefospf:BwRef
    (scalar:Uint32)
    Bandwidth reference value, holds the range from 1-4000000 if unit is mbps and holds range from 1-4000 if unit is gbpsRANGE: [0, 4294967295]
    DEFAULT: 40000
    bwRefUnitospf:BwRefUnit
    (scalar:Enum8)
    Bandwidth reference unit (Mbps or Gbps)SELECTION:
    0 - mbps
    1 - gbps
    DEFAULT: mbps
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • ctrlospf:DomControl
    (scalar:Bitmask8)
    Holds the controls bfd, name-lookup, default-passive and Segment RoutingSELECTION:
    0 - unspecified
    1 - bfd
    2 - name-lookup
    4 - default-passive
    8 - segrt
    DEFAULT: unspecified
    defMetricospf:Metric
    (scalar:Uint32)
    Default metric cost for redistributed routes
    RANGE: [0 , 16777214]
    DEFAULT: unspecified
    discardRouteospf:DiscardRoute
    (scalar:Bitmask8)
    Control bits for discard-route external and internalSELECTION:
    0 - unspecified
    1 - int
    2 - ext
    DEFAULT: int,ext
    distospf:Dist
    (scalar:UByte)
    Administrative distance preference
    RANGE: [1 , 255]
    DEFAULT: 110
    downbitIgnorescalar:Bool
    Holds the status of Down-bit ignoreSELECTION: true or false
    maxEcmpospf:Ecmp
    (scalar:UByte)
    Maximum Equal Cost Multi Path(ECMP)
    RANGE: [1 , 64]
    DEFAULT: 8
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The monitoring policy attached to this observable object.
    namenaming:Name256
    (string:Basic)
    The name of the object.
    MAX SIZE: 63
    operRtrIdip:RtrId
    (address:IPv4)
    Operational router identifier for this domainValue must match ipv4 format
    operStospf:OperSt
    (scalar:Enum8)
    Operational state of Layer 3 virtualization related commands(l3vm)SELECTION:
    0 - invalid
    1 - down
    2 - up
    DEFAULT: down
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • rfc1583Compatscalar:Bool
    RFC 1583 compatibility for external path preferencesSELECTION: true or false
    rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    rtrIdip:RtrId
    (address:IPv4)
    Router identifier for this domainValue must match ipv4 format
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    uid
    scalar:Uint16
    A unique identifier for this object.


    ospfGr Properties

    The following table contains information about the ospfGr 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 NameData TypeDescriptionValues
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • ctrlospf:GrCtrl
    (scalar:Enum8)
    Graceful restart controls like planned, complete and disabled stateSELECTION:
    1 - planned-only
    2 - complete
    3 - disabled
    DEFAULT: complete
    gracePeriodospf:GrPeriod
    (scalar:Uint32)
    Graceful restart period in seconds starting from 5 to 1800
    RANGE: [5 , 1800]
    DEFAULT: 60
    helperscalar:Bool
    Graceful restart helper modeSELECTION: true or false
    DEFAULT: true
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • restartAgescalar:Uint32
    Graceful restart ageRANGE: [0, 4294967295]
    restartExitReasonospf:RestartExitReason
    (scalar:Enum8)
    Graceful restart exit reasonSELECTION:
    0 - none
    1 - in_progress
    2 - completed
    3 - timedout
    4 - topology_changed
    DEFAULT: none
    restartStatusospf:RestartStatus
    (scalar:Enum8)
    Graceful restart status includes planned, unplanned and not-restartingSELECTION:
    0 - not-restarting
    1 - planned
    2 - unplanned
    DEFAULT: not-restarting
    rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    uid
    scalar:Uint16
    A unique identifier for this object.


    ospfArea Properties

    The following table contains information about the ospfArea 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 NameData TypeDescriptionValues
    asbrCntospf:AsbrCnt
    (scalar:Uint32)
    Autonomous system border router countRANGE: [0, 4294967295]
    authTypeospf:AuthT
    (scalar:Enum8)
    Authentication type can be simple, none or md5SELECTION:
    0 - none
    1 - simple
    2 - md5
    3 - unspecified
    DEFAULT: unspecified
    brCntospf:BrCnt
    (scalar:Uint32)
    Area border router countRANGE: [0, 4294967295]
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • costospf:AreaCost
    (scalar:Uint32)
    Area cost, specifies cost for default summary LSAs, Used with nssa/stub area types
    RANGE: [0 , 16777215]
    DEFAULT: 1
    ctrlospf:AreaControl
    (scalar:Bitmask8)
    Area controls can be ABRs originate summary LSAs into other areas, redistributed LSAs or suppress forwarding addressSELECTION:
    0 - unspecified
    1 - summary
    2 - redistribute
    4 - suppress-fa
    DEFAULT: unspecified
    idospf:AreaId
    (address:IPv4)
    Area identifier to which a network or interface belongs
    RANGE: [0 , 4294967295]
    DEFAULT: 1
    lsaCksumSumospf:LsaCksumSum
    (scalar:Uint32)
    Link-state advertisement(LSA) checksum sumRANGE: [0, 4294967295]
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The monitoring policy attached to this observable object.
    nssaTransRoleospf:NssaTransRole
    (scalar:Enum8)
    Not-so-stubby area(NSSA) translator roleSELECTION:
    1 - always
    2 - candidate
    3 - never
    DEFAULT: candidate
    nssaTransStospf:NssaTransSt
    (scalar:Enum8)
    Not-so-stubby area (NSSA) translator stateSELECTION:
    1 - enabled
    2 - elected
    3 - disabled
    DEFAULT: elected
    nssaTransStabIntvlospf:NssaTransStabIntvl
    (scalar:Uint32)
    Not-so-stubby area (NSSA) translator stability interval
    RANGE: [0 , 4294967295]
    DEFAULT: 40
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    typeospf:AreaT
    (scalar:Enum8)
    Area types can be stub, nssa, backbone etc.SELECTION:
    1 - regular
    2 - stub
    3 - nssa
    DEFAULT: regular
    uid
    scalar:Uint16
    A unique identifier for this object.


    ospfVLink Properties

    The following table contains information about the ospfVLink 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 NameData TypeDescriptionValues
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • deadIntvlospf:DeadIntvl
    (scalar:Uint32)
    Dead interval, interval after which router declares that neighbor as down
    RANGE: [0 , 65535]
    DEFAULT: unspecified
    helloIntvlospf:HelloIntvl
    (scalar:Uint16)
    Hello interval, interval between hello packets that OSPF sends on the interface
    RANGE: [1 , 65535]
    DEFAULT: 10
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The monitoring policy attached to this observable object.
    nbrRtrIdip:RtrId
    (address:IPv4)
    Router id associated with virtual link neighborValue must match ipv4 format
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • rexmitIntvlospf:RexmitIntvl
    (scalar:Uint16)
    Retransmit interval, time between LSA retransmissions
    RANGE: [1 , 65535]
    DEFAULT: 5
    rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    uid
    scalar:Uint16
    A unique identifier for this object.
    xmitDelayospf:XmitDelay
    (scalar:Uint16)
    Transmit delay, estimated time needed to send an LSA update packet
    RANGE: [1 , 450]
    DEFAULT: 1


    Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

    http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

    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:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html