show bgp ip unicast

show bgp ip unicast

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_afi": {
                                "ROW_afi": {
                                    "TABLE_safi": {
                                        "ROW_safi": {
                                            "TABLE_rd": {
                                                "ROW_rd": {
                                                    "TABLE_prefix": {
                                                        "ROW_prefix": [
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.255.1/32"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.50.0/24"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.90.128/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.0/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.8/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "0.0.0.0", 
                                                                        "localpref": "100", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "invalid", 
                                                                        "statuscode": {}, 
                                                                        "type": "local", 
                                                                        "typecode": "l", 
                                                                        "weight": "32768"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.166.4/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "33.33.33.33/32"
                                                            }
                                                        ]
                                                    }
                                                }
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "router-id": "7.57.255.2", 
                                            "safi": "1", 
                                            "table-version": "8030"
                                        }
                                    }, 
                                    "afi": "1"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast 
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 8030, Local Router ID is 7.57.255.2
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
 l7.57.0.0/16        0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e7.57.255.1/32      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.57.0.0/16       0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e10.57.50.0/24      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.100.90.128/30   0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.0/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.8/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
  l10.100.166.4/30    0.0.0.0                           100      32768 i
&e33.33.33.33/32     10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i


show bgp ip unicast neighbors

show bgp ip unicast neighbors

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast neighbors ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_neighbor": {
                        "ROW_neighbor": [
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M7S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M7S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030", 
                                                "thirdpartynexthop": "false"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8623", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "description": "REX", 
                                "elapsedtime": "P7DT11H59M29S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "10", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ibgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "10.40.100.57", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "65057", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:49", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "sourceif": "loopback0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "TABLE_inpolicy": {
                                                    "ROW_inpolicy": {
                                                        "inpolicyhandle": "true", 
                                                        "inpolicyname": "RM-MIL-IN", 
                                                        "inpolicynr": "2", 
                                                        "inpolicytype": "route-map"
                                                    }
                                                }, 
                                                "TABLE_outpolicy": {
                                                    "ROW_outpolicy": {
                                                        "outpolicyhandle": "true", 
                                                        "outpolicyname": "RM-MIL-OUT", 
                                                        "outpolicynr": "2", 
                                                        "outpolicytype": "route-map"
                                                    }
                                                }, 
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT11H59M36S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorsenttime": "P7DT11H59M36S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "182584", 
                                "bytessent": "174450", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8215", 
                                "connectedif": "Ethernet1/1", 
                                "connsdropped": "1", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT9H26M1S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "7", 
                                "keepaliverecvd": "9181", 
                                "keepalivesent": "9146", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "9186", 
                                "msgsent": "9148", 
                                "neighbor": "10.100.90.130", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "session closed", 
                                "peerresettime": "P7DT9H26M1S", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "300", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:33", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "4", 
                                "updatessent": "14", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_addpathscapaf": {
                                    "ROW_addpathscapaf": {
                                        "TABLE_addpathscapsaf": {
                                            "ROW_addpathscapsaf": {
                                                "addpathscap-af-name": "IPv4 Unicast", 
                                                "addpathscap-safi": "1", 
                                                "addpathsrecvcap-adv": "true", 
                                                "addpathsrecvcap-recv": "false", 
                                                "addpathssendcap-adv": "true", 
                                                "addpathssendcap-recv": "false"
                                            }
                                        }, 
                                        "addpathscap-afi": "1"
                                    }
                                }, 
                                "TABLE_af": {
                                    "ROW_af": {
                                        "TABLE_saf": {
                                            "ROW_saf": {
                                                "af-advertised": "true", 
                                                "af-name": "IPv4 Unicast", 
                                                "af-recvd": "true", 
                                                "af-safi": "1"
                                            }
                                        }, 
                                        "af-afi": "1"
                                    }
                                }, 
                                "TABLE_capextendednhaf": {
                                    "ROW_capextendednhaf": {
                                        "TABLE_capextendednhsaf": {
                                            "ROW_capextendednhsaf": {
                                                "capextendednh-af-name": "IPv4 Unicast", 
                                                "capextendednh-safi": "1"
                                            }
                                        }, 
                                        "capextendednh-afi": "1"
                                    }
                                }, 
                                "TABLE_graf": {
                                    "ROW_graf": {
                                        "TABLE_grsaf": {
                                            "ROW_grsaf": {
                                                "gr-adv": "true", 
                                                "gr-af-name": "IPv4 Unicast", 
                                                "gr-fwd": "false", 
                                                "gr-recv": "true", 
                                                "gr-safi": "1"
                                            }
                                        }, 
                                        "gr-afi": "1"
                                    }
                                }, 
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H29S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorrecvtime": "P7DT11H59M39S", 
                                                "lasteorsenttime": "P7DT12H29S", 
                                                "neighbortableversion": "8030", 
                                                "pathsrecvd": "8", 
                                                "pathssent": "5", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "1728", 
                                                "pfxrecvd": "8", 
                                                "pfxsent": "5", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "12260939", 
                                "bytessent": "12277195", 
                                "capabilitiesrecvd": "2", 
                                "capabilitiessent": "2", 
                                "capaddpathsadvertised": "true", 
                                "capaddpathsrecvd": "false", 
                                "capas4advertised": "true", 
                                "capas4recvd": "true", 
                                "capextendednhadvertised": "true", 
                                "capextendednhrecvd": "true", 
                                "capgradvertised": "true", 
                                "capgrdynamicadvertised": "true", 
                                "capgrdynamicrecvd": "true", 
                                "capgrrecvd": "true", 
                                "capmpadvertised": "true", 
                                "capmprecvd": "true", 
                                "capolddynamicadvertised": "true", 
                                "capolddynamicrecvd": "true", 
                                "capoldrradvertised": "true", 
                                "capoldrrrecvd": "true", 
                                "caprefreshadvertised": "true", 
                                "caprefreshrecvd": "true", 
                                "caprradvertised": "true", 
                                "caprrrecvd": "true", 
                                "capsnegotiated": "false", 
                                "connectedif": "Ethernet1/2", 
                                "connsdropped": "0", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT11H58M8S", 
                                "epe": "false", 
                                "fd": "67", 
                                "firstkeepalive": "false", 
                                "grrecvdrestarttime": "120", 
                                "grrestarttime": "120", 
                                "grstaletime": "300", 
                                "holdtime": "3", 
                                "index": "8", 
                                "keepalive": "0.822916", 
                                "keepaliverecvd": "645302", 
                                "keepalivesent": "645297", 
                                "keepalivetime": "1", 
                                "lastread": "PT0S", 
                                "lastwrite": "PT0S", 
                                "link": "ebgp", 
                                "localaddr": "10.100.157.2", 
                                "localas-inactive": "false", 
                                "localport": "45705", 
                                "msgrecvd": "645308", 
                                "msgsent": "645305", 
                                "neighbor": "10.100.157.1", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "7.57.255.1", 
                                "remoteaddr": "10.100.157.1", 
                                "remoteas": "65059", 
                                "remoteport": "179", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Established", 
                                "ttlsecurity": "false", 
                                "up": "true", 
                                "updatesrecvd": "3", 
                                "updatessent": "11", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_addpathscapaf": {
                                    "ROW_addpathscapaf": {
                                        "TABLE_addpathscapsaf": {
                                            "ROW_addpathscapsaf": {
                                                "addpathscap-af-name": "IPv4 Unicast", 
                                                "addpathscap-safi": "1", 
                                                "addpathsrecvcap-adv": "true", 
                                                "addpathsrecvcap-recv": "false", 
                                                "addpathssendcap-adv": "true", 
                                                "addpathssendcap-recv": "false"
                                            }
                                        }, 
                                        "addpathscap-afi": "1"
                                    }
                                }, 
                                "TABLE_af": {
                                    "ROW_af": {
                                        "TABLE_saf": {
                                            "ROW_saf": {
                                                "af-advertised": "true", 
                                                "af-name": "IPv4 Unicast", 
                                                "af-recvd": "true", 
                                                "af-safi": "1"
                                            }
                                        }, 
                                        "af-afi": "1"
                                    }
                                }, 
                                "TABLE_capextendednhaf": {
                                    "ROW_capextendednhaf": {
                                        "TABLE_capextendednhsaf": {
                                            "ROW_capextendednhsaf": {
                                                "capextendednh-af-name": "IPv4 Unicast", 
                                                "capextendednh-safi": "1"
                                            }
                                        }, 
                                        "capextendednh-afi": "1"
                                    }
                                }, 
                                "TABLE_graf": {
                                    "ROW_graf": {
                                        "TABLE_grsaf": {
                                            "ROW_grsaf": {
                                                "gr-adv": "true", 
                                                "gr-af-name": "IPv4 Unicast", 
                                                "gr-fwd": "false", 
                                                "gr-recv": "true", 
                                                "gr-safi": "1"
                                            }
                                        }, 
                                        "gr-afi": "1"
                                    }
                                }, 
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "TABLE_inpolicy": {
                                                    "ROW_inpolicy": {
                                                        "inpolicyhandle": "true", 
                                                        "inpolicyname": "RM-LSL-IN", 
                                                        "inpolicynr": "2", 
                                                        "inpolicytype": "route-map"
                                                    }
                                                }, 
                                                "TABLE_outpolicy": {
                                                    "ROW_outpolicy": {
                                                        "outpolicyhandle": "true", 
                                                        "outpolicyname": "RM-LSL-OUT", 
                                                        "outpolicynr": "2", 
                                                        "outpolicytype": "route-map"
                                                    }
                                                }, 
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H26S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorrecvtime": "P7DT11H59M37S", 
                                                "lasteorsenttime": "P7DT12H26S", 
                                                "neighbortableversion": "8030", 
                                                "pathsrecvd": "8", 
                                                "pathssent": "5", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "1728", 
                                                "pfxrecvd": "8", 
                                                "pfxsent": "5", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "12260977", 
                                "bytessent": "12383603", 
                                "capabilitiesrecvd": "2", 
                                "capabilitiessent": "2", 
                                "capaddpathsadvertised": "true", 
                                "capaddpathsrecvd": "false", 
                                "capas4advertised": "true", 
                                "capas4recvd": "true", 
                                "capextendednhadvertised": "true", 
                                "capextendednhrecvd": "true", 
                                "capgradvertised": "true", 
                                "capgrdynamicadvertised": "true", 
                                "capgrdynamicrecvd": "true", 
                                "capgrrecvd": "true", 
                                "capmpadvertised": "true", 
                                "capmprecvd": "true", 
                                "capolddynamicadvertised": "true", 
                                "capolddynamicrecvd": "true", 
                                "capoldrradvertised": "true", 
                                "capoldrrrecvd": "true", 
                                "caprefreshadvertised": "true", 
                                "caprefreshrecvd": "true", 
                                "caprradvertised": "true", 
                                "caprrrecvd": "true", 
                                "capsnegotiated": "false", 
                                "connectedif": "Ethernet1/4", 
                                "connsdropped": "0", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT11H58M11S", 
                                "epe": "false", 
                                "fd": "71", 
                                "firstkeepalive": "false", 
                                "grrecvdrestarttime": "120", 
                                "grrestarttime": "120", 
                                "grstaletime": "300", 
                                "holdtime": "3", 
                                "index": "9", 
                                "keepalive": "0.822680", 
                                "keepaliverecvd": "645304", 
                                "keepalivesent": "645299", 
                                "keepalivetime": "1", 
                                "lastread": "PT0S", 
                                "lastwrite": "PT0S", 
                                "link": "ebgp", 
                                "localaddr": "10.100.157.10", 
                                "localas-inactive": "false", 
                                "localport": "41191", 
                                "msgrecvd": "645310", 
                                "msgsent": "645307", 
                                "neighbor": "10.100.157.9", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "7.57.255.1", 
                                "remoteaddr": "10.100.157.9", 
                                "remoteas": "65059", 
                                "remoteport": "179", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Established", 
                                "ttlsecurity": "false", 
                                "up": "true", 
                                "updatesrecvd": "3", 
                                "updatessent": "2017", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M7S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M7S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8310", 
                                "connectedif": "Ethernet1/1.50", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M29S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "3", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.1.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1001", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:08", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M7S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M7S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8300", 
                                "connectedif": "Ethernet1/1.51", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M29S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "4", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.2.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1002", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:18", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M7S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M7S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8311", 
                                "connectedif": "Ethernet1/1.52", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M29S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "5", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.3.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1003", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:29", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M7S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M7S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8312", 
                                "connectedif": "Ethernet1/1.53", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M29S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "6", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.4.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1004", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:45", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast neighbors ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast neighbors command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast neighbors 
BGP neighbor is 10.40.100.57, remote AS 65057, ibgp link, Peer index 10
  Description: REX
  BGP version 4, remote router ID 0.0.0.0
  BGP state = Idle, down for 1w0d, retry in 00:00:47
  Using loopback0 as update source for this peer
  Enable logging neighbor events
  Last read never, hold time = 3, keepalive interval is 1 seconds
  Last written never, keepalive timer not running
  Received 0 messages, 0 notifications, 0 bytes in queue
  Sent 0 messages, 0 notifications, 0(0) bytes in queue
  Connections established 0, dropped 0
  Connection attempts 8623
  Last reset by us never, due to No error
  Last reset by peer never, due to No error

  Message statistics:
                              Sent               Rcvd
  Opens:                         0                  0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Third-party Nexthop will not be computed. Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 10.100.90.130, remote AS 300, ebgp link, Peer index 7 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:31 Peer is directly attached, interface Ethernet1/1 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 9186 messages, 0 notifications, 0 bytes in queue Sent 9148 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 1 Connection attempts 8215 Last reset by peer 1w0d, due to session closed Last reset by us never, due to No error Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 14 4
Keepalives: 9146 9181
Route Refresh: 0 0
Capability: 0 0
Total: 9148 9186
Total bytes: 174450 182584
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Inbound route-map configured is RM-MIL-IN, handle obtained Outbound route-map configured is RM-MIL-OUT, handle obtained Last End-of-RIB sent 00:01:30 after session start First convergence 00:01:30 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 10.100.157.1, remote AS 65059, ebgp link, Peer index 8 BGP version 4, remote router ID 7.57.255.1 BGP state = Established, up for 1w0d Peer is directly attached, interface Ethernet1/2 Enable logging neighbor events Last read 0.494974, hold time = 3, keepalive interval is 1 seconds Last written 0.303288, keepalive timer expiry due 0.696555 Received 645310 messages, 0 notifications, 0 bytes in queue Sent 645307 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 0 Last reset by us never, due to No error Last reset by peer never, due to No error Neighbor capabilities: Dynamic capability: advertised (mp, refresh, gr) received (mp, refresh, gr) Dynamic capability (old): advertised received Route refresh capability (new): advertised received Route refresh capability (old): advertised received 4-Byte AS capability: advertised received Address family IPv4 Unicast: advertised received Graceful Restart capability: advertised received Graceful Restart Parameters: Address families advertised to peer: IPv4 Unicast
Address families received from peer: IPv4 Unicast
Forwarding state preserved by peer for: Restart time advertised to peer: 120 seconds Stale time for routes advertised by peer: 300 seconds Restart time advertised by peer: 120 seconds Additional Paths capability: advertised Additional Paths Capability Parameters: Send capability advertised to Peer for AF: IPv4 Unicast
Receive capability advertised to Peer for AF: IPv4 Unicast
Extended Next Hop Encoding Capability: advertised received Receive IPv6 next hop encoding Capability for AF: IPv4 Unicast
Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 11 3
Keepalives: 645299 645304
Route Refresh: 0 0
Capability: 2 2
Total: 645307 645310
Total bytes: 12277233 12260977
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 8030 8 accepted prefixes (8 paths), consuming 1728 bytes of memory 5 sent prefixes (5 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Last End-of-RIB received 00:01:27 after session start Last End-of-RIB sent 00:00:38 after session start First convergence 00:00:38 after session start with 0 routes sent Local host: 10.100.157.2, Local port: 45705 Foreign host: 10.100.157.1, Foreign port: 179 fd = 67 BGP neighbor is 10.100.157.9, remote AS 65059, ebgp link, Peer index 9 BGP version 4, remote router ID 7.57.255.1 BGP state = Established, up for 1w0d Peer is directly attached, interface Ethernet1/4 Enable logging neighbor events Last read 0.495099, hold time = 3, keepalive interval is 1 seconds Last written 0.303369, keepalive timer expiry due 0.696455 Received 645312 messages, 0 notifications, 0 bytes in queue Sent 645309 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 0 Last reset by us never, due to No error Last reset by peer never, due to No error Neighbor capabilities: Dynamic capability: advertised (mp, refresh, gr) received (mp, refresh, gr) Dynamic capability (old): advertised received Route refresh capability (new): advertised received Route refresh capability (old): advertised received 4-Byte AS capability: advertised received Address family IPv4 Unicast: advertised received Graceful Restart capability: advertised received Graceful Restart Parameters: Address families advertised to peer: IPv4 Unicast
Address families received from peer: IPv4 Unicast
Forwarding state preserved by peer for: Restart time advertised to peer: 120 seconds Stale time for routes advertised by peer: 300 seconds Restart time advertised by peer: 120 seconds Additional Paths capability: advertised Additional Paths Capability Parameters: Send capability advertised to Peer for AF: IPv4 Unicast
Receive capability advertised to Peer for AF: IPv4 Unicast
Extended Next Hop Encoding Capability: advertised received Receive IPv6 next hop encoding Capability for AF: IPv4 Unicast
Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 2017 3
Keepalives: 645301 645306
Route Refresh: 0 0
Capability: 2 2
Total: 645309 645312
Total bytes: 12383641 12261015
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 8030 8 accepted prefixes (8 paths), consuming 1728 bytes of memory 5 sent prefixes (5 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Inbound route-map configured is RM-LSL-IN, handle obtained Outbound route-map configured is RM-LSL-OUT, handle obtained Last End-of-RIB received 00:01:30 after session start Last End-of-RIB sent 00:00:41 after session start First convergence 00:00:41 after session start with 0 routes sent Local host: 10.100.157.10, Local port: 41191 Foreign host: 10.100.157.9, Foreign port: 179 fd = 71 BGP neighbor is 89.1.1.10, remote AS 1001, ebgp link, Peer index 3 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:06 Peer is directly attached, interface Ethernet1/1.50 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8310 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.2.10, remote AS 1002, ebgp link, Peer index 4 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:16 Peer is directly attached, interface Ethernet1/1.51 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8300 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.3.10, remote AS 1003, ebgp link, Peer index 5 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:26 Peer is directly attached, interface Ethernet1/1.52 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8311 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.4.10, remote AS 1004, ebgp link, Peer index 6 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:43 Peer is directly attached, interface Ethernet1/1.53 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8312 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer

show bgp ip unicast neighbors vrf default

show bgp ip unicast neighbors vrf default

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast neighbors vrf default ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_neighbor": {
                        "ROW_neighbor": [
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M11S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M11S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030", 
                                                "thirdpartynexthop": "false"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8623", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "description": "REX", 
                                "elapsedtime": "P7DT11H59M32S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "10", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ibgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "10.40.100.57", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "65057", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:46", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "sourceif": "loopback0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "TABLE_inpolicy": {
                                                    "ROW_inpolicy": {
                                                        "inpolicyhandle": "true", 
                                                        "inpolicyname": "RM-MIL-IN", 
                                                        "inpolicynr": "2", 
                                                        "inpolicytype": "route-map"
                                                    }
                                                }, 
                                                "TABLE_outpolicy": {
                                                    "ROW_outpolicy": {
                                                        "outpolicyhandle": "true", 
                                                        "outpolicyname": "RM-MIL-OUT", 
                                                        "outpolicynr": "2", 
                                                        "outpolicytype": "route-map"
                                                    }
                                                }, 
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT11H59M40S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorsenttime": "P7DT11H59M40S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "182584", 
                                "bytessent": "174450", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8215", 
                                "connectedif": "Ethernet1/1", 
                                "connsdropped": "1", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT9H26M5S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "7", 
                                "keepaliverecvd": "9181", 
                                "keepalivesent": "9146", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "9186", 
                                "msgsent": "9148", 
                                "neighbor": "10.100.90.130", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "session closed", 
                                "peerresettime": "P7DT9H26M5S", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "300", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:30", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "4", 
                                "updatessent": "14", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_addpathscapaf": {
                                    "ROW_addpathscapaf": {
                                        "TABLE_addpathscapsaf": {
                                            "ROW_addpathscapsaf": {
                                                "addpathscap-af-name": "IPv4 Unicast", 
                                                "addpathscap-safi": "1", 
                                                "addpathsrecvcap-adv": "true", 
                                                "addpathsrecvcap-recv": "false", 
                                                "addpathssendcap-adv": "true", 
                                                "addpathssendcap-recv": "false"
                                            }
                                        }, 
                                        "addpathscap-afi": "1"
                                    }
                                }, 
                                "TABLE_af": {
                                    "ROW_af": {
                                        "TABLE_saf": {
                                            "ROW_saf": {
                                                "af-advertised": "true", 
                                                "af-name": "IPv4 Unicast", 
                                                "af-recvd": "true", 
                                                "af-safi": "1"
                                            }
                                        }, 
                                        "af-afi": "1"
                                    }
                                }, 
                                "TABLE_capextendednhaf": {
                                    "ROW_capextendednhaf": {
                                        "TABLE_capextendednhsaf": {
                                            "ROW_capextendednhsaf": {
                                                "capextendednh-af-name": "IPv4 Unicast", 
                                                "capextendednh-safi": "1"
                                            }
                                        }, 
                                        "capextendednh-afi": "1"
                                    }
                                }, 
                                "TABLE_graf": {
                                    "ROW_graf": {
                                        "TABLE_grsaf": {
                                            "ROW_grsaf": {
                                                "gr-adv": "true", 
                                                "gr-af-name": "IPv4 Unicast", 
                                                "gr-fwd": "false", 
                                                "gr-recv": "true", 
                                                "gr-safi": "1"
                                            }
                                        }, 
                                        "gr-afi": "1"
                                    }
                                }, 
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H33S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorrecvtime": "P7DT11H59M43S", 
                                                "lasteorsenttime": "P7DT12H33S", 
                                                "neighbortableversion": "8030", 
                                                "pathsrecvd": "8", 
                                                "pathssent": "5", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "1728", 
                                                "pfxrecvd": "8", 
                                                "pfxsent": "5", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "12261015", 
                                "bytessent": "12277252", 
                                "capabilitiesrecvd": "2", 
                                "capabilitiessent": "2", 
                                "capaddpathsadvertised": "true", 
                                "capaddpathsrecvd": "false", 
                                "capas4advertised": "true", 
                                "capas4recvd": "true", 
                                "capextendednhadvertised": "true", 
                                "capextendednhrecvd": "true", 
                                "capgradvertised": "true", 
                                "capgrdynamicadvertised": "true", 
                                "capgrdynamicrecvd": "true", 
                                "capgrrecvd": "true", 
                                "capmpadvertised": "true", 
                                "capmprecvd": "true", 
                                "capolddynamicadvertised": "true", 
                                "capolddynamicrecvd": "true", 
                                "capoldrradvertised": "true", 
                                "capoldrrrecvd": "true", 
                                "caprefreshadvertised": "true", 
                                "caprefreshrecvd": "true", 
                                "caprradvertised": "true", 
                                "caprrrecvd": "true", 
                                "capsnegotiated": "false", 
                                "connectedif": "Ethernet1/2", 
                                "connsdropped": "0", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT11H58M12S", 
                                "epe": "false", 
                                "fd": "67", 
                                "firstkeepalive": "false", 
                                "grrecvdrestarttime": "120", 
                                "grrestarttime": "120", 
                                "grstaletime": "300", 
                                "holdtime": "3", 
                                "index": "8", 
                                "keepalive": "0.051152", 
                                "keepaliverecvd": "645306", 
                                "keepalivesent": "645300", 
                                "keepalivetime": "1", 
                                "lastread": "PT0S", 
                                "lastwrite": "PT0S", 
                                "link": "ebgp", 
                                "localaddr": "10.100.157.2", 
                                "localas-inactive": "false", 
                                "localport": "45705", 
                                "msgrecvd": "645312", 
                                "msgsent": "645308", 
                                "neighbor": "10.100.157.1", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "7.57.255.1", 
                                "remoteaddr": "10.100.157.1", 
                                "remoteas": "65059", 
                                "remoteport": "179", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Established", 
                                "ttlsecurity": "false", 
                                "up": "true", 
                                "updatesrecvd": "3", 
                                "updatessent": "11", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_addpathscapaf": {
                                    "ROW_addpathscapaf": {
                                        "TABLE_addpathscapsaf": {
                                            "ROW_addpathscapsaf": {
                                                "addpathscap-af-name": "IPv4 Unicast", 
                                                "addpathscap-safi": "1", 
                                                "addpathsrecvcap-adv": "true", 
                                                "addpathsrecvcap-recv": "false", 
                                                "addpathssendcap-adv": "true", 
                                                "addpathssendcap-recv": "false"
                                            }
                                        }, 
                                        "addpathscap-afi": "1"
                                    }
                                }, 
                                "TABLE_af": {
                                    "ROW_af": {
                                        "TABLE_saf": {
                                            "ROW_saf": {
                                                "af-advertised": "true", 
                                                "af-name": "IPv4 Unicast", 
                                                "af-recvd": "true", 
                                                "af-safi": "1"
                                            }
                                        }, 
                                        "af-afi": "1"
                                    }
                                }, 
                                "TABLE_capextendednhaf": {
                                    "ROW_capextendednhaf": {
                                        "TABLE_capextendednhsaf": {
                                            "ROW_capextendednhsaf": {
                                                "capextendednh-af-name": "IPv4 Unicast", 
                                                "capextendednh-safi": "1"
                                            }
                                        }, 
                                        "capextendednh-afi": "1"
                                    }
                                }, 
                                "TABLE_graf": {
                                    "ROW_graf": {
                                        "TABLE_grsaf": {
                                            "ROW_grsaf": {
                                                "gr-adv": "true", 
                                                "gr-af-name": "IPv4 Unicast", 
                                                "gr-fwd": "false", 
                                                "gr-recv": "true", 
                                                "gr-safi": "1"
                                            }
                                        }, 
                                        "gr-afi": "1"
                                    }
                                }, 
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "TABLE_inpolicy": {
                                                    "ROW_inpolicy": {
                                                        "inpolicyhandle": "true", 
                                                        "inpolicyname": "RM-LSL-IN", 
                                                        "inpolicynr": "2", 
                                                        "inpolicytype": "route-map"
                                                    }
                                                }, 
                                                "TABLE_outpolicy": {
                                                    "ROW_outpolicy": {
                                                        "outpolicyhandle": "true", 
                                                        "outpolicyname": "RM-LSL-OUT", 
                                                        "outpolicynr": "2", 
                                                        "outpolicytype": "route-map"
                                                    }
                                                }, 
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H30S", 
                                                "insoftreconfigallowed": "true", 
                                                "insoftreconfigallowedalways": "false", 
                                                "lasteorrecvtime": "P7DT11H59M41S", 
                                                "lasteorsenttime": "P7DT12H30S", 
                                                "neighbortableversion": "8030", 
                                                "pathsrecvd": "8", 
                                                "pathssent": "5", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "1728", 
                                                "pfxrecvd": "8", 
                                                "pfxsent": "5", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "sendcommunity": "true", 
                                                "sendextcommunity": "true", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "12261053", 
                                "bytessent": "12383660", 
                                "capabilitiesrecvd": "2", 
                                "capabilitiessent": "2", 
                                "capaddpathsadvertised": "true", 
                                "capaddpathsrecvd": "false", 
                                "capas4advertised": "true", 
                                "capas4recvd": "true", 
                                "capextendednhadvertised": "true", 
                                "capextendednhrecvd": "true", 
                                "capgradvertised": "true", 
                                "capgrdynamicadvertised": "true", 
                                "capgrdynamicrecvd": "true", 
                                "capgrrecvd": "true", 
                                "capmpadvertised": "true", 
                                "capmprecvd": "true", 
                                "capolddynamicadvertised": "true", 
                                "capolddynamicrecvd": "true", 
                                "capoldrradvertised": "true", 
                                "capoldrrrecvd": "true", 
                                "caprefreshadvertised": "true", 
                                "caprefreshrecvd": "true", 
                                "caprradvertised": "true", 
                                "caprrrecvd": "true", 
                                "capsnegotiated": "false", 
                                "connectedif": "Ethernet1/4", 
                                "connsdropped": "0", 
                                "connsestablished": "1", 
                                "elapsedtime": "P7DT11H58M14S", 
                                "epe": "false", 
                                "fd": "71", 
                                "firstkeepalive": "false", 
                                "grrecvdrestarttime": "120", 
                                "grrestarttime": "120", 
                                "grstaletime": "300", 
                                "holdtime": "3", 
                                "index": "9", 
                                "keepalive": "0.050916", 
                                "keepaliverecvd": "645308", 
                                "keepalivesent": "645302", 
                                "keepalivetime": "1", 
                                "lastread": "PT0S", 
                                "lastwrite": "PT0S", 
                                "link": "ebgp", 
                                "localaddr": "10.100.157.10", 
                                "localas-inactive": "false", 
                                "localport": "41191", 
                                "msgrecvd": "645314", 
                                "msgsent": "645310", 
                                "neighbor": "10.100.157.9", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "1", 
                                "openssent": "1", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "7.57.255.1", 
                                "remoteaddr": "10.100.157.9", 
                                "remoteas": "65059", 
                                "remoteport": "179", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Established", 
                                "ttlsecurity": "false", 
                                "up": "true", 
                                "updatesrecvd": "3", 
                                "updatessent": "2017", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M11S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M11S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8310", 
                                "connectedif": "Ethernet1/1.50", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M32S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "3", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.1.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1001", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:04", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M11S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M11S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8300", 
                                "connectedif": "Ethernet1/1.51", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M32S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "4", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.2.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1002", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:14", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M11S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M11S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8311", 
                                "connectedif": "Ethernet1/1.52", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M32S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "5", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.3.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1003", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:25", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }, 
                            {
                                "TABLE_peraf": {
                                    "ROW_peraf": {
                                        "TABLE_persaf": {
                                            "ROW_persaf": {
                                                "asoverride": "false", 
                                                "defaultoriginate": "false", 
                                                "firstconvgtime": "P7DT12H1M11S", 
                                                "insoftreconfigallowed": "false", 
                                                "lasteorsenttime": "P7DT12H1M11S", 
                                                "neighbortableversion": "0", 
                                                "pathsrecvd": "0", 
                                                "pathssent": "0", 
                                                "peerascheckdisabled": "false", 
                                                "per-af-name": "IPv4 Unicast", 
                                                "per-safi": "1", 
                                                "pfxbytes": "0", 
                                                "pfxrecvd": "0", 
                                                "pfxsent": "0", 
                                                "pfxsentfirsteor": "0", 
                                                "rrconfigured": "false", 
                                                "tableversion": "8030"
                                            }
                                        }, 
                                        "per-afi": "1"
                                    }
                                }, 
                                "bytesrecvd": "0", 
                                "bytessent": "0", 
                                "capabilitiesrecvd": "0", 
                                "capabilitiessent": "0", 
                                "connattempts": "8312", 
                                "connectedif": "Ethernet1/1.53", 
                                "connsdropped": "0", 
                                "connsestablished": "0", 
                                "elapsedtime": "P7DT11H59M32S", 
                                "epe": "false", 
                                "firstkeepalive": "false", 
                                "holdtime": "3", 
                                "index": "6", 
                                "keepaliverecvd": "0", 
                                "keepalivesent": "0", 
                                "keepalivetime": "1", 
                                "link": "ebgp", 
                                "localas-inactive": "false", 
                                "msgrecvd": "0", 
                                "msgsent": "0", 
                                "neighbor": "89.1.4.10", 
                                "notificationsrcvd": "0", 
                                "notificationssent": "0", 
                                "opensrecvd": "0", 
                                "openssent": "0", 
                                "passiveonly": "false", 
                                "peerresetreason": "No error", 
                                "recvbufbytesinq": "0", 
                                "remote-id": "0.0.0.0", 
                                "remoteas": "1004", 
                                "remove-privateas": "false", 
                                "resetreason": "No error", 
                                "restarttime": "00:00:41", 
                                "rtrefreshrecvd": "0", 
                                "rtrefreshsent": "0", 
                                "sentbytesoutstanding": "0", 
                                "sentbytespacked": "0", 
                                "state": "Idle", 
                                "ttlsecurity": "false", 
                                "up": "false", 
                                "updatesrecvd": "0", 
                                "updatessent": "0", 
                                "version": "4"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast neighbors vrf default ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast neighbors vrf default command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast neighbors vrf default 
BGP neighbor is 10.40.100.57, remote AS 65057, ibgp link, Peer index 10
  Description: REX
  BGP version 4, remote router ID 0.0.0.0
  BGP state = Idle, down for 1w0d, retry in 00:00:43
  Using loopback0 as update source for this peer
  Enable logging neighbor events
  Last read never, hold time = 3, keepalive interval is 1 seconds
  Last written never, keepalive timer not running
  Received 0 messages, 0 notifications, 0 bytes in queue
  Sent 0 messages, 0 notifications, 0(0) bytes in queue
  Connections established 0, dropped 0
  Connection attempts 8623
  Last reset by us never, due to No error
  Last reset by peer never, due to No error

  Message statistics:
                              Sent               Rcvd
  Opens:                         0                  0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Third-party Nexthop will not be computed. Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 10.100.90.130, remote AS 300, ebgp link, Peer index 7 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:28 Peer is directly attached, interface Ethernet1/1 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 9186 messages, 0 notifications, 0 bytes in queue Sent 9148 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 1 Connection attempts 8215 Last reset by peer 1w0d, due to session closed Last reset by us never, due to No error Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 14 4
Keepalives: 9146 9181
Route Refresh: 0 0
Capability: 0 0
Total: 9148 9186
Total bytes: 174450 182584
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Inbound route-map configured is RM-MIL-IN, handle obtained Outbound route-map configured is RM-MIL-OUT, handle obtained Last End-of-RIB sent 00:01:30 after session start First convergence 00:01:30 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 10.100.157.1, remote AS 65059, ebgp link, Peer index 8 BGP version 4, remote router ID 7.57.255.1 BGP state = Established, up for 1w0d Peer is directly attached, interface Ethernet1/2 Enable logging neighbor events Last read 0.282660, hold time = 3, keepalive interval is 1 seconds Last written 0.094235, keepalive timer expiry due 0.905560 Received 645314 messages, 0 notifications, 0 bytes in queue Sent 645311 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 0 Last reset by us never, due to No error Last reset by peer never, due to No error Neighbor capabilities: Dynamic capability: advertised (mp, refresh, gr) received (mp, refresh, gr) Dynamic capability (old): advertised received Route refresh capability (new): advertised received Route refresh capability (old): advertised received 4-Byte AS capability: advertised received Address family IPv4 Unicast: advertised received Graceful Restart capability: advertised received Graceful Restart Parameters: Address families advertised to peer: IPv4 Unicast
Address families received from peer: IPv4 Unicast
Forwarding state preserved by peer for: Restart time advertised to peer: 120 seconds Stale time for routes advertised by peer: 300 seconds Restart time advertised by peer: 120 seconds Additional Paths capability: advertised Additional Paths Capability Parameters: Send capability advertised to Peer for AF: IPv4 Unicast
Receive capability advertised to Peer for AF: IPv4 Unicast
Extended Next Hop Encoding Capability: advertised received Receive IPv6 next hop encoding Capability for AF: IPv4 Unicast
Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 11 3
Keepalives: 645303 645308
Route Refresh: 0 0
Capability: 2 2
Total: 645311 645314
Total bytes: 12277309 12261053
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 8030 8 accepted prefixes (8 paths), consuming 1728 bytes of memory 5 sent prefixes (5 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Last End-of-RIB received 00:01:27 after session start Last End-of-RIB sent 00:00:38 after session start First convergence 00:00:38 after session start with 0 routes sent Local host: 10.100.157.2, Local port: 45705 Foreign host: 10.100.157.1, Foreign port: 179 fd = 67 BGP neighbor is 10.100.157.9, remote AS 65059, ebgp link, Peer index 9 BGP version 4, remote router ID 7.57.255.1 BGP state = Established, up for 1w0d Peer is directly attached, interface Ethernet1/4 Enable logging neighbor events Last read 0.282804, hold time = 3, keepalive interval is 1 seconds Last written 0.094340, keepalive timer expiry due 0.905461 Received 645316 messages, 0 notifications, 0 bytes in queue Sent 645313 messages, 0 notifications, 0(0) bytes in queue Connections established 1, dropped 0 Last reset by us never, due to No error Last reset by peer never, due to No error Neighbor capabilities: Dynamic capability: advertised (mp, refresh, gr) received (mp, refresh, gr) Dynamic capability (old): advertised received Route refresh capability (new): advertised received Route refresh capability (old): advertised received 4-Byte AS capability: advertised received Address family IPv4 Unicast: advertised received Graceful Restart capability: advertised received Graceful Restart Parameters: Address families advertised to peer: IPv4 Unicast
Address families received from peer: IPv4 Unicast
Forwarding state preserved by peer for: Restart time advertised to peer: 120 seconds Stale time for routes advertised by peer: 300 seconds Restart time advertised by peer: 120 seconds Additional Paths capability: advertised Additional Paths Capability Parameters: Send capability advertised to Peer for AF: IPv4 Unicast
Receive capability advertised to Peer for AF: IPv4 Unicast
Extended Next Hop Encoding Capability: advertised received Receive IPv6 next hop encoding Capability for AF: IPv4 Unicast
Message statistics: Sent Rcvd Opens: 1 1
Notifications: 0 0
Updates: 2017 3
Keepalives: 645305 645310
Route Refresh: 0 0
Capability: 2 2
Total: 645313 645316
Total bytes: 12383717 12261091
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 8030 8 accepted prefixes (8 paths), consuming 1728 bytes of memory 5 sent prefixes (5 paths) Inbound soft reconfiguration allowed Community attribute sent to this neighbor Extended community attribute sent to this neighbor Inbound route-map configured is RM-LSL-IN, handle obtained Outbound route-map configured is RM-LSL-OUT, handle obtained Last End-of-RIB received 00:01:30 after session start Last End-of-RIB sent 00:00:41 after session start First convergence 00:00:41 after session start with 0 routes sent Local host: 10.100.157.10, Local port: 41191 Foreign host: 10.100.157.9, Foreign port: 179 fd = 71 BGP neighbor is 89.1.1.10, remote AS 1001, ebgp link, Peer index 3 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:02 Peer is directly attached, interface Ethernet1/1.50 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8310 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.2.10, remote AS 1002, ebgp link, Peer index 4 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:12 Peer is directly attached, interface Ethernet1/1.51 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8300 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.3.10, remote AS 1003, ebgp link, Peer index 5 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:23 Peer is directly attached, interface Ethernet1/1.52 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8311 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer BGP neighbor is 89.1.4.10, remote AS 1004, ebgp link, Peer index 6 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for 1w0d, retry in 00:00:39 Peer is directly attached, interface Ethernet1/1.53 Enable logging neighbor events Last read never, hold time = 3, keepalive interval is 1 seconds Last written never, keepalive timer not running Received 0 messages, 0 notifications, 0 bytes in queue Sent 0 messages, 0 notifications, 0(0) bytes in queue Connections established 0, dropped 0 Connection attempts 8312 Last reset by us never, due to No error Last reset by peer never, due to No error Message statistics: Sent Rcvd Opens: 0 0
Notifications: 0 0
Updates: 0 0
Keepalives: 0 0
Route Refresh: 0 0
Capability: 0 0
Total: 0 0
Total bytes: 0 0
Bytes in queue: 0 0
For address family: IPv4 Unicast BGP table version 8030, neighbor version 0 0 accepted prefixes (0 paths), consuming 0 bytes of memory 0 sent prefixes (0 paths) Last End-of-RIB sent 0.000000 after session start First convergence 0.000000 after session start with 0 routes sent No established BGP session with peer

show bgp ip unicast nexthop 10.100.157.1

show bgp ip unicast nexthop 10.100.157.1

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast nexthop 10.100.157.1 ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_afi": {
                                "ROW_afi": {
                                    "TABLE_safi": {
                                        "ROW_safi": {
                                            "TABLE_rd": {
                                                "ROW_rd": {
                                                    "TABLE_prefix": {
                                                        "ROW_prefix": [
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "7.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "7.57.255.1/32"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.57.50.0/24"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.90.128/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.157.0/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.157.8/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "33.33.33.33/32"
                                                            }
                                                        ]
                                                    }
                                                }
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "router-id": "7.57.255.2", 
                                            "safi": "1", 
                                            "table-version": "8030"
                                        }
                                    }, 
                                    "afi": "1"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast nexthop 10.100.157.1 ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast nexthop 10.100.157.1 command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast nexthop 10.100.157.1 
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 8030, Local Router ID is 7.57.255.2
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
 e7.57.0.0/16        10.100.157.1                                   0 65059 i
&e7.57.255.1/32      10.100.157.1                                   0 65059 i
 e10.57.0.0/16       10.100.157.1                                   0 65059 i
&e10.57.50.0/24      10.100.157.1                                   0 65059 i
 e10.100.90.128/30   10.100.157.1                                   0 65059 i
 e10.100.157.0/30    10.100.157.1                                   0 65059 i
 e10.100.157.8/30    10.100.157.1                                   0 65059 i
*&e33.33.33.33/32     10.100.157.1                                   0 65059 i


show bgp ip unicast nexthop 10.100.157.1 vrf default

show bgp ip unicast nexthop 10.100.157.1 vrf default

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast nexthop 10.100.157.1 vrf default ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_afi": {
                                "ROW_afi": {
                                    "TABLE_safi": {
                                        "ROW_safi": {
                                            "TABLE_rd": {
                                                "ROW_rd": {
                                                    "TABLE_prefix": {
                                                        "ROW_prefix": [
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "7.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "7.57.255.1/32"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.57.50.0/24"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.90.128/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.157.0/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.157.8/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "65059", 
                                                                        "best": "backup", 
                                                                        "bestcode": "&", 
                                                                        "ipnexthop": "10.100.157.1", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "valid", 
                                                                        "statuscode": "*", 
                                                                        "type": "external", 
                                                                        "typecode": "e", 
                                                                        "weight": "0"
                                                                    }
                                                                }, 
                                                                "ipprefix": "33.33.33.33/32"
                                                            }
                                                        ]
                                                    }
                                                }
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "router-id": "7.57.255.2", 
                                            "safi": "1", 
                                            "table-version": "8030"
                                        }
                                    }, 
                                    "afi": "1"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast nexthop 10.100.157.1 vrf default ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast nexthop 10.100.157.1 vrf default command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast nexthop 10.100.157.1 vrf default 
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 8030, Local Router ID is 7.57.255.2
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
 e7.57.0.0/16        10.100.157.1                                   0 65059 i
&e7.57.255.1/32      10.100.157.1                                   0 65059 i
 e10.57.0.0/16       10.100.157.1                                   0 65059 i
&e10.57.50.0/24      10.100.157.1                                   0 65059 i
 e10.100.90.128/30   10.100.157.1                                   0 65059 i
 e10.100.157.0/30    10.100.157.1                                   0 65059 i
 e10.100.157.8/30    10.100.157.1                                   0 65059 i
*&e33.33.33.33/32     10.100.157.1                                   0 65059 i


show bgp ip unicast summary

show bgp ip unicast summary

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast summary ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_af": {
                                "ROW_af": {
                                    "TABLE_saf": {
                                        "ROW_saf": {
                                            "TABLE_neighbor": {
                                                "ROW_neighbor": [
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "65057", 
                                                        "neighborid": "10.40.100.57", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M40S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "9186", 
                                                        "msgsent": "9148", 
                                                        "neighboras": "300", 
                                                        "neighborid": "10.100.90.130", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT9H26M13S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "645319", 
                                                        "msgsent": "645316", 
                                                        "neighboras": "65059", 
                                                        "neighborid": "10.100.157.1", 
                                                        "neighbortableversion": "8030", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "8", 
                                                        "state": "Established", 
                                                        "time": "P7DT11H58M20S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "645321", 
                                                        "msgsent": "645318", 
                                                        "neighboras": "65059", 
                                                        "neighborid": "10.100.157.9", 
                                                        "neighbortableversion": "8030", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "8", 
                                                        "state": "Established", 
                                                        "time": "P7DT11H58M22S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1001", 
                                                        "neighborid": "89.1.1.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Active", 
                                                        "time": "P7DT11H59M40S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1002", 
                                                        "neighborid": "89.1.2.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M40S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1003", 
                                                        "neighborid": "89.1.3.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M40S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1004", 
                                                        "neighborid": "89.1.4.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M40S"
                                                    }
                                                ]
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "bytesattrs": "492", 
                                            "bytesclusterlist": "0", 
                                            "bytescommunities": "0", 
                                            "bytespaths": "6", 
                                            "capablepeers": "2", 
                                            "configuredpeers": "8", 
                                            "dampening": "false", 
                                            "memoryused": "3592", 
                                            "numberattrs": "3", 
                                            "numberclusterlist": "0", 
                                            "numbercommunities": "0", 
                                            "numberpaths": "1", 
                                            "safi": "1", 
                                            "tableversion": "8030", 
                                            "totalnetworks": "9", 
                                            "totalpaths": "22"
                                        }
                                    }, 
                                    "af-id": "1"
                                }
                            }, 
                            "vrf-local-as": "65057", 
                            "vrf-name-out": "default", 
                            "vrf-router-id": "7.57.255.2"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast summary ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast summary command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast summary 
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 7.57.255.2, local AS number 65057
BGP table version is 8030, IPv4 Unicast config peers 8, capable peers 2
9 network entries and 22 paths using 3592 bytes of memory
BGP attribute entries [3/492], BGP AS path entries [1/6]
BGP community entries [0/0], BGP clusterlist entries [0/0]

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.40.100.57    4 65057       0       0        0    0    0     1w0d Idle
10.100.90.130 4 300 9186 9148 0 0 0 1w0d Idle
10.100.157.1 4 65059 645321 645318 8030 0 0 1w0d 8
10.100.157.9 4 65059 645323 645320 8030 0 0 1w0d 8
89.1.1.10 4 1001 0 0 0 0 0 1w0d Idle
89.1.2.10 4 1002 0 0 0 0 0 1w0d Idle
89.1.3.10 4 1003 0 0 0 0 0 1w0d Idle
89.1.4.10 4 1004 0 0 0 0 0 1w0d Idle

show bgp ip unicast summary vrf default

show bgp ip unicast summary vrf default

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast summary vrf default ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_af": {
                                "ROW_af": {
                                    "TABLE_saf": {
                                        "ROW_saf": {
                                            "TABLE_neighbor": {
                                                "ROW_neighbor": [
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "65057", 
                                                        "neighborid": "10.40.100.57", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M42S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "9186", 
                                                        "msgsent": "9148", 
                                                        "neighboras": "300", 
                                                        "neighborid": "10.100.90.130", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT9H26M15S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "645321", 
                                                        "msgsent": "645318", 
                                                        "neighboras": "65059", 
                                                        "neighborid": "10.100.157.1", 
                                                        "neighbortableversion": "8030", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "8", 
                                                        "state": "Established", 
                                                        "time": "P7DT11H58M22S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "645323", 
                                                        "msgsent": "645320", 
                                                        "neighboras": "65059", 
                                                        "neighborid": "10.100.157.9", 
                                                        "neighbortableversion": "8030", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "8", 
                                                        "state": "Established", 
                                                        "time": "P7DT11H58M24S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1001", 
                                                        "neighborid": "89.1.1.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M42S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1002", 
                                                        "neighborid": "89.1.2.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M42S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1003", 
                                                        "neighborid": "89.1.3.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M42S"
                                                    }, 
                                                    {
                                                        "inq": "0", 
                                                        "msgrecvd": "0", 
                                                        "msgsent": "0", 
                                                        "neighboras": "1004", 
                                                        "neighborid": "89.1.4.10", 
                                                        "neighbortableversion": "0", 
                                                        "neighborversion": "4", 
                                                        "outq": "0", 
                                                        "prefixreceived": "0", 
                                                        "state": "Idle", 
                                                        "time": "P7DT11H59M42S"
                                                    }
                                                ]
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "bytesattrs": "492", 
                                            "bytesclusterlist": "0", 
                                            "bytescommunities": "0", 
                                            "bytespaths": "6", 
                                            "capablepeers": "2", 
                                            "configuredpeers": "8", 
                                            "dampening": "false", 
                                            "memoryused": "3592", 
                                            "numberattrs": "3", 
                                            "numberclusterlist": "0", 
                                            "numbercommunities": "0", 
                                            "numberpaths": "1", 
                                            "safi": "1", 
                                            "tableversion": "8030", 
                                            "totalnetworks": "9", 
                                            "totalpaths": "22"
                                        }
                                    }, 
                                    "af-id": "1"
                                }
                            }, 
                            "vrf-local-as": "65057", 
                            "vrf-name-out": "default", 
                            "vrf-router-id": "7.57.255.2"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast summary vrf default ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast summary vrf default command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast summary vrf default 
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 7.57.255.2, local AS number 65057
BGP table version is 8030, IPv4 Unicast config peers 8, capable peers 2
9 network entries and 22 paths using 3592 bytes of memory
BGP attribute entries [3/492], BGP AS path entries [1/6]
BGP community entries [0/0], BGP clusterlist entries [0/0]

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.40.100.57    4 65057       0       0        0    0    0     1w0d Idle
10.100.90.130 4 300 9186 9148 0 0 0 1w0d Idle
10.100.157.1 4 65059 645322 645319 8030 0 0 1w0d 8
10.100.157.9 4 65059 645324 645321 8030 0 0 1w0d 8
89.1.1.10 4 1001 0 0 0 0 0 1w0d Idle
89.1.2.10 4 1002 0 0 0 0 0 1w0d Idle
89.1.3.10 4 1003 0 0 0 0 0 1w0d Idle
89.1.4.10 4 1004 0 0 0 0 0 1w0d Idle

show bgp ip unicast vrf all

show bgp ip unicast vrf all

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast vrf all ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_afi": {
                                "ROW_afi": {
                                    "TABLE_safi": {
                                        "ROW_safi": {
                                            "TABLE_rd": {
                                                "ROW_rd": {
                                                    "TABLE_prefix": {
                                                        "ROW_prefix": [
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.255.1/32"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.50.0/24"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.90.128/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.0/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.8/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "0.0.0.0", 
                                                                        "localpref": "100", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "invalid", 
                                                                        "statuscode": {}, 
                                                                        "type": "local", 
                                                                        "typecode": "l", 
                                                                        "weight": "32768"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.166.4/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "33.33.33.33/32"
                                                            }
                                                        ]
                                                    }
                                                }
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "router-id": "7.57.255.2", 
                                            "safi": "1", 
                                            "table-version": "8030"
                                        }
                                    }, 
                                    "afi": "1"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast vrf all ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast vrf all command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast vrf all 
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 8030, Local Router ID is 7.57.255.2
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
 l7.57.0.0/16        0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e7.57.255.1/32      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.57.0.0/16       0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e10.57.50.0/24      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.100.90.128/30   0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.0/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.8/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
  l10.100.166.4/30    0.0.0.0                           100      32768 i
&e33.33.33.33/32     10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i


show bgp ip unicast vrf default

show bgp ip unicast vrf default

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show bgp ip unicast vrf default ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_afi": {
                                "ROW_afi": {
                                    "TABLE_safi": {
                                        "ROW_safi": {
                                            "TABLE_rd": {
                                                "ROW_rd": {
                                                    "TABLE_prefix": {
                                                        "ROW_prefix": [
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "7.57.255.1/32"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.0.0/16"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.57.50.0/24"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.90.128/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.0/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "0.0.0.0", 
                                                                            "localpref": "100", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "local", 
                                                                            "typecode": "l", 
                                                                            "weight": "32768"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "none", 
                                                                            "bestcode": {}, 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "2", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "10.100.157.8/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": {
                                                                        "aspath": "", 
                                                                        "best": "none", 
                                                                        "bestcode": {}, 
                                                                        "ipnexthop": "0.0.0.0", 
                                                                        "localpref": "100", 
                                                                        "origin": "i", 
                                                                        "pathnr": "0", 
                                                                        "status": "invalid", 
                                                                        "statuscode": {}, 
                                                                        "type": "local", 
                                                                        "typecode": "l", 
                                                                        "weight": "32768"
                                                                    }
                                                                }, 
                                                                "ipprefix": "10.100.166.4/30"
                                                            }, 
                                                            {
                                                                "TABLE_path": {
                                                                    "ROW_path": [
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "backup", 
                                                                            "bestcode": "&", 
                                                                            "ipnexthop": "10.100.157.1", 
                                                                            "origin": "i", 
                                                                            "pathnr": "0", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }, 
                                                                        {
                                                                            "aspath": "65059", 
                                                                            "best": "bestpath", 
                                                                            "bestcode": ">", 
                                                                            "ipnexthop": "10.100.157.9", 
                                                                            "localpref": "110", 
                                                                            "origin": "i", 
                                                                            "pathnr": "1", 
                                                                            "status": "valid", 
                                                                            "statuscode": "*", 
                                                                            "type": "external", 
                                                                            "typecode": "e", 
                                                                            "weight": "0"
                                                                        }
                                                                    ]
                                                                }, 
                                                                "ipprefix": "33.33.33.33/32"
                                                            }
                                                        ]
                                                    }
                                                }
                                            }, 
                                            "af-name": "IPv4 Unicast", 
                                            "router-id": "7.57.255.2", 
                                            "safi": "1", 
                                            "table-version": "8030"
                                        }
                                    }, 
                                    "afi": "1"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show bgp ip unicast vrf default ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show bgp ip unicast vrf default command, see the CLI command reference:

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

CLI Output
Switch# show bgp ip unicast vrf default 
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 8030, Local Router ID is 7.57.255.2
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
 l7.57.0.0/16        0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e7.57.255.1/32      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.57.0.0/16       0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
&e10.57.50.0/24      10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i
 l10.100.90.128/30   0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.0/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
 l10.100.157.8/30    0.0.0.0                           100      32768 i
&e                   10.100.157.9                      110          0 65059 i
 e                   10.100.157.1                                   0 65059 i
  l10.100.166.4/30    0.0.0.0                           100      32768 i
&e33.33.33.33/32     10.100.157.1                                   0 65059 i
 e                   10.100.157.9                      110          0 65059 i