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:

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

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).

CLI Output
Switch# show ip interface 89.1.4.1
IP Interface Status for VRF "default"
Ethernet1/1.53, Interface status: protocol-up/link-up/admin-up, iod: 559,
  IP address: 89.1.4.1, IP subnet: 89.1.4.0/24 
  IP broadcast address: 255.255.255.255
  IP multicast groups locally joined: none
  IP MTU: 1500 bytes (using link MTU)
  IP primary address route-preference: 0, tag: 0
  IP proxy ARP : disabled
  IP Local Proxy ARP : disabled
  IP multicast routing: disabled
  IP icmp redirects: enabled
  IP directed-broadcast: disabled 
  IP Forwarding: disabled 
  IP icmp unreachables (except port): disabled
  IP icmp port-unreachable: enabled
  IP unicast reverse path forwarding: none
  IP load sharing: none 
  ip interface statistics last reset: never
  IP interface software stats: (sent/received/forwarded/originated/consumed)
    Unicast packets    : 14462/14462/0/14462/14462
    Unicast bytes      : 1128036/607404/0/1128036/607404
    Multicast packets  : 0/0/0/0/0
    Multicast bytes    : 0/0/0/0/0
    Broadcast packets  : 0/0/0/0/0
    Broadcast bytes    : 0/0/0/0/0
    Labeled packets    : 0/0/0/0/0
    Labeled bytes      : 0/0/0/0/0
  WCCP Redirect outbound: disabled
  WCCP Redirect inbound: disabled
  WCCP Redirect exclude: disabled

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:

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

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).

CLI Output
Switch# show ip interface brief
IP Interface Status for VRF "default"(1)
Interface            IP Address      Interface Status
Vlan1                9.9.9.9         protocol-down/link-down/admin-up
Vlan8 10.57.8.3 protocol-up/link-up/admin-up
Vlan50 10.57.50.4 protocol-up/link-up/admin-up
Vlan253 7.57.253.2 protocol-up/link-up/admin-up
Lo0 7.57.255.2 protocol-up/link-up/admin-up
Lo100 9.9.9.9 protocol-down/link-down/admin-down Eth1/1 10.100.90.129 protocol-up/link-up/admin-up
Eth1/1.50 89.1.1.1 protocol-up/link-up/admin-up
Eth1/1.51 89.1.2.1 protocol-up/link-up/admin-up
Eth1/1.52 89.1.3.1 protocol-up/link-up/admin-up
Eth1/1.53 89.1.4.1 protocol-up/link-up/admin-up
Eth1/2 10.100.157.2 protocol-up/link-up/admin-up
Eth1/4 10.100.157.10 protocol-up/link-up/admin-up
Eth1/5 94.1.1.96 protocol-up/link-up/admin-up
Eth1/7 192.168.161.2 protocol-up/link-up/admin-up