Configure 802.1X with MAB fallback on a switch port using RADIUS
Cisco IOSWorking
Tasks
- Define ISE1 as a RADIUS server in a server group, sourcing requests from Vlan99.
- Create AAA method lists for 802.1X authentication, network authorization and accounting.
- Send the RADIUS attributes ISE expects and enable change of authorization from ISE1.
- Enable 802.1X globally.
- Configure the access ports for multi-auth with 802.1X first and MAB as fallback, reaching MAB within about 30 seconds.
- Keep the ports usable in VLAN 10 if ISE is unreachable, and reauthenticate when it returns.
Solution
1RADIUS server and groupASW2
ASW2 on Cisco IOS aaa new-model ! radius server ISE1 address ipv4 10.10.50.11 auth-port 1812 acct-port 1813 key Rad1usKey2026 ! aaa group server radius ISE-RADIUS server name ISE1 ip radius source-interface Vlan99State the ports explicitly. Older IOS defaults used 1645 and 1646, and a mismatch looks exactly like a dead server.
2Method listsASW2
ASW2 on Cisco IOS aaa authentication dot1x default group ISE-RADIUS aaa authorization network default group ISE-RADIUS aaa accounting dot1x default start-stop group ISE-RADIUSaaa authorization networkis what allows the switch to apply the VLAN or downloadable ACL that ISE returns.3Attributes, dead detection and CoAASW2
ASW2 on Cisco IOS radius-server attribute 6 on-for-login-auth radius-server attribute 8 include-in-access-req radius-server attribute 25 access-request include radius-server vsa send authentication radius-server vsa send accounting radius-server dead-criteria time 5 tries 3 radius-server deadtime 15 ! aaa server radius dynamic-author client 10.10.50.11 server-key Rad1usKey2026 ! dot1x system-auth-controlAttribute 8 sends the client's IP, and the Cisco VSAs carry the audit session ID that ISE uses to match accounting and CoA to the session.
dead-criteriaanddeadtimedecide how fast the switch gives up on an unresponsive server and how long before it tries again.4Access port templateASW2
ASW2 on Cisco IOS interface range GigabitEthernet1/0/1 - 46 switchport mode access switchport access vlan 10 authentication host-mode multi-auth authentication order dot1x mab authentication priority dot1x mab authentication port-control auto authentication periodic authentication timer reauthenticate server authentication event server dead action authorize vlan 10 authentication event server alive action reinitialize mab dot1x pae authenticator dot1x timeout tx-period 10 spanning-tree portfastWith
tx-period 10and the default two retries, a device that never answers EAPOL reaches MAB after about 30 seconds instead of about 90. These are the classicauthenticationcommands; on current IOS-XE you can convert them to the newer policy style withauthentication convert-to new-style.
Verify
ASW2# show aaa servers
RADIUS: id 1, priority 1, host 10.10.50.11, auth-port 1812, acct-port 1813, hostname ISE1
State: current UP, duration 3720s, previous duration 0s
Dead: total time 0s, count 0First lines only. The server is UP and has never been marked dead, so the ports, key and source address are right.
ASW2# show authentication sessions
Interface MAC Address Method Domain Status Fg Session ID
--------------------------------------------------------------------------------------------
Gi1/0/10 0050.5689.7c41 dot1x DATA Auth 0A63000C000000125F3A9C10
Gi1/0/22 0026.73aa.10f2 mab DATA Auth 0A63000C000000135F3A9D44The laptop authorized with dot1x and the printer with mab, both in the data domain.
ASW2# show authentication sessions interface GigabitEthernet1/0/10 details
Interface: GigabitEthernet1/0/10
MAC Address: 0050.5689.7c41
IPv4 Address: 10.10.10.61
User-Name: host/pc1.corp.example.com
Status: Authorized
Domain: DATA
Oper host mode: multi-auth
Oper control dir: both
Common Session ID: 0A63000C000000125F3A9C10
Method status list:
Method State
dot1x Authc SuccessThe machine identity from the certificate authenticated with 802.1X. The session ID starts with 0A63000C, which is 10.99.0.12, the switch's RADIUS source address in hex.
Mistakes people make
- Forgetting
dot1x system-auth-control. The interface commands are accepted but nothing authenticates. - Leaving out
aaa authorization network, so the switch ignores the VLAN or dACL that ISE returns. - No
mabon the template, so printers and cameras never get on once the port is closed. - Default timers, which leave MAB devices waiting about 90 seconds, long enough for some to give up on DHCP.
- RADIUS requests sourced from an address ISE does not know as a network device. ISE drops them and the switch marks the server dead.
- No server-dead action, which turns an ISE outage into a floor-wide outage.
Say it in the interview
"Server group with an explicit source interface, then method lists for dot1x authentication, network
authorization and accounting. Send the attributes ISE needs, enable CoA, and turn on
dot1x system-auth-control. On the ports: multi-auth, dot1x first with MAB as fallback, a 10 second
tx-period so MAB starts in about 30 seconds, and a critical VLAN for when ISE is unreachable. I verify
with show aaa servers and the session details, which tell me the method and the result."