Querying Forwarding Route Information
Querying Forwarding Route Information
GET http://<IP_Address>/api/mo/sys/ipfib.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=1000&batch-id=1
{
"totalCount": "1",
"imdata": [
{
"ipfibEntity": {
"attributes": {
"childAction": "",
"dn": "sys/ipfib",
"modTs": "2019-05-09T19:26:48.407+00:00",
"status": ""
},
"children": [
{
"ipfibDom": {
"attributes": {
"name": "",
"rn": "dom-"
},
"children": [
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "ff00::/8",
"rn": "pfx-[ff00::/8]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "fe80::/10",
"rn": "pfx-[fe80::/10]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "0.0.0.0",
"rn": "pfx-[0.0.0.0]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "127.0.0.0/8",
"rn": "pfx-[127.0.0.0/8]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "::/127",
"rn": "pfx-[::/127]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "255.255.255.255",
"rn": "pfx-[255.255.255.255]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
}
]
}
},
{
"ipfibDom": {
"attributes": {
"name": "default",
"rn": "dom-default"
},
"children": [
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "2001::100:10:2:0/112",
"rn": "pfx-[2001::100:10:2:0/112]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "eth1/96",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "ATTACHED"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "fe80::/10",
"rn": "pfx-[fe80::/10]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "::/127",
"rn": "pfx-[::/127]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "2001::100:10:2:2",
"rn": "pfx-[2001::100:10:2:2]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.30.2.0/24",
"rn": "pfx-[100.30.2.0/24]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "1.10.10.20",
"nhIntf": "eth1/97",
"outLabel": "27002 ",
"outOperation": "PUSH",
"partialInst": "",
"rn": "nh-[1.10.10.20]",
"routeType": "DEFAULT"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.20.2.0/24",
"rn": "pfx-[100.20.2.0/24]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "1.10.10.20",
"nhIntf": "eth1/97",
"outLabel": "3",
"outOperation": "POP",
"partialInst": "",
"rn": "nh-[1.10.10.20]",
"routeType": "DEFAULT"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.10.2.0/24",
"rn": "pfx-[100.10.2.0/24]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "eth1/96",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "ATTACHED"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.10.10.255",
"rn": "pfx-[1.10.10.255]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "eth1/97",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "ATTACHED"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.10.2.0",
"rn": "pfx-[100.10.2.0]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "255.255.255.255",
"rn": "pfx-[255.255.255.255]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "127.0.0.0/8",
"rn": "pfx-[127.0.0.0/8]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV6",
"partialInst": "no",
"pfxAddr": "ff00::/8",
"rn": "pfx-[ff00::/8]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "::",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.1.1.10",
"rn": "pfx-[1.1.1.10]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "0.0.0.0",
"rn": "pfx-[0.0.0.0]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.1.1.20",
"rn": "pfx-[1.1.1.20]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "1.10.10.20",
"nhIntf": "eth1/97",
"outLabel": "3",
"outOperation": "POP",
"partialInst": "",
"rn": "nh-[1.10.10.20]",
"routeType": "DEFAULT"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.1.1.30",
"rn": "pfx-[1.1.1.30]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "1.10.10.20",
"nhIntf": "eth1/97",
"outLabel": "24030 ",
"outOperation": "PUSH",
"partialInst": "",
"rn": "nh-[1.10.10.20]",
"routeType": "DEFAULT"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.10.10.0/24",
"rn": "pfx-[1.10.10.0/24]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "eth1/97",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "ATTACHED"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.10.2.255",
"rn": "pfx-[100.10.2.255]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "eth1/96",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "ATTACHED"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "100.10.2.2",
"rn": "pfx-[100.10.2.2]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.10.10.20",
"rn": "pfx-[1.10.10.20]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "1.10.10.20",
"nhIntf": "eth1/97",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[1.10.10.20]",
"routeType": "DEFAULT"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.10.10.0",
"rn": "pfx-[1.10.10.0]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "null0",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "DROP"
}
}
}
]
}
},
{
"ipfibRoute": {
"attributes": {
"addrType": "IPV4",
"partialInst": "no",
"pfxAddr": "1.10.10.10",
"rn": "pfx-[1.10.10.10]"
},
"children": [
{
"ipfibRouteNextHopInfo": {
"attributes": {
"nhAddr": "0.0.0.0",
"nhIntf": "supeth1",
"outLabel": "",
"outOperation": "DEFAULT",
"partialInst": "",
"rn": "nh-[0.0.0.0]",
"routeType": "RECEIVE"
}
}
}
]
}
},
{
"ipfibLabel": {
"attributes": {
"fec": "100.30.2.0/24",
"fectype": "DEFAULT",
"label": "26002",
"rn": "label-26002",
"tableId": "1"
}
}
},
{
"ipfibLabel": {
"attributes": {
"fec": "100.20.2.0/24",
"fectype": "DEFAULT",
"label": "25002",
"rn": "label-25002",
"tableId": "1"
}
}
},
{
"ipfibLabel": {
"attributes": {
"fec": "1.1.1.30/32",
"fectype": "DEFAULT",
"label": "23030",
"rn": "label-23030",
"tableId": "1"
}
}
},
{
"ipfibLabel": {
"attributes": {
"fec": "1.1.1.20/32",
"fectype": "DEFAULT",
"label": "23020",
"rn": "label-23020",
"tableId": "1"
}
}
}
]
}
}
]
}
},
{
"warning": {
"attributes": {
"text": "backend rv=43700005, Done, no more data."
}
}
}
]
}
Note: This example was added in Cisco NX-OS Release 9.3(1).
CLI Output Switch(config)# show forwarding ipv4 route
slot 1
=======
IPv4 routes for table default/base
------------------+-----------------------------------------+----------------------+-----------------+-----------------
Prefix | Next-hop | Interface | Labels | Partial Install
------------------+-----------------------------------------+----------------------+-----------------+-----------------
0.0.0.0/32 Drop Null0
127.0.0.0/8 Drop Null0
255.255.255.255/32 Receive sup-eth1
1.1.1.10/32 Receive sup-eth1
*1.1.1.20/32 1.10.10.20 Ethernet1/97 POP
*1.1.1.30/32 1.10.10.20 Ethernet1/97 PUSH 24030
1.10.10.0/24 Attached Ethernet1/97
1.10.10.0/32 Drop Null0
1.10.10.10/32 Receive sup-eth1
1.10.10.20/32 1.10.10.20 Ethernet1/97
1.10.10.255/32 Attached Ethernet1/97
100.10.2.0/24 Attached Ethernet1/96
100.10.2.0/32 Drop Null0
100.10.2.2/32 Receive sup-eth1
100.10.2.255/32 Attached Ethernet1/96
*100.20.2.0/24 1.10.10.20 Ethernet1/97 POP
*100.30.2.0/24 1.10.10.20 Ethernet1/97 PUSH 27002
CLI Output Switch(config)# show forwarding ipv6 route
slot 1
=======
IPv6 routes for table default/base
0::/127
Drop, Null0
fe80::/10
Receive sup-eth1
ff00::/8
Drop, Null0
2001::100:10:2:0/112
Attached, Ethernet1/96
2001::100:10:2:2/128
Receive sup-eth1
CLI Output Switchconfig)# show forwarding mpls
slot 1
=======
--------+-----------+-------------------+----------------+-------------+-------
Local |Prefix |FEC |Next-Hop |Interface |Out
Label |Table Id |(Prefix/Tunnel id) | | |Label
--------+-----------+-------------------+----------------+-------------+-------
23020 |0x1 |1.1.1.20/32 |1.10.10.20 |Eth1/97 |0 SWAP
23030 |0x1 |1.1.1.30/32 |1.10.10.20 |Eth1/97 |24030 SWAP
25002 |0x1 |100.20.2.0/24 |1.10.10.20 |Eth1/97 |0 SWAP
26002 |0x1 |100.30.2.0/24 |1.10.10.20 |Eth1/97 |27002 SWAP
492287 | |
Note: The property information for this example was added in Release 9.3(3).
ipfibEntity Properties
The following table contains information about the ipfibEntity 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 childAction
mo:ModificationChildAction
scalar:Bitmask32Delete or ignore. For internal use only. SELECTION:
dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. modTs mo:TStamp
(scalar:Date)The time when this object was last modified. SELECTION: status mo:ModificationStatus
(scalar:Bitmask32)The upgrade status. This property is for internal use only. SELECTION:
ipfibDom Properties
The following table contains information about the ipfibDom 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 name naming:Name256
(string:Basic)The name of the object. rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
ipfibRoute Properties
The following table contains information about the ipfibRoute 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 addrType ipfib:AddressType
(scalar:Enum8)Address Family. Ipv4 or Ipv6 SELECTION: partialInst scalar:Bool Identifies if the prefix is partially installed. SELECTION: true or false pfxAddr address:Ip Prefix address. IPv4 or IPv6 Value must match ipv4 or ipv6 known format rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
ipfibRouteNextHopInfo Properties
The following table contains information about the ipfibRouteNextHopInfo 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 nhAddr address:Ip NextHop IP address. It could be a connected or a remote Next Hop Value must match ipv4 or ipv6 known format nhIntf nw:IfId
(base:IfIndex)NextHop Interface ID. The port on the switch where the next hop ip address is learnt Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 outLabel string:Basic Outgoing label Stack for MPLS next hops A sequence of characters outOperation ipfib:OutOperEnum
(scalar:Enum8)Operation performed on outgoing packets for MPLS next hops. Push/Swap/Pop SELECTION: partialInst string:Basic Identifies if the route is partially installed A sequence of characters rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. routeType ipfib:SpecialAdj
(scalar:Enum8)Special route type. Marks if its a drop/direct/supervisor route SELECTION:
ipfibLabel Properties
The following table contains information about the ipfibLabel 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 fec string:Basic Typicaly the Destination IP address A sequence of characters fectype ipfib:FecType
(scalar:Enum8)The type of Forwarding Equivalence Class SELECTION: label scalar:Uint32 Segment Routing Label value RANGE: [0, 4294967295] rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. tableId scalar:Uint32 Prefix/Table ID. Usually the VRF Id 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: