Home > Articles > Cisco Certification > CCIE > CCIE Self-Study: Security Protocols

CCIE Self-Study: Security Protocols

Chapter Description

This chapter covers some of today's most widely used technologies that enable network administrators to ensure that sensitive data is secure from unauthorized sources. Standards such as IP Security (IPSec) and encryption standards are covered, as are all the fundamental foundation topics you need to understand to master the topics covered in the CCIE Security written exam.

Terminal Access Controller Access Control System Plus

Cisco IOS supports three versions of TACACS—TACACS, extended TACACS, and TACACS+. All three methods authenticate users and deny access to users who do not have a valid username/password pairing. TACACS+ is Cisco proprietary, whereas RADIUS is an open standard originally created by Livingston Enterprises.

Cisco has also developed Cisco Secure Access Control Server (ACS), a flexible family of security servers that supports both RADIUS and TACACS+. You can even run debugging commands on the Cisco Secure ACS software. In UNIX, you can modify files, such as syslog.conf and csu.cfg, to change the output to your screen. For more details on how to debug on a UNIX server, see http://www.cisco.com/warp/public/480/cssample2x.html#debug.

TACACS+ has the following features:

  • TCP packets (port 49) ensure that data is sent reliably across the IP network.
  • Supports AAA architectures and, in fact, separates each of the three AAA mechanisms.
  • The data between the NAS and server is encrypted.
  • Supports both PAP/CHAP and multiprotocols such as IPX and X.25.
  • Access control lists (ACL) can be defined on a per-user basis. (RADIUS can also define ACLs on a per-user basis.)

Figure 4-3 displays a typical TACACS+ connection request (authentication).

04fig03.gif

Figure 4-3 TACACS+ Authentication Example Sequence

When a TACACS+ server authenticates a remote user, the following events occur:

  1. When the connection is established, the NAS contacts the TACACS+ daemon to obtain a username prompt, which is then displayed to the user. The user enters a username and the NAS and communicates to the TACACS+ server to obtain a password prompt. The NAS displays the password prompt to the user, the user enters a password, and the password is sent to the TACACS+ daemon.

  2. The NAS eventually receives one of the following responses from the TACACS+ daemon:

    • ACCEPT— The user is authenticated and service can begin. If the NAS is configured to require authorization, authorization begins at this time.
    • REJECT— The user has failed to authenticate. The user may be denied further access or may be prompted to retry the login sequence, depending on the TACACS+ daemon.
    • ERROR— An error occurred at some time during authentication. This can be either at the daemon or in the network connection between the daemon and the NAS. If an ERROR response is received, the NAS typically tries to use an alternative method for authenticating the user.
    • CONTINUE— The user is prompted for additional authentication information.
  3. A PAP login is similar to an ASCII login, except that the username and password arrive at the NAS in a PAP protocol packet instead of being typed in by the user, so the user is not prompted. PPP CHAP logins are also similar, in principle.

  4. Following authentication, the user is required to undergo an additional authorization phase, if authorization has been enabled on the NAS. Users must first successfully complete TACACS+ authentication before proceeding to TACACS+ authorization.

  5. If TACACS+ authorization is required, the TACACS+ daemon is again contacted and it returns an ACCEPT or REJECT authorization response. If an ACCEPT response is returned, the response contains data in the form of attributes used to direct the EXEC or NETWORK session for that user, determining services that the user can access.

Services include the following:

  • Telnet, rlogin, PPP, SLIP, or EXEC services
  • Connection parameters, including the host or client IP address, ACL, and user timeouts

The TACACS+ authorization process is defined as the packet flow between the NAS and the TACACS+ server. The packets exchanged between the NAS and server contain AV pairs. The NAS sends Start packets and the TACACS+ server responds with Response packets. The server can permit, deny, or modify commands requested by the end user. The data (that contains the full list of all username/password pairs) is stored on a local file defining what commands are permitted by the end user, for example.

TACACS+ accounting provides an audit record of what commands were completed. The NAS sends a record of any commands, and the TACACS+ server sends a response acknowledging the accounting record.

Table 4-3 summarizes the main features of TACACS+.

Table 4-3. Summary of TACACS+ Protocol

 

Feature

TCP

Packets sent between client and server are TCP.

TCP destination port

Port 49.

Attributes

Packet types are defined in TACACS+ frame format as follows:

Authentication 0x01

Authorization 0x02

Accounting 0x03

Seq_no

The sequence number of the current packet flow for the current session. The Seq_no starts with 1, and each subsequent packet increments by one. The client sends only odd numbers. The TACACS+ server sends only even numbers.

Encryption method

The entire packet is encrypted. Data is encrypted using MD5 and a secret key that matches both on the NAS (for example, a Cisco IOS router) and the TACACS+ server.

Multiprotocol support

Multiprotocol Support indicates the following are fully supported in non IP networks, multiprotocols such as AppleTalk, NetBIOS, or IPX, along with IP.

Now, examine the TACACS+ configuration tasks required when enabling TACACS+ on a Cisco IOS router.

TACACS+ Configuration Task List

To configure your router to support TACACS+, you must perform the following tasks:

Step 1.

Use the aaa new-model global configuration command to enable AAA, which must be configured if you plan to use TACACS+. For more information about using the aaa new-model command, refer to http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_c/scprt1/scdaaa.htm.

Step 2.

Use the tacacs-server host command to specify the IP address of one or more TACACS+ daemons:


         tacacs-server host 
         hostname [single-connection] [port integer] [timeout
integer] [key string]
Step 3. Use the tacacs-server key command to specify an encryption key to encrypt all exchanges between the NAS and the TACACS+ daemon. This same key must also be configured on the TACACS+ daemon. The actual command is as follows:


         tacacs-server key 
         key

      

The key should match the one used on the TACACS+ daemon.

Step 4.

Use the aaa authentication global configuration command to define method lists that use TACACS+ for authentication.

Step 5.

Use line and interface commands to apply the defined method lists to various interfaces.

Step 6.

To enable authorization, use the aaa authorization global command to configure authorization for the NAS. Unlike authentication, which can be configured per line or per interface, authorization is configured globally for the entire NAS.

Step 7.

To enable accounting for TACACS+ connections, use the aaa accounting command. Optional commands include the following:

  • Configuring AAA server groups (Optional)
  • Configuring AAA server group selection based on Dialed Number Identification Service (DNIS) (Optional)
  • Specifying TACACS+ authentication (Required)
  • Specifying TACACS+ authorization (Optional)
  • Specifying TACACS+ accounting (Optional)

Example 4-5 displays a sample configuration of a Cisco router with TACACS+ authentication for PPP.

Example 4-5. TACACS+ Authentication for PPP Example


   
      aaa new-model                                                              
aaa authentication ppp CCIE group tacacs+ local
tacacs-server host 10.1.2.3
tacacs-server key cciesarecool
interface serial 0
 ppp authentication chap pap CCIE

The configuration lines in Example 4-5 are defined as follows:

  • The aaa new-model command enables the AAA security services.
  • The aaa authentication command defines a method list, CCIE, to be used on serial interfaces running PPP. The keyword group tacacs+ means that authentication is done through TACACS+. If TACACS+ returns an ERROR during authentication, the keyword local indicates that authentication will be attempted using the local database on the NAS. Note that the local database is not used if a REJECT response is received from the security server.
  • The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key as cciesarecool.
  • The interface command selects the line, and the ppp authentication command applies the CCIE method list to this line.

Example 4-6 shows how to configure TACACS+ as the security protocol for PPP authentication using the default method list; it also shows how to configure network authorization through TACACS+.

Example 4-6. Authorization and TACACS+ Example


   
      aaa new-model
aaa authentication ppp default if-needed group tacacs+ local
aaa authorization network default group tacacs+                            
tacacs-server host 3.3.3.3
tacacs-server key simoniscool
interface serial 0
ppp authentication default

The lines in the preceding sample configuration are defined as follows:

  • The aaa new-model command enables the AAA security services.
  • The aaa authentication command defines a method list, default, to be used on serial interfaces running PPP. The keyword default means that PPP authentication is applied by default to all interfaces. The if-needed keyword means that if the user has already authenticated by going through the ASCII login procedure, PPP authentication is not necessary and can be skipped. If authentication is needed, the keyword group tacacs+ means that authentication is done through TACACS+. If TACACS+ returns an ERROR during authentication, the keyword local indicates that authentication will be attempted using the local database on the NAS.
  • The aaa authorization command configures network authorization via TACACS+.
  • The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 3.3.3.3.
  • The tacacs-server key command defines the shared encryption key as simoniscool.
  • The interface command selects the line, and the ppp authentication command applies the default method list to this line.

The source interface used by TACACS+ or RADIUS can be defined when required as follows:


   ip tacacs source-interface 
   subinterface-name

   ip radius source-interface 
   subinterface-name

The source-interface commands force the security protocol to use a specific interface as the source IP address. For example, it may be a loopback address (remember, it is always active, unlike a physical interface, which may fail or be down) for redundancy purposes in case of a physical interface failure.

Example 4-7 displays a sample configuration where accounting is also enabled.

Example 4-7. Accounting Example


   
      aaa new-model
aaa authentication ppp default if-needed group tacacs+ local
aaa accounting network default stop-only group tacacs+                     
tacacs-server host 3.3.3.3
tacacs-server key andrewiscool
interface serial 0
ppp authentication default

The lines in the Example 4-7 configuration are defined as follows:

  • The aaa new-model command enables the AAA security services.
  • The aaa authentication command defines a method list, default, to be used on serial interfaces running PPP. The keyword default means that PPP authentication is applied by default to all interfaces. The if-needed keyword means that if the user has already authenticated through the ASCII login procedure, PPP authentication is not necessary. If authentication is needed, the keyword group tacacs+ means that authentication is done through TACACS+. If TACACS+ returns an ERROR during authentication, the keyword local indicates that authentication will be attempted using the local database on the NAS.
  • The aaa accounting command configures network accounting through TACACS+. In this example, accounting records stop-only, meaning that the session that just terminated will be sent to the TACACS+ daemon whenever a network connection terminates.
  • The interface command selects the line, and the ppp authentication command applies the default method list to this line.

TACACS+ Versus RADIUS

Table 4-4 compares the main differences between TACACS+ and RADIUS.

Table 4-4. TACACS+/RADIUS Comparison

 

RADIUS

TACACS+

Packet delivery

UDP.

TCP.

Packet encryption

Encrypts only the password in the access-request packet from the client to the server.

Encrypts the entire body of the packet but leaves a standard TCP header.

AAA support

Combines authentication and authorization.

Uses the AAA architecture, separating authentication, authorization, and accounting.

Multiprotocol support

None.

Supports other protocols, such as AppleTalk, NetBIOS, and IPX.

Router management

Can pass a privilege level down to the router, which can then be used locally for command authorization.

Enables network administrators to control which commands can be executed on a router.

Responses

Uses single-challenge response. Combines authentication and authorization.

Uses multiple-challenge response for each of the AAA processes. Uses the AAA architecture and separates each process.

The AAA configuration options are numerous, and those presented in this guide are only a small subset of a larger set that you can view online at Cisco.com. Visit the following URL for more quality examples of how AAA, along with RADIUS or TACACS, can be implemented on Cisco IOS routers:

http://www.cisco.com/pcgi-bin/Support/browse/index.pl?i=Technologies&f=774

The IOS debug command set for RADIUS and TACACS is extensive. Presented here are some common RADIUS and TACACS debug outputs found in real networks.

Example 4-8 displays a sample output from the debug aaa authentication command for a RADIUS login attempt that failed. The information indicates that TACACS is the authentication method used.

Example 4-8. debug aaa authentication Command

R1# debug aaa authentication
14:02:55: AAA/AUTHEN (164826761): Method=RADIUS
14:02:55: AAA/AUTHEN (164826761): status = GETPASS
14:03:01: AAA/AUTHEN/CONT (164826761): continue_login
14:03:01: AAA/AUTHEN (164826761): status = GETPASS
14:03:04: AAA/AUTHEN (164826761): status = FAIL

Example 4-9 displays a sample output from the debug radius command that shows a successful login attempt (note that newer versions of IOS code may display some differences), as indicated by an Access-Accept message.

Example 4-9. debug radius Command

R1# debug radius
 13:59:02: Radius: IPC Send 0.0.0.0:1645, Access-Request, id 0xB, len 56
13:59:02:         Attribute 4 6 AC150E5A
13:59:02:         Attribute 5 6 0000000A
13:59:02:         Attribute 1 6 62696C6C
13:59:02:         Attribute 2 18 0531FEA3
13:59:04: Radius: Received from 131.108.1.1:1645, Access-Accept, id 0xB, len 26
13:59:04:         Attribute 6 6 00000001

Example 4-10 displays a sample output from the debug radius command that shows an unsuccessful login attempt, as indicated by an Access-Reject message.

Example 4-10. debug radius Command

R1# debug radius
13:57:56: Radius: IPC Send 0.0.0.0:1645, Access-Request, id 0xA, len 57
13:57:56:         Attribute 4 6 AC150E5A
13:57:56:         Attribute 5 6 0000000A
13:57:56:         Attribute 1 7 62696C6C
13:57:56:         Attribute 2 18 49C28F6C
13:57:59: Radius: Received from 171.69.1.152:1645, Access-Reject, id 0xA, len 20
5. Encryption Technology Overview | Next Section Previous Section