show vlan dot1Q tag native

show vlan dot1Q tag native

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 vlan dot1Q tag native ",
  "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 vlan dot1Q tag native",
        "msg": "Success",
        "code": "200",
        "body": {
        "tag_native_mode": "disabled"
}}}}}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan dot1Q tag native 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 vlan dot1Q tag native 

vlan dot1q native tag is disabled


show vlan id 2 counters

show vlan id 2 counters

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 vlan id 2 counters ",
  "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 vlan id 2 counters",
        "msg": "Success",
        "code": "200",
        "body": {
        "TABLE_vlancounters": {
            "ROW_vlancounters": {
                "vlanshowbr-vlanid": "2", 
                "l2_ing_ucast_b": "5812", 
                "l2_ing_ucast_p": "7", 
                "l2_ing_mcast_b": "3028752", 
                "l2_ing_mcast_p": "42066", 
                "l2_ing_bcast_b": "640636690", 
                "l2_ing_bcast_p": "1314579", 
                "l2_egr_ucast_b": "5812", 
                "l2_egr_ucast_p": "7", 
                "l3_ucast_rcv_b": "0", 
                "l3_ucast_rcv_p": "0"
        }}}}}}}}}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan id 2 counters 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 vlan id 2 counters 
Vlan Id                             :2 
Unicast Octets In                  :5812 
Unicast Packets In                 :7 
Multicast Octets In                :3028824 
Multicast Packets In               :42067 
Broadcast Octets In                :640655272 
Broadcast Packets In               :1314618 
Unicast Octets Out                 :5812 
Unicast Packets Out                :7 
L3 Unicast Octets In                :0 
L3 Unicast Packets In               :0

show vlan id 101 vn-segment

show vlan id 101 vn-segment

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 vlan id 101 vn-segment",
  "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 vlan id 101 vn-segment ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_seginfoid": {
            "ROW_seginfoid": {
              "vlanshowinfo-seg-vlanid": "101",
              "vlanshowinfo-segment-id": "10101"
            }
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan id 101 vn-segment 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 vlan id 101 vn-segment

VLAN Segment-id
---- -----------
101  10101

show vlan private-vlan

show vlan private-vlan

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 vlan private-vlan ",
  "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 vlan private-vlan",
        "msg": "Success",
        "code": "200",
        "body": {
            "TABLE_pvlan_primary": {
                "ROW_pvlan_primary": [
                    {
                        "vlan-key": null, 
                        "primary": "150", 
                        "secondary": "151", 
                        "pvlan-type": "isolated", 
                        "ports": [
                            "369099782", 
                            "369099783", 
                            "369099784", 
                            "939524096", 
                            "939528192", 
                            "939532288", 
                            "939565056", 
                            "939569152", 
                            "939573248", 
                            "939606016", 
                            "939610112", 
                            "939614208", 
                            "939933696", 
                            "939937792", 
                            "939941888", 
                            "939982848", 
                            "971481088", 
                            "971485184"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "150", 
                        "secondary": "152", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "369099794", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939655168", 
                            "939659264", 
                            "939896832", 
                            "939933696", 
                            "940306432", 
                            "971481088", 
                            "971722752"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "150", 
                        "secondary": "153", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "369099872", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939900928", 
                            "939933696", 
                            "939974656", 
                            "940310528", 
                            "971472896", 
                            "971481088", 
                            "971726848"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "150", 
                        "secondary": "154", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939933696", 
                            "971481088"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "155", 
                        "secondary": "156", 
                        "pvlan-type": "isolated", 
                        "ports": [
                            "369099782", 
                            "369099783", 
                            "369099785", 
                            "939524096", 
                            "939528192", 
                            "939536384", 
                            "939565056", 
                            "939569152", 
                            "939577344", 
                            "939606016", 
                            "939610112", 
                            "939618304", 
                            "939933696", 
                            "939937792", 
                            "939945984", 
                            "939986944", 
                            "971481088", 
                            "971485184"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "155", 
                        "secondary": "157", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939933696", 
                            "971481088"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "155", 
                        "secondary": "158", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939933696", 
                            "971481088"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "160", 
                        "secondary": "161", 
                        "pvlan-type": "isolated", 
                        "ports": [
                            "369099782", 
                            "369099783", 
                            "369099792", 
                            "939524096", 
                            "939528192", 
                            "939565056", 
                            "939569152", 
                            "939606016", 
                            "939610112", 
                            "939646976", 
                            "939651072", 
                            "939892736", 
                            "939933696", 
                            "939937792", 
                            "940302336", 
                            "971481088", 
                            "971485184", 
                            "971718656"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "160", 
                        "secondary": "162", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "369099873", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939905024", 
                            "939933696", 
                            "939978752", 
                            "940314624", 
                            "971476992", 
                            "971481088", 
                            "971730944"
                        ]
                    }, 
                    {
                        "vlan-key": null, 
                        "primary": "160", 
                        "secondary": "163", 
                        "pvlan-type": "community", 
                        "ports": [
                            "369099782", 
                            "939524096", 
                            "939565056", 
                            "939606016", 
                            "939933696", 
                            "971481088"
                ]}]}}}}}}}}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan private-vlan 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 vlan private-vlan 
Primary  Secondary  Type             Ports 
-------  ---------  ---------------  -------------------------------------------
150      151        isolated         Po1031, Po1032, Po1033, Eth1/1/1,
                                     Eth1/1/2, Eth1/1/3, Eth1/2/1, Eth1/2/2,
                                     Eth1/2/3, Eth1/3/1, Eth1/3/2, Eth1/3/3,
                                     Eth1/11/1, Eth1/11/2, Eth1/11/3, Eth1/12/3,
                                     Eth4/13/3, Eth4/13/4
150      152        community        Po1031, Po1043, Eth1/1/1, Eth1/2/1,
                                     Eth1/3/1, Eth1/4/3, Eth1/4/4, Eth1/10/2,
                                     Eth1/11/1, Eth1/20/2, Eth4/13/3, Eth4/19/2
150      153        community        Po1031, Po1121, Eth1/1/1, Eth1/2/1,
                                     Eth1/3/1, Eth1/10/3, Eth1/11/1, Eth1/12/1,
                                     Eth1/20/3, Eth4/13/1, Eth4/13/3, Eth4/19/3
150      154        community        Po1031, Eth1/1/1, Eth1/2/1, Eth1/3/1,
                                     Eth1/11/1, Eth4/13/3
155      156        isolated         Po1031, Po1032, Po1034, Eth1/1/1,
                                     Eth1/1/2, Eth1/1/4, Eth1/2/1, Eth1/2/2,
                                     Eth1/2/4, Eth1/3/1, Eth1/3/2, Eth1/3/4,
                                     Eth1/11/1, Eth1/11/2, Eth1/11/4, Eth1/12/4,
                                     Eth4/13/3, Eth4/13/4
155      157        community        Po1031, Eth1/1/1, Eth1/2/1, Eth1/3/1,
                                     Eth1/11/1, Eth4/13/3
155      158        community        Po1031, Eth1/1/1, Eth1/2/1, Eth1/3/1,
                                     Eth1/11/1, Eth4/13/3
160      161        isolated         Po1031, Po1032, Po1041, Eth1/1/1,
                                     Eth1/1/2, Eth1/2/1, Eth1/2/2, Eth1/3/1,
                                     Eth1/3/2, Eth1/4/1, Eth1/4/2, Eth1/10/1,
                                     Eth1/11/1, Eth1/11/2, Eth1/20/1, Eth4/13/3,
                                     Eth4/13/4, Eth4/19/1
160      162        community        Po1031, Po1122, Eth1/1/1, Eth1/2/1,
                                     Eth1/3/1, Eth1/10/4, Eth1/11/1, Eth1/12/2,
                                     Eth1/20/4, Eth4/13/2, Eth4/13/3, Eth4/19/4
160      163        community        Po1031, Eth1/1/1, Eth1/2/1, Eth1/3/1,
                                     Eth1/11/1, Eth4/13/3

show vlan private-vlan type

show vlan private-vlan type

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 vlan private-vlan type ",
  "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 vlan private-vlan type",
        "msg": "Success",
        "code": "200",
        "body": {
        "TABLE_pvlantype": {
            "ROW_pvlantype": [
                {
                    "vlan-num": "150", 
                    "pvlan-type": "primary"
                }, 
                {
                    "vlan-num": "151", 
                    "pvlan-type": "isolated"
                }, 
                {
                    "vlan-num": "152", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "153", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "154", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "155", 
                    "pvlan-type": "primary"
                }, 
                {
                    "vlan-num": "156", 
                    "pvlan-type": "isolated"
                }, 
                {
                    "vlan-num": "157", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "158", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "160", 
                    "pvlan-type": "primary"
                }, 
                {
                    "vlan-num": "161", 
                    "pvlan-type": "isolated"
                }, 
                {
                    "vlan-num": "162", 
                    "pvlan-type": "community"
                }, 
                {
                    "vlan-num": "163", 
                    "pvlan-type": "community"
                }
        ]
    }
}}}}}}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan private-vlan type 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 vlan private-vlan type 
Vlan Type
---- ----------------- 150 primary 151 isolated 152 community 153 community 154 community 155 primary 156 isolated 157 community 158 community 160 primary 161 isolated 162 community 163 community