Only Mab
This scenario shows how to configure the only-MAB
authentication mode.
Test Successful MAB Authentication
Description
This scenario shows how to configure MAB-only authentication. DUT1 uses a correct MAC address.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth1 address 192.168.100.1/24 set interfaces ethernet eth1 authenticator aaa authentication list1 set interfaces ethernet eth1 authenticator log-level debug set interfaces ethernet eth1 authenticator mode only-MAB set interfaces ethernet eth1 authenticator quiet-period 60 set interfaces ethernet eth1 authenticator reauth-period 0 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 U2FsdGVkX18apJadCrrd2aZ6+Sb4Ufrr9T2b4hyJDfpfbQqIXDYApNR9M2fv1JR8ohd58mHkyQYBZN+SrhrT3Q== set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Ping the 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.317 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.317/0.317/0.317/0.000 ms
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth1 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 4: Ping the 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.482 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.482/0.482/0.482/0.000 ms
Step 5: Run the command interfaces ethernet eth1 authenticator show stats on DUT0 and check whether the output matches the following regular expressions:
Authentication Successes\s+1 Authentication Mode\s+MABShow output
------------------------------------------- Field Value ------------------------------------------- Access Challenges 0 Authentication Backend RADIUS Authentication Failures 0 Authentication Mode MAB Authentication Status Authorized (MAB) Authentication Successes 1 EAPoL frames (Rx) 0 EAPoL frames (Tx) 0 Quiet Period 60 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User MAC de:ad:be:ef:6c:11 Session User Name N/A
Step 6: Ping the 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.287 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.287/0.287/0.287/0.000 ms
Step 7: Run the command system journal show | grep "osdx hostapd" on DUT0 and check whether the output contains the following tokens:
802.1X: MAB: station successfully authenticatedShow output
Jun 03 08:52:52.152073 osdx hostapd[51406]: eth1: IEEE 802.11 Fetching hardware channel/rate support not supported. Jun 03 08:52:52.152092 osdx hostapd[51406]: eth1: RADIUS Authentication server 10.215.168.1:1812 Jun 03 08:52:52.152379 osdx hostapd[51406]: connect[radius]: Network is unreachable Jun 03 08:52:52.152137 osdx hostapd[51406]: eth1: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 Jun 03 08:52:52.152142 osdx hostapd[51406]: eth1: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode Jun 03 08:52:52.171894 osdx hostapd[51406]: Discovery mode enabled on eth1 Jun 03 08:52:52.171967 osdx hostapd[51406]: eth1: interface state UNINITIALIZED->ENABLED Jun 03 08:52:52.171967 osdx hostapd[51406]: eth1: AP-ENABLED Jun 03 08:52:57.172175 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 DRIVER: Device discovered, triggering MAB authentication Jun 03 08:52:57.172222 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: New STA de:ad:be:ef:6c:11 added Jun 03 08:52:57.172231 osdx hostapd[51407]: eth1: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode Jun 03 08:52:57.187906 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB-only mode: Starting MAB authentication Jun 03 08:52:57.187939 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Starting RADIUS query Jun 03 08:52:57.187959 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: User-Name = de:ad:be:ef:6c:11 Jun 03 08:52:57.190280 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: User-Password = de:ad:be:ef:6c:11 Jun 03 08:52:57.190293 osdx hostapd[51407]: eth1: RADIUS Authentication server 10.215.168.1:1812 Jun 03 08:52:57.190379 osdx hostapd[51407]: eth1: RADIUS Sending RADIUS message to authentication server Jun 03 08:52:57.190414 osdx hostapd[51407]: eth1: RADIUS Next RADIUS client retransmit in 1 seconds Jun 03 08:52:57.190680 osdx hostapd[51407]: eth1: RADIUS Received 20 bytes from RADIUS server Jun 03 08:52:57.190685 osdx hostapd[51407]: eth1: RADIUS Received RADIUS message Jun 03 08:52:57.190690 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec Jun 03 08:52:57.190694 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Processing RADIUS response Jun 03 08:52:57.190704 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Identity set to 'de:ad:be:ef:6c:11' Jun 03 08:52:57.190716 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: station successfully authenticated Jun 03 08:52:57.190720 osdx hostapd[51407]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled Jun 03 08:52:57.190736 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: authorizing port Jun 03 08:52:57.190739 osdx hostapd[51407]: eth1: STA de:ad:be:ef:6c:11 RADIUS: starting accounting session 971C9CBC88B9AB1B
Test Unsuccessful MAB Authentication
Description
This scenario shows how to configure MAB-only authentication. DUT1 uses an incorrect MAC address.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth1 address 192.168.100.1/24 set interfaces ethernet eth1 authenticator aaa authentication list1 set interfaces ethernet eth1 authenticator log-level debug set interfaces ethernet eth1 authenticator mode only-MAB set interfaces ethernet eth1 authenticator quiet-period 60 set interfaces ethernet eth1 authenticator reauth-period 0 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/6xchjqch9OvkX/hHIQ9/Fcg81FAuQl3SFWedp5+eYKZtOaJD/k4Oo49nUm6AU7mOQHdr8VYYNZQ== set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Ping the 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.582 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.582/0.582/0.582/0.000 ms
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth1 address 192.168.100.2/24 set interfaces ethernet eth1 mac '00:11:22:33:44:55' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 4: Run the command interfaces ethernet eth1 authenticator show stats on DUT0 and check whether the output matches the following regular expressions:
Authentication Failures\s+[1-9]\d?Show output
------------------------------------------- Field Value ------------------------------------------- Access Challenges 0 Authentication Backend RADIUS Authentication Failures 2 Authentication Mode N/A Authentication Status Unauthorized Authentication Successes 0 EAPoL frames (Rx) 0 EAPoL frames (Tx) 0 Quiet Period 60 Reauthenticate FALSE Reauthenticate Period 0 Session Time 0 Session User MAC 00:11:22:33:44:55 Session User Name N/A
Step 5: Expect a failure in the following command:
Ping the 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 6: Run the command system journal show | grep "osdx hostapd" on DUT0 and check whether the output contains the following tokens:
802.1X: MAB: Authentication failedShow output
Jun 03 08:53:08.355058 osdx hostapd[51972]: eth1: IEEE 802.11 Fetching hardware channel/rate support not supported. Jun 03 08:53:08.355070 osdx hostapd[51972]: eth1: RADIUS Authentication server 10.215.168.1:1812 Jun 03 08:53:08.355316 osdx hostapd[51972]: connect[radius]: Network is unreachable Jun 03 08:53:08.355104 osdx hostapd[51972]: eth1: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 Jun 03 08:53:08.355108 osdx hostapd[51972]: eth1: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode Jun 03 08:53:08.382816 osdx hostapd[51972]: Discovery mode enabled on eth1 Jun 03 08:53:08.382892 osdx hostapd[51972]: eth1: interface state UNINITIALIZED->ENABLED Jun 03 08:53:08.382892 osdx hostapd[51972]: eth1: AP-ENABLED Jun 03 08:53:13.383095 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 DRIVER: Device discovered, triggering MAB authentication Jun 03 08:53:13.383138 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: New STA 00:11:22:33:44:55 added Jun 03 08:53:13.383146 osdx hostapd[51973]: eth1: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode Jun 03 08:53:13.398854 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB-only mode: Starting MAB authentication Jun 03 08:53:13.398886 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Starting RADIUS query Jun 03 08:53:13.398901 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Name = 00:11:22:33:44:55 Jun 03 08:53:13.400655 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Password = 00:11:22:33:44:55 Jun 03 08:53:13.400667 osdx hostapd[51973]: eth1: RADIUS Authentication server 10.215.168.1:1812 Jun 03 08:53:13.400752 osdx hostapd[51973]: eth1: RADIUS Sending RADIUS message to authentication server Jun 03 08:53:13.400786 osdx hostapd[51973]: eth1: RADIUS Next RADIUS client retransmit in 1 seconds Jun 03 08:53:14.400885 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 RADIUS: Resending RADIUS message (id=128) Jun 03 08:53:14.401171 osdx hostapd[51973]: eth1: RADIUS Next RADIUS client retransmit in 2 seconds Jun 03 08:53:14.401183 osdx hostapd[51973]: eth1: RADIUS Received 20 bytes from RADIUS server Jun 03 08:53:14.401186 osdx hostapd[51973]: eth1: RADIUS Received RADIUS message Jun 03 08:53:14.401192 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec Jun 03 08:53:14.401196 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Processing RADIUS response Jun 03 08:53:14.401296 osdx hostapd[51973]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled Jun 03 08:53:14.401299 osdx hostapd[51973]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled Jun 03 08:53:14.401304 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Authentication failed, entering held state (quiet period 60 sec) Jun 03 08:53:14.401307 osdx hostapd[51973]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Retry timeout registered for 60 seconds Jun 03 08:53:14.401316 osdx hostapd[51973]: eth1: RADIUS Received 20 bytes from RADIUS server Jun 03 08:53:14.401319 osdx hostapd[51973]: eth1: RADIUS Received RADIUS message Jun 03 08:53:14.401323 osdx hostapd[51973]: eth1: RADIUS No matching RADIUS request found (type=0 id=128) - dropping packet