IP Commands
show ip client
show ip client
import requests
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 client",
"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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip client",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ip_clnt": {
"ROW_ip_clnt": {
"TABLE_clnt": {
"ROW_clnt": [
{
"clnt-name": "arp",
"clnt-uuid": 268,
"clnt-pid": 7645,
"clnt-ext-pid": 7645,
"clnt-ind": 4,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 280,
"clnt-flg": "3",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "rpm",
"clnt-uuid": 305,
"clnt-pid": 8010,
"clnt-ext-pid": 8010,
"clnt-ind": 11,
"clnt-cntxt-id": 1,
"clnt-mts-sap": 0,
"clnt-flg": "3",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "ntp",
"clnt-uuid": 71,
"clnt-pid": 7739,
"clnt-ext-pid": 7739,
"clnt-ind": 12,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 0,
"clnt-flg": "3",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "tcpudp",
"clnt-uuid": 545,
"clnt-pid": 7675,
"clnt-ext-pid": 7675,
"clnt-proto": 1,
"clnt-ind": 6,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4449,
"clnt-flg": "1",
"clnt-msg-succ-cnt": 1,
"clnt-msg-fail-cnt": 0,
"clnt-recv-fn-name": "tcp_process_ip_data_msg",
"clnt-recv-fn": "1058fd29"
},
{
"clnt-name": "igmp",
"clnt-uuid": 286,
"clnt-pid": 8021,
"clnt-ext-pid": 8021,
"clnt-proto": 2,
"clnt-ind": 5,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 5001,
"clnt-flg": "3",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "tcpudp",
"clnt-uuid": 545,
"clnt-pid": 7675,
"clnt-ext-pid": 7675,
"clnt-proto": 2,
"clnt-ind": 7,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4449,
"clnt-flg": "1",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0,
"clnt-recv-fn-name": "tcp_process_ip_data_msg",
"clnt-recv-fn": "1058fd29"
},
{
"clnt-name": "pktmgr",
"clnt-uuid": 263,
"clnt-pid": 7647,
"clnt-ext-pid": 7647,
"clnt-proto": 4,
"clnt-ind": 1,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 250,
"clnt-flg": "7",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "tcpudp",
"clnt-uuid": 545,
"clnt-pid": 7675,
"clnt-ext-pid": 7675,
"clnt-proto": 6,
"clnt-ind": 8,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4449,
"clnt-flg": "1",
"clnt-msg-succ-cnt": 186,
"clnt-msg-fail-cnt": 0,
"clnt-recv-fn-name": "tcp_process_ip_data_msg",
"clnt-recv-fn": "1058fd29"
},
{
"clnt-name": "tcpudp",
"clnt-uuid": 545,
"clnt-pid": 7675,
"clnt-ext-pid": 7675,
"clnt-proto": 17,
"clnt-ind": 9,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4449,
"clnt-flg": "1",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0,
"clnt-recv-fn-name": "tcp_process_ip_data_msg",
"clnt-recv-fn": "1058fd29"
},
{
"clnt-name": "pktmgr",
"clnt-uuid": 263,
"clnt-pid": 7647,
"clnt-ext-pid": 7647,
"clnt-proto": 41,
"clnt-ind": 2,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 250,
"clnt-flg": "7",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "pktmgr",
"clnt-uuid": 263,
"clnt-pid": 7647,
"clnt-ext-pid": 7647,
"clnt-proto": 47,
"clnt-ind": 3,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 250,
"clnt-flg": "7",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
},
{
"clnt-name": "tcpudp",
"clnt-uuid": 545,
"clnt-pid": 7675,
"clnt-ext-pid": 7675,
"clnt-proto": 112,
"clnt-ind": 10,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4449,
"clnt-flg": "1",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0,
"clnt-recv-fn-name": "tcp_process_ip_data_msg",
"clnt-recv-fn": "1058fd29"
},
{
"clnt-name": "mcastfwd",
"clnt-uuid": 757,
"clnt-pid": 8236,
"clnt-ext-pid": 8236,
"clnt-proto": 254,
"clnt-ind": 13,
"clnt-cntxt-id": 65535,
"clnt-mts-sap": 4776,
"clnt-flg": "3",
"clnt-msg-succ-cnt": 0,
"clnt-msg-fail-cnt": 0
}
]
}
}
}
}
}
}
}
}
switch# show ip client | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_ip_clnt>
<ROW_ip_clnt>
<TABLE_clnt>
<ROW_clnt>
<clnt-name>arp</clnt-name>
<clnt-uuid>268</clnt-uuid>
<clnt-pid>7645</clnt-pid>
<clnt-ext-pid>7645</clnt-ext-pid>
<clnt-ind>4</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>280</clnt-mts-sap>
<clnt-flg>3</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>rpm</clnt-name>
<clnt-uuid>305</clnt-uuid>
<clnt-pid>8010</clnt-pid>
<clnt-ext-pid>8010</clnt-ext-pid>
<clnt-ind>11</clnt-ind>
<clnt-cntxt-id>1</clnt-cntxt-id>
<clnt-mts-sap>0</clnt-mts-sap>
<clnt-flg>3</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>ntp</clnt-name>
<clnt-uuid>71</clnt-uuid>
<clnt-pid>7739</clnt-pid>
<clnt-ext-pid>7739</clnt-ext-pid>
<clnt-ind>12</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>0</clnt-mts-sap>
<clnt-flg>3</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>tcpudp</clnt-name>
<clnt-uuid>545</clnt-uuid>
<clnt-pid>7675</clnt-pid>
<clnt-ext-pid>7675</clnt-ext-pid>
<clnt-proto>1</clnt-proto>
<clnt-ind>6</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4449</clnt-mts-sap>
<clnt-flg>1</clnt-flg>
<clnt-msg-succ-cnt>1</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
<clnt-recv-fn-name>tcp_process_ip_data_msg</clnt-recv-fn-name>
<clnt-recv-fn>1058fd29</clnt-recv-fn>
</ROW_clnt>
<ROW_clnt>
<clnt-name>igmp</clnt-name>
<clnt-uuid>286</clnt-uuid>
<clnt-pid>8021</clnt-pid>
<clnt-ext-pid>8021</clnt-ext-pid>
<clnt-proto>2</clnt-proto>
<clnt-ind>5</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>5001</clnt-mts-sap>
<clnt-flg>3</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>tcpudp</clnt-name>
<clnt-uuid>545</clnt-uuid>
<clnt-pid>7675</clnt-pid>
<clnt-ext-pid>7675</clnt-ext-pid>
<clnt-proto>2</clnt-proto>
<clnt-ind>7</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4449</clnt-mts-sap>
<clnt-flg>1</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
<clnt-recv-fn-name>tcp_process_ip_data_msg</clnt-recv-fn-name>
<clnt-recv-fn>1058fd29</clnt-recv-fn>
</ROW_clnt>
<ROW_clnt>
<clnt-name>pktmgr</clnt-name>
<clnt-uuid>263</clnt-uuid>
<clnt-pid>7647</clnt-pid>
<clnt-ext-pid>7647</clnt-ext-pid>
<clnt-proto>4</clnt-proto>
<clnt-ind>1</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>250</clnt-mts-sap>
<clnt-flg>7</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>tcpudp</clnt-name>
<clnt-uuid>545</clnt-uuid>
<clnt-pid>7675</clnt-pid>
<clnt-ext-pid>7675</clnt-ext-pid>
<clnt-proto>6</clnt-proto>
<clnt-ind>8</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4449</clnt-mts-sap>
<clnt-flg>1</clnt-flg>
<clnt-msg-succ-cnt>179</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
<clnt-recv-fn-name>tcp_process_ip_data_msg</clnt-recv-fn-name>
<clnt-recv-fn>1058fd29</clnt-recv-fn>
</ROW_clnt>
<ROW_clnt>
<clnt-name>tcpudp</clnt-name>
<clnt-uuid>545</clnt-uuid>
<clnt-pid>7675</clnt-pid>
<clnt-ext-pid>7675</clnt-ext-pid>
<clnt-proto>17</clnt-proto>
<clnt-ind>9</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4449</clnt-mts-sap>
<clnt-flg>1</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
<clnt-recv-fn-name>tcp_process_ip_data_msg</clnt-recv-fn-name>
<clnt-recv-fn>1058fd29</clnt-recv-fn>
</ROW_clnt>
<ROW_clnt>
<clnt-name>pktmgr</clnt-name>
<clnt-uuid>263</clnt-uuid>
<clnt-pid>7647</clnt-pid>
<clnt-ext-pid>7647</clnt-ext-pid>
<clnt-proto>41</clnt-proto>
<clnt-ind>2</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>250</clnt-mts-sap>
<clnt-flg>7</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>pktmgr</clnt-name>
<clnt-uuid>263</clnt-uuid>
<clnt-pid>7647</clnt-pid>
<clnt-ext-pid>7647</clnt-ext-pid>
<clnt-proto>47</clnt-proto>
<clnt-ind>3</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>250</clnt-mts-sap>
<clnt-flg>7</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
<ROW_clnt>
<clnt-name>tcpudp</clnt-name>
<clnt-uuid>545</clnt-uuid>
<clnt-pid>7675</clnt-pid>
<clnt-ext-pid>7675</clnt-ext-pid>
<clnt-proto>112</clnt-proto>
<clnt-ind>10</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4449</clnt-mts-sap>
<clnt-flg>1</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
<clnt-recv-fn-name>tcp_process_ip_data_msg</clnt-recv-fn-name>
<clnt-recv-fn>1058fd29</clnt-recv-fn>
</ROW_clnt>
<ROW_clnt>
<clnt-name>mcastfwd</clnt-name>
<clnt-uuid>757</clnt-uuid>
<clnt-pid>8236</clnt-pid>
<clnt-ext-pid>8236</clnt-ext-pid>
<clnt-proto>254</clnt-proto>
<clnt-ind>13</clnt-ind>
<clnt-cntxt-id>65535</clnt-cntxt-id>
<clnt-mts-sap>4776</clnt-mts-sap>
<clnt-flg>3</clnt-flg>
<clnt-msg-succ-cnt>0</clnt-msg-succ-cnt>
<clnt-msg-fail-cnt>0</clnt-msg-fail-cnt>
</ROW_clnt>
</TABLE_clnt>
</ROW_ip_clnt>
</TABLE_ip_clnt>
</body>
<input>show ip client</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|
show ip int brief vrf all
show ip int brief vrf all
import requests
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 int brief 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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip int brief vrf all",
"msg": "Success",
"code": "200",
"body": {
"TABLE_intf": {
"ROW_intf": {
"vrf-name-out": "management",
"intf-name": "mgmt0",
"proto-state": "up",
"link-state": "up",
"admin-state": "up",
"iod": 2,
"prefix": "10.77.143.115",
"ip-disabled": "FALSE"
}
}
}
}
}
}
}
switch# show ip int brief vrf all | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_intf>
<ROW_intf>
<vrf-name-out>management</vrf-name-out>
<intf-name>mgmt0</intf-name>
<proto-state>up</proto-state>
<link-state>up</link-state>
<admin-state>up</admin-state>
<iod>2</iod>
<prefix>10.77.143.115</prefix>
<ip-disabled>FALSE</ip-disabled>
</ROW_intf>
</TABLE_intf>
</body>
<input>show ip int brief vrf all</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|
show ip load-sharing
show ip load-sharing
import requests
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 load-sharing",
"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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip load-sharing",
"msg": "Success",
"code": "200",
"body": {
"univer-id-ran-seed": 3775226694,
"l34-msg-load": "address source-destination port source-destination",
"gre-outer-hash": "disabled",
"concatenation": "disabled"
}
}
}
}
}
switch# show ip load-sharing | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<univer-id-ran-seed>3775226694</univer-id-ran-seed>
<l34-msg-load>address source-destination port source-destination</l34-msg-load>
<gre-outer-hash>disabled</gre-outer-hash>
<concatenation>disabled</concatenation>
</body>
<input>show ip load-sharing</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|
show ip process
show ip process
import requests
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 process",
"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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip process",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ip_pro_vrf": {
"ROW_ip_pro_vrf": {
"pro-cntxt-name": "default",
"pro-cntxt-id": 1,
"pro-base-tid": 1,
"pro-auto-disc": "disabled",
"pro-atuo-add": "not",
"pro-null-bcast": "",
"auto-punt-bcast": "",
"static-disc": "not",
"static-def-route": 0,
"ip-unreach": 0
}
}
}
}
}
}
}
switch# show ip process | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_ip_pro_vrf>
<ROW_ip_pro_vrf>
<pro-cntxt-name>default</pro-cntxt-name>
<pro-cntxt-id>1</pro-cntxt-id>
<pro-base-tid>1</pro-base-tid>
<pro-auto-disc>disabled</pro-auto-disc>
<pro-atuo-add>not</pro-atuo-add>
<pro-null-bcast />
<auto-punt-bcast />
<static-disc>not</static-disc>
<static-def-route>0</static-def-route>
<ip-unreach>0</ip-unreach>
</ROW_ip_pro_vrf>
</TABLE_ip_pro_vrf>
</body>
<input>show ip process</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|
show ip static-route vrf all
show ip static-route vrf all
import requests
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 static-route 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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip static-route vrf all",
"msg": "Success",
"code": "200",
"body": {
"TABLE_vrf_all": {
"ROW_vrf_all": {
"cntxt_name": "management",
"cntxt_id": 2,
"TABLE_each_vrf": {
"ROW_each_vrf": {
"prefix_addr_msk": "0.0.0.0/0",
"nhop_addr_msk": "10.77.143.1/32",
"nhop_vrf_info": "",
"nhop_intr_info": "",
"urib_stat": " (installed in urib)",
"nhop_urib_stat": " rnh(installed in urib)"
}
}
}
}
}
}
}
}
}
switch# show ip static-route vrf all | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_vrf_all>
<ROW_vrf_all>
<cntxt_name>management</cntxt_name>
<cntxt_id>2</cntxt_id>
<TABLE_each_vrf>
<ROW_each_vrf>
<prefix_addr_msk>0.0.0.0/0</prefix_addr_msk>
<nhop_addr_msk>10.77.143.1/32</nhop_addr_msk>
<nhop_vrf_info />
<nhop_intr_info />
<urib_stat> (installed in urib)</urib_stat>
<nhop_urib_stat> rnh(installed in urib)</nhop_urib_stat>
</ROW_each_vrf>
</TABLE_each_vrf>
</ROW_vrf_all>
</TABLE_vrf_all>
</body>
<input>show ip static-route vrf all</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|
show ip traffic
show ip traffic
import requests
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 traffic",
"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": {
"type": "cli_show",
"version": "1.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show ip traffic",
"msg": "Success",
"code": "200",
"body": {
"TABLE_icmp_software_proc_traffic": {
"ROW_icmp_software_proc_traffic": {
"TABLE_stat_last_never": {
"ROW_stat_last_never": {
"stat-last-never": "never"
}
},
"TABLE_transmission": {
"ROW_transmission": {
"tx-redir": 0,
"tx-unreach": 0,
"tx-echo-req": 0,
"tx-echo-reply": 0,
"tx-mask-req": 0,
"tx-mask-rep": 0,
"tx-info-req": 0,
"tx-info-reply": 0,
"tx-param-prob": 0,
"tx-source-quench": 0,
"tx-tstamp-req": 0,
"tx-tstamp-reply": 0,
"tx-time-exceeded": 0,
"tx-router-solicit": 0,
"tx-router-advert": 0,
"out-drop-badlen": 0,
"encap-fail": 0,
"xmit-fail": 0,
"icmp-orginate": 1,
"redirect-orginate-req": 0,
"orginate-deny": 0,
"short-ip": 0,
"old-icmp": 0,
"error-drop": 0
}
},
"TABLE_reception": {
"ROW_reception": {
"rx-redir": 0,
"rx-unreach": 0,
"rx-echo-req": 0,
"rx-echo-reply": 0,
"rx-mask-req": 0,
"rx-mask-rep": 0,
"rx-info-req": 0,
"rx-info-reply": 0,
"rx-param-prob": 0,
"rx-source-quench": 0,
"rx-tstamp-req": 0,
"rx-tstamp-reply": 0,
"rx-time-exceeded": 0,
"rx-router-solicit": 0,
"rx-router-advert": 0,
"rx-format-errors": 0,
"rx-csum-errors": 0,
"lisp-processed": 0,
"lisp-noclient": 0,
"lisp-consumed": 1,
"icmp-replies": 0,
"icmp-reply-drop": 0,
"icmp-inactive-addr": 0
}
}
}
},
"TABLE_rfc4293_ip_soft_proc_traffic": {
"ROW_rfc4293_ip_soft_proc_traffic": {
"TABLE_rfc_reception": {
"ROW_rfc_reception": {
"inrcv": 257,
"inoctet": 29800,
"inhdrerr": 0,
"innoroutes": 0,
"inaddrerr": 0,
"innoproto": 0,
"intruncated": 0,
"inforw": 0,
"reasmreqds": 0,
"reasmoks": 0,
"reasmfails": 0,
"indiscards": 0,
"indelivers": 258,
"inmcastpkts": 0,
"inmcastbytes": 0,
"inbastpkts": 0
}
},
"TABLE_rfc_transmission": {
"ROW_rfc_transmission": {
"tr-pkt-sent": 946,
"tr-bytes-sent": 507287,
"tr-out-req": 947,
"tr-outno-routes": 0,
"tr-out-frwdgrams": 0,
"tr-outdiscards": 0,
"tr-outfragreqds": 0,
"tr-outfragoks": 0,
"tr-outfragfails": 0,
"tr-outfragcreates": 0,
"tr-outtransmits": 946,
"tr-bytes-sent-end": 507287,
"tr-outmcast-pkts": 0,
"tr-outmcast-bytes": 0,
"tr-outbcastpkts": 0,
"tr-outbcastbytes": 0
}
}
}
},
"TABLE_vrf": {
"ROW_vrf": {
"vrf-name-out": "default"
}
},
"TABLE_ip_soft_processed_traffic": {
"ROW_ip_soft_processed_traffic": {
"TABLE_fragment": {
"ROW_fragment": {
"frag": 0,
"fragmented": 0,
"out-frag": 0,
"frag-drop": 0,
"cant-frag": 0,
"reasm": 0,
"frag-to": 0
}
},
"TABLE_trans_and_reception": {
"ROW_trans_and_reception": {
"rcvd": 257,
"sent": 946,
"consumed": 257,
"fwd-ucast": 0,
"fwd-mcast": 0,
"fwd-label": 0,
"ingress-mcecfrwd": 0
}
},
"TABLE_opts": {
"ROW_opts": {
"opts-end": 0,
"opts-nop": 0,
"opts-bsec": 0,
"opts-loosesrc-route": 0,
"opts-timestamp": 0,
"opts-esec": 0,
"opts-record-route": 0,
"opts-other": 0
}
},
"TABLE_errors": {
"ROW_errors": {
"bad-csum": 0,
"too-small": 0,
"bad-ver": 0,
"bad-hlen": 0,
"bad-len": 0,
"bad-dest": 0,
"bad-ttl": 0,
"cant-fwd": 0,
"out-drop": 0,
"bad-encap": 1,
"no-route": 0,
"no-proto": 0,
"bad-options": 0,
"vinci": 0,
"snoop": 0,
"svi": 0,
"restart-recovery": 0,
"mbuf-fail": 0,
"bad-context": 0,
"rpf-drops": 0,
"bad-gw-mac": 0,
"ing-ips-option-fail": 0,
"nat-in-drop": 0,
"nat-out-drop": 0,
"ing-option-proc-fail": 0,
"ing-mfrwd-fail": 0,
"ing-lisp-drop": 0,
"ing-lisp-decap-drop": 0,
"ing-lisp-encap-drop": 0,
"ing-lisp-encap": 0,
"ing-mfwd-copy-drop": 0,
"ing-ra-reass-drop": 0,
"ing-icmp-redirect": 0,
"ing-drop-ifmgr-init": 0,
"ing-drop-invld-filter": 0,
"ing-drop-invld-l2-msg": 0,
"ingress": 0,
"egrees": 0,
"directed_bdcast": 0
}
}
}
}
}
}
}
}
}
switch# show ip traffic | xml
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_vrf>
<ROW_vrf>
<vrf-name-out>default</vrf-name-out>
</ROW_vrf>
</TABLE_vrf>
<TABLE_ip_soft_processed_traffic>
<ROW_ip_soft_processed_traffic>
<TABLE_trans_and_reception>
<ROW_trans_and_reception>
<rcvd>246</rcvd>
<sent>927</sent>
<consumed>246</consumed>
<fwd-ucast>0</fwd-ucast>
<fwd-mcast>0</fwd-mcast>
<fwd-label>0</fwd-label>
<ingress-mcecfrwd>0</ingress-mcecfrwd>
</ROW_trans_and_reception>
</TABLE_trans_and_reception>
<TABLE_opts>
<ROW_opts>
<opts-end>0</opts-end>
<opts-nop>0</opts-nop>
<opts-bsec>0</opts-bsec>
<opts-loosesrc-route>0</opts-loosesrc-route>
<opts-timestamp>0</opts-timestamp>
<opts-esec>0</opts-esec>
<opts-record-route>0</opts-record-route>
<opts-other>0</opts-other>
</ROW_opts>
</TABLE_opts>
<TABLE_errors>
<ROW_errors>
<bad-csum>0</bad-csum>
<too-small>0</too-small>
<bad-ver>0</bad-ver>
<bad-hlen>0</bad-hlen>
<bad-len>0</bad-len>
<bad-dest>0</bad-dest>
<bad-ttl>0</bad-ttl>
<cant-fwd>0</cant-fwd>
<out-drop>0</out-drop>
<bad-encap>1</bad-encap>
<no-route>0</no-route>
<no-proto>0</no-proto>
<bad-options>0</bad-options>
<vinci>0</vinci>
<snoop>0</snoop>
<svi>0</svi>
<restart-recovery>0</restart-recovery>
<mbuf-fail>0</mbuf-fail>
<bad-context>0</bad-context>
<rpf-drops>0</rpf-drops>
<bad-gw-mac>0</bad-gw-mac>
<ing-ips-option-fail>0</ing-ips-option-fail>
<nat-in-drop>0</nat-in-drop>
<nat-out-drop>0</nat-out-drop>
<ing-option-proc-fail>0</ing-option-proc-fail>
<ing-mfrwd-fail>0</ing-mfrwd-fail>
<ing-lisp-drop>0</ing-lisp-drop>
<ing-lisp-decap-drop>0</ing-lisp-decap-drop>
<ing-lisp-encap-drop>0</ing-lisp-encap-drop>
<ing-lisp-encap>0</ing-lisp-encap>
<ing-mfwd-copy-drop>0</ing-mfwd-copy-drop>
<ing-ra-reass-drop>0</ing-ra-reass-drop>
<ing-icmp-redirect>0</ing-icmp-redirect>
<ing-drop-ifmgr-init>0</ing-drop-ifmgr-init>
<ing-drop-invld-filter>0</ing-drop-invld-filter>
<ing-drop-invld-l2-msg>0</ing-drop-invld-l2-msg>
<ingress>0</ingress>
<egrees>0</egrees>
<directed_bdcast>0</directed_bdcast>
</ROW_errors>
</TABLE_errors>
<TABLE_fragment>
<ROW_fragment>
<frag>0</frag>
<fragmented>0</fragmented>
<out-frag>0</out-frag>
<frag-drop>0</frag-drop>
<cant-frag>0</cant-frag>
<reasm>0</reasm>
<frag-to>0</frag-to>
</ROW_fragment>
</TABLE_fragment>
</ROW_ip_soft_processed_traffic>
</TABLE_ip_soft_processed_traffic>
<TABLE_icmp_software_proc_traffic>
<ROW_icmp_software_proc_traffic>
<TABLE_transmission>
<ROW_transmission>
<tx-redir>0</tx-redir>
<tx-unreach>0</tx-unreach>
<tx-echo-req>0</tx-echo-req>
<tx-echo-reply>0</tx-echo-reply>
<tx-mask-req>0</tx-mask-req>
<tx-mask-rep>0</tx-mask-rep>
<tx-info-req>0</tx-info-req>
<tx-info-reply>0</tx-info-reply>
<tx-param-prob>0</tx-param-prob>
<tx-source-quench>0</tx-source-quench>
<tx-tstamp-req>0</tx-tstamp-req>
<tx-tstamp-reply>0</tx-tstamp-reply>
<tx-time-exceeded>0</tx-time-exceeded>
<tx-router-solicit>0</tx-router-solicit>
<tx-router-advert>0</tx-router-advert>
<out-drop-badlen>0</out-drop-badlen>
<encap-fail>0</encap-fail>
<xmit-fail>0</xmit-fail>
<icmp-orginate>1</icmp-orginate>
<redirect-orginate-req>0</redirect-orginate-req>
<orginate-deny>0</orginate-deny>
<short-ip>0</short-ip>
<old-icmp>0</old-icmp>
<error-drop>0</error-drop>
</ROW_transmission>
</TABLE_transmission>
<TABLE_reception>
<ROW_reception>
<rx-redir>0</rx-redir>
<rx-unreach>0</rx-unreach>
<rx-echo-req>0</rx-echo-req>
<rx-echo-reply>0</rx-echo-reply>
<rx-mask-req>0</rx-mask-req>
<rx-mask-rep>0</rx-mask-rep>
<rx-info-req>0</rx-info-req>
<rx-info-reply>0</rx-info-reply>
<rx-param-prob>0</rx-param-prob>
<rx-source-quench>0</rx-source-quench>
<rx-tstamp-req>0</rx-tstamp-req>
<rx-tstamp-reply>0</rx-tstamp-reply>
<rx-time-exceeded>0</rx-time-exceeded>
<rx-router-solicit>0</rx-router-solicit>
<rx-router-advert>0</rx-router-advert>
<rx-format-errors>0</rx-format-errors>
<rx-csum-errors>0</rx-csum-errors>
<lisp-processed>0</lisp-processed>
<lisp-noclient>0</lisp-noclient>
<lisp-consumed>1</lisp-consumed>
<icmp-replies>0</icmp-replies>
<icmp-reply-drop>0</icmp-reply-drop>
<icmp-inactive-addr>0</icmp-inactive-addr>
</ROW_reception>
</TABLE_reception>
<TABLE_stat_last_never>
<ROW_stat_last_never>
<stat-last-never>never</stat-last-never>
</ROW_stat_last_never>
</TABLE_stat_last_never>
</ROW_icmp_software_proc_traffic>
</TABLE_icmp_software_proc_traffic>
<TABLE_rfc4293_ip_soft_proc_traffic>
<ROW_rfc4293_ip_soft_proc_traffic>
<TABLE_rfc_reception>
<ROW_rfc_reception>
<inrcv>246</inrcv>
<inoctet>28634</inoctet>
<inhdrerr>0</inhdrerr>
<innoroutes>0</innoroutes>
<inaddrerr>0</inaddrerr>
<innoproto>0</innoproto>
<intruncated>0</intruncated>
<inforw>0</inforw>
<reasmreqds>0</reasmreqds>
<reasmoks>0</reasmoks>
<reasmfails>0</reasmfails>
<indiscards>0</indiscards>
<indelivers>247</indelivers>
<inmcastpkts>0</inmcastpkts>
<inmcastbytes>0</inmcastbytes>
<inbastpkts>0</inbastpkts>
</ROW_rfc_reception>
</TABLE_rfc_reception>
<TABLE_rfc_transmission>
<ROW_rfc_transmission>
<tr-pkt-sent>927</tr-pkt-sent>
<tr-bytes-sent>498390</tr-bytes-sent>
<tr-out-req>928</tr-out-req>
<tr-outno-routes>0</tr-outno-routes>
<tr-out-frwdgrams>0</tr-out-frwdgrams>
<tr-outdiscards>0</tr-outdiscards>
<tr-outfragreqds>0</tr-outfragreqds>
<tr-outfragoks>0</tr-outfragoks>
<tr-outfragfails>0</tr-outfragfails>
<tr-outfragcreates>0</tr-outfragcreates>
<tr-outtransmits>927</tr-outtransmits>
<tr-bytes-sent-end>498390</tr-bytes-sent-end>
<tr-outmcast-pkts>0</tr-outmcast-pkts>
<tr-outmcast-bytes>0</tr-outmcast-bytes>
<tr-outbcastpkts>0</tr-outbcastpkts>
<tr-outbcastbytes>0</tr-outbcastbytes>
</ROW_rfc_transmission>
</TABLE_rfc_transmission>
</ROW_rfc4293_ip_soft_proc_traffic>
</TABLE_rfc4293_ip_soft_proc_traffic>
</body>
<input>show ip traffic</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
CLI Output |
---|
|