Tutorials · Security

How to Set Up TACACS+ AAA for Switch, Router and Firewall Logins

Replace shared admin passwords with per-person logins: authenticate administrators against TACACS+, authorize each command by role and keep an accounting record of every change.

Advanced25 min8 steps

Quick answer

TACACS+ is the standard protocol for device administration AAA. Each administrator logs in to switches, routers and firewalls with their own account. The TACACS+ server checks the password, decides which commands that person may run, and records every command they type.

Use TACACS+ for people who manage network devices and RADIUS for users and devices joining the network (802.1X, Wi-Fi, VPN). Most enterprises run both, often on the same policy server.

Key terms

Authentication
Proving who the administrator is: a password, a one-time code or a certificate.
Authorization
Deciding what that person may do: which devices, which privilege level, which commands.
Accounting
Recording what they did: login, logout and each command, with time and source IP.
Privilege level
A number from 0 to 15 on many network operating systems. 1 is read-only and 15 is full configuration.
Fallback (local) account
A break-glass account on the device itself, used only when no TACACS+ server is reachable.

Before you start

  • A TACACS+ server (for example an open-source tac_plus daemon or a commercial policy server)
  • Managed switches, routers or firewalls that support TACACS+
  • A management VLAN that can reach the server on TCP port 49
  • Synchronised time (NTP) on all devices

Step by step

  1. Create roles on the server

    Define at least three groups: read-only (NOC, auditors), operator (port and VLAN changes) and admin (full access). Map each group to a privilege level or a command set.

    group = noc { default service = deny
      service = exec { priv-lvl = 1 } }
    group = netadmin { default service = permit
      service = exec { priv-lvl = 15 } }
    
  2. Add every device as a TACACS+ client

    Register the management IP of each switch, router and firewall with a unique, long shared key (at least 22 random characters). Never reuse the key on other systems.

  3. Point the device to the server

    Configure two servers for redundancy and send TACACS+ from the management interface.

    aaa new-model
    tacacs server TAC1
     address ipv4 10.99.0.21
     key <long-random-key>
    tacacs server TAC2
     address ipv4 10.99.0.22
     key <long-random-key>
    ip tacacs source-interface Vlan99
    
  4. Authenticate logins, with local fallback

    Use the server first. Use the local account only if the server does not answer, not if it rejects the password.

    aaa authentication login default group tacacs+ local
    aaa authentication enable default group tacacs+ enable
    
  5. Authorize sessions and commands

    Let the server decide the privilege level and approve configuration commands one by one.

    aaa authorization exec default group tacacs+ local
    aaa authorization commands 15 default group tacacs+ local
    aaa authorization config-commands
    
  6. Turn on accounting

    Send a start and stop record for each session and a record for every privileged command.

    aaa accounting exec default start-stop group tacacs+
    aaa accounting commands 15 default start-stop group tacacs+
    
  7. Protect the break-glass account

    Keep one local admin with a long random password in a sealed vault. Alert whenever it is used.

    username breakglass privilege 15 secret <vault-stored-password>
    
  8. Test before you log out

    Keep your current session open, log in from a second session as a read-only user and as an admin, and confirm the accounting log shows both.

    test aaa group tacacs+ noc-user <password> new-code
    show tacacs
    

Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.

Pro tips

  • TACACS+ encrypts the whole packet body, but RFC 8907 calls this obfuscation and says it is not strong security. Keep TACACS+ on an isolated management network or inside an IPsec tunnel.
  • Combine TACACS+ with MFA: let the policy server ask for a one-time code or push approval after the password.
  • Firewalls often map TACACS+ groups to admin profiles instead of privilege levels. Return the profile name as a vendor-specific attribute.
  • Review accounting logs weekly for configuration changes made outside approved change windows.

Which AAA protocol for which job

JobProtocolWhy
Admin login to switches, routers, firewallsTACACS+Separate authorization per command and full command accounting
Users and devices joining wired or Wi-Fi (802.1X)RADIUSCarries EAP, returns VLAN and policy, supported by every AP and switch
Remote-access VPN usersRADIUS or SAMLRADIUS for MFA servers; SAML for identity-provider single sign-on
Mobile operator core (4G/5G)DiameterDesigned for large carrier networks

Last reviewed:

FAQ

Frequently asked questions

What is the difference between TACACS+ and RADIUS?

TACACS+ runs over TCP port 49, encrypts the whole packet body and handles authentication, authorization and accounting separately, which suits device administration. RADIUS runs over UDP 1812/1813, hides only the password and combines authentication and authorization, which suits network access (802.1X, Wi-Fi, VPN).

Is TACACS+ secure?

Its body obfuscation uses MD5 and is not considered strong encryption. Use long unique keys and keep TACACS+ traffic on a dedicated management network or inside a VPN tunnel.

What happens if the TACACS+ server is down?

With 'group tacacs+ local', the device falls back to its local accounts only when no server responds. A rejected password is not retried locally.

What does AAA stand for?

Authentication, authorization and accounting: who you are, what you may do, and a record of what you did.

Stuck on a step?

Ask Navijin technical support or an authorised partner for help with your configuration.