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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|
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:
| CLI Output |
|---|
|