Labs / Who Goes There / AAA, 802.1X & LDAP

Lab 2 of 3 · AAA, 802.1X & LDAP

802.1X and RADIUS: logging in to a switch port

Unlock a switch port by logging in with 802.1X against RADIUS.

Open this lab Pro 6 steps

The idea

802.1X keeps a switch port shut until the device on it logs in. The laptop logs in on officeSwitch, which asks radiusServer over RADIUS; the port opens to fileServer. An intruder who guesses alice's password stays out.

The login, end to end
The login, end to end
Two identities: anonymous outside, alice inside
Two identities: anonymous outside, alice inside

Steps

  1. A locked port passes nothing

    A free wall jack must not be a way in, so the laptop's port starts shut. Ping fileServer from the laptop, then read the port's settings and its MAC table on officeSwitch.

    laptop:~# ping -c2 -W1 10.0.1.12
    officeSwitch:~# bridge -d link show dev laptop
    officeSwitch:~# bridge fdb show dev laptop
  2. Log in on the port with 802.1X

    The laptop is the supplicant, the device that wants in; it speaks EAP to the switch in EAPOL frames. Start wpa_supplicant with the settings in /etc/wpa_supplicant/office.conf (alice's account, EAP-MD5), read its status, and ping again.

    laptop:~# wpa_supplicant -B -D wired -i eth0 -c /etc/wpa_supplicant/office.conf
    laptop:~# wpa_cli -i eth0 status
    laptop:~# ping -c2 -W1 10.0.1.12

Pro

4 more steps in the app

  1. What the switch did
  2. A wrong password: Access-Reject
  3. EAP methods: MD5 shows too much
  4. Log off, and the port locks again
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab