802.1X-Befehle richten die portbasierte Netzwerkzugangskontrolle (PNAC) auf Cisco-Switches ein: Ein Endgerät (Supplicant) muss sich am Port (Authenticator) gegen einen RADIUS-Server authentifizieren, bevor Datenverkehr fließt. Die Rollen und das EAP-Verfahren erklärt der Artikel 802.1X.
RADIUS-Server und AAA einrichten
Switch(config)# aaa new-model
Switch(config)# radius server RADIUS-1
Switch(config-radius-server)# address ipv4 192.0.2.10 auth-port 1812 acct-port 1813
Switch(config-radius-server)# key GeheimSchluessel
Switch(config)# aaa authentication dot1x default group radius
aaa new-model aktiviert das AAA-System. Der RADIUS-Server wird mit IP, Ports (1812 Authentifizierung, 1813 Accounting) und gemeinsamem Schlüssel definiert. Die Methodenliste aaa authentication dot1x default group radius weist 802.1X-Authentifizierungen dem RADIUS-Server zu.
Global und am Port aktivieren
Switch(config)# dot1x system-auth-control
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# authentication port-control auto
Switch(config-if)# dot1x pae authenticator
dot1x system-auth-control schaltet 802.1X global ein. Am Access-Port setzt authentication port-control auto den Port auf automatische Authentifizierung (das ältere dot1x port-control auto wirkt gleich), dot1x pae authenticator legt die Port-Rolle fest. Der Port startet im unautorisierten Zustand und lässt nur EAPOL-Verkehr (EtherType 0x888E) durch.
Host-Modus und MAB-Fallback
Switch(config-if)# authentication host-mode multi-host
Switch(config-if)# authentication order dot1x mab
Switch(config-if)# mab
Switch(config-if)# dot1x reauthentication
Switch(config-if)# dot1x timeout reauth-period 3600
authentication host-mode bestimmt, wie viele Hosts sich an einem Port authentifizieren müssen (single-host, multi-host, multi-auth). Mit authentication order dot1x mab und mab greift die MAC-Authentifizierung als Fallback für Geräte ohne Supplicant (Drucker, IP-Kameras). dot1x reauthentication erzwingt regelmäßige Neu-Authentifizierung.
Prüfen und Fehlersuche
Switch# show dot1x all
Switch# show dot1x interface GigabitEthernet0/1 details
Switch# show authentication sessions
Switch# show authentication sessions interface GigabitEthernet0/1 details
Switch# show aaa servers
show dot1x all zeigt den globalen Status, show authentication sessions den Autorisierungszustand je Port (Autorisiert/Unautorisiert, Methode, MAC, VLAN). show aaa servers prüft die Erreichbarkeit des RADIUS-Servers.
Verwandte Grundlagen: DHCP-Snooping-Befehle, Port-Security-Befehle, RADIUS.