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/ECAE2rWjcxHktiRjlFg6uKFlqMcGFBi3wtfT9UWkzkuFVvk5juJ28uOuDpAsVYnyOf+Dn16kAMw== 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 U2FsdGVkX1979MCbaBQxnOTDrIfcfxDyEAstFqZM8qE= 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 1Show 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.329 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.329/0.329/0.329/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 1Show 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=437 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 437.467/437.467/437.467/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+1Show 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+AuthorizedShow 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/WKjPH4IwNWIEiHwnBZgyFPahmqf2OUgoz0TGHfDUIG+D/Q25+fYEmeRLuCkFdFTWYcADl3PNpVA== 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 U2FsdGVkX18c6PpGlI4Zov1fE3xOYAAP50lDT/+QA30= 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 1Show 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.179 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.179/0.179/0.179/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 1Show 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 4073ms 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: ENABLEDShow 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/7KGz4Vd2Hxp5T9YwqTIW3T67ZENYz/gDqCDzCb+BIyRBKDUmv1CbqtamWFZhPJa3xXwNlzqD0CQ== 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 U2FsdGVkX19kyf7UtLMcTO5pECdJi0HHDKK3v5DOTDI= 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 1Show 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.206 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.206/0.206/0.206/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 1Show 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 = 451.982/451.982/451.982/0.000 ms
Step 5: Modify the following configuration lines in DUT1
:
set interfaces ethernet eth0 802.1x supplicant encrypted-password U2FsdGVkX19kyf7UtLMcTIYu7pVrV7hMm4xF93+o8J0= 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 1Show 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 U2FsdGVkX1+mYzxiScSagzUupPnP7xYFAzjqRsCE5ldx4pFhmFblsxSfzaoEB9umaTDcxIWZIrOw07joPhwktg== 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 U2FsdGVkX18+WO0G+ZeIcaRIRytSazgVGeu8bDIMfUY= 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 1Show 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.368 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.368/0.368/0.368/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 1Show 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 = 451.661/451.661/451.661/0.000 ms