Check Connection

This scenario shows how to configure 802.1x authentication and accounting for an Ethernet interface.

Test Authentication

Description

DUT0 is configured with a 802.1x authenticated interface. DUT1 is authenticated successfully and can ping DUT0.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 encrypted-key U2FsdGVkX1+XxpTK+yPx/AjReMSN9A1tEvR7/H3ifY6Fy4aqodoTQL//d+0ZLKgp4rKUKXVmNAMSQd+ozyONMg==
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX1/7GB5J/PdOAgwSkgi+Tz5/aEm3aOHFpxQ=
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.172 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.172/0.172/0.172/0.000 ms

Step 4: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=468 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 467.572/467.572/467.572/0.000 ms

Step 5: Run command interfaces ethernet eth1 802.1x authenticator show stats at DUT0 and check if output matches the following regular expressions:

Access Accepts\s+1
Show output
---------------------------------
          Field             Value
---------------------------------
Access Requests                10
Access Retransmissions          0
Access Accepts                  1
Access Rejects                  0
Access Challenges               9
Malformed Access Responses      0
Bad Authenticators              0
Pending Requests                0
Timeouts                        0
Unknown Types                   0
Dropped Packets                 0

Step 6: Run command interfaces ethernet eth0 802.1x supplicant show stats at DUT1 and check if output matches the following regular expressions:

Port Status\s+Authorized
Show output
----------------------------
     Field          Value
----------------------------
Port Status       Authorized
Rx Frames                 11
Tx Frames                 11
Tx Start Frames            1
Tx Logoff Frames           0
Tx Resp Frames            10
Rx Req ID Frames           1
Rx Req Frames              9
Invalid                    0

Test Authentication Deny

Description

DUT0 is configured with a 802.1x authenticated interface. DUT1 fails to authenticate and all its traffic is dropped.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 encrypted-key U2FsdGVkX1/PERjfef1KvtSKSvAyo6YYinCwAB/21DFQM1W2zw2Kyd+d5HiW1IUzN+WfjcEfPD1Ebj5j0qPTOA==
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX1+wv63TTlnNnaOHxea0TNDs4Uh/nd3ZbW4=
set interfaces ethernet eth0 802.1x supplicant username bad_username
set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.387 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.387/0.387/0.387/0.000 ms

Step 4: Expect a failure in the following command: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 5 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
From 192.168.100.2 icmp_seq=1 Destination Host Unreachable
From 192.168.100.2 icmp_seq=2 Destination Host Unreachable
From 192.168.100.2 icmp_seq=3 Destination Host Unreachable

--- 192.168.100.1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4074ms
pipe 3

Step 5: Run command interfaces ethernet eth1 802.1x authenticator show status at DUT0 and check if output contains the following tokens:

Current status: ENABLED
Show output
Current status: ENABLED

Step 6: Run command interfaces ethernet eth0 802.1x supplicant show status at DUT1 and expect this output:

Show output
Error: no valid response was received
  CLI Error: Command error

Test Deauthentication

Description

DUT0 is configured with a 802.1x authenticated interface. DUT1 is authenticated successfully and then, when its configuration changes, it fails to authenticate and all its traffic is dropped.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 encrypted-key U2FsdGVkX1++YPxdJCaXRORsrFAIPcpBLuO7LLZRQXcTINrZo/1nWCqg9m9a49qzKwNHeSigiEt1hQ16/Fb1mA==
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX19dA/Od+Goju8+ABaZNVkV6taHYMDuHwl4=
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.246 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.246/0.246/0.246/0.000 ms

Step 4: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=452 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 452.088/452.088/452.088/0.000 ms

Step 5: Modify the following configuration lines in DUT1:

set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX19dA/Od+Goju53TIA6KrZix6smLaiz9Jzc=
set interfaces ethernet eth0 802.1x supplicant username bad_username

Step 6: Expect a failure in the following command: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats at DUT0 and check if output matches the following regular expressions:

Access Accepts\s+1
Access Rejects\s+[1-9]\d?
Show output
---------------------------------
          Field             Value
---------------------------------
Access Requests                19
Access Retransmissions          0
Access Accepts                  1
Access Rejects                  1
Access Challenges              17
Malformed Access Responses      0
Bad Authenticators              0
Pending Requests                0
Timeouts                        0
Unknown Types                   0
Dropped Packets                 0

Step 8: Run command interfaces ethernet eth0 802.1x supplicant show stats at DUT1 and check if output matches the following regular expressions:

Port Status\s+Unauthorized
Tx Start Frames\s+[1-9]\d?
Show output
------------------------------
     Field           Value
------------------------------
Port Status       Unauthorized
Rx Frames                   21
Tx Frames                   21
Tx Start Frames              2
Tx Logoff Frames             0
Tx Resp Frames              19
Rx Req ID Frames             2
Rx Req Frames               17
Invalid                      0

Test Accounting

Description

DUT0 is configured with a 802.1x authenticated interface. DUT1 is authenticated and the accounting information is sent to the RADIUS server.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth1 802.1x authenticator aaa accounting list1
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 encrypted-key U2FsdGVkX187j2LQsFPatBqY41Gd1KKdqYLS8AdEJAexwW3uLnykZlnmmrObiDzUrCnNmNnXk9oLKy2lCI4GnQ==
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX1/3ok2a2i85GcG5fE+JyowPImUfOFNDIEM=
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 address 192.168.100.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.274 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.274/0.274/0.274/0.000 ms

Step 4: Ping IP address 192.168.100.1 from DUT1:

admin@DUT1$ ping 192.168.100.1 count 1 size 56 timeout 1
Show output
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=459 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 458.650/458.650/458.650/0.000 ms