show dot1x

show dot1x

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 dot1x",
  "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 dot1x",
        "msg": "Success",
        "code": "200",
        "body": {
          "sys_auth_ctrl": "enable",
          "proto_ver": "2"
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x 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 dot1x
           Sysauthcontrol Enabled
   Dot1x Protocol Version 2








show dot1x all

show dot1x 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 dot1x 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 dot1x all",
        "msg": "Success",
        "code": "200",
        "body": {
          "sys_auth_ctrl": "enable",
          "proto_ver": "2",
          "TABLE_all": {
            "ROW_all": [
              {
                "if_index": "Ethernet1/41",
                "TABLE_allpae": {
                  "ROW_allpae": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable"
                  }
                }
              },
              {
                "if_index": "Ethernet1/42",
                "TABLE_allpae": {
                  "ROW_allpae": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable"
                  }
                }
              },
              {
                "if_index": "Ethernet1/43",
                "TABLE_allpae": {
                  "ROW_allpae": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable"
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x 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 dot1x all
           Sysauthcontrol Enabled
   Dot1x Protocol Version 2

Dot1x Info for Ethernet1/41
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled

Dot1x Info for Ethernet1/42
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled

Dot1x Info for Ethernet1/43
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled
Leaf-2(config)#














show dot1x all details

show dot1x all details

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 dot1x all details",
  "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 dot1x all details",
        "msg": "Success",
        "code": "200",
        "body": {
          "sys_auth_ctrl": "enable",
          "proto_ver": "2",
          "TABLE_alldetail": {
            "ROW_alldetail": [
              {
                "if_index": "Ethernet1/41",
                "TABLE_allpaedetail": {
                  "ROW_allpaedetail": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable",
                    "no_of_clients": "1",
                    "TABLE_if_auth_clients": {
                      "ROW_if_auth_clients": {
                        "supp_mac_addr": "0015.5a4c.0003",
                        "auth_domain": "data",
                        "auth_sm_state": "authenticated",
                        "auth_bend_sm_state": "success",
                        "port_status": "authorized",
                        "authentication_method": "mab",
                        "authenticated_by": "server",
                        "auth_vlan": "20"
                      }
                    }
                  }
                }
              },
              {
                "if_index": "Ethernet1/42",
                "TABLE_allpaedetail": {
                  "ROW_allpaedetail": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable",
                    "no_of_clients": "1",
                    "TABLE_if_auth_clients": {
                      "ROW_if_auth_clients": {
                        "supp_mac_addr": "3611.5141.2123",
                        "auth_domain": "data",
                        "auth_sm_state": "authenticated",
                        "auth_bend_sm_state": "success",
                        "port_status": "authorized",
                        "authentication_method": "mab",
                        "authenticated_by": "server",
                        "auth_vlan": "20"
                      }
                    }
                  }
                }
              },
              {
                "if_index": "Ethernet1/43",
                "TABLE_allpaedetail": {
                  "ROW_allpaedetail": {
                    "pae_type": "authenticator",
                    "port_control": "auto",
                    "host_mode": "multi-host",
                    "quiet_period": "60",
                    "inactivity_period": "0",
                    "tx_period": "1",
                    "max_req": "1",
                    "reauth": "disable",
                    "rate_limit_period": "0",
                    "supp_timeout": "30",
                    "server_timeout": "30",
                    "reauth_server": "disable",
                    "reauth_period": "3600",
                    "reauth_max": "1",
                    "mac_auth_bypass": "enable",
                    "no_of_clients": "1",
                    "TABLE_if_auth_clients": {
                      "ROW_if_auth_clients": {
                        "supp_mac_addr": "0015.5a4c.0004",
                        "auth_domain": "data",
                        "auth_sm_state": "authenticated",
                        "auth_bend_sm_state": "success",
                        "port_status": "authorized",
                        "authentication_method": "mab",
                        "authenticated_by": "server",
                        "auth_vlan": "20"
                      }
                    }
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x all details 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 dot1x all details
           Sysauthcontrol Enabled
   Dot1x Protocol Version 2

Dot1x Info for Ethernet1/41
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled

Dot1x Authenticator Client List
-------------------------------
               Supplicant = 00:15:5A:4C:00:03
                   Domain = DATA
            Auth SM State = AUTHENTICATED
       Auth BEND SM State = IDLE
              Port Status = AUTHORIZED
    Authentication Method = MAB
         Authenticated By = Remote Server
                Auth-Vlan = 20


Dot1x Info for Ethernet1/42
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled

Dot1x Authenticator Client List
-------------------------------
               Supplicant = 36:11:51:41:21:23
                   Domain = DATA
            Auth SM State = AUTHENTICATED
       Auth BEND SM State = IDLE
              Port Status = AUTHORIZED
    Authentication Method = MAB
         Authenticated By = Remote Server
                Auth-Vlan = 20


Dot1x Info for Ethernet1/43
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled

Dot1x Authenticator Client List
-------------------------------
               Supplicant = 00:15:5A:4C:00:04
                   Domain = DATA
            Auth SM State = AUTHENTICATED
       Auth BEND SM State = IDLE
              Port Status = AUTHORIZED
    Authentication Method = MAB
         Authenticated By = Remote Server
                Auth-Vlan = 20

Leaf-2(config)#














show dot1x all statistics

show dot1x all 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 dot1x all 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 dot1x all statistics",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_allstat": {
            "ROW_allstat": [
              {
                "if_index": "Ethernet1/41",
                "TABLE_allpaestat": {
                  "ROW_allpaestat": {
                    "pae_type": "authenticator",
                    "rxstart": "0",
                    "rxlogoff": "0",
                    "rxresp": "0",
                    "rxrespid": "0",
                    "rxinvalid": "0",
                    "rxlenerr": "0",
                    "rxtotal": "0",
                    "txreq": "0",
                    "txreqid": "4",
                    "txtotal": "4",
                    "rxversion": "0",
                    "lastrxsourcemac": "0000.0000.0000"
                  }
                }
              },
              {
                "if_index": "Ethernet1/42",
                "TABLE_allpaestat": {
                  "ROW_allpaestat": {
                    "pae_type": "authenticator",
                    "rxstart": "0",
                    "rxlogoff": "0",
                    "rxresp": "0",
                    "rxrespid": "0",
                    "rxinvalid": "0",
                    "rxlenerr": "0",
                    "rxtotal": "5",
                    "txreq": "0",
                    "txreqid": "4",
                    "txtotal": "4",
                    "rxversion": "2",
                    "lastrxsourcemac": "0000.0000.0000"
                  }
                }
              },
              {
                "if_index": "Ethernet1/43",
                "TABLE_allpaestat": {
                  "ROW_allpaestat": {
                    "pae_type": "authenticator",
                    "rxstart": "0",
                    "rxlogoff": "0",
                    "rxresp": "0",
                    "rxrespid": "0",
                    "rxinvalid": "0",
                    "rxlenerr": "0",
                    "rxtotal": "0",
                    "txreq": "0",
                    "txreqid": "5",
                    "txtotal": "5",
                    "rxversion": "0",
                    "lastrxsourcemac": "0000.0000.0000"
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

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

Dot1x Authenticator Port Statistics for Ethernet1/41
--------------------------------------------
RxStart = 0     RxLogoff = 0    RxResp = 0      RxRespID = 0
RxInvalid = 0   RxLenErr = 0    RxTotal = 0

TxReq = 0       TxReqID = 4     TxTotal = 4

RxVersion = 0   LastRxSrcMAC = 00:00:00:00:00:00



Dot1x Authenticator Port Statistics for Ethernet1/42
--------------------------------------------
RxStart = 0     RxLogoff = 0    RxResp = 0      RxRespID = 0
RxInvalid = 0   RxLenErr = 0    RxTotal = 5

TxReq = 0       TxReqID = 4     TxTotal = 4

RxVersion = 2   LastRxSrcMAC = 00:00:00:00:00:00



Dot1x Authenticator Port Statistics for Ethernet1/43
--------------------------------------------
RxStart = 0     RxLogoff = 0    RxResp = 0      RxRespID = 0
RxInvalid = 0   RxLenErr = 0    RxTotal = 0

TxReq = 0       TxReqID = 5     TxTotal = 5

RxVersion = 0   LastRxSrcMAC = 00:00:00:00:00:00


Leaf-2(config)#












show dot1x all summary

show dot1x all summary

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

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


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show dot1x all summary",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_allsummary": {
            "ROW_allsummary": [
              {
                "if_index": "Ethernet1/41",
                "pae_type": "authenticator",
                "TABLE_if_auth_clients": {
                  "ROW_if_auth_clients": {
                    "auth_mac_addr": "0015.5a4c.0003",
                    "port_status": "authorized"
                  }
                }
              },
              {
                "if_index": "Ethernet1/42",
                "pae_type": "authenticator",
                "TABLE_if_auth_clients": {
                  "ROW_if_auth_clients": {
                    "auth_mac_addr": "3611.5141.2123",
                    "port_status": "authorized"
                  }
                }
              },
              {
                "if_index": "Ethernet1/43",
                "pae_type": "authenticator",
                "TABLE_if_auth_clients": {
                  "ROW_if_auth_clients": {
                    "auth_mac_addr": "0015.5a4c.0004",
                    "port_status": "authorized"
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

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

           Interface     PAE              Client          Status
------------------------------------------------------------------
        Ethernet1/41    AUTH   00:15:5A:4C:00:03      AUTHORIZED

           Interface     PAE              Client          Status
------------------------------------------------------------------
        Ethernet1/42    AUTH   36:11:51:41:21:23      AUTHORIZED

           Interface     PAE              Client          Status
------------------------------------------------------------------
        Ethernet1/43    AUTH   00:15:5A:4C:00:04      AUTHORIZED
Leaf-2(config)#















show dot1x interface ethernet 1/41

show dot1x interface ethernet 1/41

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 dot1x interface ethernet 1/41",
  "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 dot1x interface ethernet 1/41",
        "msg": "Success",
        "code": "200",
        "body": {
          "if_index": "Ethernet1/41",
          "pae_type": "authenticator",
          "port_control": "auto",
          "host_mode": "multi-host",
          "quiet_period": "60",
          "inactivity_period": "0",
          "tx_period": "1",
          "max_req": "1",
          "reauth": "disable",
          "rate_limit_period": "0",
          "supp_timeout": "30",
          "server_timeout": "30",
          "reauth_server": "disable",
          "reauth_period": "3600",
          "reauth_max": "1",
          "mac_auth_bypass": "enable"
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x interface ethernet 1/41 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 dot1x interface ethernet 1/41

Dot1x Info for Ethernet1/41
-----------------------------------
                      PAE = AUTHENTICATOR
              PortControl = AUTO
                 HostMode = MULTI HOST
         ReAuthentication = Disabled
              QuietPeriod = 60
            ServerTimeout = 30
              SuppTimeout = 30
             ReAuthPeriod = 3600 (Locally configured)
                ReAuthMax = 1
                   MaxReq = 1
                 TxPeriod = 1
          RateLimitPeriod = 0
         InactivityPeriod = 0
          Mac-Auth-Bypass = Enabled