show ip interface 89.1.4.1
show ip interface 89.1.4.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 ip interface 89.1.4.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_intf": {
"ROW_intf": {
"admin-state": "TRUE",
"bbyte-consumed": "0",
"bbyte-fwd": "0",
"bbyte-orig": "0",
"bbyte-recv": "0",
"bbyte-sent": "0",
"bcast-addr": "255.255.255.255",
"bpkt-consumed": "0",
"bpkt-fwd": "0",
"bpkt-orig": "0",
"bpkt-recv": "0",
"bpkt-sent": "0",
"dir-bcast": "FALSE",
"icmp-redirect": "TRUE",
"intf-name": "Ethernet1/1.53",
"iod": "559",
"ip-disabled": "FALSE",
"ip-forwarding": "FALSE",
"ip-ls-type": "none",
"ip-unreach": "FALSE",
"lbyte-consumed": "0",
"lbyte-fwd": "0",
"lbyte-orig": "0",
"lbyte-recv": "0",
"lbyte-sent": "0",
"lcl-proxy-arp": "FALSE",
"link-state": "TRUE",
"lpkt-consumed": "0",
"lpkt-fwd": "0",
"lpkt-orig": "0",
"lpkt-recv": "0",
"lpkt-sent": "0",
"masklen": "24",
"mbyte-consumed": "0",
"mbyte-fwd": "0",
"mbyte-orig": "0",
"mbyte-recv": "0",
"mbyte-sent": "0",
"mpkt-consumed": "0",
"mpkt-fwd": "0",
"mpkt-orig": "0",
"mpkt-recv": "0",
"mpkt-sent": "0",
"mrouting": "FALSE",
"mtu": "1500",
"num-addr": "1",
"num-maddr": "0",
"port-unreach": "TRUE",
"pref": "0",
"prefix": "89.1.4.1",
"proto-state": "TRUE",
"proxy-arp": "FALSE",
"secondary": "",
"stats-last-reset": "PT0S",
"subnet": "89.1.4.0",
"tag": "0",
"ubyte-consumed": "607404",
"ubyte-fwd": "0",
"ubyte-orig": "1128036",
"ubyte-recv": "607404",
"ubyte-sent": "1128036",
"upkt-consumed": "14462",
"upkt-fwd": "0",
"upkt-orig": "14462",
"upkt-recv": "14462",
"upkt-sent": "14462",
"urpf-mode": "none",
"vrf-name-out": "default",
"wccp-exclude": "FALSE",
"wccp-inbound": "FALSE",
"wccp-outbound": "FALSE"
}
}
},
"code": "200",
"input": "show ip interface 89.1.4.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 ip interface 89.1.4.1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
CLI Output |
---|
|
show ip interface brief
show ip interface brief
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 ip interface brief",
"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_intf": {
"ROW_intf": [
{
"admin-state": "TRUE",
"intf-name": "Vlan1",
"iod": "55",
"ip-disabled": "FALSE",
"link-state": "FALSE",
"prefix": "9.9.9.9",
"proto-state": "FALSE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Vlan8",
"iod": "62",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "10.57.8.3",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Vlan50",
"iod": "104",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "10.57.50.4",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Vlan253",
"iod": "307",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "7.57.253.2",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Lo0",
"iod": "560",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "7.57.255.2",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "FALSE",
"intf-name": "Lo100",
"iod": "561",
"ip-disabled": "FALSE",
"link-state": "FALSE",
"prefix": "9.9.9.9",
"proto-state": "FALSE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/1",
"iod": "7",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "10.100.90.129",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/1.50",
"iod": "556",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "89.1.1.1",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/1.51",
"iod": "557",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "89.1.2.1",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/1.52",
"iod": "558",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "89.1.3.1",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/1.53",
"iod": "559",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "89.1.4.1",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/2",
"iod": "8",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "10.100.157.2",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/4",
"iod": "10",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "10.100.157.10",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/5",
"iod": "11",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "94.1.1.96",
"proto-state": "TRUE",
"vrf-name-out": "default"
},
{
"admin-state": "TRUE",
"intf-name": "Eth1/7",
"iod": "13",
"ip-disabled": "FALSE",
"link-state": "TRUE",
"prefix": "192.168.161.2",
"proto-state": "TRUE",
"vrf-name-out": "default"
}
]
}
},
"code": "200",
"input": "show ip interface brief",
"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 ip interface brief command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
CLI Output |
---|
|