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 U2FsdGVkX1/YK0MEwtPkTfKefSaHnaiWTXBhjMiblkkA+EH1cOFqSEQTNCkVqpY+DUZsL3CnqT/ktmTpV00oAg== 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.342 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.342/0.342/0.342/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.643 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.643/0.643/0.643/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.424 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.424/0.424/0.424/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
May 19 21:17:32.996091 osdx hostapd[138594]: eth1: IEEE 802.11 Fetching hardware channel/rate support not supported. May 19 21:17:32.996126 osdx hostapd[138594]: eth1: RADIUS Authentication server 10.215.168.1:1812 May 19 21:17:32.996575 osdx hostapd[138594]: connect[radius]: Network is unreachable May 19 21:17:32.996200 osdx hostapd[138594]: eth1: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 May 19 21:17:32.996208 osdx hostapd[138594]: eth1: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode May 19 21:17:33.019841 osdx hostapd[138594]: Discovery mode enabled on eth1 May 19 21:17:33.019903 osdx hostapd[138594]: eth1: interface state UNINITIALIZED->ENABLED May 19 21:17:33.019903 osdx hostapd[138594]: eth1: AP-ENABLED May 19 21:17:38.020191 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 DRIVER: Device discovered, triggering MAB authentication May 19 21:17:38.020241 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: New STA de:ad:be:ef:6c:11 added May 19 21:17:38.020250 osdx hostapd[138595]: eth1: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode May 19 21:17:38.035891 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB-only mode: Starting MAB authentication May 19 21:17:38.035945 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Starting RADIUS query May 19 21:17:38.035978 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: User-Name = de:ad:be:ef:6c:11 May 19 21:17:38.039932 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: User-Password = de:ad:be:ef:6c:11 May 19 21:17:38.039956 osdx hostapd[138595]: eth1: RADIUS Authentication server 10.215.168.1:1812 May 19 21:17:38.040143 osdx hostapd[138595]: eth1: RADIUS Sending RADIUS message to authentication server May 19 21:17:38.040200 osdx hostapd[138595]: eth1: RADIUS Next RADIUS client retransmit in 1 seconds May 19 21:17:38.040828 osdx hostapd[138595]: eth1: RADIUS Received 20 bytes from RADIUS server May 19 21:17:38.040842 osdx hostapd[138595]: eth1: RADIUS Received RADIUS message May 19 21:17:38.040850 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec May 19 21:17:38.040859 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Processing RADIUS response May 19 21:17:38.040881 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: Identity set to 'de:ad:be:ef:6c:11' May 19 21:17:38.040910 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: MAB: station successfully authenticated May 19 21:17:38.040917 osdx hostapd[138595]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled May 19 21:17:38.040939 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 IEEE 802.1X: authorizing port May 19 21:17:38.040946 osdx hostapd[138595]: eth1: STA de:ad:be:ef:6c:11 RADIUS: starting accounting session D7CA99A5390369B9
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 U2FsdGVkX18GQEqH6vkZ5JsnEyEpUPAslF+V5Sew0fCI95ZrXoA7K1qdWP/g3Y+tJ+nYmo56HydWVRN2NgMKLA== 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.226 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.226/0.226/0.226/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
May 19 21:17:48.003918 osdx hostapd[139160]: eth1: IEEE 802.11 Fetching hardware channel/rate support not supported. May 19 21:17:48.003934 osdx hostapd[139160]: eth1: RADIUS Authentication server 10.215.168.1:1812 May 19 21:17:48.004167 osdx hostapd[139160]: connect[radius]: Network is unreachable May 19 21:17:48.003975 osdx hostapd[139160]: eth1: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 May 19 21:17:48.003978 osdx hostapd[139160]: eth1: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode May 19 21:17:48.019789 osdx hostapd[139160]: Discovery mode enabled on eth1 May 19 21:17:48.019837 osdx hostapd[139160]: eth1: interface state UNINITIALIZED->ENABLED May 19 21:17:48.019855 osdx hostapd[139160]: eth1: AP-ENABLED May 19 21:17:53.020160 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 DRIVER: Device discovered, triggering MAB authentication May 19 21:17:53.020195 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: New STA 00:11:22:33:44:55 added May 19 21:17:53.020203 osdx hostapd[139161]: eth1: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode May 19 21:17:53.039881 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB-only mode: Starting MAB authentication May 19 21:17:53.039950 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Starting RADIUS query May 19 21:17:53.039991 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Name = 00:11:22:33:44:55 May 19 21:17:53.044423 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Password = 00:11:22:33:44:55 May 19 21:17:53.044449 osdx hostapd[139161]: eth1: RADIUS Authentication server 10.215.168.1:1812 May 19 21:17:53.044613 osdx hostapd[139161]: eth1: RADIUS Sending RADIUS message to authentication server May 19 21:17:53.044672 osdx hostapd[139161]: eth1: RADIUS Next RADIUS client retransmit in 1 seconds May 19 21:17:54.044749 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 RADIUS: Resending RADIUS message (id=128) May 19 21:17:54.044780 osdx hostapd[139161]: eth1: RADIUS Next RADIUS client retransmit in 2 seconds May 19 21:17:54.045167 osdx hostapd[139161]: eth1: RADIUS Received 20 bytes from RADIUS server May 19 21:17:54.045174 osdx hostapd[139161]: eth1: RADIUS Received RADIUS message May 19 21:17:54.045180 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec May 19 21:17:54.045186 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Processing RADIUS response May 19 21:17:54.045252 osdx hostapd[139161]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled May 19 21:17:54.045257 osdx hostapd[139161]: eth1: IEEE 802.1X IEEE 802.1X: Discovery already disabled May 19 21:17:54.045262 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Authentication failed, entering held state (quiet period 60 sec) May 19 21:17:54.045267 osdx hostapd[139161]: eth1: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Retry timeout registered for 60 seconds