Build an 802.1X lab
These hands-on guides walk a complete 802.1X deployment on a lab small enough to build in an afternoon, and concrete enough that every command and every checkbox is one you will actually type. This first page builds the foundation the others start from: a switch that talks RADIUS to Taranac, one access port under 802.1X, and a Windows PC on the other end of the cable.
Nothing here authenticates a user yet — that is deliberate. The single most common way an 802.1X rollout stalls is that the plumbing was never proven before the supplicant was touched, so a switch-side problem gets mistaken for a client problem for hours. By the end of this page you will have positive proof that a RADIUS request leaves the switch and arrives at Taranac, and only then do the later guides configure the client.
What you’ll build
Section titled “What you’ll build”| Component | Role | Reference address |
|---|---|---|
| Taranac | NAC RADIUS server + policy engine | 10.30.0.20 |
| SW1 | Access switch (the authenticator) | 10.30.0.11 |
| Windows 10/11 PC | 802.1X supplicant | DHCP, on SW1 Gi1/1 |
| A dumb client (VPC, printer, camera) | MAB endpoint — used by the MAB guide | DHCP, on SW1 Gi1/0 |
VLANs used throughout the series:
| VLAN | Purpose | Gateway |
|---|---|---|
| 1 | Switch management + Taranac | 10.30.0.1 |
| 10 | Data — where authenticated corporate devices land | 10.30.10.1 |
| 30 | Guest / quarantine | 10.30.30.1 |
| 40 | Printers and other MAB’d devices | 10.30.40.1 |
Substitute your own addressing as you go — the only hard requirement is that the switch and Taranac can reach each other on UDP, and that the switch’s RADIUS source address matches what you register in Taranac.
Before you start
Section titled “Before you start”- Taranac installed and reachable. See Installation or the virtual appliance. You need admin access to the web UI.
- A switch with a management IP and an L3 path to Taranac. Console or out-of-band access to that switch — you are about to enable port authentication, and locking yourself out of a lab switch is a rite of passage worth skipping.
- A Windows 10/11 machine with a wired NIC on a port of that switch.
- The NAC RADIUS ports open between them: auth
1814/udp, accounting1815/udp, CoA3799/udp.
Step 1 — Register the switch in Taranac
Section titled “Step 1 — Register the switch in Taranac”A switch that is not registered is not a client: the NAC server drops its packets before any policy runs, and you will see nothing in the logs. This step comes first for that reason.
-
Open Network → Devices (
/network/devices) and click New. -
Fill in the identity side — a name, and a Network Object carrying the switch’s address (a
/32host object is the usual choice). That address must be the one the switch sources RADIUS packets from, not necessarily its loopback or its DNS name. Vendor, platform and location are optional but worth filling in. -
Under Protocol Support, turn on NAC. NAC rides on the RADIUS protocol, so enabling it reveals the RADIUS Secret field even when the RADIUS toggle itself is off — that same secret is what your
radius serverline on the switch must carry. Set a strong one and keep it to hand. -
Leave CoA Port and CoA Secret empty unless you have a reason not to. Empty means inherit: the device falls back to its group, then to the global
nac.coa_port/nac.coa_secretsetting — the Details panel spells out which value is actually in effect. The default CoA port is3799. -
Optionally pin a Vendor Dictionary (CoA). Left empty, Taranac detects the vendor and falls back to a generic encoding; set explicitly, CoA actions (reauth, bounce, VLAN change) are encoded exactly the way that platform expects.
-
Save.
The device form. RADIUS is off and the RADIUS Secret field is still there — that is NAC reusing it. On the right, the Details panel resolves what each setting actually evaluates to, including 3799 (Global default) for the CoA port left blank on the left.
Secrets resolve along a three-level chain — device → device group → global setting — with the first level that has a value winning. For a lab, set it on the device. For a real network, a per-site device group carrying the secret is usually the better shape; see Network devices.
Step 2 — Point the switch at Taranac
Section titled “Step 2 — Point the switch at Taranac”Now the switch side. This block is global plumbing only: which server, which ports, which secret, and the master switch that turns 802.1X on.
! ── The NAC RADIUS server ───────────────────────────────────────radius server TARANAC-NAC address ipv4 10.30.0.20 auth-port 1814 acct-port 1815 timeout 5 retransmit 2 key <RADIUS_SECRET>
! ── Its own server group, so device-admin AAA is untouched ──────aaa group server radius TARANAC-NAC-GRP server name TARANAC-NAC ip radius source-interface Vlan1
aaa authentication dot1x default group TARANAC-NAC-GRPaaa authorization network default group TARANAC-NAC-GRPaaa accounting dot1x default start-stop group TARANAC-NAC-GRP
! ── The global 802.1X master switch ─────────────────────────────dot1x system-auth-control
! ── Source + attributes ─────────────────────────────────────────ip radius source-interface Vlan1radius-server attribute 6 on-for-login-authradius-server attribute 8 include-in-access-reqradius-server attribute 25 access-request include
! ── CoA listener (Taranac pushes reauth / disconnect here) ──────aaa server radius dynamic-author client 10.30.0.20 server-key <RADIUS_SECRET> port 3799 auth-type any! ── The global 802.1X master switch ─────────────────────────────dot1x system-auth-controldot1x dynamic-authorization
! ── The NAC RADIUS server + CoA listener ────────────────────────radius-server host 10.30.0.20 auth-port 1814 acct-port 1815 key 0 <RADIUS_SECRET>radius-server dynamic-authorization port 3799
aaa group server radius TARANAC-NAC server 10.30.0.20 auth-port 1814 acct-port 1815
aaa authentication dot1x default group TARANAC-NACaaa accounting dot1x default start-stop group TARANAC-NACOn EOS the CoA key comes from the radius-server host line — there is no
separate client/server-key stanza like Cisco’s aaa server radius dynamic-author, and EOS will reject that syntax if you try to paste it.
Two EOS specifics are worth stating plainly, because both fail quietly:
-
CoA needs two lines, not one.
radius-server dynamic-authorization port 3799opens the listener;dot1x dynamic-authorizationlets the dot1x process apply what arrives. They are independent, and having only the second one is a config that looks CoA-ready and silently drops every reauth/disconnect Taranac sends. Nothing about authentication breaks, so this can sit unnoticed indefinitely.Verify it by behaviour, not by reading the config: with the port left at its default, the listener line may not appear in
show running-configat all, since EOS omits values that match defaults. Useshow running-config allandshow radiusto confirm it is really there — and re-check after a reload, so a setting that was only ever applied at runtime does not quietly disappear on the next reboot. -
Accounting is its own line, and sessions depend on it.
aaa accounting dot1xis what produces the Accounting-Requests that create sessions in Taranac. A switch missing it authenticates perfectly and shows up in the auth log while producing zero sessions.
Two more things worth getting right the first time:
- Source the RADIUS packets deliberately.
ip radius source-interface Vlan1(Cisco) makes packets carry the switch’s management IP, which is what you registered in Step 1. If the source address and the registered address disagree, the NAC server sees an unknown client and drops the request without logging a policy decision. - The secret is per device. It must match the
radius_secreton this switch’s device entry. Not the TACACS+ key, and not another switch’s secret. A mismatch surfaces as a rejected or unanswered request at the NAC handler. - Save the configuration —
write memoryon Cisco,writeon EOS. A lab switch that reloads with half of this config missing produces symptoms that look nothing like “the config is gone”: authentication may keep working while accounting silently stops, so sessions vanish from Taranac while access still succeeds.
Step 3 — Configure the access port
Section titled “Step 3 — Configure the access port”Wire the Windows PC to Gi1/1 and apply the port config. This is a dot1x port
with MAB as the fallback — the shape you will use for most real access ports.
interface GigabitEthernet1/1 switchport access vlan 10 switchport mode access ip device tracking maximum 10 authentication open ! ← monitor mode; remove when you go live authentication order mab dot1x authentication priority dot1x mab authentication port-control auto authentication periodic authentication timer reauthenticate server authentication violation restrict mab dot1x pae authenticator dot1x timeout tx-period 10 spanning-tree portfast edgeauthentication order sets which method is tried first; authentication priority sets which one wins if both could succeed. Ordering MAB first and
prioritising dot1x is the usual pairing: a device that never sends EAPOL gets
MAB’d quickly, while a real supplicant still ends up authenticated by 802.1X.
interface Ethernet3 switchport access vlan 10 switchport mode access dot1x pae authenticator dot1x port-control auto dot1x host-mode multi-host authenticated dot1x reauthentication dot1x mac based authentication dot1x timeout tx-period 10 spanning-tree portfast edgeOn EOS, MAB is dot1x mac based authentication on the port. With both enabled,
802.1X is attempted first and MAC-based authentication is the fallback. EOS has
no direct equivalent of Cisco’s authentication open, so keep console or
out-of-band access to the switch while you bring the port up.
Step 4 — Prove the plumbing before touching the PC
Section titled “Step 4 — Prove the plumbing before touching the PC”Do not configure the Windows supplicant yet. First confirm that a request physically reaches Taranac.
On the switch:
show dot1xshow dot1x interface GigabitEthernet1/1 detailsshow authentication sessions interface GigabitEthernet1/1 detailsshow aaa serversshow dot1x must report that 802.1X is enabled system-wide. If it does not, you
skipped dot1x system-auth-control.
show dot1xshow dot1x interface Ethernet3show radiusshow aaa accountingshow mac address-tableshow loggingshow radius should list the Taranac server and the dynamic-authorization
listener; if the listener is absent, you have dot1x dynamic-authorization
without radius-server dynamic-authorization port 3799. Note that the listener
line may be missing from show running-config even when it is active — check
show running-config all before concluding anything from the config text.
show aaa accounting must show a dot1x method pointed at your server group —
without it you will authenticate but never create a session.
On Taranac: open Logging → NAC → Authentication
(/logging/nac/authentication). Plug the PC in, or bounce the port
(shutdown / no shutdown), and watch.
- With Windows’ 802.1X not yet configured, the PC sends no EAPOL — so after the dot1x timeout the switch falls back to MAB and you should see a MAB attempt for the PC’s MAC address. That request is almost certainly rejected by the default deny-all policy, and that is a success for this step: a rejected request that reached the handler proves the client entry, the secret, the routing and the ports are all correct.
- The device should also appear under Endpoints (
/nac/endpoints), created from the MAC the switch reported.
If you see nothing at all, work down this table before changing anything on the client.
| Symptom | Likely cause | Fix |
|---|---|---|
| No requests reach Taranac at all; port is silent | dot1x system-auth-control missing | Add it globally — see the callout above |
| Nothing in the NAC log, but device-admin logins work | Switch pointed at 1812/1813 | NAC listens on 1814/1815 |
| Request logged as unknown client / no policy decision | Source IP ≠ registered device IP | Set ip radius source-interface, or correct the device’s IP in Taranac |
| Access-Reject with no policy match, secret suspected | Wrong or stale shared secret | The secret must equal this device’s RADIUS secret, not the TACACS+ key |
| Device saved in Taranac but still not a client | Config not regenerated yet | Wait ~30 s (nac.auto_reload_interval), then retry |
| CoA sent but the session never changes | CoA client IP on the switch points elsewhere | The client / listener must name the Taranac that serves this switch |
What’s next
Section titled “What’s next”The lab is now a working NAC testbed: the switch asks, Taranac answers, and every answer is logged. From here:
- 802.1X with PEAP — create a user, build a policy, configure the Windows supplicant window by window, watch a real authentication succeed, and close the port.
- MAB for printers and IoT — take the dumb client on
Gi1/0from unknown to classified and onto VLAN 40. (Coming next in this series.) - EAP-TLS for domain users — certificates instead of passwords, for Active Directory accounts.
Related
Section titled “Related”- NAC overview — how the pieces fit together
- Network devices — device fields, groups and secret inheritance
- 802.1X authentication — what each EAP method needs
- NAC policy — authorization profiles and rule matching