Only Mab

This scenario shows how to configure the only-MAB authentication mode.

../../../../../_images/topologydut0dut1.svg

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 U2FsdGVkX18PWLSGLxSuv8IcokcRX4ahCAy/2PV5C3mV+U0DyVjbtwg/XCGIiWySrCxthbxpkTquuNl23OjHjg==
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 1
Show 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.192 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.192/0.192/0.192/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 1
Show 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.338 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.338/0.338/0.338/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+MAB
Show 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 1
Show 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.316 ms

--- 192.168.100.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.316/0.316/0.316/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 authenticated
Show output
Feb 19 07:45:44.286617 osdx hostapd[44104]: eth2: IEEE 802.11 Fetching hardware channel/rate support not supported.
Feb 19 07:45:44.286629 osdx hostapd[44104]: eth2: RADIUS Authentication server 10.215.168.1:1812
Feb 19 07:45:44.286840 osdx hostapd[44104]: connect[radius]: Network is unreachable
Feb 19 07:45:44.286663 osdx hostapd[44104]: eth2: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5
Feb 19 07:45:44.286666 osdx hostapd[44104]: eth2: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode
Feb 19 07:45:44.302505 osdx hostapd[44104]: Discovery mode enabled on eth2
Feb 19 07:45:44.302575 osdx hostapd[44104]: eth2: interface state UNINITIALIZED->ENABLED
Feb 19 07:45:44.302575 osdx hostapd[44104]: eth2: AP-ENABLED
Feb 19 07:45:49.303337 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 DRIVER: Device discovered, triggering MAB authentication
Feb 19 07:45:49.303366 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: New STA de:ad:be:ef:6c:12 added
Feb 19 07:45:49.303373 osdx hostapd[44105]: eth2: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode
Feb 19 07:45:49.318493 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB-only mode: Starting MAB authentication
Feb 19 07:45:49.318516 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Starting RADIUS query
Feb 19 07:45:49.318530 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: User-Name = de:ad:be:ef:6c:12
Feb 19 07:45:49.320129 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: User-Password = de:ad:be:ef:6c:12
Feb 19 07:45:49.320141 osdx hostapd[44105]: eth2: RADIUS Authentication server 10.215.168.1:1812
Feb 19 07:45:49.320204 osdx hostapd[44105]: eth2: RADIUS Sending RADIUS message to authentication server
Feb 19 07:45:49.320230 osdx hostapd[44105]: eth2: RADIUS Next RADIUS client retransmit in 1 seconds
Feb 19 07:45:49.320482 osdx hostapd[44105]: eth2: RADIUS Received 20 bytes from RADIUS server
Feb 19 07:45:49.320487 osdx hostapd[44105]: eth2: RADIUS Received RADIUS message
Feb 19 07:45:49.320490 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec
Feb 19 07:45:49.320493 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Processing RADIUS response
Feb 19 07:45:49.320508 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: Identity set to 'de:ad:be:ef:6c:12'
Feb 19 07:45:49.320510 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: MAB: station successfully authenticated
Feb 19 07:45:49.320512 osdx hostapd[44105]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled
Feb 19 07:45:49.320523 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 IEEE 802.1X: authorizing port
Feb 19 07:45:49.320526 osdx hostapd[44105]: eth2: STA de:ad:be:ef:6c:12 RADIUS: starting accounting session 3531D99C6688EBB2

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 U2FsdGVkX191HIXJjDLxJ0iAUNkCe/1WUeGcTu8QA5lljwvVHyGQ7YGz/8e2v2hNI+aE9w0v7yHCYxwz6rKduA==
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 1
Show 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.153 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.153/0.153/0.153/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 1
Show 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 failed
Show output
Feb 19 07:45:59.355775 osdx hostapd[44630]: eth2: IEEE 802.11 Fetching hardware channel/rate support not supported.
Feb 19 07:45:59.355787 osdx hostapd[44630]: eth2: RADIUS Authentication server 10.215.168.1:1812
Feb 19 07:45:59.355992 osdx hostapd[44630]: connect[radius]: Network is unreachable
Feb 19 07:45:59.355825 osdx hostapd[44630]: eth2: IEEE 802.1X Initializing IEEE 802.1X: mode=MAB-only, eap_server=0, eap_quiet_period=60, eap_max_retrans=5
Feb 19 07:45:59.355829 osdx hostapd[44630]: eth2: IEEE 802.1X IEEE 802.1X: Enabling packet capture discovery mode
Feb 19 07:45:59.375643 osdx hostapd[44630]: Discovery mode enabled on eth2
Feb 19 07:45:59.375708 osdx hostapd[44630]: eth2: interface state UNINITIALIZED->ENABLED
Feb 19 07:45:59.375708 osdx hostapd[44630]: eth2: AP-ENABLED
Feb 19 07:46:04.376556 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 DRIVER: Device discovered, triggering MAB authentication
Feb 19 07:46:04.376596 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: New STA 00:11:22:33:44:55 added
Feb 19 07:46:04.376610 osdx hostapd[44631]: eth2: IEEE 802.1X IEEE 802.1X: Disabling packet capture discovery mode
Feb 19 07:46:04.391703 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB-only mode: Starting MAB authentication
Feb 19 07:46:04.391730 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Starting RADIUS query
Feb 19 07:46:04.391744 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Name = 00:11:22:33:44:55
Feb 19 07:46:04.393478 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: User-Password = 00:11:22:33:44:55
Feb 19 07:46:04.393490 osdx hostapd[44631]: eth2: RADIUS Authentication server 10.215.168.1:1812
Feb 19 07:46:04.393570 osdx hostapd[44631]: eth2: RADIUS Sending RADIUS message to authentication server
Feb 19 07:46:04.393607 osdx hostapd[44631]: eth2: RADIUS Next RADIUS client retransmit in 1 seconds
Feb 19 07:46:05.393635 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 RADIUS: Resending RADIUS message (id=128)
Feb 19 07:46:05.393671 osdx hostapd[44631]: eth2: RADIUS Next RADIUS client retransmit in 2 seconds
Feb 19 07:46:05.393908 osdx hostapd[44631]: eth2: RADIUS Received 20 bytes from RADIUS server
Feb 19 07:46:05.393912 osdx hostapd[44631]: eth2: RADIUS Received RADIUS message
Feb 19 07:46:05.393916 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 RADIUS: Received RADIUS packet matched with a pending request, round trip time 0.00 sec
Feb 19 07:46:05.393921 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Processing RADIUS response
Feb 19 07:46:05.393969 osdx hostapd[44631]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled
Feb 19 07:46:05.393972 osdx hostapd[44631]: eth2: IEEE 802.1X IEEE 802.1X: Discovery already disabled
Feb 19 07:46:05.393975 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Authentication failed, entering held state (quiet period 60 sec)
Feb 19 07:46:05.393978 osdx hostapd[44631]: eth2: STA 00:11:22:33:44:55 IEEE 802.1X: MAB: Retry timeout registered for 60 seconds