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.20/24
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 key enq88RORo0P5x3Wtyxfwerkj45sdLKJdnvdSASDi
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 802.1x supplicant password password

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.333 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.333/0.333/0.333/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=415 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 414.511/414.511/414.511/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.20/24
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 key enq88RORo0P5x3Wtyxfwerkj45sdLKJdnvdSASDi
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces ethernet eth0 802.1x supplicant username bad_username
set interfaces ethernet eth0 802.1x supplicant password bad_password

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.321 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.321/0.321/0.321/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 101ms
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.20/24
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 key enq88RORo0P5x3Wtyxfwerkj45sdLKJdnvdSASDi
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 802.1x supplicant password password

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.296 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.296/0.296/0.296/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=403 ms

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

Step 5: Set the following configuration in DUT1:

set interfaces ethernet eth0 802.1x supplicant username bad_username
set interfaces ethernet eth0 802.1x supplicant password bad_password

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.20/24
set interfaces ethernet eth1 address 192.168.100.1/24
set system aaa server radius serv1 address 10.215.168.1
set system aaa server radius serv1 key enq88RORo0P5x3Wtyxfwerkj45sdLKJdnvdSASDi
set system aaa group radius radgroup1 server serv1
set system aaa list list1 method 1 group radius radgroup1
set interfaces ethernet eth1 802.1x authenticator aaa authentication list1
set interfaces ethernet eth1 802.1x authenticator aaa accounting list1

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set interfaces ethernet eth0 802.1x supplicant username testing
set interfaces ethernet eth0 802.1x supplicant password password

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.286 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.286/0.286/0.286/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=393 ms

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