CCNA Lab 3: TACACS+ and RADIUS Authentication on Switches
Managing local passwords on 50 switches does not scale. AAA (Authentication, Authorization, Accounting) centralizes access control. TACACS+ and RADIUS are the two protocols used, and they serve different purposes.
| Feature | TACACS+ | RADIUS |
|---|---|---|
| Transport | TCP (port 49) | UDP (ports 1812/1813) |
| Encryption | Entire packet encrypted | Only password encrypted |
| Authorization | Yes โ per-command | Limited |
| Accounting | Yes โ detailed | Yes โ basic |
| Best for | Device administration | Network access (802.1X, VPN) |
Rule of thumb: TACACS+ for switch/router admin access, RADIUS for end-user network access.
tacacs-server host 192.168.1.100
key MyTacacsKey123!Or using the newer syntax:
aaa new-model
tacacs server TACACS-1
address ipv4 192.168.1.100
key MyTacacsKey123!
tacacs server TACACS-2
address ipv4 192.168.1.101
key MyTacacsKey123!aaa authentication login default group tacacs+ local
aaa authentication enable default group tacacs+ enable
aaa authorization exec default group tacacs+ local
aaa authorization commands 15 default group tacacs+ local
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default start-stop group tacacs+Breakdown:
authentication login โ who can log inauthentication enable โ who can run enableauthorization exec โ what shell access they getauthorization commands 15 โ which privilege 15 commands they can runaccounting exec โ log when sessions start/stopaccounting commands 15 โ log every command executedThe local keyword at the end means: if the TACACS server is unreachable, fall back to local users. This prevents lockouts.
aaa authentication login default group tacacs+ localline con 0
login authentication defaultradius server RADIUS-1
address ipv4 192.168.1.100 auth-port 1812 acct-port 1813
key MyRadiusKey123!
aaa authentication dot1x default group radius
aaa authorization network default group radius
aaa accounting network default start-stop group radius
dot1x system-auth-controlInstall FreeRADIUS on a Linux server:
apt install freeradius freeradius-utilsEdit /etc/freeradius/3.0/clients.conf:
client 192.168.0.0/16 {
secret = MyRadiusKey123!
shortname = network-devices
}
Add users in /etc/freeradius/3.0/users:
admin Cleartext-Password := "StrongPass"
Service-Type = NAS-Prompt-User,
Cisco-AVPair = "shell:priv-lvl=15"
netop Cleartext-Password := "NetopPass"
Service-Type = NAS-Prompt-User,
Cisco-AVPair = "shell:priv-lvl=5"
Restart:
systemctl restart freeradiustest aaa group tacacs+ admin StrongPass! new-code
test aaa group radius admin StrongPass! new-code
show aaa servers
show tacacs
show radius statisticsdebug aaa authentication
debug aaa authorization
debug tacacs
debug radiusAlways disable debug when done โ it floods the console:
undebug all| Issue | Cause | Fix |
|---|---|---|
| Authentication fails | Wrong shared key | Confirm key matches on both sides |
| No fallback on server down | Missing local in method list | Add local after group tacacs+ |
| Commands not logged | No accounting configured | Add accounting commands 15 |
| Locked out | AAA misconfig | Reload via console or break into ROMMON |
If AAA misconfiguration locks you out:
confreg 0x2142 (skip startup config)resetconfig-register 0x2102wrRelated Articles
CCNA Lab 3: TACACS+ and RADIUS Authentication on Switches
Centralize authentication for your network devices using TACACS+ and RADIUS. Real AAA configuration with Cisco IOS and a Linux ACS server.
CCNA Lab 12: DHCP Snooping, DAI, and IP Source Guard
Configure Layer 2 security features to prevent DHCP spoofing, ARP poisoning, and IP spoofing attacks on your access switches.
CCNA Lab 5: ACLs on Layer 2 Switches
Configure and troubleshoot ACLs on Cisco switches โ port ACLs, VLAN ACLs, and router ACLs. Secure your Layer 2 network.