show HSRP Commands
show hsrp
show hsrp
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 hsrp”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.544000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 114,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 114,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.950000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 106,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 106,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>2.178000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>157</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>157</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp interface ethernet
show hsrp interface ethernet
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 hsrp interface ethernet 4/13”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/13”,
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.279000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 463,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 463,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/13-1”,
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/13”,
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.472000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 455,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 455,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<interface>
<__XML__PARAM__interface-id>
<__XML__value>Ethernet4/13</__XML__value>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>1.825000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>192</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>192</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</__XML__PARAM__interface-id>
</interface>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp group
show hsrp group 1
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 hsrp group 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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.557000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 562,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 562,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.473000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 554,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 554,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<group>
<__XML__PARAM__group-number>
<__XML__value>1</__XML__value>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>1.337000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>209</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>209</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</__XML__PARAM__group-number>
</group>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp active
show hsrp active
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 hsrp active”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.476000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 231,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 231,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.761000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 223,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 223,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<active>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>0.377000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>230</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>230</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</active>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp brief
show hsrp brief
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 hsrp 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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.047000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 175,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 175,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.371000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 167,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 167,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<brief>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>0.480000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>250</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>250</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</brief>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp all
show hsrp 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 hsrp 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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.348000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 267,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 267,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.072000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 258,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 258,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<all>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>0.251000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>268</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>268</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</all>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp detail
show hsrp detail
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 hsrp detail”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.935000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 303,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 303,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.019000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 295,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 295,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<detail>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>1.112000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>278</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>278</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</detail>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp ipv4
show hsrp ipv4
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 hsrp ipv4”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": {
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 100,
"sh_cfg_prio": 100,
"sh_fwd_lower_threshold": 90,
"sh_fwd_upper_threshold": 100,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.902000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 5,
"sh_last_state_change": 387,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 387,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<ipv4>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>0.779000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>290</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>290</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</ipv4>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp ipv6
show hsrp ipv6
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 hsrp ipv6”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": {
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Active",
"sh_prio": 101,
"sh_cfg_prio": 101,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 101,
"sh_can_forward": "enabled",
"sh_preempt": "enabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.307000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "0.000000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 2,
"sh_last_state_change": 404,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 404,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<ipv6>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/13</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v6</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Active</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>2.483000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip_v6>fe80::100</sh_vip_v6>
<sh_vip_attr>config</sh_vip_attr>
<TABLE_grp_vip_sec>
<ROW_grp_vip_sec>
<sh_vip_sec>0.0.0.48</sh_vip_sec>
</ROW_grp_vip_sec>
</TABLE_grp_vip_sec>
<sh_active_router_addr_v6>fe80::da67:d9ff:fe0d:a6c3</sh_active_router_ad
dr_v6>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>0.000000</sh_active_router_timer>
<sh_standby_router_addr_v6>0::</sh_standby_router_addr_v6>
<sh_standby_router_prio>0</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0005.73a0.0001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>2</sh_num_of_state_changes>
<sh_last_state_change>27</sh_last_state_change>
<sh_num_of_total_state_changes>5</sh_num_of_total_state_changes>
<sh_last_total_state_change>27</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/13-1-V6</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</ipv6>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp standby
show hsrp standby
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 hsrp standby”,
"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)
{
"TABLE_grp_detail": {
"ROW_grp_detail": [
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v4",
"sh_group_version": "v2",
"sh_group_state": "Standby",
"sh_prio": 50,
"sh_cfg_prio": 50,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 50,
"sh_can_forward": "enabled",
"sh_preempt": "disabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.765000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip": "4.4.4.100",
"sh_vip_attr": "config",
"sh_active_router_addr": "4.4.4.2",
"sh_active_router_prio": 100,
"sh_active_router_timer": "2.534000",
"sh_standby_router_addr": "4.4.4.1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "1234.1234.1234",
"sh_vmac_attr": "Configured MAC",
"sh_num_of_state_changes": 7,
"sh_last_state_change": 1061,
"sh_num_of_total_state_changes": 9,
"sh_last_total_state_change": 1061,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1",
"sh_ip_redund_name_attr": "Default"
},
{
"sh_if_index": "Ethernet4/1",
"sh_group_num": 1,
"sh_group_type": "v6",
"sh_group_version": "v2",
"sh_group_state": "Standby",
"sh_prio": 50,
"sh_cfg_prio": 50,
"sh_fwd_lower_threshold": 1,
"sh_fwd_upper_threshold": 50,
"sh_can_forward": "enabled",
"sh_preempt": "disabled",
"sh_cur_hello": 1,
"sh_cur_hello_attr": "sec",
"sh_cfg_hello": 1,
"sh_cfg_hello_attr": "sec",
"sh_active_hello": "0.359000",
"sh_cur_hold": 3,
"sh_cur_hold_attr": "sec",
"sh_cfg_hold": 3,
"sh_cfg_hold_attr": "sec",
"sh_vip_v6": "fe80::5:73ff:fea0:1",
"sh_vip_attr": "config",
"TABLE_grp_vip_sec": {
"ROW_grp_vip_sec": {
"sh_vip_sec": "0.0.0.64"
}
},
"sh_active_router_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"sh_active_router_prio": 101,
"sh_active_router_timer": "2.791000",
"sh_standby_router_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"sh_standby_router_prio": 50,
"sh_authentication_type": "md5",
"sh_authentication_data": "hsrp",
"sh_vmac": "0005.73a0.0001",
"sh_vmac_attr": "Default MAC",
"sh_num_of_state_changes": 4,
"sh_last_state_change": 1053,
"sh_num_of_total_state_changes": 7,
"sh_last_total_state_change": 1053,
"sh_num_track_obj": 0,
"sh_ip_redund_name": "hsrp-Eth4/1-1-V6",
"sh_ip_redund_name_attr": "Default"
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<standby>
<__readonly__>
<TABLE_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/5</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v4</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Standby</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>2.357000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip>30.0.0.100</sh_vip>
<sh_vip_attr>config</sh_vip_attr>
<sh_active_router_addr>30.0.0.16</sh_active_router_addr>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>3.033000</sh_active_router_timer>
<sh_standby_router_addr>30.0.0.15</sh_standby_router_addr>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0000.0c9f.f001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>1</sh_num_of_state_changes>
<sh_last_state_change>408</sh_last_state_change>
<sh_num_of_total_state_changes>3</sh_num_of_total_state_changes>
<sh_last_total_state_change>408</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/5-1</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
<ROW_grp_detail>
<sh_if_index>Ethernet4/5</sh_if_index>
<sh_group_num>1</sh_group_num>
<sh_group_type>v6</sh_group_type>
<sh_group_version>v2</sh_group_version>
<sh_group_state>Standby</sh_group_state>
<sh_prio>100</sh_prio>
<sh_cfg_prio>100</sh_cfg_prio>
<sh_fwd_lower_threshold>1</sh_fwd_lower_threshold>
<sh_fwd_upper_threshold>100</sh_fwd_upper_threshold>
<sh_can_forward>enabled</sh_can_forward>
<sh_preempt>disabled</sh_preempt>
<sh_cur_hello>3</sh_cur_hello>
<sh_cur_hello_attr>sec</sh_cur_hello_attr>
<sh_active_hello>0.541000</sh_active_hello>
<sh_cur_hold>10</sh_cur_hold>
<sh_cur_hold_attr>sec</sh_cur_hold_attr>
<sh_vip_v6>fe80::100</sh_vip_v6>
<sh_vip_attr>config</sh_vip_attr>
<TABLE_grp_vip_sec>
<ROW_grp_vip_sec>
<sh_vip_sec>0.0.0.48</sh_vip_sec>
</ROW_grp_vip_sec>
</TABLE_grp_vip_sec>
<sh_active_router_addr_v6>fe80::da67:d9ff:fe0d:a6c3</sh_active_router_ad
dr_v6>
<sh_active_router_prio>100</sh_active_router_prio>
<sh_active_router_timer>7.875000</sh_active_router_timer>
<sh_standby_router_addr_v6>fe80::da67:d9ff:fe0d:a6c2</sh_standby_router_
addr_v6>
<sh_standby_router_prio>100</sh_standby_router_prio>
<sh_authentication_type>text</sh_authentication_type>
<sh_authentication_data>cisco</sh_authentication_data>
<sh_vmac>0005.73a0.0001</sh_vmac>
<sh_vmac_attr>Default MAC</sh_vmac_attr>
<sh_num_of_state_changes>1</sh_num_of_state_changes>
<sh_last_state_change>16</sh_last_state_change>
<sh_num_of_total_state_changes>4</sh_num_of_total_state_changes>
<sh_last_total_state_change>16</sh_last_total_state_change>
<sh_num_track_obj>0</sh_num_track_obj>
<sh_ip_redund_name>hsrp-Eth4/5-1-V6</sh_ip_redund_name>
<sh_ip_redund_name_attr>Default</sh_ip_redund_name_attr>
</ROW_grp_detail>
</TABLE_grp_detail>
</__readonly__>
</standby>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp bfd-sessions
show hsrp bfd-sessions
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 hsrp bfd-sessions”,
"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)
{
"TABLE_bfd_sess": {
"ROW_bfd_sess": [
{
"interface": "Ethernet4/1",
"list_size": 2,
"src_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"dst_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"ref_count": 1,
"TABLE_ref_groups": {
"ROW_ref_groups": {
"ref_group_id": 1
}
},
"TABLE_hist_groups": {
"ROW_hist_groups": [
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:01:28",
"hist_abs_time": "(02)-16:12:31",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADDED",
"hist_op_reason": "-"
},
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:01:30",
"hist_abs_time": "(02)-16:12:28",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADD Tx",
"hist_op_reason": "BFD configured on interface"
}
]
}
},
{
"interface": "Ethernet4/1",
"src_addr": "4.4.4.2",
"dst_addr": "4.4.4.1",
"ref_count": 1,
"TABLE_ref_groups": {
"ROW_ref_groups": {
"ref_group_id": 1
}
},
"TABLE_hist_groups": {
"ROW_hist_groups": [
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:01:28",
"hist_abs_time": "(02)-16:12:31",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADDED",
"hist_op_reason": "-"
},
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:01:30",
"hist_abs_time": "(02)-16:12:28",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADD Tx",
"hist_op_reason": "BFD configured on interface"
}
]
}
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<bfd-sessions>
<__readonly__>
<TABLE_bfd_sess>
<ROW_bfd_sess>
<interface>Ethernet4/13</interface>
<list_size>2</list_size>
<src_addr_v6>fe80::da67:d9ff:fe0d:a6c3</src_addr_v6>
<dst_addr_v6>fe80::da67:d9ff:fe0d:a6c2</dst_addr_v6>
<ref_count>1</ref_count>
<TABLE_ref_groups>
<ROW_ref_groups>
<ref_group_id>1</ref_group_id>
</ROW_ref_groups>
</TABLE_ref_groups>
<TABLE_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:00:09</hist_rel_time>
<hist_abs_time>(11)-12:30:21</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADDED</hist_status>
<hist_op_reason>-</hist_op_reason>
</ROW_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:00:12</hist_rel_time>
<hist_abs_time>(11)-12:30:19</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADD Tx</hist_status>
<hist_op_reason>BFD configured on interface</hist_op_reason>
</ROW_hist_groups>
</TABLE_hist_groups>
</ROW_bfd_sess>
<ROW_bfd_sess>
<interface>Ethernet4/13</interface>
<src_addr>30.0.0.16</src_addr>
<dst_addr>30.0.0.15</dst_addr>
<ref_count>1</ref_count>
<TABLE_ref_groups>
<ROW_ref_groups>
<ref_group_id>1</ref_group_id>
</ROW_ref_groups>
</TABLE_ref_groups>
<TABLE_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:00:09</hist_rel_time>
<hist_abs_time>(11)-12:30:21</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADDED</hist_status>
<hist_op_reason>-</hist_op_reason>
</ROW_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:00:12</hist_rel_time>
<hist_abs_time>(11)-12:30:19</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADD Tx</hist_status>
<hist_op_reason>BFD configured on interface</hist_op_reason>
</ROW_hist_groups>
</TABLE_hist_groups>
</ROW_bfd_sess>
</TABLE_bfd_sess>
</__readonly__>
</bfd-sessions>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp interface ethernet
show hsrp interface ethernet 4/1
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 hsrp interface ethernet 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)
{
"TABLE_bfd_sess": {
"ROW_bfd_sess": [
{
"interface": "Ethernet4/1",
"list_size": 2,
"src_addr_v6": "fe80::da67:d9ff:fe0d:cc1",
"dst_addr_v6": "fe80::da67:d9ff:fe0d:a6c1",
"ref_count": 1,
"TABLE_ref_groups": {
"ROW_ref_groups": {
"ref_group_id": 1
}
},
"TABLE_hist_groups": {
"ROW_hist_groups": [
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:02:05",
"hist_abs_time": "(02)-16:12:31",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADDED",
"hist_op_reason": "-"
},
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:02:07",
"hist_abs_time": "(02)-16:12:28",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADD Tx",
"hist_op_reason": "BFD configured on interface"
}
]
}
},
{
"interface": "Ethernet4/1",
"src_addr": "4.4.4.2",
"dst_addr": "4.4.4.1",
"ref_count": 1,
"TABLE_ref_groups": {
"ROW_ref_groups": {
"ref_group_id": 1
}
},
"TABLE_hist_groups": {
"ROW_hist_groups": [
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:02:05",
"hist_abs_time": "(02)-16:12:31",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADDED",
"hist_op_reason": "-"
},
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:02:07",
"hist_abs_time": "(02)-16:12:28",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADD Tx",
"hist_op_reason": "BFD configured on interface"
}
]
}
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<bfd-sessions>
<interface>
<__XML__PARAM__interface-id>
<__XML__value>Ethernet4/1</__XML__value>
<__readonly__>
<TABLE_bfd_sess>
<ROW_bfd_sess>
<interface>Ethernet4/1</interface>
<list_size>2</list_size>
<src_addr_v6>fe80::da67:d9ff:fe0d:a6c3</src_addr_v6>
<dst_addr_v6>fe80::da67:d9ff:fe0d:a6c2</dst_addr_v6>
<ref_count>1</ref_count>
<TABLE_ref_groups>
<ROW_ref_groups>
<ref_group_id>1</ref_group_id>
</ROW_ref_groups>
</TABLE_ref_groups>
<TABLE_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:00</hist_rel_time>
<hist_abs_time>(11)-12:30:21</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADDED</hist_status>
<hist_op_reason>-</hist_op_reason>
</ROW_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:02</hist_rel_time>
<hist_abs_time>(11)-12:30:19</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADD Tx</hist_status>
<hist_op_reason>BFD configured on interface</hist_op_reason>
</ROW_hist_groups>
</TABLE_hist_groups>
</ROW_bfd_sess>
<ROW_bfd_sess>
<interface>Ethernet4/1</interface>
<src_addr>30.0.0.16</src_addr>
<dst_addr>30.0.0.15</dst_addr>
<ref_count>1</ref_count>
<TABLE_ref_groups>
<ROW_ref_groups>
<ref_group_id>1</ref_group_id>
</ROW_ref_groups>
</TABLE_ref_groups>
<TABLE_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:00</hist_rel_time>
<hist_abs_time>(11)-12:30:21</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADDED</hist_status>
<hist_op_reason>-</hist_op_reason>
</ROW_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:02</hist_rel_time>
<hist_abs_time>(11)-12:30:19</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADD Tx</hist_status>
<hist_op_reason>BFD configured on interface</hist_op_reason>
</ROW_hist_groups>
</TABLE_hist_groups>
</ROW_bfd_sess>
</TABLE_bfd_sess>
</__readonly__>
</__XML__PARAM__interface-id>
</interface>
</bfd-sessions>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp bfd-sessions ipv4
show hsrp bfd-sessions ipv4
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 hsrp bfd-sessions ipv4”,
"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)
{
"TABLE_bfd_sess": {
"ROW_bfd_sess": {
"interface": "Ethernet4/1",
"list_size": 2,
"src_addr": "4.4.4.2",
"dst_addr": "4.4.4.1",
"ref_count": 1,
"TABLE_ref_groups": {
"ROW_ref_groups": {
"ref_group_id": 1
}
},
"TABLE_hist_groups": {
"ROW_hist_groups": [
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:03:03",
"hist_abs_time": "(02)-16:12:31",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADDED",
"hist_op_reason": "-"
},
{
"hist_group_id": 1,
"hist_operation": "ADD",
"hist_rel_time": "00:03:06",
"hist_abs_time": "(02)-16:12:28",
"hist_ref_count": 1,
"hist_group_state": "Active",
"hist_status": "ADD Tx",
"hist_op_reason": "BFD configured on interface"
}
]
}
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<bfd-sessions>
<ipv4>
<__readonly__>
<TABLE_bfd_sess>
<ROW_bfd_sess>
<interface>Ethernet4/13</interface>
<list_size>2</list_size>
<src_addr>30.0.0.16</src_addr>
<dst_addr>30.0.0.15</dst_addr>
<ref_count>1</ref_count>
<TABLE_ref_groups>
<ROW_ref_groups>
<ref_group_id>1</ref_group_id>
</ROW_ref_groups>
</TABLE_ref_groups>
<TABLE_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:25</hist_rel_time>
<hist_abs_time>(11)-12:30:21</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADDED</hist_status>
<hist_op_reason>-</hist_op_reason>
</ROW_hist_groups>
<ROW_hist_groups>
<hist_group_id>1</hist_group_id>
<hist_operation>ADD</hist_operation>
<hist_rel_time>00:01:28</hist_rel_time>
<hist_abs_time>(11)-12:30:19</hist_abs_time>
<hist_ref_count>1</hist_ref_count>
<hist_group_state>Active</hist_group_state>
<hist_status>ADD Tx</hist_status>
<hist_op_reason>BFD configured on interface</hist_op_reason>
</ROW_hist_groups>
</TABLE_hist_groups>
</ROW_bfd_sess>
</TABLE_bfd_sess>
</__readonly__>
</ipv4>
</bfd-sessions>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp summary
show hsrp summary
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 hsrp 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)
{
"switchover_notify_rxed": "Extended-hold (NSF) disabled",
"bfd_enabled": "Global HSRP-BFD disabled",
"num_of_groups": 2,
"num_of_v4_v1_groups": 0,
"num_of_v4_v2_groups": 1,
"num_of_v6_v2_groups": 1,
"num_of_active_groups": 1,
"num_of_standby_groups": 0,
"num_of_listen_groups": 0,
"num_of_v6_active_groups": 1,
"num_of_v6_standby_groups": 0,
"num_of_v6_listen_groups": 0,
"num_of_hsrp_enabled_ifs": 1,
"counter_pkts_tx": 1319,
"counter_pkts_tx_failure": 0,
"counter_pkts_in": 1409,
"counter_pkts_bad_vr": 0,
"counter_mts_rx": 187
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<summary>
<__readonly__>
<switchover_notify_rxed>Extended-hold (NSF) disabled
</switchover_notify_rxed>
<bfd_enabled>Global HSRP-BFD disabled
</bfd_enabled>
<num_of_groups>2</num_of_groups>
<num_of_v4_v1_groups>0</num_of_v4_v1_groups>
<num_of_v4_v2_groups>1</num_of_v4_v2_groups>
<num_of_v6_v2_groups>1</num_of_v6_v2_groups>
<num_of_active_groups>1</num_of_active_groups>
<num_of_standby_groups>0</num_of_standby_groups>
<num_of_listen_groups>0</num_of_listen_groups>
<num_of_v6_active_groups>1</num_of_v6_active_groups>
<num_of_v6_standby_groups>0</num_of_v6_standby_groups>
<num_of_v6_listen_groups>0</num_of_v6_listen_groups>
<num_of_hsrp_enabled_ifs>1</num_of_hsrp_enabled_ifs>
<counter_pkts_tx>302</counter_pkts_tx>
<counter_pkts_tx_failure>0</counter_pkts_tx_failure>
<counter_pkts_in>225</counter_pkts_in>
<counter_pkts_bad_vr>0</counter_pkts_bad_vr>
<counter_mts_rx>66</counter_mts_rx>
</__readonly__>
</summary>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp delay
show hsrp delay
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 hsrp delay”,
"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)
{
"TABLE_delay": {
"ROW_delay": {
"interface": "Ethernet4/1",
"min_delay": 10,
"reload_delay": 10
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<delay>
<__readonly__>
<TABLE_delay>
<ROW_delay>
<interface>Ethernet4/13</interface>
<min_delay>10</min_delay>
<reload_delay>10</reload_delay>
</ROW_delay>
</TABLE_delay>
</__readonly__>
</delay>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp mgo
show hsrp mgo
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 hsrp mgo”,
"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)
{
"TABLE_hsrp_mgo": {
"ROW_hsrp_mgo": [
{
"master_name": "jsontest",
"master_interface": "Vlan2",
"master_address_family": "(IPv4)",
"master_group_id": 1,
"master_version": "(HSRP-V2)",
"master_state": "Active",
"TABLE_slave": {
"ROW_slave": {
"slave_interface": "Vlan4",
"slave_group_id": 4,
"slave_state": "Active"
}
}
},
{
"master_name": "jsontestv6",
"master_interface": "Vlan2",
"master_address_family": "(IPv6)",
"master_group_id": 1,
"master_version": "(HSRP-V2)",
"master_state": "Active",
"TABLE_slave": {
"ROW_slave": {
"slave_interface": "Vlan4",
"slave_group_id": 4,
"slave_state": "Active"
}
}
}
]
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<mgo>
<__readonly__>
<TABLE_hsrp_mgo>
<ROW_hsrp_mgo>
<master_name>MGO</master_name>
<master_interface>Ethernet4/13</master_interface>
<master_address_family>(IPv4)</master_address_family>
<master_group_id>1</master_group_id>
<master_version>(HSRP-V2)</master_version>
<master_state>Active</master_state>
</ROW_hsrp_mgo>
<ROW_hsrp_mgo>
<master_name>MGOv6</master_name>
<master_interface>Ethernet4/13</master_interface>
<master_address_family>(IPv6)</master_address_family>
<master_group_id>1</master_group_id>
<master_version>(HSRP-V2)</master_version>
<master_state>Active</master_state>
</ROW_hsrp_mgo>
</TABLE_hsrp_mgo>
</__readonly__>
</mgo>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp mgo name MGO
show hsrp mgo name MGO
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 hsrp mgo name MGO”,
"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)
{
"TABLE_hsrp_mgo": {
"ROW_hsrp_mgo": {
"master_name": “MGO”,
"master_interface": "Vlan2",
"master_address_family": "(IPv4)",
"master_group_id": 1,
"master_version": "(HSRP-V2)",
"master_state": "Active",
"TABLE_slave": {
"ROW_slave": {
"slave_interface": "Vlan4",
"slave_group_id": 4,
"slave_state": "Active"
}
}
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<mgo>
<name>
<__XML__PARAM__name>
<__XML__value>MGO</__XML__value>
<__readonly__>
<TABLE_hsrp_mgo>
<ROW_hsrp_mgo>
<master_name>MGO</master_name>
<master_interface>Ethernet4/13</master_interface>
<master_address_family>(IPv4)</master_address_family>
<master_group_id>1</master_group_id>
<master_version>(HSRP-V2)</master_version>
<master_state>Active</master_state>
</ROW_hsrp_mgo>
</TABLE_hsrp_mgo>
</__readonly__>
</__XML__PARAM__name>
</name>
</mgo>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp anycast
show hsrp anycast
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 hsrp anycast”,
"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)
{
"TABLE_anycast": {
"ROW_anycast": {
"bundle_id": 1,
"type": "IPv4-v6",
"admin_status": "Up",
"oper_status": "Up",
"switch_id": 1,
"bundle_priority": 101,
"bundle_state": "Active",
"vlan_range": "2"
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<anycast>
<__readonly__>
<TABLE_anycast>
<ROW_anycast>
<bundle_id>1</bundle_id>
<type>IPv4-v6</type>
<admin_status>Down</admin_status>
<oper_status>Down</oper_status>
<reason>Reason: Admin/Oper Down, : </reason>
<switch_id>1</switch_id>
<bundle_priority>100</bundle_priority>
<bundle_state>Initial</bundle_state>
<vlan_range></vlan_range>
</ROW_anycast>
</TABLE_anycast>
</__readonly__>
</anycast>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp anycast brief
show hsrp anycast brief
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 hsrp anycast 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)
{
"TABLE_anycast": {
"ROW_anycast": {
"bundle_id": 1,
"type": "IPv4-v6",
"oper_status": "Up",
"switch_id": 1,
"bundle_priority": 101,
"bundle_state": "Active",
"track_id": "N/A",
"vlan_range": "2"
}
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<anycast>
<brief>
<__readonly__>
<TABLE_anycast>
<ROW_anycast>
<bundle_id>1</bundle_id>
<type>IPv4-v6</type>
<oper_status>Down</oper_status>
<switch_id>1</switch_id>
<bundle_priority>100</bundle_priority>
<bundle_state>Initial</bundle_state>
<track_id>N/A</track_id>
<vlan_range></vlan_range>
</ROW_anycast>
</TABLE_anycast>
</__readonly__>
</brief>
</anycast>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 hsrp anycast summary
show hsrp anycast summary
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 hsrp anycast 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)
{
"total_num_of_bundles": 1,
"num_of_root_bundles": 1,
"num_of_non_root_bundles": 0,
"num_of_admin_down_bundles": 0
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.0.SK.1.:hsrp_engine" xmlns:nf
="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<hsrp>
<anycast>
<summary>
<__readonly__>
<total_num_of_bundles>1</total_num_of_bundles>
<num_of_root_bundles>0</num_of_root_bundles>
<num_of_non_root_bundles>1</num_of_non_root_bundles>
<num_of_admin_down_bundles>1</num_of_admin_down_bundles>
</__readonly__>
</summary>
</anycast>
</hsrp>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
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 |
---|
|