Contents

Introduction

Prerequisites

Requirements

Components Used

How TACACS works

Troubleshoot TACACS Issues

Related Information

Introduction

This document describes the steps to troubleshoot TACACS authentication issues on Cisco IOS®/Cisco IOS-XE routers and switches.

Prerequisites

Requirements

Cisco recommends that you have basic knowledge of these topics:

- Authentication, Authorization and Accounting (AAA) configuration on Cisco devices

- TACACS configuration

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

How TACACS works

TACACS+ protocol uses Transmission Control Protocol (TCP) as the transport protocol with destination port number 49. When the Router receives a log in request, it establishes a TCP connection with the TACACS server, post which a username prompt is displayed to the user. When the user enters the username, the Router again communicates with the TACACS server for the password prompt. Once the user enters the password, the Router send this information to the TACACS server again. The TACACS server verifies the user credentials and sends a response back to the Router. The result of a AAA session can be any of these:

PASS: When you are authenticated the service begins only if AAA authorization is configured on the router. The authorization phase begins at this time.

FAIL: When you have failed the authentication, you can be denied further access or be prompted to retry the log in sequence. It depends on the TACACS+ daemon. In this, you can check the policies configured for the user in TACACS server, if you receive a FAIL from the server

ERROR: It indicates an error occurred during authentication. This can be either at the daemon or in the network connection between the daemon and the router. If an ERROR response is received, the router typically tries to use an alternative method to authenticate the user.

These are the basic configuration of AAA and TACACS on a Cisco Router

aaa new-model

aaa authentication log in default group tacacs+ local

aaa authorization exec default group tacacs+ local

!

tacacs server prod

address ipv4 10.106.60.182

key cisco123

!

ip tacacs source-interface Gig 0/0

Troubleshoot TACACS Issues

Step 1.

Verify the connectivity to the TACACS server with a telnet on port 49 from the router with appropriate source interface. In case the router is not able to connect to the TACACS server on Port 49, there can be some firewall or access list that blocks the traffic.

Router#telnet 10.106.60.182 49

Trying 10.106.60.182, 49 ... Open

Step 2.

Verify that the AAA Client is properly configured on the TACACS server with the correct IP address and the shared secret key. If the Router has multiple outgoing interfaces, it is suggested to configure the TACACS source interface with use of this command. You can configure the interface, of which the IP address is configured as client IP address on TACACS server, as the TACACS source interface on Router

Router(config)#ip tacacs source-interface Gig 0/0

Step 3.

Verify if the TACACS source interface is on a Virtual Routing and Forwarding (VRF). In case the interface is on a VRF, you can configure the VRF information under the AAA server group. Refer to TACACS Configuration Guide for configuration of VRF aware TACACS.

Step 4.

Perform test aaa and verify that we receive the correct response from the Server

Router#test aaa  group tacacs+ cisco cisco legacy

Sending password

User successfully authenticated

Step 5.

If test aaa fails, enable these debugs together to analyse the transactions between the Router and the TACACS server to identify the root cause.

debug aaa authentication

debug aaa authorization

debug tacacs

debug ip tcp transaction

This is a sample debug output in a working scenario:

*Apr  6 13:32:50.462: AAA/BIND(00000054): Bind i/f

*Apr  6 13:32:50.462: AAA/AUTHEN/LOGIN (00000054): Pick method list 'default'

*Apr  6 13:32:50.462: TPLUS: Queuing AAA Authentication request 84 for processing

*Apr  6 13:32:50.462: TPLUS(00000054) log in timer started 1020 sec timeout

*Apr  6 13:32:50.462: TPLUS: processing authentication start request id 84

*Apr  6 13:32:50.462: TPLUS: Authentication start packet created for 84()

*Apr  6 13:32:50.462: TPLUS: Using server 10.106.60.182

*Apr  6 13:32:50.462: TPLUS(00000054)/0/NB_WAIT/2432818: Started 5 sec timeout

*Apr  6 13:32:50.466: TPLUS(00000054)/0/NB_WAIT: socket event 2

*Apr  6 13:32:50.466: TPLUS(00000054)/0/NB_WAIT: wrote entire 38 bytes request

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: Would block while reading

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: read entire 12 header bytes (expect 43 bytes data)

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:50.466: TPLUS(00000054)/0/READ: read entire 55 bytes response

*Apr  6 13:32:50.466: TPLUS(00000054)/0/2432818: Processing the reply packet

*Apr  6 13:32:50.466: TPLUS: Received authen response status GET_USER (7)

*Apr  6 13:32:53.242: TPLUS: Queuing AAA Authentication request 84 for processing

*Apr  6 13:32:53.242: TPLUS(00000054) log in timer started 1020 sec timeout

*Apr  6 13:32:53.242: TPLUS: processing authentication continue request id 84

*Apr  6 13:32:53.242: TPLUS: Authentication continue packet generated for 84

*Apr  6 13:32:53.242: TPLUS(00000054)/0/WRITE/10882BBC: Started 5 sec timeout

*Apr  6 13:32:53.242: TPLUS(00000054)/0/WRITE: wrote entire 22 bytes request

*Apr  6 13:32:53.246: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:53.246: TPLUS(00000054)/0/READ: read entire 12 header bytes (expect 16 bytes data)

*Apr  6 13:32:53.246: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:53.246: TPLUS(00000054)/0/READ: read entire 28 bytes response

*Apr  6 13:32:53.246: TPLUS(00000054)/0/10882BBC: Processing the reply packet

*Apr  6 13:32:53.246: TPLUS: Received authen response status GET_PASSWORD (8)

*Apr  6 13:32:54.454: TPLUS: Queuing AAA Authentication request 84 for processing

*Apr  6 13:32:54.454: TPLUS(00000054) log in timer started 1020 sec timeout

*Apr  6 13:32:54.454: TPLUS: processing authentication continue request id 84

*Apr  6 13:32:54.454: TPLUS: Authentication continue packet generated for 84

*Apr  6 13:32:54.454: TPLUS(00000054)/0/WRITE/2432818: Started 5 sec timeout

*Apr  6 13:32:54.454: TPLUS(00000054)/0/WRITE: wrote entire 22 bytes request

*Apr  6 13:32:54.458: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:54.458: TPLUS(00000054)/0/READ: read entire 12 header bytes (expect 6 bytes data)

*Apr  6 13:32:54.458: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:54.458: TPLUS(00000054)/0/READ: read entire 18 bytes response

*Apr  6 13:32:54.458: TPLUS(00000054)/0/2432818: Processing the reply packet

*Apr  6 13:32:54.458: TPLUS: Received authen response status PASS (2)

*Apr  6 13:32:54.462: AAA/AUTHOR (0x54): Pick method list 'default'

*Apr  6 13:32:54.462: TPLUS: Queuing AAA Authorization request 84 for processing

*Apr  6 13:32:54.462: TPLUS(00000054) log in timer started 1020 sec timeout

*Apr  6 13:32:54.462: TPLUS: processing authorization request id 84

*Apr  6 13:32:54.462: TPLUS: Protocol set to None .....Skipping

*Apr  6 13:32:54.462: TPLUS: Sending AV service=shell

*Apr  6 13:32:54.462: TPLUS: Sending AV cmd*

*Apr  6 13:32:54.462: TPLUS: Authorization request created for 84(cisco)

*Apr  6 13:32:54.462: TPLUS: using previously set server 10.106.60.182 from group tacacs+

*Apr  6 13:32:54.462: TPLUS(00000054)/0/NB_WAIT/2432818: Started 5 sec timeout

*Apr  6 13:32:54.462: TPLUS(00000054)/0/NB_WAIT: socket event 2

*Apr  6 13:32:54.462: TPLUS(00000054)/0/NB_WAIT: wrote entire 62 bytes request

*Apr  6 13:32:54.462: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:54.462: TPLUS(00000054)/0/READ: Would block while reading

*Apr  6 13:32:54.470: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:54.470: TPLUS(00000054)/0/READ: read entire 12 header bytes (expect 18 bytes data)

*Apr  6 13:32:54.470: TPLUS(00000054)/0/READ: socket event 1

*Apr  6 13:32:54.470: TPLUS(00000054)/0/READ: read entire 30 bytes response

*Apr  6 13:32:54.470: TPLUS(00000054)/0/2432818: Processing the reply packet

*Apr  6 13:32:54.470: TPLUS: Processed AV priv-lvl=15

*Apr  6 13:32:54.470: TPLUS: received authorization response for 84: PASS

*Apr  6 13:32:54.470: AAA/AUTHOR/EXEC(00000054): processing AV cmd=

*Apr  6 13:32:54.470: AAA/AUTHOR/EXEC(00000054): processing AV priv-lvl=15

*Apr  6 13:32:54.470: AAA/AUTHOR/EXEC(00000054): Authorization successful

This is a sample debug output from the Router, when the TACACS server is configured with a wrong pre shared key.

*Apr  6 13:35:07.826: AAA/BIND(00000055): Bind i/f

*Apr  6 13:35:07.826: AAA/AUTHEN/LOGIN (00000055): Pick method list 'default'

*Apr  6 13:35:07.826: TPLUS: Queuing AAA Authentication request 85 for processing

*Apr  6 13:35:07.826: TPLUS(00000055) log in timer started 1020 sec timeout

*Apr  6 13:35:07.826: TPLUS: processing authentication start request id 85

*Apr  6 13:35:07.826: TPLUS: Authentication start packet created for 85()

*Apr  6 13:35:07.826: TPLUS: Using server 10.106.60.182

*Apr  6 13:35:07.826: TPLUS(00000055)/0/NB_WAIT/225FE2DC: Started 5 sec timeout

*Apr  6 13:35:07.830: TPLUS(00000055)/0/NB_WAIT: socket event 2

*Apr  6 13:35:07.830: TPLUS(00000055)/0/NB_WAIT: wrote entire 38 bytes request

*Apr  6 13:35:07.830: TPLUS(00000055)/0/READ: socket event 1

*Apr  6 13:35:07.830: TPLUS(00000055)/0/READ: Would block while reading

*Apr  6 13:35:07.886: TPLUS(00000055)/0/READ: socket event 1

*Apr  6 13:35:07.886: TPLUS(00000055)/0/READ: read entire 12 header bytes (expect 6 bytes data)

*Apr  6 13:35:07.886: TPLUS(00000055)/0/READ: socket event 1

*Apr  6 13:35:07.886: TPLUS(00000055)/0/READ: read entire 18 bytes response

*Apr  6 13:35:07.886: TPLUS(00000055)/0/225FE2DC: Processing the reply packet

*Apr  6 13:35:07.886: TPLUS: received bad AUTHEN packet: length = 6, expected 43974

*Apr  6 13:35:07.886: TPLUS: Invalid AUTHEN packet (check keys).

Related Information

- TACACS Configuration on Cisco IOS

- Technical Support & Documentation - Cisco Systems