Querying Advertised Routes
Querying Advertised Routes
GET http://<IP_Address>/api/node/mo/sys/bgp/inst/dom-default/peer-[19.0.101.1]/af-ipv4-ucast/advtdrt.json
{
"totalCount": "1",
"imdata": [
{
"bgpAdvtdRoutes": {
"attributes": {
"dn": "sys/bgp/inst/dom-default/peer-[19.0.101.1]/af-ipv4-ucast/advtdrt"
},
"children": [
{
"bgpRoute": {
"attributes": {
"bestPathId": "1",
"numPaths": "1",
"pfx": "104.0.0.0/8",
"rn": "rt-[104.0.0.0/8]",
"rtFlags": "best,rib,vpn,xmit",
"ver": "3"
},
"children": [
{
"bgpPath": {
"attributes": {
"aggr": "0.0.0.0",
"aggrAs": "0",
"asPath": "",
"clusterLst": "",
"extComm": "RT:100:1 RT:400:400",
"flags": "advertise,best-path,imported,metric",
"id": "0",
"importedRd": "rd:nn4-nn4:4240651637:0",
"localPref": "100",
"metric": "0",
"nh": "0.0.0.0",
"nhMetric": "0",
"operSt": "valid",
"origImportedRd": "unknown:unknown:0:0",
"origin": "incomplete",
"originatorId": "0.0.0.0",
"peer": "0.0.0.0",
"peerRtrId": "19.0.0.6",
"rcvdLbl": "",
"regComm": "",
"rn": "path-[0.0.0.0]-id-0-nh-[0.0.0.0]-imprd-rd:nn4-nn4:4240651637:0-origimprd-unknown:unknown:0:0",
"type": "redistribute",
"unknownAttrData": "",
"unknownAttrLen": "0",
"weight": "32768"
},
"children": [
{
"bgpExtComm": {
"attributes": {
"encap": "unknown",
"rn": "ecomm",
"rtrMac": "00:00:00:00:00:00"
},
"children": [
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:as2-nn2:400:400",
"rn": "rt-extended:as2-nn2:400:400"
}
}
},
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:as2-nn2:100:1",
"rn": "rt-extended:as2-nn2:100:1"
}
}
}
]
}
}
]
}
}
]
}
}
]
}
},
{
"warning": {
"attributes": {
"text": "backend rv=43700005, No more data. Done"
}
}
}
]
}
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output
Switch# show bgp ipv4 unicast neighbors 19.0.101.1 advertised-routes
Peer 19.0.101.1 routes for address family IPv4 Unicast:
BGP table version is 318, Local Router ID is 19.0.0.6
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup
Network Next Hop Metric LocPrf Weight Path
*>r104.0.0.0/8 0.0.0.0 0 100 32768 ?
Note: The property information for this example was added in Release 9.3(3).
bgpAdvtdRoutes Properties
The following table contains information about the bgpAdvtdRoutes 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 dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
bgpRoute Properties
The following table contains information about the bgpRoute 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 bestPathId bgp:PathId
(scalar:Uint32)Bestpath Id RANGE: [0, 4294967295] numPaths scalar:Uint32 Number of paths available RANGE: [0, 4294967295] pfx address:Ip Prefix 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. rtFlags bgp:RtFlags
(scalar:Bitmask32)Flags SELECTION: ver bgp:RtVer
(scalar:Uint32)Version of the route RANGE: [0, 4294967295]
bgpPath Properties
The following table contains information about the bgpPath 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 aggr address:Ip Aggregator Value must match ipv4 or ipv6 known format aggrAs bgp:AsnNum
(string:Basic)Aggregator AS A sequence of characters asPath string:Basic AS-Path A sequence of characters clusterLst string:Basic Cluster-List A sequence of characters extComm string:Basic Extcommunity A sequence of characters flags bgp:PathFlags
(scalar:Bitmask32)Path flags SELECTION: id bgp:PathId
(scalar:Uint32)Path id RANGE: [0, 4294967295] importedRd base:Community Imported route distinguisher localPref rtmap:LocalPref
(scalar:Uint32)Local preference RANGE: [0, 4294967295] metric rtmap:Metric
(scalar:Uint32)Metric RANGE: [0, 4294967295] nh address:Ip Next hop Value must match ipv4 or ipv6 known format nhMetric bgp:Metric
(scalar:Uint32)Nexthop metric RANGE: [0, 4294967295] operSt bgp:PathSt
(scalar:Enum8)The path status. SELECTION: origImportedRd base:Community Original Imported Src Route Distinguisher origin bgp:Origin
(scalar:Enum8)Origin SELECTION: originatorId address:Ip Originator Id Value must match ipv4 or ipv6 known format peer address:Ip Peer source of route path Value must match ipv4 or ipv6 known format peerRtrId string:Basic Peer router id ipaddress A sequence of characters rcvdLbl string:Basic Received label A sequence of characters regComm string:Basic The regular community. 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. type bgp:PathT
(scalar:Enum8)Path type SELECTION: unknownAttrData string:Basic Unknown Attribute Data A sequence of characters unknownAttrLen bgp:UnknownAttrLen
(scalar:Uint32)Unknown Attribute Length weight rtmap:Weight
(scalar:Uint16)Weight RANGE: [0, 65535]
bgpExtComm Properties
The following table contains information about the bgpExtComm 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 encap base:Encap Encapsulation SELECTION: unknown, vlan-%d or vxlan-%d rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. rtrMac address:MAC Router Mac address from nve Value must match MM:MM:MM:SS:SS:SS format
bgpExtCommRt Properties
The following table contains information about the bgpExtCommRt 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 community base:Community Community value rn
reference:BinRNIdentifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
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: