Radius Terminate Capture
These scenarios show different acct-terminate-causes that are sent by OSDx devices when 802.1x sessions end.
Test 802.1x User Request Cause
Description
This scenario shows how to stop an 802.1x session using
operational command supplicant disconnect
.
Accounting RADIUS stop messages should contain the
following attribute: acct-terminate-cause=1
.
Scenario
Step 1: Set the following configuration in DUT2
:
set interfaces ethernet eth0 address 192.168.200.1/24 set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 traffic nat destination rule 1 address 192.168.200.2 set interfaces ethernet eth1 traffic nat source rule 1 address masquerade set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.200.2/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 802.1x authenticator reauth-period 0 set interfaces ethernet eth1 address 192.168.100.1/24 set protocols static route 0.0.0.0/0 next-hop 192.168.200.1 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/L0qMVgx26a4HkXNYLyNFu2nAM/diI5M+kUX1XsKPO58+Gh3u8vO3a6ZAJ31KcezNzKlBfcaLnUw== 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=63 time=0.401 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.401/0.401/0.401/0.000 ms
Step 4: Set the following configuration in DUT1
:
set interfaces ethernet eth1 802.1x supplicant encrypted-password U2FsdGVkX196PidYHDtP0NlPghSINoWjv3xRrburmIE= set interfaces ethernet eth1 802.1x supplicant username testing set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 5: Run command interfaces ethernet eth1 802.1x supplicant show status
at DUT1
and check if output contains the following tokens:
Authorized
Show output
--------------------------------------------------- Field Value --------------------------------------------------- EAP State SUCCESS EAP TLS Cipher ECDHE-RSA-AES256-GCM-SHA384 EAP TLS Version TLSv1.2 PAE State AUTHENTICATED Supplicant Port Status Authorized WPA State COMPLETED
Step 6: Run command interfaces ethernet eth1 802.1x supplicant show stats
at DUT1
and check if output matches the following regular expressions:
Port Status\s+AuthorizedShow output
------------------------------- Field Value ------------------------------- EAPoL Frames (Rx) 11 EAPoL Frames (Tx) 11 Invalid Frames (Rx) 0 Logoff Frames (Tx) 0 Port Status Authorized Req Frames (Rx) 9 Req ID Frames (Rx) 1 Resp Frames (Tx) 10 Start Frames (Tx) 1
Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats
at DUT0
and check if output matches the following regular expressions:
Authentication Successes\s+1Show output
--------------------------------- Field Value --------------------------------- Access Challenges 9 Authentication Backend RADIUS Authentication Failures 0 Authentication Successes 1 EAPoL frames (Rx) 11 EAPoL frames (Tx) 11 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User Name testing
Step 8: 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=0.293 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.293/0.293/0.293/0.000 ms
Note
Start packet capture in DUT2 to filter RADIUS stop messages (e.g., traffic dump monitor interface eth0 detail filter "udp port 1813" packets 1
).
Step 9: Run command interfaces ethernet eth1 802.1x supplicant disconnect
at DUT1
and expect this output:
Show output
OK
Step 10: Run command interfaces ethernet eth1 802.1x authenticator show status
at DUT0
and check if output contains the following tokens:
Current status: UnauthorizedShow output
Current status: Unauthorized
Note
Stop packet capture in DUT0
and expect
the following RADIUS messages:
Show output
eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:01:08.761095 de:ad:be:ef:6c:10 > de:ad:be:ef:6c:30, ethertype IPv4 (0x0800), length 199: (tos 0x0, ttl 64, id 28112, offset 0, flags [none], proto UDP (17), length 185) 192.168.200.2.36082 > 10.215.168.1.1813: [bad udp cksum 0x3c3a -> 0xe26f!] RADIUS, length: 157 Accounting-Request (4), id: 0x0c, Authenticator: 2b9a3706fb8d6a550035ec35018b7f42 Acct-Status-Type Attribute (40), length: 6, Value: Stop 0x0000: 0000 0002 Acct-Authentic Attribute (45), length: 6, Value: RADIUS 0x0000: 0000 0001 User-Name Attribute (1), length: 9, Value: testing 0x0000: 7465 7374 696e 67 Called-Station-Id Attribute (30), length: 20, Value: DE-AD-BE-EF-6C-11: 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d31 0x0010: 313a NAS-Port-Type Attribute (61), length: 6, Value: Wireless - IEEE 802.11 0x0000: 0000 0013 Service-Type Attribute (6), length: 6, Value: Framed 0x0000: 0000 0002 Calling-Station-Id Attribute (31), length: 19, Value: DE-AD-BE-EF-6C-21 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d32 0x0010: 31 Connect-Info Attribute (77), length: 23, Value: CONNECT 0Mbps 802.11b 0x0000: 434f 4e4e 4543 5420 304d 6270 7320 3830 0x0010: 322e 3131 62 Acct-Session-Id Attribute (44), length: 18, Value: 61D5E9F7816D2420 0x0000: 3631 4435 4539 4637 3831 3644 3234 3230 Event-Timestamp Attribute (55), length: 6, Value: Mon Oct 7 10:01:08 2024 0x0000: 6703 b164 Acct-Delay-Time Attribute (41), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Session-Time Attribute (46), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Terminate-Cause Attribute (49), length: 6, Value: User Request 0x0000: 0000 0001 1 packet captured
Test 802.1x Lost Carrier Cause
Description
This scenario shows how an 802.1x session is stopped
after a link down event in DUT0 eth1
.
Accounting RADIUS stop messages should contain the
following attribute: acct-terminate-cause=2
.
Scenario
Step 1: Set the following configuration in DUT2
:
set interfaces ethernet eth0 address 192.168.200.1/24 set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 traffic nat destination rule 1 address 192.168.200.2 set interfaces ethernet eth1 traffic nat source rule 1 address masquerade set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.200.2/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 802.1x authenticator coa client 10.215.168.1 set interfaces ethernet eth1 802.1x authenticator coa encrypted-secret U2FsdGVkX1+eB51LZ7gHzduA/mj1kc48DO0moH9QwKs= set interfaces ethernet eth1 802.1x authenticator reauth-period 0 set interfaces ethernet eth1 address 192.168.100.1/24 set protocols static route 0.0.0.0/0 next-hop 192.168.200.1 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+fimDw2j1mnHfiRmFQEY1q6A2m2BG1yITGKRtfJaHqhKL+eXXLtui1wRMzXsQhmFlUHvzN2zqKPA== 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=63 time=0.493 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.493/0.493/0.493/0.000 ms
Step 4: Set the following configuration in DUT1
:
set interfaces ethernet eth1 802.1x supplicant encrypted-password U2FsdGVkX18D20i/bqRp2KNAWP1G1b6S0wGkbj0z3dg= set interfaces ethernet eth1 802.1x supplicant username testing set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 5: Run command interfaces ethernet eth1 802.1x supplicant show status
at DUT1
and check if output contains the following tokens:
Authorized
Show output
--------------------------------------------------- Field Value --------------------------------------------------- EAP State SUCCESS EAP TLS Cipher ECDHE-RSA-AES256-GCM-SHA384 EAP TLS Version TLSv1.2 PAE State AUTHENTICATED Supplicant Port Status Authorized WPA State COMPLETED
Step 6: Run command interfaces ethernet eth1 802.1x supplicant show stats
at DUT1
and check if output matches the following regular expressions:
Port Status\s+AuthorizedShow output
------------------------------- Field Value ------------------------------- EAPoL Frames (Rx) 11 EAPoL Frames (Tx) 11 Invalid Frames (Rx) 0 Logoff Frames (Tx) 0 Port Status Authorized Req Frames (Rx) 9 Req ID Frames (Rx) 1 Resp Frames (Tx) 10 Start Frames (Tx) 1
Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats
at DUT0
and check if output matches the following regular expressions:
Authentication Successes\s+1Show output
--------------------------------- Field Value --------------------------------- Access Challenges 9 Authentication Backend RADIUS Authentication Failures 0 Authentication Successes 1 EAPoL frames (Rx) 11 EAPoL frames (Tx) 11 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User Name testing
Step 8: 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=0.305 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.305/0.305/0.305/0.000 ms
Note
Start packet capture in DUT2 to filter RADIUS stop messages (e.g., traffic dump monitor interface eth0 detail filter "udp port 1813" packets 1
).
Note
Remove the link between DUT0 and DUT1 to provoke a link-down event.
Step 9: Run command interfaces ethernet eth1 802.1x authenticator show status
at DUT0
and expect this output:
Show output
Error: no supplicant found CLI Error: Command error
Note
Stop packet capture in DUT0
and expect
the following RADIUS messages:
Show output
eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:01:21.358508 de:ad:be:ef:6c:10 > de:ad:be:ef:6c:30, ethertype IPv4 (0x0800), length 199: (tos 0x0, ttl 64, id 10383, offset 0, flags [none], proto UDP (17), length 185) 192.168.200.2.49739 > 10.215.168.1.1813: [bad udp cksum 0x3c3a -> 0x3e8d!] RADIUS, length: 157 Accounting-Request (4), id: 0x0c, Authenticator: 30e368189436d8241adb669dea760403 Acct-Status-Type Attribute (40), length: 6, Value: Stop 0x0000: 0000 0002 Acct-Authentic Attribute (45), length: 6, Value: RADIUS 0x0000: 0000 0001 User-Name Attribute (1), length: 9, Value: testing 0x0000: 7465 7374 696e 67 Called-Station-Id Attribute (30), length: 20, Value: DE-AD-BE-EF-6C-11: 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d31 0x0010: 313a NAS-Port-Type Attribute (61), length: 6, Value: Wireless - IEEE 802.11 0x0000: 0000 0013 Service-Type Attribute (6), length: 6, Value: Framed 0x0000: 0000 0002 Calling-Station-Id Attribute (31), length: 19, Value: DE-AD-BE-EF-6C-21 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d32 0x0010: 31 Connect-Info Attribute (77), length: 23, Value: CONNECT 0Mbps 802.11b 0x0000: 434f 4e4e 4543 5420 304d 6270 7320 3830 0x0010: 322e 3131 62 Acct-Session-Id Attribute (44), length: 18, Value: 5175C12CF467DD2F 0x0000: 3531 3735 4331 3243 4634 3637 4444 3246 Event-Timestamp Attribute (55), length: 6, Value: Mon Oct 7 10:01:21 2024 0x0000: 6703 b171 Acct-Delay-Time Attribute (41), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Session-Time Attribute (46), length: 6, Value: 01 secs 0x0000: 0000 0001 Acct-Terminate-Cause Attribute (49), length: 6, Value: Lost Carrier 0x0000: 0000 0002 1 packet captured
Test 802.1x Idle Timeout Cause
Description
This scenario shows how an 802.1x session is stopped
after a reauthentication timeout.
Accounting RADIUS stop messages should contain the
following attribute: acct-terminate-cause=4
.
Scenario
Step 1: Set the following configuration in DUT2
:
set interfaces ethernet eth0 address 192.168.200.1/24 set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 traffic nat destination rule 1 address 192.168.200.2 set interfaces ethernet eth1 traffic nat source rule 1 address masquerade set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.200.2/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 802.1x authenticator max-retransmissions 2 set interfaces ethernet eth1 802.1x authenticator reauth-period 15 set interfaces ethernet eth1 address 192.168.100.1/24 set protocols static route 0.0.0.0/0 next-hop 192.168.200.1 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+MYL6APLooAGitsmH+zmAY2vC+7KQ8/Xr+BfM9JTaMXRhZh/SxySgqf7/A+f+0qIymNr2cFtV6gw== 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=63 time=0.401 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.401/0.401/0.401/0.000 ms
Step 4: Set the following configuration in DUT1
:
set interfaces ethernet eth1 802.1x supplicant encrypted-password U2FsdGVkX18w/+XBR0rDWzN3CfLXG74y7TNfFJ+6bhI= set interfaces ethernet eth1 802.1x supplicant username testing set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 5: Run command interfaces ethernet eth1 802.1x supplicant show status
at DUT1
and check if output contains the following tokens:
Authorized
Show output
--------------------------------------------------- Field Value --------------------------------------------------- EAP State SUCCESS EAP TLS Cipher ECDHE-RSA-AES256-GCM-SHA384 EAP TLS Version TLSv1.2 PAE State AUTHENTICATED Supplicant Port Status Authorized WPA State COMPLETED
Step 6: Run command interfaces ethernet eth1 802.1x supplicant show stats
at DUT1
and check if output matches the following regular expressions:
Port Status\s+AuthorizedShow output
------------------------------- Field Value ------------------------------- EAPoL Frames (Rx) 11 EAPoL Frames (Tx) 11 Invalid Frames (Rx) 0 Logoff Frames (Tx) 0 Port Status Authorized Req Frames (Rx) 9 Req ID Frames (Rx) 1 Resp Frames (Tx) 10 Start Frames (Tx) 1
Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats
at DUT0
and check if output matches the following regular expressions:
Authentication Successes\s+1Show output
--------------------------------- Field Value --------------------------------- Access Challenges 9 Authentication Backend RADIUS Authentication Failures 0 Authentication Successes 1 EAPoL frames (Rx) 11 EAPoL frames (Tx) 11 Reauthenticate TRUE Reauthenticate Period 15 Session Time 0 Session User Name testing
Step 8: 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=0.351 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.351/0.351/0.351/0.000 ms
Note
Start packet capture in DUT2 to filter RADIUS stop messages (e.g., traffic dump monitor interface eth0 detail filter "udp port 1813" packets 1
).
Note
Disable DUT1 interface or remove address configuration to prevent the device from responding EAP requests.
Step 9: Modify the following configuration lines in DUT1
:
set interfaces ethernet eth1 disable
Step 10: Run command interfaces ethernet eth1 802.1x authenticator show status
at DUT0
and check if output contains the following tokens:
Current status: UnauthorizedShow output
Current status: Unauthorized
Note
Stop packet capture in DUT0
and expect
the following RADIUS messages:
Show output
eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:02:15.076361 de:ad:be:ef:6c:10 > de:ad:be:ef:6c:30, ethertype IPv4 (0x0800), length 199: (tos 0x0, ttl 64, id 24563, offset 0, flags [none], proto UDP (17), length 185) 192.168.200.2.33665 > 10.215.168.1.1813: [bad udp cksum 0x3c3a -> 0x81d5!] RADIUS, length: 157 Accounting-Request (4), id: 0x0c, Authenticator: d6127a2e2bc3b451ba709549f9829d38 Acct-Status-Type Attribute (40), length: 6, Value: Stop 0x0000: 0000 0002 Acct-Authentic Attribute (45), length: 6, Value: RADIUS 0x0000: 0000 0001 User-Name Attribute (1), length: 9, Value: testing 0x0000: 7465 7374 696e 67 Called-Station-Id Attribute (30), length: 20, Value: DE-AD-BE-EF-6C-11: 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d31 0x0010: 313a NAS-Port-Type Attribute (61), length: 6, Value: Wireless - IEEE 802.11 0x0000: 0000 0013 Service-Type Attribute (6), length: 6, Value: Framed 0x0000: 0000 0002 Calling-Station-Id Attribute (31), length: 19, Value: DE-AD-BE-EF-6C-21 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d32 0x0010: 31 Connect-Info Attribute (77), length: 23, Value: CONNECT 0Mbps 802.11b 0x0000: 434f 4e4e 4543 5420 304d 6270 7320 3830 0x0010: 322e 3131 62 Acct-Session-Id Attribute (44), length: 18, Value: 34668F2845C3FAB9 0x0000: 3334 3636 3846 3238 3435 4333 4641 4239 Event-Timestamp Attribute (55), length: 6, Value: Mon Oct 7 10:02:14 2024 0x0000: 6703 b1a6 Acct-Delay-Time Attribute (41), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Session-Time Attribute (46), length: 6, Value: 41 secs 0x0000: 0000 0029 Acct-Terminate-Cause Attribute (49), length: 6, Value: Idle Timeout 0x0000: 0000 0004 1 packet captured
Test 802.1x Admin Reset Cause
Description
This scenario shows how to stop an 802.1x session using
operational command authenticator disassociate
.
Accounting RADIUS stop messages should contain the
following attribute: acct-terminate-cause=6
.
Scenario
Step 1: Set the following configuration in DUT2
:
set interfaces ethernet eth0 address 192.168.200.1/24 set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 traffic nat destination rule 1 address 192.168.200.2 set interfaces ethernet eth1 traffic nat source rule 1 address masquerade set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.200.2/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 802.1x authenticator reauth-period 0 set interfaces ethernet eth1 address 192.168.100.1/24 set protocols static route 0.0.0.0/0 next-hop 192.168.200.1 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 U2FsdGVkX18QkH5zjVuCwb6UBDq399qUwXcEsxV67HW7toKXMkpoRZahkY9PvakYo8cI1oQv0F6DwUa5mm58UQ== 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=63 time=0.361 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.361/0.361/0.361/0.000 ms
Step 4: Set the following configuration in DUT1
:
set interfaces ethernet eth1 802.1x supplicant encrypted-password U2FsdGVkX1+rp/4xVAcmR1IzBMcFF3pgngifPNDqpI0= set interfaces ethernet eth1 802.1x supplicant username testing set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 5: Run command interfaces ethernet eth1 802.1x supplicant show status
at DUT1
and check if output contains the following tokens:
Authorized
Show output
--------------------------------------------------- Field Value --------------------------------------------------- EAP State SUCCESS EAP TLS Cipher ECDHE-RSA-AES256-GCM-SHA384 EAP TLS Version TLSv1.2 PAE State AUTHENTICATED Supplicant Port Status Authorized WPA State COMPLETED
Step 6: Run command interfaces ethernet eth1 802.1x supplicant show stats
at DUT1
and check if output matches the following regular expressions:
Port Status\s+AuthorizedShow output
------------------------------- Field Value ------------------------------- EAPoL Frames (Rx) 11 EAPoL Frames (Tx) 11 Invalid Frames (Rx) 0 Logoff Frames (Tx) 0 Port Status Authorized Req Frames (Rx) 9 Req ID Frames (Rx) 1 Resp Frames (Tx) 10 Start Frames (Tx) 1
Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats
at DUT0
and check if output matches the following regular expressions:
Authentication Successes\s+1Show output
--------------------------------- Field Value --------------------------------- Access Challenges 9 Authentication Backend RADIUS Authentication Failures 0 Authentication Successes 1 EAPoL frames (Rx) 11 EAPoL frames (Tx) 11 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User Name testing
Step 8: 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=0.340 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.340/0.340/0.340/0.000 ms
Note
Start packet capture in DUT2 to filter RADIUS stop messages (e.g., traffic dump monitor interface eth0 detail filter "udp port 1813" packets 1
).
Step 9: Run command interfaces ethernet eth1 802.1x authenticator disassociate
at DUT0
and expect this output:
Show output
OK
Step 10: Run command interfaces ethernet eth1 802.1x authenticator show status
at DUT0
and check if output contains the following tokens:
Current status: UnauthorizedShow output
Current status: Unauthorized
Note
Stop packet capture in DUT0
and expect
the following RADIUS messages:
Show output
eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:02:26.066782 de:ad:be:ef:6c:10 > de:ad:be:ef:6c:30, ethertype IPv4 (0x0800), length 199: (tos 0x0, ttl 64, id 41830, offset 0, flags [none], proto UDP (17), length 185) 192.168.200.2.55300 > 10.215.168.1.1813: [bad udp cksum 0x3c3a -> 0xdc29!] RADIUS, length: 157 Accounting-Request (4), id: 0x0c, Authenticator: 4aa4cfd9439795c669335e8220418c15 Acct-Status-Type Attribute (40), length: 6, Value: Stop 0x0000: 0000 0002 Acct-Authentic Attribute (45), length: 6, Value: RADIUS 0x0000: 0000 0001 User-Name Attribute (1), length: 9, Value: testing 0x0000: 7465 7374 696e 67 Called-Station-Id Attribute (30), length: 20, Value: DE-AD-BE-EF-6C-11: 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d31 0x0010: 313a NAS-Port-Type Attribute (61), length: 6, Value: Wireless - IEEE 802.11 0x0000: 0000 0013 Service-Type Attribute (6), length: 6, Value: Framed 0x0000: 0000 0002 Calling-Station-Id Attribute (31), length: 19, Value: DE-AD-BE-EF-6C-21 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d32 0x0010: 31 Connect-Info Attribute (77), length: 23, Value: CONNECT 0Mbps 802.11b 0x0000: 434f 4e4e 4543 5420 304d 6270 7320 3830 0x0010: 322e 3131 62 Acct-Session-Id Attribute (44), length: 18, Value: CFBAEAA349595D54 0x0000: 4346 4241 4541 4133 3439 3539 3544 3534 Event-Timestamp Attribute (55), length: 6, Value: Mon Oct 7 10:02:26 2024 0x0000: 6703 b1b2 Acct-Delay-Time Attribute (41), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Session-Time Attribute (46), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Terminate-Cause Attribute (49), length: 6, Value: Admin Reset 0x0000: 0000 0006 1 packet captured
Test 802.1x NAS Request Cause
Description
This scenario shows how to stop an 802.1x session from
the authentication server using a CoA message.
Accounting RADIUS stop messages should contain the
following attribute: acct-terminate-cause=10
.
Scenario
Step 1: Set the following configuration in DUT2
:
set interfaces ethernet eth0 address 192.168.200.1/24 set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 traffic nat destination rule 1 address 192.168.200.2 set interfaces ethernet eth1 traffic nat source rule 1 address masquerade set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.200.2/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 802.1x authenticator coa client 10.215.168.1 set interfaces ethernet eth1 802.1x authenticator coa encrypted-secret U2FsdGVkX19lQPwc6nqOMzpphSy05Edru/MzIPPMmik= set interfaces ethernet eth1 802.1x authenticator reauth-period 0 set interfaces ethernet eth1 address 192.168.100.1/24 set protocols static route 0.0.0.0/0 next-hop 192.168.200.1 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/GmWLhuJQLnFKZQbUlFe/L7T+yAHS0YBXo6KDlwH4DnuNjGDlokYi+ZPn+81oG8xCSSVP6mqblPA== 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=63 time=0.357 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.357/0.357/0.357/0.000 ms
Step 4: Set the following configuration in DUT1
:
set interfaces ethernet eth1 802.1x supplicant encrypted-password U2FsdGVkX19uiKMgFruS1H94GJ8z52/HVYWBmpq+M2o= set interfaces ethernet eth1 802.1x supplicant username testing set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 5: Run command interfaces ethernet eth1 802.1x supplicant show status
at DUT1
and check if output contains the following tokens:
Authorized
Show output
--------------------------------------------------- Field Value --------------------------------------------------- EAP State SUCCESS EAP TLS Cipher ECDHE-RSA-AES256-GCM-SHA384 EAP TLS Version TLSv1.2 PAE State AUTHENTICATED Supplicant Port Status Authorized WPA State COMPLETED
Step 6: Run command interfaces ethernet eth1 802.1x supplicant show stats
at DUT1
and check if output matches the following regular expressions:
Port Status\s+AuthorizedShow output
------------------------------- Field Value ------------------------------- EAPoL Frames (Rx) 11 EAPoL Frames (Tx) 11 Invalid Frames (Rx) 0 Logoff Frames (Tx) 0 Port Status Authorized Req Frames (Rx) 9 Req ID Frames (Rx) 1 Resp Frames (Tx) 10 Start Frames (Tx) 1
Step 7: Run command interfaces ethernet eth1 802.1x authenticator show stats
at DUT0
and check if output matches the following regular expressions:
Authentication Successes\s+1Show output
--------------------------------- Field Value --------------------------------- Access Challenges 9 Authentication Backend RADIUS Authentication Failures 0 Authentication Successes 1 EAPoL frames (Rx) 11 EAPoL frames (Tx) 11 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User Name testing
Step 8: 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=0.440 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.440/0.440/0.440/0.000 ms
Note
Start packet capture in DUT2 to filter RADIUS stop messages (e.g., traffic dump monitor interface eth0 detail filter "udp port 1813" packets 1
).
Note
Send a CoA/Disconnect request from the RADIUS server
On Linux, the FreeRADIUS package includes the utility
radtest
that can be used to send these messages:
Show output
$ cat /osdx-tests/utils/dot1x/auth.req User-Name = "testing" $ radclient -s -t 1 -r 1 10.215.168.64:3799 disconnect coa_secret -f /osdx-tests/utils/dot1x/auth.req Sent Disconnect-Request Id 73 from 0.0.0.0:51675 to 10.215.168.64:3799 length 29 Received Disconnect-ACK Id 73 from 10.215.168.64:3799 to 10.215.168.1:51675 length 44 Packet summary: Accepted : 1 Rejected : 0 Lost : 0 Passed filter : 1 Failed filter : 0
Step 9: Run command interfaces ethernet eth1 802.1x authenticator show status
at DUT0
and check if output contains the following tokens:
Current status: UnauthorizedShow output
Current status: Unauthorized
Note
Stop packet capture in DUT0
and expect
the following RADIUS messages:
Show output
eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 10:02:38.274486 de:ad:be:ef:6c:10 > de:ad:be:ef:6c:30, ethertype IPv4 (0x0800), length 199: (tos 0x0, ttl 64, id 12902, offset 0, flags [none], proto UDP (17), length 185) 192.168.200.2.55921 > 10.215.168.1.1813: [bad udp cksum 0x3c3a -> 0x255b!] RADIUS, length: 157 Accounting-Request (4), id: 0x0c, Authenticator: b994e6b58991ff63b00cc67e10ea6ec7 Acct-Status-Type Attribute (40), length: 6, Value: Stop 0x0000: 0000 0002 Acct-Authentic Attribute (45), length: 6, Value: RADIUS 0x0000: 0000 0001 User-Name Attribute (1), length: 9, Value: testing 0x0000: 7465 7374 696e 67 Called-Station-Id Attribute (30), length: 20, Value: DE-AD-BE-EF-6C-11: 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d31 0x0010: 313a NAS-Port-Type Attribute (61), length: 6, Value: Wireless - IEEE 802.11 0x0000: 0000 0013 Service-Type Attribute (6), length: 6, Value: Framed 0x0000: 0000 0002 Calling-Station-Id Attribute (31), length: 19, Value: DE-AD-BE-EF-6C-21 0x0000: 4445 2d41 442d 4245 2d45 462d 3643 2d32 0x0010: 31 Connect-Info Attribute (77), length: 23, Value: CONNECT 0Mbps 802.11b 0x0000: 434f 4e4e 4543 5420 304d 6270 7320 3830 0x0010: 322e 3131 62 Acct-Session-Id Attribute (44), length: 18, Value: 980F073AB244524E 0x0000: 3938 3046 3037 3341 4232 3434 3532 3445 Event-Timestamp Attribute (55), length: 6, Value: Mon Oct 7 10:02:37 2024 0x0000: 6703 b1bd Acct-Delay-Time Attribute (41), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Session-Time Attribute (46), length: 6, Value: 00 secs 0x0000: 0000 0000 Acct-Terminate-Cause Attribute (49), length: 6, Value: NAS Request 0x0000: 0000 000a 1 packet captured