Configure Cisco Routers to Use ACS for AAA with TACACS+
Learn to configure a Cisco IOS router for ACS-based TACACS+ authentication and EXEC authorization, with local credentials as a controlled fallback.
Centralized AAA lets a Cisco IOS router use Cisco ACS to control administrative access. In this configuration, the router sends login and authorization requests to ACS through TACACS+, while a local administrator account provides a recovery path if ACS is unavailable.
This lesson assumes familiarity with IOS configuration modes, IP connectivity, VTY lines, SSH, local usernames, and basic ACS administration. For background, review AAA explained, what Cisco ACS is, and enabling SSH on a Cisco router.
AAA and centralized router administration
AAA is a framework containing three related functions:
- Authentication verifies who a user is, usually by checking a username and password.
- Authorization determines what an authenticated user may access or do.
- Accounting records access and activity for auditing and reporting.
With local-only administration, every router has its own username database. Adding, removing, or changing an administrator then requires changes on multiple devices. Centralized identity management puts users and access policies in one service, making consistent administration, auditing, and account removal easier.
Cisco ACS, or Cisco Access Control Server, acts as a centralized AAA server for network-device administration. It stores or references administrator identities and applies device-access and authorization policies.
Authentication and authorization are separate decisions. A user can supply valid credentials and still fail EXEC authorization. EXEC authorization determines whether IOS permits the user to start an EXEC session and which privilege or administrative attributes apply.
AAA functions in an IOS router
TACACS+ between the router and ACS
TACACS+ is the AAA protocol used for communication in this example. The router is the TACACS+ client; ACS is the TACACS+ server. The client sends authentication and authorization requests, and ACS evaluates them against its users and policies.
A shared secret is configured for the router client in ACS and for the corresponding TACACS+ server definition on the router. Both values must match. The secret helps the two systems authenticate their relationship and protect TACACS+ exchanges. Use a strong secret and protect it like any other infrastructure credential.
The router must be able to reach the ACS address through its routing table and management path. Check interface state, routes, management VRFs, source addressing, firewalls, and ACLs. Any intervening control must permit TACACS+ traffic. ACS must also recognize the source address that the router uses for its requests.
Prepare a local recovery account first
Before enabling AAA, create at least one local administrative account. This account is the emergency path when ACS cannot be contacted. Give it a usable privilege level or other local authorization configuration.
configure terminal
username localadmin privilege 15 secret <LOCAL_SECRET>
Use a real secret in place of <LOCAL_SECRET>; do not reuse a TACACS+ shared secret. Keep console or out-of-band access available while changing AAA. Enabling AAA without a valid method list or fallback account can lock out remote administrators.
Basic ACS-first AAA configuration
The following example uses a router with management address 192.0.2.1 and an ACS TACACS+ address of 192.0.2.10. The syntax shown first is the legacy IOS TACACS+ style supplied in the scenario. Confirm syntax for the IOS release before deploying.
1. Define the ACS TACACS+ server
configure terminal
tacacs-server host 192.0.2.10 key <TACACS_SHARED_SECRET>
The address can be an IP address or, where supported and correctly resolved, a hostname. The shared secret must equal the secret configured for this router as a network device in ACS.
2. Enable the IOS AAA subsystem
aaa new-model
aaa new-model activates IOS AAA processing and makes AAA method lists available. Do not enter this command casually on a remotely managed device: if the resulting configuration has no usable authentication method or recovery path, existing access can be lost.
3. Create the default login authentication method list
aaa authentication login default group tacacs+ local
A method list is an ordered policy describing which authentication sources IOS should try. This list tries the TACACS+ server group first and the local username database second.
default is the special default method-list name. Services that use the default list automatically use this policy unless a named list is explicitly configured. The order matters: TACACS+ is preferred, and local authentication is the fallback.
Fallback generally occurs when the TACACS+ service is unavailable or cannot be contacted. An explicit TACACS+ rejection, such as an invalid centralized password or a policy denial, normally should not be treated as permission to bypass ACS with a local account. This distinction prevents a local account from circumventing a deliberate centralized denial.
4. Create the default EXEC authorization method list
aaa authorization exec default group tacacs+ local
This policy asks TACACS+ to authorize an EXEC session and uses local authorization if ACS is unavailable. Authentication alone does not guarantee an IOS shell. ACS must return an authorization result that permits EXEC access and, when required, supplies an appropriate privilege level or related attribute.
5. Apply both policies to the VTY lines
line vty 0 4
login authentication default
authorization exec default
transport input ssh
VTY lines control inbound remote terminal sessions, including SSH and Telnet according to the configured transport settings. The example permits SSH only, which is preferred for administrative access. On platforms with more VTY lines, configure the complete applicable range, such as line vty 0 15, after checking the device.
Complete legacy-style example
configure terminal
username localadmin privilege 15 secret <LOCAL_SECRET>
tacacs-server host 192.0.2.10 key <TACACS_SHARED_SECRET>
aaa new-model
aaa authentication login default group tacacs+ local
aaa authorization exec default group tacacs+ local
line vty 0 4
login authentication default
authorization exec default
transport input ssh
end
copy running-config startup-config
Save only after reviewing the configuration and testing the recovery plan. Avoid testing a new AAA policy by closing the only working remote session.
Modern named-server syntax
Newer IOS releases may use named TACACS+ server objects and explicit server groups instead of the older tacacs-server host syntax. The concepts remain the same: define the server and key, place it in a group, then reference that group in the method lists.
tacacs server ACS1
address ipv4 192.0.2.10
key <TACACS_SHARED_SECRET>
!
aaa group server tacacs+ ACS-GROUP
server name ACS1
!
aaa authentication login default group ACS-GROUP local
aaa authorization exec default group ACS-GROUP local
Prepare ACS
- Add the router as a TACACS+ network device or client in ACS.
- Enter the same router client address that ACS will see. If the router uses a loopback or management interface as its source, register that address as appropriate.
- Enter the exact shared secret configured on the router.
- Create or assign an administrator identity in ACS.
- Associate the identity with a device-administration policy, authorization result, or privilege assignment that permits the intended access.
- Review ACS authentication and authorization logs during testing.
The ACS account must be authorized for device administration, not merely valid as an identity. A valid password without an appropriate authorization policy can produce authentication success followed by EXEC authorization failure.
AAA configuration components
Validate the deployment
Check configuration and reachability
show running-config | section aaa
show running-config | section tacacs
show running-config | section line vty
show aaa servers
show tacacs
ping 192.0.2.10
Confirm that AAA is enabled, the correct server and key are present, both default method lists contain the intended fallback, and the VTY lines reference those lists. Check that the ACS server is reachable from the correct management context.
Test ACS authentication and authorization
- From an authorized workstation, start an SSH connection to the router.
- Sign in with the ACS-defined administrator account.
- Confirm that authentication succeeds.
- Confirm that the user receives an EXEC session.
- Check the resulting privilege level and test only the commands that the ACS policy is intended to permit.
- Confirm the login and authorization events in ACS logs.
Test local fallback safely
In a lab or controlled maintenance window, make ACS genuinely unreachable, or otherwise disable the TACACS+ service path without changing unrelated production traffic. Then test localadmin. Restore ACS and confirm that normal ACS authentication works again.
This test demonstrates the difference between unavailability and rejection. If ACS actively rejects a username or password, local fallback should not normally override that decision.
Use debugging carefully
debug aaa authentication
debug aaa authorization
debug tacacs
undebug all
Troubleshooting ACS and TACACS+
Security and deployment practices
- Prefer SSH over Telnet because Telnet does not protect the management session in transit.
- Restrict VTY access with management-plane ACLs where appropriate, allowing only approved administration sources.
- Use strong, protected TACACS+ shared secrets and limit who can view router and ACS configuration.
- Keep a console or out-of-band recovery path while changing AAA.
- Maintain a tested local emergency account, but protect and monitor its use.
- Do not close the only active remote session immediately after changing AAA. Open a second controlled test session first.
- Confirm the router's source address, routing context, and ACS device registration before diagnosing user credentials.
- Remember that command syntax varies by IOS release; newer releases commonly use named TACACS+ objects and server groups.
Exam-relevant points
aaa new-modelenables the IOS AAA subsystem.- The router is the TACACS+ client, and ACS is the TACACS+ server.
aaa authentication login default group tacacs+ localprefers TACACS+ and uses the local database when the server is unavailable.aaa authorization exec default group tacacs+ localcontrols authorization for the IOS EXEC session after authentication.- The word
defaultidentifies the automatically used default method list. - Local fallback is not the same as bypassing an explicit TACACS+ credential rejection.
- The TACACS+ shared secret must match on both the router and ACS.
- VTY lines must reference the authentication and EXEC authorization method lists for remote access to use them.
For related management-plane controls, see protecting the management plane, passwords on IOS devices, and Cisco ACS setup.