show ipv6 dhcp relay

show ipv6 dhcp relay

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 ipv6 dhcp relay",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": [
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:55:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan552", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan710", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:23::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan722", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:75:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan752", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:71:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan770", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:1:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel60", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:2:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel61.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:5:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/47.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:0:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/48", 
                                "intf_header": "0"
                            }
                        ]
                    }, 
                    "relay_cisco_option_enable": "disabled", 
                    "relay_service_enable": "enabled", 
                    "relay_vpn_enable": "disabled"
                }, 
                "code": "200", 
                "input": "show ipv6 dhcp relay", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ipv6 dhcp relay command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ipv6 dhcp relay
DHCPv6 relay service : Enabled
Insertion of VPN options : Disabled
Insertion of CISCO options : Disabled

DHCPv6 Relay is configured on the following interfaces:
-------------------------------------------------------
Interface Vlan552 :
Relay Address                            Dest. Interface   VRF name
-------------                            ---------------   --------
2007:55:3:1::5                                 ---
Interface Vlan710 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:3:1::5 ---
Interface Vlan722 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:7:23::5 ---
Interface Vlan752 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:75:3:1::5 ---
Interface Vlan770 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:7:71:1::5 ---
Interface port-channel60 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:1:1::5 ---
Interface port-channel61.1 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:2:1::5 ---
Interface Ethernet1/47.1 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:5:1::5 ---
Interface Ethernet1/48 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:0:1::5 ---

show ip dhcp relay address

show ip dhcp relay address

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 dhcp relay address",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": [
                            {
                                "intf2": "Vlan710", 
                                "relay_address": "60.3.0.5", 
                                "vrf_name": {}
                            }, 
                            {
                                "intf2": "port-channel60", 
                                "relay_address": "60.1.0.5", 
                                "vrf_name": {}
                            }, 
                            {
                                "intf2": "port-channel61.1", 
                                "relay_address": "60.2.0.5", 
                                "vrf_name": {}
                            }, 
                            {
                                "intf2": "Ethernet1/47.1", 
                                "relay_address": "60.5.0.5", 
                                "vrf_name": {}
                            }, 
                            {
                                "intf2": "Ethernet1/48", 
                                "relay_address": "60.0.0.5", 
                                "vrf_name": {}
                            }
                        ]
                    }, 
                    "intf_header": "0"
                }, 
                "code": "200", 
                "input": "show ip dhcp relay address", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp relay address command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp relay address
 Interface        Relay Address     VRF Name
 -------------    -------------     --------
 Vlan710           60.3.0.5
port-channel60 60.1.0.5
port-channel61.1 60.2.0.5
Ethernet1/47.1 60.5.0.5
Ethernet1/48 60.0.0.5

show ip dhcp relay information trusted-sources

show ip dhcp relay information trusted-sources

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 dhcp relay information trusted-sources",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": {
                            "intf": "Ethernet1/2"
                        }
                    }, 
                    "header": "2"
                }, 
                "code": "200", 
                "input": "show ip dhcp relay information trusted-sources", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp relay information trusted-sources command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp relay information trusted-sources
 Trusted-Interface
 ------------------
        Ethernet1/2

show ip dhcp relay statistics

show ip dhcp relay statistics

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 dhcp relay statistics ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "ack_drops": "0", 
                    "ack_rx_pkts": "15", 
                    "ack_tx_pkts": "15", 
                    "decline_drops": "0", 
                    "decline_rx_pkts": "0", 
                    "decline_tx_pkts": "0", 
                    "drop_hdr": "0", 
                    "drop_intf_err": "0", 
                    "drop_invalid_msg_type": "0", 
                    "drop_l3_unknown_op_intf": "0", 
                    "drop_malformed": "0", 
                    "drop_max_hops": "0", 
                    "drop_mct_drop": "0", 
                    "drop_opt82_insert_fail": "0", 
                    "drop_relay_disable": "0", 
                    "drop_tx_fail_client_intf": "0", 
                    "drop_tx_sock_err": "0", 
                    "drop_unknown_op_intf": "0", 
                    "drop_untrusted_relay_intf": "0", 
                    "drop_validation_fail": "0", 
                    "drops": "0", 
                    "footer": "0", 
                    "inform_drops": "0", 
                    "inform_rx_pkts": "0", 
                    "inform_tx_pkts": "0", 
                    "l3_fwd_drops": "0", 
                    "l3_fwd_hdr": "0", 
                    "l3_fwd_rx_pkts": "0", 
                    "l3_fwd_tx_pkts": "0", 
                    "line": "0", 
                    "line_x": "0", 
                    "msg_stats_hdr": "0", 
                    "msg_type_str": "Discover", 
                    "msg_type_str_ack": "Ack", 
                    "msg_type_str_decline": "Decline", 
                    "msg_type_str_inform": "Inform(*)", 
                    "msg_type_str_nack": "Nack", 
                    "msg_type_str_offer": "Offer", 
                    "msg_type_str_release": "Release(*)", 
                    "msg_type_str_request": "Request(*)", 
                    "msg_type_str_total": "Total", 
                    "nack_drops": "0", 
                    "nack_rx_pkts": "0", 
                    "nack_tx_pkts": "0", 
                    "non_dhcp_drops": "0", 
                    "non_dhcp_hdr": "0", 
                    "non_dhcp_rx_pkts": "0", 
                    "non_dhcp_tx_pkts": "0", 
                    "offer_drops": "0", 
                    "offer_rx_pkts": "31", 
                    "offer_tx_pkts": "31", 
                    "release_drops": "0", 
                    "release_rx_pkts": "0", 
                    "release_tx_pkts": "0", 
                    "request_drops": "0", 
                    "request_rx_pkts": "15", 
                    "request_tx_pkts": "15", 
                    "rx_pkts": "36", 
                    "total_drops": "0", 
                    "total_rx_pkts": "97", 
                    "total_tx_pkts": "97", 
                    "tx_pkts": "36"
                }, 
                "code": "200", 
                "input": "show ip dhcp relay statistics ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp relay statistics command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp relay statistics 
----------------------------------------------------------------------
Message Type             Rx              Tx           Drops
---------------------------------------------------------------------- Discover 36 36 0 Offer 31 31 0 Request() 15 15 0 Ack 15 15 0 Release() 0 0 0 Decline 0 0 0 Inform() 0 0 0 Nack 0 0 0 ---------------------------------------------------------------------- Total 97 97 0 ---------------------------------------------------------------------- DHCP L3 FWD: Total Packets Received : 0 Total Packets Forwarded : 0 Total Packets Dropped : 0 Non DHCP: Total Packets Received : 0 Total Packets Forwarded : 0 Total Packets Dropped : 0 DROP: DHCP Relay not enabled : 0 Invalid DHCP message type : 0 Interface error : 0 Tx failure towards server : 0 Tx failure towards client : 0 Unknown output interface : 0 Unknown vrf or interface for server : 0 Max hops exceeded : 0 Option 82 validation failed : 0 Packet Malformed : 0 Relay Trusted port not configured : 0 DHCP Request dropped on MCT : 0 - These counters will show correct value when switch receives DHCP request packet with destination ip as broadcast address. If request is unicast it will be HW switched

show ip dhcp snooping

show ip dhcp snooping

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 dhcp snooping",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf_entry": {
                        "ROW_intf_entry": {
                            "intf_entry_if_index": "Ethernet1/61", 
                            "intf_entry_pkt_limit": "0", 
                            "intf_entry_trust_dhcp": "yes"
                        }
                    }, 
                    "snoop_gbl_enable": "enabled", 
                    "snoop_hdr": "0", 
                    "snoop_hwaddr_verify_enable": "enabled", 
                    "snoop_oper_vlan_enable": "700-705", 
                    "snoop_opt82_enable": "enabled", 
                    "snoop_vlan_enable": "22,700-705"
                }, 
                "code": "200", 
                "input": "show ip dhcp snooping", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp snooping command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp snooping
Switch DHCP snooping is enabled
DHCP snooping is configured on the following VLANs:
22,700-705
DHCP snooping is operational on the following VLANs:
700-705
Insertion of Option 82 is enabled
Verification of MAC address is enabled
DHCP snooping trust is configured on the following interfaces:
Interface             Trusted
------------          -------
Ethernet1/61          Yes

show ip dhcp snooping statistics

show ip dhcp snooping statistics

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 dhcp snooping statistics ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_message": {
                        "ROW_message": [
                            {
                                "drops": "0", 
                                "msg_type_str": "Discover", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Offer", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Request", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Ack", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Release", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Decline", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Inform", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }, 
                            {
                                "drops": "0", 
                                "msg_type_str": "Nack", 
                                "rx_pkts": "0", 
                                "tx_pkts": "0"
                            }
                        ]
                    }, 
                    "drop_hdr": "0", 
                    "drop_intf_err": "0", 
                    "drop_invalid_dhcp_discover_with_ip": "0", 
                    "drop_invalid_msg_type": "0", 
                    "drop_malformed": "0", 
                    "drop_no_trusted_port": "0", 
                    "drop_nobinding": "0", 
                    "drop_opt82_insert_fail": "0", 
                    "drop_src_mac_chk_fail": "0", 
                    "drop_tx_trusted_port_fail": "0", 
                    "drop_unknown": "0", 
                    "drop_untrust": "0", 
                    "drop_validation_fail": "0", 
                    "drop_vlan_validation_fail": "0", 
                    "l2_fwd_drops": "0", 
                    "l2_fwd_hdr": "0", 
                    "l2_fwd_rx_pkts": "0", 
                    "l2_fwd_tx_pkts": "0", 
                    "line": "0", 
                    "line1": "0", 
                    "msg_stats_hdr": "0", 
                    "msg_type_str_total": "Total", 
                    "non_dhcp_drops": "0", 
                    "non_dhcp_hdr": "0", 
                    "non_dhcp_rx_pkts": "0", 
                    "non_dhcp_tx_pkts": "0", 
                    "total_drops": "0", 
                    "total_rx_pkts": "0", 
                    "total_tx_pkts": "0"
                }, 
                "code": "200", 
                "input": "show ip dhcp snooping statistics ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp snooping statistics command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp snooping statistics 
---------------------------------------------------------------------- 
Message Type             Rx              Tx           Drops
---------------------------------------------------------------------- Discover 0 0 0 Offer 0 0 0 Request 0 0 0 Ack 0 0 0 Release 0 0 0 Decline 0 0 0 Inform 0 0 0 Nack 0 0 0 ---------------------------------------------------------------------- DHCP L2 Forwarding: Total Packets Received : 0 Total Packets Forwarded : 0 Total Packets Dropped : 0 Non DHCP: Total Packets Received : 0 Total Packets Forwarded : 0 Total Packets Dropped : 0 DROP: Received on untrusted port : 0 Unknown Failure : 0 Source mac validation failed : 0 Binding entry validation Failed : 0 Invalid DHCP message type : 0 Interface error : 0 Tx over trusted port failed : 0 Trust port not configured : 0 Vlan validation failure : 0 Insertion of option 82 failed : 0 Packet Malformed : 0

show ip dhcp status

show ip dhcp status

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 dhcp status",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "current_cli_op": "show ip dhcp status", 
                    "last_cli_op": "ipv6 nd raguard", 
                    "last_cli_stat": "SUCCESS"
                }, 
                "code": "200", 
                "input": "show ip dhcp status", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip dhcp status command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip dhcp status
Current CLI Operation: show ip dhcp status
Last CLI Operation: ipv6 nd raguard
Last CLI Operation Status: SUCCESS

show ipv6 dhcp relay

show ipv6 dhcp relay

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 ipv6 dhcp relay",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": [
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:55:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan552", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan710", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:23::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan722", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:75:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan752", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:71:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan770", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:1:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel60", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:2:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel61.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:5:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/47.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:0:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/48", 
                                "intf_header": "0"
                            }
                        ]
                    }, 
                    "relay_cisco_option_enable": "disabled", 
                    "relay_service_enable": "enabled", 
                    "relay_vpn_enable": "disabled"
                }, 
                "code": "200", 
                "input": "show ipv6 dhcp relay", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ipv6 dhcp relay command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ipv6 dhcp relay
DHCPv6 relay service : Enabled
Insertion of VPN options : Disabled
Insertion of CISCO options : Disabled

DHCPv6 Relay is configured on the following interfaces:
-------------------------------------------------------
Interface Vlan552 :
Relay Address                            Dest. Interface   VRF name
-------------                            ---------------   --------
2007:55:3:1::5                                 ---
Interface Vlan710 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:3:1::5 ---
Interface Vlan722 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:7:23::5 ---
Interface Vlan752 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:75:3:1::5 ---
Interface Vlan770 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:7:71:1::5 ---
Interface port-channel60 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:1:1::5 ---
Interface port-channel61.1 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:2:1::5 ---
Interface Ethernet1/47.1 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:5:1::5 ---
Interface Ethernet1/48 : Relay Address Dest. Interface VRF name ------------- --------------- -------- 2007:60:0:1::5 ---

show ipv6 dhcp relay statistics

show ipv6 dhcp relay statistics

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 ipv6 dhcp relay statistics",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "drop_bad_context": "0", 
                    "drop_hdr": "0", 
                    "drop_intf_error": "0", 
                    "drop_ipv6_extn_hdrs_presence": "0", 
                    "drop_max_hops": "0", 
                    "drop_mct_drop": "0", 
                    "drop_no_ipv6_addr": "0", 
                    "drop_opt_insert_fail": "0", 
                    "drop_relay_disable": "0", 
                    "drop_server_direct_reply": "0", 
                    "drop_unknown_op_intf": "0", 
                    "drop_validation_fails": "0", 
                    "drop_vpn_disabled": "0", 
                    "drops": "0", 
                    "drops_advertise": "0", 
                    "drops_confirm": "0", 
                    "drops_decline": "0", 
                    "drops_inforeq": "0", 
                    "drops_rebind": "0", 
                    "drops_reconfigure": "0", 
                    "drops_relay_fwd": "0", 
                    "drops_relay_reply": "0", 
                    "drops_release": "0", 
                    "drops_renew": "0", 
                    "drops_reply": "0", 
                    "drops_request": "0", 
                    "drops_unknown": "0", 
                    "msg_stats_hdr": "0", 
                    "msg_type_str": "SOLICIT", 
                    "msg_type_str_advertise": "ADVERTISE", 
                    "msg_type_str_confirm": "CONFIRM", 
                    "msg_type_str_decline": "DECLINE", 
                    "msg_type_str_inforeq": "INFORMATION_REQUEST", 
                    "msg_type_str_rebind": "REBIND", 
                    "msg_type_str_reconfigure": "RECONFIGURE", 
                    "msg_type_str_relay_fwd": "RELAY_FWD", 
                    "msg_type_str_relay_reply": "RELAY_REPLY", 
                    "msg_type_str_release": "RELEASE", 
                    "msg_type_str_renew": "RENEW", 
                    "msg_type_str_reply": "REPLY", 
                    "msg_type_str_request": "REQUEST", 
                    "msg_type_str_total": "0", 
                    "msg_type_str_unknown": "UNKNOWN", 
                    "rx_pkts": "48", 
                    "rx_pkts_advertise": "0", 
                    "rx_pkts_confirm": "0", 
                    "rx_pkts_decline": "0", 
                    "rx_pkts_inforeq": "0", 
                    "rx_pkts_rebind": "0", 
                    "rx_pkts_reconfigure": "0", 
                    "rx_pkts_relay_fwd": "0", 
                    "rx_pkts_relay_reply": "35", 
                    "rx_pkts_release": "0", 
                    "rx_pkts_renew": "0", 
                    "rx_pkts_reply": "0", 
                    "rx_pkts_request": "0", 
                    "rx_pkts_unknown": "0", 
                    "tx_pkts": "0", 
                    "tx_pkts_advertise": "35", 
                    "tx_pkts_confirm": "0", 
                    "tx_pkts_decline": "0", 
                    "tx_pkts_inforeq": "0", 
                    "tx_pkts_rebind": "0", 
                    "tx_pkts_reconfigure": "0", 
                    "tx_pkts_relay_fwd": "48", 
                    "tx_pkts_relay_reply": "0", 
                    "tx_pkts_release": "0", 
                    "tx_pkts_renew": "0", 
                    "tx_pkts_reply": "0", 
                    "tx_pkts_request": "0", 
                    "tx_pkts_unknown": "3853"
                }, 
                "code": "200", 
                "input": "show ipv6 dhcp relay statistics", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ipv6 dhcp relay statistics command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ipv6 dhcp relay statistics
-------------------------------------------------------------------------
Message Type                           Rx              Tx           Drops
-------------------------------------------------------------------------
SOLICIT                                48               0               0
ADVERTISE                               0              35               0
REQUEST                                 0               0               0
CONFIRM                                 0               0               0
RENEW                                   0               0               0
REBIND                                  0               0               0
REPLY                                   0               0               0
RELEASE                                 0               0               0
DECLINE                                 0               0               0
RECONFIGURE                             0               0               0
INFORMATION_REQUEST                     0               0               0
RELAY_FWD                               0              48               0
RELAY_REPLY                            35               0               0
UNKNOWN                                 0            3853               0
-------------------------------------------------------------------------
Total                                  83            3936               0
-------------------------------------------------------------------------
DROPS:
------
DHCPv6 Relay is disabled                     :   0
Max hops exceeded                            :   0
Packet validation fails                      :   0
Unknown output interface                     :   0
Invalid VRF                                  :   0
Option insertion failed                      :   0
Direct Replies (Recnfg/Adv/Reply) from server:   0
IPv6 addr not configured                     :   0
Interface error                              :   0
VPN Option Disabled                          :   0
IPv6 extn headers present                    :   0
DHCP Request dropped on MCT                    :   0

show ipv6 raguard statistics

show ipv6 raguard statistics

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 ipv6 raguard statistics ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "drop_count": "0", 
                    "intf2": "Ethernet1/1", 
                    "msg_stats_hdr": "0", 
                    "rx_pkts": "0"
                }, 
                "code": "200", 
                "input": "show ipv6 raguard statistics ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ipv6 raguard statistics command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ipv6 raguard statistics 
-----------------------------------------------------
 Interface                   Rx                 Drops
-----------------------------------------------------

 Ethernet1/1                 0                  0

show ip verify source

show ip verify source

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 verify source ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_verify_entry": {
                        "ROW_verify_entry": [
                            {
                                "verify_filter_mode": "inactive-no-snoop-vlan", 
                                "verify_intf": "port-channel100"
                            }, 
                            {
                                "verify_filter_mode": "inactive-no-snoop-vlan", 
                                "verify_intf": "Ethernet1/53"
                            }
                        ]
                    }, 
                    "verify_hdr": "0", 
                    "verify_ipsg_enable_intfs": "     port-channel100\n        port-channel130\n        Ethernet1/52\n        Ethernet1/53\n", 
                    "verify_ipsg_exclude_vlans": "511-515"
                }, 
                "code": "200", 
                "input": "show ip verify source ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip verify source command, see the CLI command reference:

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

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show ip verify source 
IP source guard excluded vlans:
------------------------------------------------------ 
511-515

-----------------------------------
IP source guard is enabled on the following interfaces:
------------------------------------------------------ 
        port-channel100
        port-channel130
        Ethernet1/52
        Ethernet1/53


IP source guard operational entries: 
-----------------------------------
Interface         Filter-mode             IP-address     Mac-address       Vlan
------------      -----------             ----------     --------------    ----
port-channel100   inactive-no-snoop-vlan
Ethernet1/53      inactive-no-snoop-vlan