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 eth2 address 192.168.100.1/24 set interfaces ethernet eth2 authenticator aaa authentication list1 set interfaces ethernet eth2 authenticator log-level debug set interfaces ethernet eth2 authenticator mode only-MAB set interfaces ethernet eth2 authenticator quiet-period 60 set interfaces ethernet eth2 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 U2FsdGVkX18tw1QQIu7jdtkZGa3e1rQOPgw31nbYUwCI0QZ4rbtORYymYAV6N2c2hgz+6HQvvKVZkX9nEPYahw== set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: 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.283 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.283/0.283/0.283/0.000 ms
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth2 address 192.168.100.2/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
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=0.443 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.443/0.443/0.443/0.000 ms
Step 5: Run command interfaces ethernet eth2 authenticator show stats at DUT0 and check if 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:12 Session User Name N/A
Step 6: 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.349 ms --- 192.168.100.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.349/0.349/0.349/0.000 ms
Step 7: Run command system journal show | grep "osdx hostapd" at DUT0 and check if output contains the following tokens:
802.1X: MAB: station successfully authenticatedShow output
Mar 05 18:26:01.076673 osdx hostapd[596343]: eth2: IEEE 802.11 Fetching hardware channel/rate support not supported. Mar 05 18:26:01.076703 osdx hostapd[596343]: eth2: RADIUS Authentication server 10.215.168.1:1812 Mar 05 18:26:01.077391 osdx hostapd[596343]: connect[radius]: Network is unreachable Mar 05 18:26:01.076782 osdx hostapd[596343]: eth2: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 Mar 05 18:26:01.076792 osdx hostapd[596343]: eth2: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode Mar 05 18:26:01.096422 osdx hostapd[596343]: Discovery mode enabled on eth2 Mar 05 18:26:01.096469 osdx hostapd[596343]: eth2: interface state UNINITIALIZED->ENABLED Mar 05 18:26:01.096469 osdx hostapd[596343]: eth2: AP-ENABLED Mar 05 18:26:06.097302 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 DRIVER: Device discovered, triggering MAB authentication Mar 05 18:26:06.097349 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: New STA de:ad:be:ef:6c:12 added Mar 05 18:26:06.097359 osdx hostapd[596344]: eth2: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode Mar 05 18:26:06.116557 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB-only mode: Starting MAB authentication Mar 05 18:26:06.116598 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Starting RADIUS query Mar 05 18:26:06.116616 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: User-Name = de:ad:be:ef:6c:12 Mar 05 18:26:06.118927 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: User-Password = de:ad:be:ef:6c:12 Mar 05 18:26:06.118943 osdx hostapd[596344]: eth2: RADIUS Authentication server 10.215.168.1:1812 Mar 05 18:26:06.119027 osdx hostapd[596344]: eth2: RADIUS Sending RADIUS message to authentication server Mar 05 18:26:06.119061 osdx hostapd[596344]: eth2: RADIUS Next RADIUS client retransmit in 1 seconds Mar 05 18:26:06.119358 osdx hostapd[596344]: eth2: RADIUS Received 20 bytes from RADIUS server Mar 05 18:26:06.119364 osdx hostapd[596344]: eth2: RADIUS Received RADIUS message Mar 05 18:26:06.119371 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec Mar 05 18:26:06.119375 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Processing RADIUS response Mar 05 18:26:06.119387 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Identity set to 'de:ad:be:ef:6c:12' Mar 05 18:26:06.119401 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: station successfully authenticated Mar 05 18:26:06.119405 osdx hostapd[596344]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled Mar 05 18:26:06.119421 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: authorizing port Mar 05 18:26:06.119425 osdx hostapd[596344]: eth2: STA de:ad:be:ef:6c:12 RADIUS: starting accounting session A9CD96843CF5DA6E
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 eth2 address 192.168.100.1/24 set interfaces ethernet eth2 authenticator aaa authentication list1 set interfaces ethernet eth2 authenticator log-level debug set interfaces ethernet eth2 authenticator mode only-MAB set interfaces ethernet eth2 authenticator quiet-period 60 set interfaces ethernet eth2 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 U2FsdGVkX1812yBibhgenDgSbWh2ivFCeoXMkRqlkvxFttFsESqPeHeLPecIJG4aDL3IcTfA+hDqPOh4uwf2Ag== set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: 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.224 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.224/0.224/0.224/0.000 ms
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth2 address 192.168.100.2/24 set interfaces ethernet eth2 mac '00:11:22:33:44:55' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 4: Run command interfaces ethernet eth2 authenticator show stats at DUT0 and check if 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 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 command system journal show | grep "osdx hostapd" at DUT0 and check if output contains the following tokens:
802.1X: MAB: Authentication failedShow output
Mar 05 18:26:16.358123 osdx hostapd[596867]: eth2: IEEE 802.11 Fetching hardware channel/rate support not supported. Mar 05 18:26:16.358137 osdx hostapd[596867]: eth2: RADIUS Authentication server 10.215.168.1:1812 Mar 05 18:26:16.358404 osdx hostapd[596867]: connect[radius]: Network is unreachable Mar 05 18:26:16.358184 osdx hostapd[596867]: eth2: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5 Mar 05 18:26:16.358188 osdx hostapd[596867]: eth2: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode Mar 05 18:26:16.389964 osdx hostapd[596867]: Discovery mode enabled on eth2 Mar 05 18:26:16.390031 osdx hostapd[596867]: eth2: interface state UNINITIALIZED->ENABLED Mar 05 18:26:16.390031 osdx hostapd[596867]: eth2: AP-ENABLED Mar 05 18:26:21.390548 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 DRIVER: Device discovered, triggering MAB authentication Mar 05 18:26:21.390584 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: New STA 00:11:22:33:44:55 added Mar 05 18:26:21.390593 osdx hostapd[596868]: eth2: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode Mar 05 18:26:21.406026 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB-only mode: Starting MAB authentication Mar 05 18:26:21.406057 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Starting RADIUS query Mar 05 18:26:21.406073 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Name = 00:11:22:33:44:55 Mar 05 18:26:21.407797 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Password = 00:11:22:33:44:55 Mar 05 18:26:21.407810 osdx hostapd[596868]: eth2: RADIUS Authentication server 10.215.168.1:1812 Mar 05 18:26:21.407889 osdx hostapd[596868]: eth2: RADIUS Sending RADIUS message to authentication server Mar 05 18:26:21.407922 osdx hostapd[596868]: eth2: RADIUS Next RADIUS client retransmit in 1 seconds Mar 05 18:26:22.408005 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 RADIUS: Resending RADIUS message (id=128) Mar 05 18:26:22.408044 osdx hostapd[596868]: eth2: RADIUS Next RADIUS client retransmit in 2 seconds Mar 05 18:26:22.408250 osdx hostapd[596868]: eth2: RADIUS Received 20 bytes from RADIUS server Mar 05 18:26:22.408253 osdx hostapd[596868]: eth2: RADIUS Received RADIUS message Mar 05 18:26:22.408258 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec Mar 05 18:26:22.408263 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Processing RADIUS response Mar 05 18:26:22.408315 osdx hostapd[596868]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled Mar 05 18:26:22.408318 osdx hostapd[596868]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled Mar 05 18:26:22.408320 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Authentication failed, entering held state (quiet period 60 sec) Mar 05 18:26:22.408323 osdx hostapd[596868]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Retry timeout registered for 60 seconds