show vrrpv3

show vrrpv3

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

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


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": [
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv4",
                "desc": "\"vrrpv3_json_test\"",
                "state": "MASTER",
                "duration": "2 mins 7.902 secs",
                "vip": "4.4.4.100",
                "vmac": "0000.5e00.0101",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "4.4.4.2",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 1380
              },
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv6",
                "desc": "\"vrrpv3_v6_json_test\"",
                "state": "MASTER",
                "duration": "58.071 secs",
                "vip": "fe80::101",
                "TABLE_sec": {
                  "ROW_sec": {
                    "addr": "4000::100"
                  }
                },
                "vmac": "0000.5e00.0201",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "fe80::1034:12ff:fe34:1234",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 852
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 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 9.2(1).

CLI Output
Switch# show vrrpv3

Vlan2 - Group 1 - Address-Family IPv4
  Description is ""vrrpv3_json_test""
  State is MASTER
  State duration 2 mins 3.311 secs
  Virtual IP address is 4.4.4.100
  Virtual MAC address is 0000.5e00.0101
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is 4.4.4.2 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 562 msec)
  Master Down interval is unknown

Vlan2 - Group 1 - Address-Family IPv6
  Description is ""vrrpv3_v6_json_test""
  State is MASTER
  State duration 53.480 secs
  Virtual IP address is fe80::101
  Virtual secondary IP addresses:
    4000::100
  Virtual MAC address is 0000.5e00.0201
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is fe80::1034:12ff:fe34:1234 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 119 msec)
  Master Down interval is unknown






show vrrpv3 all

show vrrpv3 all

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 vrrpv3 all",
  "output_format": "json"
}

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


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 all",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": [
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv4",
                "desc": "\"vrrpv3_json_test\"",
                "state": "MASTER",
                "duration": "3 mins 54.492 secs",
                "vip": "4.4.4.100",
                "vmac": "0000.5e00.0101",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "4.4.4.2",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 1476
              },
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv6",
                "desc": "\"vrrpv3_v6_json_test\"",
                "state": "MASTER",
                "duration": "2 mins 44.661 secs",
                "vip": "fe80::101",
                "TABLE_sec": {
                  "ROW_sec": {
                    "addr": "4000::100"
                  }
                },
                "vmac": "0000.5e00.0201",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "fe80::1034:12ff:fe34:1234",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 532
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 all 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 9.2(1).

CLI Output
Switch# show vrrpv3 all


Vlan2 - Group 1 - Address-Family IPv4
  Description is ""vrrpv3_json_test""
  State is MASTER
  State duration 3 mins 45.301 secs
  Virtual IP address is 4.4.4.100
  Virtual MAC address is 0000.5e00.0101
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is 4.4.4.2 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 119 msec)
  Master Down interval is unknown

Vlan2 - Group 1 - Address-Family IPv6
  Description is ""vrrpv3_v6_json_test""
  State is MASTER
  State duration 2 mins 35.470 secs
  Virtual IP address is fe80::101
  Virtual secondary IP addresses:
    4000::100
  Virtual MAC address is 0000.5e00.0201
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is fe80::1034:12ff:fe34:1234 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 660 msec)
  Master Down interval is unknown







show vrrpv3 brief

show vrrpv3 brief

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show vrrpv3 brief",
  "output_format": "json"
}

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


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 brief",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_vbrief": {
            "ROW_vbrief": [
              {
                "intf_b": "Vlan2",
                "id_b": 1,
                "af_b": "IPv4",
                "priority_b": 101,
                "down_b": 0,
                "owner_b": "N",
                "preempt_b": "Y",
                "state_b": "MASTER",
                "m_addr_b": "4.4.4.2",
                "vip_b": "4.4.4.100"
              },
              {
                "intf_b": "Vlan2",
                "id_b": 1,
                "af_b": "IPv6",
                "priority_b": 101,
                "down_b": 0,
                "owner_b": "N",
                "preempt_b": "Y",
                "state_b": "MASTER",
                "m_addr_b": "fe80::1034:12ff:fe34:1234",
                "vip_b": "fe80::101"
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 brief 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 9.2(1).

CLI Output
Switch# show vrrpv3 brief

  Interface          Grp  A-F Pri  Time Own Pre State   Master addr/Group addr
  Vlan2                1 IPv4 101     0  N   Y  MASTER  4.4.4.2(local) 4.4.4.100
  Vlan2                1 IPv6 101     0  N   Y  MASTER  fe80::1034:12ff:fe34:1234(local) fe80::101





show vrrpv3 detail

show vrrpv3 detail

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 vrrpv3 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)


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 detail",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": [
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv4",
                "desc": "\"vrrpv3_json_test\"",
                "state": "MASTER",
                "duration": "2 days 0 hours 52 mins",
                "vip": "4.4.4.100",
                "vmac": "0000.5e00.0101",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "4.4.4.2",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 1803,
                "adv_sent": 97670,
                "adv_err": 0,
                "adv_recvd": 0,
                "v2adv_sent": 0,
                "v2adv_err": 0,
                "v2adv_recvd": 0,
                "drops": 0,
                "incompat": 0,
                "conflict": 0,
                "bad_count": 0,
                "bad_config": 0,
                "bad_advert": 0,
                "bad_state": 0,
                "bad_other": 0,
                "init_master": 0,
                "init_backup": 1,
                "init_backup_time": "Fri Aug 03 07:11:48.658 UTC",
                "back_master": 1,
                "back_master_time": "Fri Aug 03 07:11:52.268 UTC",
                "master_back": 0,
                "mast_init": 0,
                "back_init": 0
              },
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv6",
                "desc": "\"vrrpv3_v6_json_test\"",
                "state": "MASTER",
                "duration": "2 days 0 hours 51 mins",
                "vip": "fe80::101",
                "TABLE_sec": {
                  "ROW_sec": {
                    "addr": "4000::100"
                  }
                },
                "vmac": "0000.5e00.0201",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "fe80::1034:12ff:fe34:1234",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 1308,
                "adv_sent": 97623,
                "adv_err": 0,
                "adv_recvd": 0,
                "v2adv_sent": 0,
                "v2adv_err": 0,
                "v2adv_recvd": 0,
                "drops": 0,
                "incompat": 0,
                "conflict": 0,
                "bad_count": 0,
                "bad_config": 0,
                "bad_advert": 0,
                "bad_state": 0,
                "bad_other": 0,
                "init_master": 0,
                "init_backup": 1,
                "init_backup_time": "Fri Aug 03 07:12:58.488 UTC",
                "back_master": 1,
                "back_master_time": "Fri Aug 03 07:13:02.098 UTC",
                "master_back": 0,
                "mast_init": 0,
                "back_init": 0
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 detail 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 9.2(1).

CLI Output
Switch# show vrrpv3 detail

Vlan2 - Group 1 - Address-Family IPv4
  Description is ""vrrpv3_json_test""
  State is MASTER
  State duration 2 days 0 hours 52 mins
  Virtual IP address is 4.4.4.100
  Virtual MAC address is 0000.5e00.0101
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is 4.4.4.2 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 1533 msec)
  Master Down interval is unknown
  VRRPv3 Advertisements: sent 97667 (errors 0) - rcvd 0
  VRRPv2 Advertisements: sent 0 (errors 0) - rcvd 0
  Group Discarded Packets: 0
    VRRPv2 incompatibility: 0
    IP Address Owner conflicts: 0
    Invalid address count: 0
    IP address configuration mismatch : 0
    Invalid Advert Interval: 0
    Adverts received in Init state: 0
    Invalid group other reason: 0
  Group State transition:
    Init to master: 0
    Init to backup: 1 (Last change Fri Aug 03 07:11:48.658 UTC)
    Backup to master: 1 (Last change Fri Aug 03 07:11:52.268 UTC)
    Master to backup: 0
    Master to init: 0
    Backup to init: 0

Vlan2 - Group 1 - Address-Family IPv6
  Description is ""vrrpv3_v6_json_test""
  State is MASTER
  State duration 2 days 0 hours 51 mins
  Virtual IP address is fe80::101
  Virtual secondary IP addresses:
    4000::100
  Virtual MAC address is 0000.5e00.0201
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is fe80::1034:12ff:fe34:1234 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 976 msec)
  Master Down interval is unknown
  VRRPv3 Advertisements: sent 97620 (errors 0) - rcvd 0
  VRRPv2 Advertisements: sent 0 (errors 0) - rcvd 0
  Group Discarded Packets: 0
    VRRPv2 incompatibility: 0
    IP Address Owner conflicts: 0
    Invalid address count: 0
    IP address configuration mismatch : 0
    Invalid Advert Interval: 0
    Adverts received in Init state: 0
    Invalid group other reason: 0
  Group State transition:
    Init to master: 0
    Init to backup: 1 (Last change Fri Aug 03 07:12:58.488 UTC)
    Backup to master: 1 (Last change Fri Aug 03 07:13:02.098 UTC)
    Master to backup: 0
    Master to init: 0
    Backup to init: 0






show vrrpv3 ipv4

show vrrpv3 ipv4

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 vrrpv3 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)


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 ipv4",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": {
              "intf": "Vlan2",
              "id": 1,
              "af": "IPv4",
              "desc": "\"vrrpv3_json_test\"",
              "state": "MASTER",
              "duration": "2 days 0 hours 55 mins",
              "vip": "4.4.4.100",
              "vmac": "0000.5e00.0101",
              "adv": 2000,
              "preempt": "enabled",
              "priority": 101,
              "m_addr": "4.4.4.2",
              "m_priority": 101,
              "m_adv": 2000,
              "m_expire": 986
            }
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 ipv4 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 9.2(1).

CLI Output
Switch# show vrrpv3 ipv4


Vlan2 - Group 1 - Address-Family IPv4
  Description is ""vrrpv3_json_test""
  State is MASTER
  State duration 2 days 0 hours 55 mins
  Virtual IP address is 4.4.4.100
  Virtual MAC address is 0000.5e00.0101
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is 4.4.4.2 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 1296 msec)
  Master Down interval is unknown



show vrrpv3 ipv6

show vrrpv3 ipv6

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 vrrpv3 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)


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 ipv6",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": {
              "intf": "Vlan2",
              "id": 1,
              "af": "IPv6",
              "desc": "\"vrrpv3_v6_json_test\"",
              "state": "MASTER",
              "duration": "2 days 0 hours 54 mins",
              "vip": "fe80::101",
              "TABLE_sec": {
                "ROW_sec": {
                  "addr": "4000::100"
                }
              },
              "vmac": "0000.5e00.0201",
              "adv": 2000,
              "preempt": "enabled",
              "priority": 101,
              "m_addr": "fe80::1034:12ff:fe34:1234",
              "m_priority": 101,
              "m_adv": 2000,
              "m_expire": 1650
            }
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 ipv6 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 9.2(1).

CLI Output
Switch# show vrrpv3 ipv6


Vlan2 - Group 1 - Address-Family IPv6
  Description is ""vrrpv3_v6_json_test""
  State is MASTER
  State duration 2 days 0 hours 54 mins
  Virtual IP address is fe80::101
  Virtual secondary IP addresses:
    4000::100
  Virtual MAC address is 0000.5e00.0201
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is fe80::1034:12ff:fe34:1234 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 715 msec)
  Master Down interval is unknown







show vrrpv3 statistics

show vrrpv3 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 vrrpv3 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": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 statistics",
        "msg": "Success",
        "code": "200",
        "body": {
          "global_drops": 0,
          "TABLE_istats": {
            "ROW_istats": {
              "i_intf": "Vlan2",
              "i_drops": 0,
              "ttl": 0,
              "checksum": 0,
              "version": 0,
              "type": 0,
              "length": 0,
              "badid": 0,
              "other": 0
            }
          },
          "TABLE_grp": {
            "ROW_grp": [
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv4",
                "state": "MASTER",
                "duration": "2 days 0 hours 53 mins",
                "adv_sent": 97707,
                "adv_err": 0,
                "adv_recvd": 0,
                "v2adv_sent": 0,
                "v2adv_err": 0,
                "v2adv_recvd": 0,
                "drops": 0,
                "incompat": 0,
                "conflict": 0,
                "bad_count": 0,
                "bad_config": 0,
                "bad_advert": 0,
                "bad_state": 0,
                "bad_other": 0,
                "init_master": 0,
                "init_backup": 1,
                "init_backup_time": "Fri Aug 03 07:11:48.658 UTC",
                "back_master": 1,
                "back_master_time": "Fri Aug 03 07:11:52.268 UTC",
                "master_back": 0,
                "mast_init": 0,
                "back_init": 0
              },
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv6",
                "state": "MASTER",
                "duration": "2 days 0 hours 52 mins",
                "adv_sent": 97660,
                "adv_err": 0,
                "adv_recvd": 0,
                "v2adv_sent": 0,
                "v2adv_err": 0,
                "v2adv_recvd": 0,
                "drops": 0,
                "incompat": 0,
                "conflict": 0,
                "bad_count": 0,
                "bad_config": 0,
                "bad_advert": 0,
                "bad_state": 0,
                "bad_other": 0,
                "init_master": 0,
                "init_backup": 1,
                "init_backup_time": "Fri Aug 03 07:12:58.488 UTC",
                "back_master": 1,
                "back_master_time": "Fri Aug 03 07:13:02.098 UTC",
                "master_back": 0,
                "mast_init": 0,
                "back_init": 0
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 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 9.2(1).

CLI Output
Switch# show vrrpv3 statistics

VRRP Global Statistics:
  Dropped Packets : 0
VRRP Statistics for Vlan2
  Header Discarded Packets: 0
   Invalid TTL/Hop Limit: 0
   Invalid Checksum: 0
   Invalid Version: 0
   Invalid Msg Type: 0
   Invalid length/Incomplete packet: 0
   Invalid group no: 0
   Invalid packet other reason: 0

VRRP Statistics for Vlan2 - Group 1 - Address-Family IPv4
  State is MASTER
  State duration 2 days 0 hours 53 mins
  VRRPv3 Advertisements: sent 97704 (errors 0) - rcvd 0
  VRRPv2 Advertisements: sent 0 (errors 0) - rcvd 0
  Group Discarded Packets: 0
    VRRPv2 incompatibility: 0
    IP Address Owner conflicts: 0
    Invalid address count: 0
    IP address configuration mismatch : 0
    Invalid Advert Interval: 0
    Adverts received in Init state: 0
    Invalid group other reason: 0
  Group State transition:
    Init to master: 0
    Init to backup: 1 (Last change Fri Aug 03 07:11:48.658 UTC)
    Backup to master: 1 (Last change Fri Aug 03 07:11:52.268 UTC)
    Master to backup: 0
    Master to init: 0
    Backup to init: 0

VRRP Statistics for Vlan2 - Group 1 - Address-Family IPv6
  State is MASTER
  State duration 2 days 0 hours 52 mins
  VRRPv3 Advertisements: sent 97657 (errors 0) - rcvd 0
  VRRPv2 Advertisements: sent 0 (errors 0) - rcvd 0
  Group Discarded Packets: 0
    VRRPv2 incompatibility: 0
    IP Address Owner conflicts: 0
    Invalid address count: 0
    IP address configuration mismatch : 0
    Invalid Advert Interval: 0
    Adverts received in Init state: 0
    Invalid group other reason: 0
  Group State transition:
    Init to master: 0
    Init to backup: 1 (Last change Fri Aug 03 07:12:58.488 UTC)
    Backup to master: 1 (Last change Fri Aug 03 07:13:02.098 UTC)
    Master to backup: 0
    Master to init: 0
    Backup to init: 0





show vrrpv3 vlan 2

show vrrpv3 vlan 2

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 vrrpv3 vlan 2",
  "output_format": "json"
}

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


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrpv3 vlan 2",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_grp": {
            "ROW_grp": [
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv4",
                "desc": "\"vrrpv3_json_test\"",
                "state": "MASTER",
                "duration": "2 days 0 hours 54 mins",
                "vip": "4.4.4.100",
                "vmac": "0000.5e00.0101",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "4.4.4.2",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 1871
              },
              {
                "intf": "Vlan2",
                "id": 1,
                "af": "IPv6",
                "desc": "\"vrrpv3_v6_json_test\"",
                "state": "MASTER",
                "duration": "2 days 0 hours 53 mins",
                "vip": "fe80::101",
                "TABLE_sec": {
                  "ROW_sec": {
                    "addr": "4000::100"
                  }
                },
                "vmac": "0000.5e00.0201",
                "adv": 2000,
                "preempt": "enabled",
                "priority": 101,
                "m_addr": "fe80::1034:12ff:fe34:1234",
                "m_priority": 101,
                "m_adv": 2000,
                "m_expire": 380
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 vlan 2 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 9.2(1).

CLI Output
Switch# show vrrpv3 vlan 2


Vlan2 - Group 1 - Address-Family IPv4
  Description is ""vrrpv3_json_test""
  State is MASTER
  State duration 2 days 0 hours 54 mins
  Virtual IP address is 4.4.4.100
  Virtual MAC address is 0000.5e00.0101
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is 4.4.4.2 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 1389 msec)
  Master Down interval is unknown

Vlan2 - Group 1 - Address-Family IPv6
  Description is ""vrrpv3_v6_json_test""
  State is MASTER
  State duration 2 days 0 hours 53 mins
  Virtual IP address is fe80::101
  Virtual secondary IP addresses:
    4000::100
  Virtual MAC address is 0000.5e00.0201
  Advertisement interval is 2000 msec
  Preemption enabled
  Priority is 101
  Master Router is fe80::1034:12ff:fe34:1234 (local), priority is 101
  Master Advertisement interval is 2000 msec (expires in 1395 msec)
  Master Down interval is unknown