Network Services and Security · Topic 1 of 7
Local Users and AAA Client
Configure local usernames, SSH login on the vty lines, and a Cisco device as an AAA client for TACACS+ or RADIUS, with a local fallback for management access.
- 5 min
- AAA is authentication, authorization and accounting.
- The router or switch is the AAA client. The server makes the decision.
aaa new-modelenables AAA. Method lists are read in order.
What it is
Device management access can be checked against accounts stored on the device (local users) or against a central AAA server.
AAA stands for authentication (who are you), authorization (what may you do) and accounting (what did you do). The router or switch is the AAA client, also called the network access server. It does not decide anything itself. It asks the server and enforces the answer.
The two server protocols are TACACS+ and RADIUS. Both can authenticate administrators who log in to the command line.
How it works
The device tries each method in the list in order, and moves on only when a method does not answer.
Local users
username admin privilege 15 secret STRONGPASS
!
line vty 0 15
login local
transport input ssh
exec-timeout 10 0
username ... secret stores a hash. privilege 15 puts the user straight into privileged EXEC. login local makes the line check the local username database, and transport input ssh refuses Telnet. SSH needs a hostname, a domain name and RSA keys first (crypto key generate rsa modulus 2048), plus ip ssh version 2.
login local with no username configured locks everyone out. Create the user first and keep a second session open while you test.
AAA client with TACACS+ and RADIUS
aaa new-model
!
tacacs server TAC1
address ipv4 10.1.1.20
key SHAREDKEY
!
radius server RAD1
address ipv4 10.1.1.21 auth-port 1812 acct-port 1813
key SHAREDKEY
!
aaa authentication login default group tacacs+ local
aaa authorization exec default group tacacs+ local
aaa accounting exec default start-stop group tacacs+
aaa new-model switches on the AAA system. Once it is on, every line uses a method list, so define one before you log out.
Read the first method list left to right: for logins, ask the TACACS+ servers, and use the local database if none of them answers. To use RADIUS instead, write group radius.
You can also name servers in a group and name the list:
aaa group server tacacs+ MGMT
server name TAC1
aaa authentication login VTY-LIST group MGMT local
line vty 0 15
login authentication VTY-LIST
A list called default applies to every line automatically. A named list applies only to the lines where you attach it with login authentication.
TACACS+ compared with RADIUS
| Feature | TACACS+ | RADIUS |
|---|---|---|
| Standard | Cisco developed | Open standard |
| Transport | TCP port 49 | UDP ports 1812 and 1813 |
| Encryption | Whole payload | Password only |
| AAA functions | Separated | Authentication and authorization combined |
| Typical use | Device administration | Network access such as VPN and 802.1X |
Older RADIUS servers may still use UDP 1645 and 1646. TACACS+ can authorize each command an administrator types, so it is the usual choice for management access.
Fallback to local
The fallback happens only when the server does not respond. If the server answers with a reject, the login fails and the local list is not tried.
R1# show aaa servers
R1# show users
R1# debug aaa authentication
R1# test aaa group radius admin PASSWORD new-code
show aaa servers shows whether each server is up or dead and its request counters (most complete for RADIUS). test aaa sends a test login to the server group, and debug aaa authentication shows each method being tried. Switch debugging off with undebug all when you are done.
Keep local last in every method list. If the AAA server is unreachable, the local account still works.
Common mistakes
No fallback method. With only group tacacs+ and the server down, nobody can log in.
Shared key mismatch. The key on the device must match the server exactly, or every request fails.
Wrong server address or no route. If the device cannot reach the server, the method times out and the next method is used after a delay.
Expecting fallback after a reject. A reject from a reachable server ends the login attempt.
Turning on aaa new-model without a user. The vty and console lines now use the method list, and a missing local user means a lockout.
Wrong list name on the line. The list named on the line must match a list you defined. Check both with show running-config | section aaa|line.
What to remember for the exam
- AAA is authentication, authorization and accounting.
- The router or switch is the AAA client. The server makes the decision.
aaa new-modelenables AAA. Method lists are read in order.login localuses the local username database.login authentication NAMEuses a named list.- Put
localat the end of the list so an unreachable server does not lock you out. - Fallback happens only when the server does not respond, not when it rejects.
- TACACS+ is TCP 49 and encrypts the whole payload. RADIUS is UDP 1812 and 1813 and encrypts only the password.
username NAME secret PASSWORDis hashed and better thanpassword.
Check yourself
What does
aaa authentication login default group tacacs+ localdo?The device asks the TACACS+ servers first and uses the local username database only if no server responds.
A reachable TACACS+ server rejects a login. Does the device try the local database?
No. Fallback happens only when the server does not answer, so the login fails.
Which protocol encrypts the whole payload and runs over TCP port 49?
TACACS+. RADIUS runs over UDP and encrypts only the password.
Topic 1 of 7 in Network Services and Security
Test yourself on Network Services and Security
The full Cisco CCNA 200-301 v2.0 question bank has 1,242 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.