Netstack Operational Commands
This section demonstrates many of the netstack operational command options shows how the NX-API REST API corresponds to the CLI commands.
Querying an IP Interface
Querying a Default VRF
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Querying a Non-Default VRF
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip interface { {{brief [include-secondary]} | [<interface>] | [<ip-addr>]}
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IP Traffic
Querying IP Traffic
Querying IP Traffic
GET https://<IP_Address>/api/mo/sys/ipv4/inst/iptrafficstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip traffic
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IP Clients
Querying All Clients
All Clients
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv4/inst/client-pktmgr-proto-47.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip client [<client-name>]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying a IP Processes
Querying a Default VRF
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Querying a Non-Default VRF
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip process [api] [vrf {<vrf-name> | <vrf-known-name> | all}]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying Netstack Log Levels
Querying Netstack Log Levels
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json
CLI Command
show logging level netstack
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying Load Sharing
Querying Load Sharing
GET https://<IP_Address>/api/mo/sys/ipv4/inst/loadstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip load-sharing
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Interfaces
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 interface
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Traffic
Querying IPv6 Traffic
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/trafficstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 traffic [detail] [vrf {<vrf-name> | <vrf-known-name>}]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Clients
All Clients
GET https://<IP_Address>/api/mo/sys/ipv6/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv6/inst/clientstats-tm-proto-0.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 client [<client-name>]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Fragments
Querying IPv6 Fragments
GET https://<IP_Address>/api/mo/sys/ipv6/inst/fragstats-[<srcAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 fragments [<source-addr>]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Processes
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 process [vrf {<vrf-name> | <vrf-known-name> | all}]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 MTU Statistics
Querying IPv6 MTU Statistics
GET https://<IP_Address>/api/mo/sys/ipv6/inst/mtustats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 mtu [statistics | vrf {<vrf-name> | <vrf-known-name> | all [detail]}]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Neighbor Static Interfaces
Querying IPv6 Neighbor Static Interfaces
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 neighbor static [interface <interface>]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying Logging Levels for ICMPv6
Querying Logging Levels for ICMPv6
GET https://<IP_Address>/api/mo/sys/icmpv6/inst.json
CLI Command
show logging level ipv6 icmp
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Global Traffic
Querying IPv6 Global Traffic
GET https://<IP_Address>/api/mo/sys/nd/inst/glblpktstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 {icmp | nd} global traffic
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Interface Statistics for Prefixes and Routes
Querying a Default VRF (Prefix)
Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Querying a Default VRF (Route)
Default VRF (Route)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Querying a Non-Default VRF (Prefix)
Non-Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Querying a Non-Default VRF (Route)
Non-Default VRF (Route)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 {icmp | nd} interface [<interface>] {[prefix [full]] | [route] | [detail]} [vrf {<vrf-name> | <vrf-known-name> | all}]} | default-vrf
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 ICMP Off-List Statistics
Querying IPv6 ICMP Off-List Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/offliststat-<vlanID>-ip-[<addr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp off-list [vlan <vlan-id>]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 ICMP vPC Statistics
Querying IPv6 ICMP vPC Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/vpcstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp vpc-statistics
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 Router Statistics
Querying IPv6 Router Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-<intf-vrf>/if-[<interface>]/rtrstat-[<routerAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 routers [all-routers] [[interface <interface>] | [vrf {<vrf-name> | <vrf-known-name> | all}]]
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
Querying IPv6 ICMP vAddr Link-Local Addresses
Querying a vAddr Link-Local Address
vAddr Link-Local Address
GET https://<IP_Address>/api/mo/sys/nd/inst/vaddrllstat-[fe80::5:73ff:fea0:2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Querying vAddr Globals
vAddr Globals
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/vaddrstatglobal-[12:6:1::101].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp vaddr { link-local [detail] | global | pt-tree}
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html