Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
Page 2
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,
INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH
THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,
CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS.
CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT
LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network
topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional
and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http://
www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership
relationship between Cisco and any other company. (1110R)
Obtaining Documentation and Submitting a Service Request
Preface
DescriptionConvention
[x {y | z}]
variable
string
Examples use the following conventions:
italic screen font
Nested set of square brackets or braces indicate optional or required
choices within optional or required elements. Braces and a vertical bar
within square brackets indicate a required choice within an optional
element.
Indicates a variable for which you supply values, in context where italics
cannot be used.
A nonquoted set of characters. Do not use quotation marks around the
string or the string will include the quotation marks.
DescriptionConvention
Terminal sessions and information the switch displays are in screen font.screen font
Information you must enter is in boldface screen font.boldface screen font
Arguments for which you supply values are in italic screen font.
Nonprinting characters, such as passwords, are in angle brackets.< >
Default responses to system prompts are in square brackets.[ ]
!, #
An exclamation point (!) or a pound sign (#) at the beginning of a line
of code indicates a comment line.
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service
request, and gathering additional information, see What's New in Cisco Product Documentation at: http://
Subscribe to What's New in Cisco Product Documentation, which lists all new and revised Cisco technical
documentation as an RSS feed and delivers content directly to your desktop using a reader application. The
RSS feeds are a free service.
Documentation Feedback
To provide technical feedback on this document, or to report an error or omission, please send your comments
to nexus3k-docfeedback@cisco.com. We appreciate your feedback.
The Cisco NX-OS software supports security features that can protect your network against degradation or
failure and also against data loss or compromise resulting from intentional attacks and from unintended but
damaging mistakes by well-meaning network users.
Authentication, Authorization, and Accounting, page 3
•
RADIUS and TACACS+ Security Protocols, page 4
•
SSH and Telnet, page 4
•
SSH and Telnet, page 5
•
IP ACLs, page 5
•
Authentication, Authorization, and Accounting
Authentication, authorization, and accounting (AAA) is an architectural framework for configuring a set of
three independent security functions in a consistent, modular manner.
Authentication
Provides the method of identifying users, including login and password dialog, challenge and response,
messaging support, and, depending on the security protocol that you select, encryption. Authentication
is the way a user is identified prior to being allowed access to the network and network services. You
configure AAA authentication by defining a named list of authentication methods and then applying
that list to various interfaces.
Authorization
Provides the method for remote access control, including one-time authorization or authorization for
each service, per-user account list and profile, user group support, and support of IP, IPX, ARA, and
Telnet.
Remote security servers, such as RADIUS and TACACS+, authorize users for specific rights by
associating attribute-value (AV) pairs, which define those rights, with the appropriate user. AAA
authorization works by assembling a set of attributes that describe what the user is authorized to perform.
These attributes are compared with the information contained in a database for a given user, and the
result is returned to AAA to determine the user’s actual capabilities and restrictions.
Provides the method for collecting and sending security server information used for billing, auditing,
and reporting, such as user identities, start and stop times, executed commands (such as PPP), number
of packets, and number of bytes. Accounting enables you to track the services that users are accessing,
as well as the amount of network resources that they are consuming.
Overview
Note
You can configure authentication outside of AAA. However, you must configure AAA if you want to use
RADIUS or TACACS+, or if you want to configure a backup authentication method.
RADIUS and TACACS+ Security Protocols
AAA uses security protocols to administer its security functions. If your router or access server is acting as
a network access server, AAA is the means through which you establish communication between your network
access server and your RADIUS or TACACS+ security server.
The chapters in this guide describe how to configure the following security server protocols:
RADIUS
A distributed client/server system implemented through AAA that secures networks against unauthorized
access. In the Cisco implementation, RADIUS clients run on Cisco routers and send authentication
requests to a central RADIUS server that contains all user authentication and network service access
information.
TACACS+
A security application implemented through AAA that provides a centralized validation of users who
are attempting to gain access to a router or network access server. TACACS+ services are maintained
in a database on a TACACS+ daemon running, typically, on a UNIX or Windows NT workstation.
TACACS+ provides for separate and modular authentication, authorization, and accounting facilities.
SSH and Telnet
You can use the Secure Shell (SSH) server to enable an SSH client to make a secure, encrypted connection
to a Cisco NX-OS device. SSH uses strong encryption for authentication. The SSH server in the Cisco NX-OS
software can interoperate with publicly and commercially available SSH clients.
The SSH client in the Cisco NX-OS software works with publicly and commercially available SSH servers.
The Telnet protocol enables TCP/IP connections to a host. Telnet allows a user at one site to establish a TCP
connection to a login server at another site and then passes the keystrokes from one device to the other. Telnet
can accept either an IP address or a domain name as the remote device address.
You can use the Secure Shell (SSH) server to enable an SSH client to make a secure, encrypted connection
to a Cisco NX-OS device. SSH uses strong encryption for authentication. The SSH server in the Cisco NX-OS
software can interoperate with publicly and commercially available SSH clients.
The SSH client in the Cisco NX-OS software works with publicly and commercially available SSH servers.
The Telnet protocol enables TCP/IP connections to a host. Telnet allows a user at one site to establish a TCP
connection to a login server at another site and then passes the keystrokes from one device to the other. Telnet
can accept either an IP address or a domain name as the remote device address.
IP ACLs
IP ACLs are ordered sets of rules that you can use to filter traffic based on IPv4 information in the Layer 3
header of packets. Each rule specifies a set of conditions that a packet must satisfy to match the rule. When
the Cisco NX-OS software determines that an IP ACL applies to a packet, it tests the packet against the
conditions of all rules. The first match determines whether a packet is permitted or denied, or if there is no
match, the Cisco NX-OS software applies the applicable default rule. The Cisco NX-OS software continues
processing packets that are permitted and drops packets that are denied.
This chapter describes how to configure authentication, authorization, and accounting (AAA) on Cisco
NX-OS devices.
Information About AAA, page 7
•
Prerequisites for Remote AAA, page 11
•
Guidelines and Limitations for AAA, page 12
•
Configuring AAA, page 12
•
Monitoring and Clearing the Local AAA Accounting Log , page 25
•
Verifying the AAA Configuration, page 25
•
Configuration Examples for AAA, page 26
•
Default AAA Settings, page 26
•
Information About AAA
AAA Security Services
The authentication, authorization, and accounting (AAA) features allows you to verify the identity of, grant
access to, and track the actions of users who manage Cisco Nexus devices. The Cisco Nexus device supports
Remote Access Dial-In User Service (RADIUS) or Terminal Access Controller Access Control device Plus
(TACACS+) protocols.
Based on the user ID and password that you provide, the switches perform local authentication or authorization
using the local database or remote authentication or authorization using one or more AAA servers. A preshared
secret key provides security for communication between the switch and AAA servers. You can configure a
common secret key for all AAA servers or for only a specific AAA server.
AAA security provides the following services:
• Authentication—Identifies users, including login and password dialog, challenge and response, messaging
support, and, encryption depending on the security protocol that you select.
Authorization to access a Cisco Nexus device is provided by attributes that are downloaded from AAA
servers. Remote security servers, such as RADIUS and TACACS+, authorize users for specific rights
by associating attribute-value (AV) pairs, which define those rights with the appropriate user.
• Accounting—Provides the method for collecting information, logging the information locally, and
sending the information to the AAA server for billing, auditing, and reporting.
Note
The Cisco NX-OS software supports authentication, authorization, and accounting independently. For
example, you can configure authentication and authorization without configuring accounting.
Benefits of Using AAA
AAA provides the following benefits:
Increased flexibility and control of access configuration
•
Scalability
•
Standardized authentication methods, such as RADIUS and TACACS+
•
Multiple backup devices
•
Remote AAA Services
Remote AAA services provided through RADIUS and TACACS+ protocols have the following advantages
over local AAA services:
User password lists for each switch in the fabric are easier to manage.
•
AAA servers are already deployed widely across enterprises and can be easily used for AAA services.
•
The accounting log for all switches in the fabric can be centrally managed.
•
User attributes for each switch in the fabric are easier to manage than using the local databases on the
•
switches.
AAA Server Groups
You can specify remote AAA servers for authentication, authorization, and accounting using server groups.
A server group is a set of remote AAA servers that implement the same AAA protocol. A server group provides
for failover servers if a remote AAA server fails to respond. If the first remote server in the group fails to
respond, the next remote server in the group is tried until one of the servers sends a response. If all the AAA
servers in the server group fail to respond, that server group option is considered a failure. If required, you
can specify multiple server groups. If a switch encounters errors from the servers in the first group, it tries
the servers in the next server group.
On Cisco Nexus devices, you can have separate AAA configurations for the following services:
User Telnet or Secure Shell (SSH) login authentication
•
Console login authentication
•
User management session accounting
•
The following table lists the CLI commands for each AAA service configuration option.
Table 2: AAA Service Configuration Commands
AAA Service Configuration Options
Related CommandAAA Service Configuration Option
aaa authentication login defaultTelnet or SSH login
aaa authentication login consoleConsole login
Note
aaa accounting defaultUser session accounting
You can specify the following authentication methods for the AAA services:
• RADIUS server groups—Uses the global pool of RADIUS servers for authentication.
• Specified server groups—Uses specified RADIUS or TACACS+ server groups for authentication.
• Local—Uses the local username or password database for authentication.
• None—Uses only the username.
If the method is for all RADIUS servers, instead of a specific server group, the Cisco Nexus devices choose
the RADIUS server from the global pool of configured RADIUS servers in the order of configuration.
Servers from this global pool are the servers that can be selectively configured in a RADIUS server group
on the Cisco Nexus devices.
The following table describes the AAA authentication methods that you can configure for the AAA services.
Table 3: AAA Authentication Methods for AAA Services
AAA MethodsAAA Service
Server groups, local, and noneConsole login authentication
Server groups, local, and noneUser login authentication
Server groups and localUser management session accounting
Authentication and Authorization Process for User Logins
Configuring AAA
Note
For console login authentication, user login authentication, and user management session accounting, the
Cisco Nexus devices try each option in the order specified. The local option is the default method when
other configured options fail.
Authentication and Authorization Process for User Logins
The authentication and authorization process for user login is as occurs:
When you log in to the required Cisco Nexus device, you can use the Telnet, SSH, Fabric Manager or
•
Device Manager, or console login options.
When you have configured the AAA server groups using the server group authentication method, the
•
Cisco Nexus device sends an authentication request to the first AAA server in the group as follows:
If the AAA server fails to respond, then the next AAA server is tried and so on until the remote server
responds to the authentication request.
If all AAA servers in the server group fail to respond, the servers in the next server group are tried.
If all configured methods fail, the local database is used for authentication.
If a Cisco Nexus device successfully authenticates you through a remote AAA server, the following
•
conditions apply:
If the AAA server protocol is RADIUS, user roles specified in the cisco-av-pair attribute are downloaded
with an authentication response.
If the AAA server protocol is TACACS+, another request is sent to the same server to get the user roles
specified as custom attributes for the shell.
If your username and password are successfully authenticated locally, the Cisco Nexus device logs you
•
in and assigns you the roles configured in the local database.
The Cisco Nexus devices do not support all numeric usernames, whether created with TACACS+ or RADIUS,
or created locally. If an all numeric username exists on an AAA server and is entered during a login, the Cisco
Nexus device still logs in the user.
If you configure the AAA login authentication default group, TACACS-SERVER-GROUP, it also overrides
the login for the console. This override occurs even if aaa authentication login console local is a default
command on the switch. To prevent this, you must configure aaa authentication login console local.
You should not create user accounts with usernames that are all numeric.Caution
Configuring AAA
Configuring AAA
Configuring Console Login Authentication Methods
The authentication methods include the following:
Global pool of RADIUS servers
•
Named subset of RADIUS or TACACS+ servers
•
Local database on the Cisco Nexus device.
•
Username only none
•
The default method is local.
Note
Note
The group radius and group server-name forms of the aaa authentication command are used for a
set of previously defined RADIUS servers. Use the radius server-host command to configure the host
servers. Use the aaa group server radius command to create a named group of servers.
If you configure the AAA login authentication default group, TACACS-SERVER-GROUP, it also overrides
the login for the console. This override occurs even if aaa authentication login console local is a default
command on the switch. To prevent this, you must configure aaa authentication login console local.
Before you configure console login authentication methods, configure RADIUS or TACACS+ server groups
as needed.
Enters global configuration mode.switch# configure terminal
Configures the default authentication methods.switch(config)# aaa
The group-list argument consists of a space-delimited list of
group names. The group names are the following:
• radius —Uses the global pool of RADIUS servers for
authentication.
• named-group —Uses a named subset of TACACS+ or
RADIUS servers for authentication.
The local method uses the local database for authentication.
The none method uses the username only.
The default login method is local , which is used when no
methods are configured or when all of the configured methods
do not respond.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the configuration of the default login authentication
methods.
(Optional)
Copies the running configuration to the startup configuration.
Enabling Login Authentication Failure Messages
When you log in, the login is processed by the local user database if the remote AAA servers do not respond.
If you have enabled the displaying of login failure messages, the following message is displayed:
Remote AAA servers unreachable; local authentication done.
Remote AAA servers unreachable; local authentication failed.
Enters global configuration mode.switch# configure terminal
Enables login authentication failure messages.
The default is disabled.
Exits configuration mode.switch(config)# exit
Page 29
Configuring AAA
Logging Successful and Failed Login Attempts
PurposeCommand or Action
Step 4
Step 5
switch# show aaa authentication
switch# copy running-config
startup-config
Logging Successful and Failed Login Attempts
You can configure the switch to log all successful and failed login attempts to the configured syslog server.
Procedure
PurposeCommand or Action
Step 1
Step 2
Example:
switch# configure terminal
[no] login on-failure log
Example:
switch(config)# login
on-failure log
Enters global configuration mode.configure terminal
Logs all failed authentication messages to the configured
syslog server. With this configuration, the following syslog
message appears after the failed login:
AUTHPRIV-3-SYSTEM_MSG: pam_aaa:Authentication
failed for user admin from 172.22.00.00
Note
(Optional)
Displays the login failure message configuration.
(Optional)
Copies the running configuration to the startup
configuration.
When logging level authpriv is 6, additional Linux
kernel authentication messages appear along with
the previous message. If these additional messages
need to be ignored, the authpriv value should be set
to 3.
Logs all successful authentication messages to the configured
syslog server. With this configuration, the following syslog
message appears after the successful login:
AUTHPRIV-6-SYSTEM_MSG: pam_aaa:Authentication
success for user admin from 172.22.00.00
Note
When logging level authpriv is 6, additional Linux
kernel authentication messages appear along with
the previous message.
(Optional)
Displays whether the switch is configured to log failed
authentication messages to the syslog server.
When a TACACS+ server authorization method is configured, you can authorize every command that a user
executes with the TACACS+ server which includes all EXEC mode commands and all configuration mode
commands.
The authorization methods include the following:
• Group—TACACS+ server group
• Local—Local role-based authorization
• None—No authorization is performed
(Optional)
Displays whether the switch is configured to log successful
authentication messages to the syslog server.
(Optional)
Copies the running configuration to the startup configuration.
The default method is Local.
There is no authorization on the console session.Note
Before You Begin
You must enable TACACS+ before configuring AAA command authorization.
switch(config)# aaa authorization
config-commands default group tac1
configuration mode commands.
Use the group, local, or none keywords to
identify the authorization method.
Example:
switch# aaa authorization commands default
group tac1
The following example shows how to authorize EXEC mode commands with TACACS+ server group tac1:
switch# aaa authorization commands default group tac1
The following example shows how to authorize configuration mode commands with TACACS+ server group
tac1:
switch(config)# aaa authorization config-commands default group tac1
The following example shows how to authorize configuration mode commands with TACACS+ server group
tac1:
If the server is reachable, the command is allowed or not allowed based on the server response.
•
If there is an error reaching the server, the command is authorized based on the user's local role.
•
switch(config)# aaa authorization config-commands default group tac1 local
The followng example shows how to authorize configuration mode commands with TACACS+ server group
tac1:
If the server is reachable, the command is allowed or not allowed based on the server response.
•
If there is an error reaching the server, allow the command regardless of the local role.
•
switch# aaa authorization commands default group tac1 none
The following example shows how to authorize EXEC mode commands regardless of the local role:
switch# aaa authorization commands default none
The following example shows how to authorize EXEC mode commands using the local role for authorization:
switch# aaa authorization commands default local
Enabling MSCHAP Authentication
Microsoft Challenge Handshake Authentication Protocol (MSCHAP) is the Microsoft version of CHAP. You
can use MSCHAP for user logins to a Cisco Nexus device through a remote authentication server (RADIUS
or TACACS+).
By default, the Cisco Nexus device uses Password Authentication Protocol (PAP) authentication between the
switch and the remote server. If you enable MSCHAP, you must configure your RADIUS server to recognize
the MSCHAP vendor-specific attributes (VSAs).
The following table describes the RADIUS VSAs required for MSCHAP.
Table 4: MSCHAP RADIUS VSAs
Configuring AAA
DescriptionVSAVendor-Type NumberVendor-ID Number
Procedure
Step 1
Step 2
MSCHAP-Challenge11311
MSCHAP-Response11211
switch(config)# aaa authentication login
mschap enable
Contains the challenge
sent by an AAA server to
an MSCHAP user. It can
be used in both
Access-Request and
Access-Challenge
packets.
Contains the response
value provided by an
MSCHAP user in
response to the challenge.
It is only used in
Access-Request packets.
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Enables MS-CHAP authentication. The default
is disabled.
Step 3
Step 4
switch# show aaa authentication login
mschap
Step 5
switch# copy running-config
startup-config
Configuring AAA Accounting Default Methods
The Cisco Nexus device supports TACACS+ and RADIUS methods for accounting. The switches report user
activity to TACACS+ or RADIUS security servers in the form of accounting records. Each accounting record
contains accounting attribute-value (AV) pairs and is stored on the AAA server.
(Optional)
Copies the running configuration to the startup
configuration.
Page 33
Configuring AAA
Configuring AAA Accounting Default Methods
When you activate AAA accounting, the Cisco Nexus device reports these attributes as accounting records,
which are then stored in an accounting log on the security server.
You can create default method lists defining specific accounting methods, which include the following:.
• RADIUS server group—Uses the global pool of RADIUS servers for accounting.
• Specified server group—Uses a specified RADIUS or TACACS+ server group for accounting.
• Local—Uses the local username or password database for accounting.
Note
If you have configured server groups and the server groups do not respond, by default, the local database
is used for authentication.
Before You Begin
Before you configure AAA accounting default methods, configure RADIUS or TACACS+ server groups as
needed.
The local method uses the local database for accounting.
The default method is local, which is used when no server
groups are configured or when all the configured server group
do not respond.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the configuration AAA accounting default methods.
(Optional)
Copies the running configuration to the startup configuration.
19
Page 34
Using AAA Server VSAs
Using AAA Server VSAs
VSAs
You can use vendor-specific attributes (VSAs) to specify the Cisco Nexus device user roles and SNMPv3
parameters on AAA servers.
The Internet Engineering Task Force (IETF) draft standard specifies a method for communicating VSAs
between the network access server and the RADIUS server. The IETF uses attribute 26. VSAs allow vendors
to support their own extended attributes that are not suitable for general use. The Cisco RADIUS implementation
supports one vendor-specific option using the format recommended in the specification. The Cisco vendor
ID is 9, and the supported option is vendor type 1, which is named cisco-av-pair. The value is a string with
the following format:
protocol : attribute seperator value *
The protocol is a Cisco attribute for a particular type of authorization, separator is an equal sign (=) for
mandatory attributes, and an asterisk (* ) indicates optional attributes.
When you use RADIUS servers for authentication on a Cisco Nexus device, the RADIUS protocol directs
the RADIUS server to return user attributes, such as authorization information, with authentication results.
This authorization information is specified through VSAs.
Configuring AAA
VSA Format
The following VSA protocol options are supported by the Cisco Nexus device:
• Shell— Used in access-accept packets to provide user profile information.
• Accounting—Used in accounting-request packets. If a value contains any white spaces, put it within
double quotation marks.
The following attributes are supported by the Cisco Nexus device:
• roles—Lists all the roles assigned to the user. The value field is a string that stores the list of group
names delimited by white space.
• accountinginfo—Stores additional accounting information in addition to the attributes covered by a
standard RADIUS accounting protocol. This attribute is sent only in the VSA portion of the
Account-Request frames from the RADIUS client on the switch, and it can only be used with the
accounting protocol-related PDUs.
Specifying Switch User Roles and SNMPv3 Parameters on AAA Servers
You can use the VSA cisco-av-pair on AAA servers to specify user role mapping for the Cisco Nexus device
using this format:
shell:roles="roleA roleB …"
If you do not specify the role option in the cisco-av-pair attribute, the default user role is network-operator.
For information on Cisco Unified Wireless Network TACACS+ configurations and to change the user
roles, see Cisco Unified Wireless Network TACACS+ Configuration.
You can also specify your SNMPv3 authentication and privacy protocol attributes as follows:
The SNMPv3 authentication protocol options are SHA and MD5. The privacy protocol options are AES-128
and DES. If you do not specify these options in the cisco-av-pair attribute, MD5 and DES are the default
authentication protocols.
For additional information, see the Configuring User Accounts and RBAC chapter in the System Management
Configuration Guide for your Cisco Nexus device.
Secure Login Enhancements
Secure Login Enhancements
The following secure login enhancements are supported in Cisco NX-OS:
Configuring Login Parameters
•
Configuration Examples for Login Parameters
•
• Restricting Sessions Per User—Per User Per Login
Enabling the Password Prompt for User Name
•
Configuring Share Key Value for using RADIUS/TACACS+
•
Configuring Login Parameters
Use this task to configure your Cisco NX-OS device for login parameters that help detect suspected DoS
attacks and slow down dictionary attacks.
All login parameters are disabled by default. You must enter the login block-for command, which enables
default login functionality, before using any other login commands. After the login block-for command is
enabled, the following default is enforced:
All login attempts made through Telnet or SSH are denied during the quiet period; that is, no ACLs are
•
exempt from the login period until the login quiet-mode access-class command is entered.
Procedure
Step 1
Example:
Switch# configure terminal
PurposeCommand or Action
Enters global configuration mode.configure terminal
Configures your Cisco NX-OS device for login
parameters that help provide DoS detection.
Note
This command must be issued before any
other login command can be used.
(Optional) Although this command is optional, it is
recommended that it be configured to specify an ACL
that is to be applied to the device when the device
switches to quiet mode. When the device is in quiet
mode, all login requests are denied and the only
available connection is through the console.
Exits to privileged EXEC mode.exit
Displays login parameters.show login failures
failures --Displays information related only to
•
failed login attempts.
Configuration Examples for Login Parameters
Setting Login Parameters Example
The following example shows how to configure your switch to enter a 100 second quiet period if 15 failed
login attempts is exceeded within 100 seconds; all login requests are denied during the quiet period except
hosts from the ACL "myacl."
The following sample output from the show login failures command verifies that no information is presently
logged:
Switch# show login failures
*** No logged failed login attempts with the device.***
Restricting Sessions Per User—Per User Per Login
Use this task to restrict the maximum sessions per user.
Procedure
Step 1
Example:
Switch# configure terminal
Step 2
Step 3
[no] user max-logins max-logins
Example:
Switch(config)# user max-logins 1
Example:
Switch(config)# exit
PurposeCommand or Action
Enters global configuration mode.configure terminal
Restricts the maximum sessions per user. The
range is from 1 to 7. If you set the maximum login
limit as 1, then only one session (telnet/SSH) is
allowed per user.
Enters global configuration mode.configure terminal
Enables the login knob. If this command is enabled
and the user enters the username command without
Example:
the password option, then the password is prompted.
The password accepts hidden characters. Use the no
Switch(config)# password prompt
username
Step 3
Example:
Switch(config)# exit
form of this command to disable the login knob.
Exits to privileged EXEC mode.exit
Configuring Share Key Value for using RADIUS/TACACS+
The shared secret you configure for remote authentication and accounting must be hidden. For the radius-server
key and tacacs-server key commands, a separate command to generate encrypted shared secret can be used.
Procedure
PurposeCommand or Action
Step 1
Step 2
Example:
Switch# configure terminal
generate type7_encrypted_secret
Enters global configuration mode.configure terminal
Configures RADIUS and TACACS shared secret with
key type 7. While generating an encrypted shared
Example:
Switch(config)# generate
type7_encrypted_secret
secret, user input is hidden.
Note
You can generate encrypted equivalent of
plain text separately and can configure the
encrypted shared secret later.
Monitoring and Clearing the Local AAA Accounting Log
PurposeCommand or Action
Step 3
Example:
Switch(config)# exit
Exits to privileged EXEC mode.exit
Monitoring and Clearing the Local AAA Accounting Log
The Cisco Nexus device maintains a local log for the AAA accounting activity.
Procedure
PurposeCommand or Action
Step 1
Step 2
switch# show accounting log [size]
[start-time year month day hh : mm
: ss]
switch# clear accounting log
Displays the accounting log contents. By default, the
command output contains up to 250,000 bytes of the
accounting log. You can use the size argument to limit
command output. The range is from 0 to 250000 bytes. You
can also specify a start time for the log output.
(Optional)
Clears the accounting log contents.
Verifying the AAA Configuration
To display AAA configuration information, perform one of the following tasks:
The Remote Access Dial-In User Service (RADIUS) distributed client/server system allows you to secure
networks against unauthorized access. In the Cisco implementation, RADIUS clients run on Cisco Nexus
device and send authentication and accounting requests to a central RADIUS server that contains all user
authentication and network service access information.
RADIUS Network Environments
RADIUS can be implemented in a variety of network environments that require high levels of security while
maintaining network access for remote users.
You can use RADIUS in the following network environments that require access security:
Networks with multiple-vendor network devices, each supporting RADIUS.
For example, network devices from several vendors can use a single RADIUS server-based security
database.
Networks already using RADIUS.
•
You can add a Cisco Nexus device with RADIUS to the network. This action might be the first step
when you make a transition to an AAA server.
Networks that require resource accounting.
•
You can use RADIUS accounting independent of RADIUS authentication or authorization. The RADIUS
accounting functions allow data to be sent at the start and end of services, indicating the amount of
resources (such as time, packets, bytes, and so on) used during the session. An Internet service provider
(ISP) might use a freeware-based version of the RADIUS access control and accounting software to
meet special security and billing needs.
Networks that support authentication profiles.
•
Using the RADIUS server in your network, you can configure AAA authentication and set up per-user
profiles. Per-user profiles enable the Cisco Nexus device to manage ports using their existing RADIUS
solutions and to efficiently manage shared resources to offer different service-level agreements.
Configuring RADIUS
Information About RADIUS Operations
When a user attempts to log in and authenticate to a Cisco Nexus device using RADIUS, the following process
occurs:
1
The user is prompted for and enters a username and password.
2
The username and encrypted password are sent over the network to the RADIUS server.
3
The user receives one of the following responses from the RADIUS server:
• ACCEPT—The user is authenticated.
• REJECT—The user is not authenticated and is prompted to reenter the username and password, or
access is denied.
• CHALLENGE—A challenge is issued by the RADIUS server. The challenge collects additional
data from the user.
• CHANGE PASSWORD—A request is issued by the RADIUS server, asking the user to select a
new password.
The ACCEPT or REJECT response is bundled with additional data that is used for EXEC or network
authorization. You must first complete RADIUS authentication before using RADIUS authorization. The
additional data included with the ACCEPT or REJECT packets consists of the following:
Services that the user can access, including Telnet, rlogin, or local-area transport (LAT) connections,
•
and Point-to-Point Protocol (PPP), Serial Line Internet Protocol (SLIP), or EXEC services.
Connection parameters, including the host or client IPv4 or IPv6 address, access list, and user timeouts.
An unresponsive RADIUS server can cause delay in processing of AAA requests. You can configure the
switch to periodically monitor a RADIUS server to check whether it is responding (or alive) to save time in
processing AAA requests. The switch marks unresponsive RADIUS servers as dead and does not send AAA
requests to any dead RADIUS servers. The switch periodically monitors the dead RADIUS servers and brings
them to the alive state once they respond. This process verifies that a RADIUS server is in a working state
before real AAA requests are sent to the server. Whenever a RADIUS server changes to the dead or alive
state, a Simple Network Management Protocol (SNMP) trap is generated and the switch displays an error
message that a failure is taking place.
The following figure shows the different RADIUS server states:
Figure 2: RADIUS Server States
RADIUS Server Monitoring
Note
The monitoring interval for alive servers and dead servers are different and can be configured by the user.
The RADIUS server monitoring is performed by sending a test authentication request to the RADIUS
server.
Vendor-Specific Attributes
The Internet Engineering Task Force (IETF) draft standard specifies a method for communicating
vendor-specific attributes (VSAs) between the network access server and the RADIUS server. The IETF uses
attribute 26. VSAs allow vendors to support their own extended attributes that are not suitable for general
use. The Cisco RADIUS implementation supports one vendor-specific option using the format recommended
in the specification. The Cisco vendor ID is 9, and the supported option is vendor type 1, which is named
cisco-av-pair. The value is a string with the following format:
protocol : attribute separator value *
The protocol is a Cisco attribute for a particular type of authorization, the separator is an equal sign (=) for
mandatory attributes, and an asterisk (*) indicates optional attributes.
When you use RADIUS servers for authentication on a Cisco Nexus device, the RADIUS protocol directs
the RADIUS server to return user attributes, such as authorization information, with authentication results.
This authorization information is specified through VSAs.
The following VSA protocol options are supported by the Cisco Nexus device:
The Cisco Nexus device supports the following attributes:
Configuring RADIUS
• Shell— Used in access-accept packets to provide user profile information.
• Accounting— Used in accounting-request packets. If a value contains any white spaces, you should
enclose the value within double quotation marks.
• roles—Lists all the roles to which the user belongs. The value field is a string that lists the role names
delimited by white spaces.
• accountinginfo—Stores accounting information in addition to the attributes covered by a standard
RADIUS accounting protocol. This attribute is sent only in the VSA portion of the Account-Request
frames from the RADIUS client on the switch. It can be used only with the accounting protocol data
units (PDUs).
Prerequisites for RADIUS
RADIUS has the following prerequisites:
You must obtain IPv4 or IPv6 addresses or hostnames for the RADIUS servers.
•
You must obtain preshared keys from the RADIUS servers.
•
Ensure that the Cisco Nexus device is configured as a RADIUS client of the AAA servers.
•
Guidelines and Limitations for RADIUS
RADIUS has the following configuration guidelines and limitations:
You can configure a maximum of 64 RADIUS servers on the device.
•
Configuring RADIUS Servers
This section describes how to configure RADIUS servers.
Establish the RADIUS server connections to the Cisco Nexus device.
See Configuring RADIUS Server Hosts, on page 33.
Configure the preshared secret keys for the RADIUS servers.
Page 47
Configuring RADIUS
Step 3
Step 4
Configuring RADIUS Server Hosts
See Configuring RADIUS Global Preshared Keys, on page 34.
If needed, configure RADIUS server groups with subsets of the RADIUS servers for AAA authentication
methods.
See Allowing Users to Specify a RADIUS Server at Login, on page 37 and Configuring Accounting and
Authentication Attributes for RADIUS Servers, on page 39.
If needed, configure any of the following optional parameters:
Dead-time interval. See Configuring the Dead-Time Interval, on page 41.
•
Allow specification of a RADIUS server at login. See Allowing Users to Specify a RADIUS Server at
•
Login, on page 37
Transmission retry count and timeout interval. See Configuring the Global RADIUS Transmission Retry
•
Count and Timeout Interval, on page 38.
Accounting and authentication attributes. See Configuring Accounting and Authentication Attributes
•
for RADIUS Servers, on page 39.
Step 5
If needed, configure periodic RADIUS server monitoring.
See Configuring Periodic RADIUS Server Monitoring, on page 40.
Configuring RADIUS Server Hosts
You must configure the IPv4 or IPv6 address or the hostname for each RADIUS server that you want to use
for authentication. All RADIUS server hosts are added to the default RADIUS server group. You can configure
up to 64 RADIUS servers.
You can configure preshared keys at the global level for all servers used by the Cisco Nexus device. A preshared
key is a shared secret text string between the switch and the RADIUS server hosts.
Before You Begin
Obtain the preshared key values for the remote RADIUS servers
Enters global configuration move.switch# configure terminal
Specifies a preshared key for all RADIUS servers. You can
specify a clear text ( 0 ) or encrypted ( 7 ) preshared key. The
default format is clear text.
The maximum length is 63 characters.
By default, no preshared key is configured.
Step 3
Step 4
switch# show radius-server
Exits configuration mode.switch(config)# exit
(Optional)
Displays the RADIUS server configuration.
Note
The preshared keys are saved in encrypted form in
the running configuration. Use the showrunning-config command to display the encrypted
preshared keys.
Step 5
switch# copy running-config
startup-contig
(Optional)
Saves the change persistenetly through reboots and restarts
by copying the running configuration to the startup
configuration.
This example shows how to configure preshared keys at the global level for all servers used by the device:
Enters global configuration move.switch# configure terminal
Specifies a preshared key for a specific RADIUS server.
You can specify a clear text ( 0 ) or encrypted ( 7 ) preshared
key. The default format is clear text.
The maximum length is 63 characters.
This preshared key is used instead of the global preshared
key.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the RADIUS server configuration.
Note
The preshared keys are saved in encrypted form in
the running configuration. Use the showrunning-config command to display the encrypted
preshared keys.
(Optional)
Saves the change persistenetly through reboots and restarts
by copying the running configuration to the startup
configuration.
This example shows how to configure RADIUS preshared keys:
You can specify one or more remote AAA servers for authentication using server groups. All members of a
group must belong to the RADIUS protocol. The servers are tried in the same order in which you configure
them.
Configuring the Global Source Interface for RADIUS Server Groups
switch (config)# show radius-server group
switch (config)# copy running-config startup-config
What to Do Next
Apply the RADIUS server groups to an AAA service.
Configuring the Global Source Interface for RADIUS Server Groups
You can configure a global source interface for RADIUS server groups to use when accessing RADIUS
servers. You can also configure a different source interface for a specific RADIUS server group.
Procedure
PurposeCommand or Action
Step 1
Step 2
switch(config)# ip radius
source-interface interface
Enters global configuration mode.switch# configure terminal
Configures the global source interface for all RADIUS
server groups configured on the device. The source
interface can be the management or the VLAN
interface.
Step 3
Step 4
switch# show radius-server
Exits configuration mode.switch(config)# exit
(Optional)
Displays the RADIUS server configuration
information.
Step 5
switch# copy running-config startup
config
(Optional)
Copies the running configuration to the startup
configuration.
This example shows how to configure the mgmt 0 interface as the global source interface for RADIUS server
groups:
Configuring the Global RADIUS Transmission Retry Count and Timeout Interval
You can configure a global retransmission retry count and timeout interval for all RADIUS servers. By default,
a switch retries transmission to a RADIUS server only once before reverting to local authentication. You can
increase this number up to a maximum of five retries per server. The timeout interval determines how long
the Cisco Nexus device waits for responses from RADIUS servers before declaring a timeout failure.
Procedure
PurposeCommand or Action
Step 1
Step 2
switch(config)# radius-server
retransmit count
Enters global configuration move.switch# configure terminal
Specifies the retransmission count for all RADIUS
servers. The default retransmission count is 1 and the
range is from 0 to 5.
Step 3
switch(config)# radius-server
timeout seconds
Specifies the transmission timeout interval for
RADIUS servers. The default timeout interval is 5
seconds and the range is from 1 to 60 seconds.
Step 4
Exits global configuration mode.switch(config)# exit
Configuring Accounting and Authentication Attributes for RADIUS Servers
You can specify that a RADIUS server is to be used only for accounting purposes or only for authentication
purposes. By default, RADIUS servers are used for both accounting and authentication. You can also specify
the destination UDP port numbers where RADIUS accounting and authentication messages should be sent.
You can monitor the availability of RADIUS servers. These parameters include the username and password
to use for the server and an idle timer. The idle timer specifies the interval during which a RADIUS server
receives no requests before the switch sends out a test packet. You can configure this option to test servers
periodically.
Note
For security reasons, we recommend that you do not configure a test username that is the same as an
existing user in the RADIUS database.
The test idle timer specifies the interval during which a RADIUS server receives no requests before the switch
sends out a test packet.
The default idle timer value is 0 minutes. When the idle time interval is 0 minutes, the switch does not perform
periodic RADIUS server monitoring.
host-name} test {idle-time minutes |
password password [idle-time minutes]
| username name [password password
[idle-time minutes]]}
Configuring the Dead-Time Interval
PurposeCommand or Action
The default value for the idle timer is 0 minutes.
The valid range is from 0 to 1440 minutes.
Note
For periodic RADIUS server monitoring, you
must set the idle timer to a value greater than
0.
Step 3
switch(config)# radius-server
deadtime minutes
Specifies the number of minutes before the switch
checks a RADIUS server that was previously
unresponsive.
The default value is 0 minutes.
The valid range is 1 to 1440 minutes.
Step 4
Step 5
switch# show radius-server
Exits configuration mode.switch(config)# exit
(Optional)
Displays the RADIUS server configuration.
Step 6
switch# copy running-config
startup-contig
(Optional)
Saves the change persistenetly through reboots and
restarts by copying the running configuration to the
startup configuration.
This example shows how to configure RADIUS server host 10.10.1.1 with a username (user1) and password
(Ur2Gd2BH) and with an idle timer of 3 minutes and a deadtime of 5 minutes:
You can configure the dead-time interval for all RADIUS servers. The dead-time interval specifies the time
that the Cisco Nexus device waits after declaring a RADIUS server is dead, before sending out a test packet
to determine if the server is now alive. The default value is 0 minutes.
Note
When the dead-time interval is 0 minutes, RADIUS servers are not marked as dead even if they are not
responding. You can configure the dead-time interval for a RADIUS server group. See Configuring
The Terminal Access Controller Access Control System Plus (TACACS+) security protocol provides centralized
validation of users attempting to gain access to a Cisco Nexus device. TACACS+ services are maintained in
a database on a TACACS+ daemon typically running on a UNIX or Windows NT workstation. You must
have access to and must configure a TACACS+ server before the configured TACACS+ features on your
Cisco Nexus device are available.
TACACS+ provides for separate authentication, authorization, and accounting facilities. TACACS+ allows
for a single access control server (the TACACS+ daemon) to provide each service (authentication, authorization,
and accounting) independently. Each service is associated with its own database to take advantage of other
services available on that server or on the network, depending on the capabilities of the daemon.
The TACACS+ client/server protocol uses TCP (TCP port 49) for transport requirements. The Cisco Nexus
device provides centralized authentication using the TACACS+ protocol.
TACACS+ Advantages
TACACS+ has the following advantages over RADIUS authentication:
Provides independent AAA facilities. For example, the Cisco Nexus device can authorize access without
•
authenticating.
Uses the TCP transport protocol to send data between the AAA client and server, making reliable transfers
Encrypts the entire protocol payload between the switch and the AAA server to ensure higher data
•
confidentiality. The RADIUS protocol only encrypts passwords.
User Login with TACACS+
When a user attempts a Password Authentication Protocol (PAP) login to a Cisco Nexus device using
TACACS+, the following actions occur:
1
When the Cisco Nexus device establishes a connection, it contacts the TACACS+ daemon to obtain the
username and password.
Configuring TACACS+
Note
TACACS+ allows an arbitrary conversation between the daemon and the user until the daemon receives
enough information to authenticate the user. This action is usually done by prompting for a username and
password combination, but may include prompts for other items, such as the user’s mother’s maiden name.
2
The Cisco Nexus device receives one of the following responses from the TACACS+ daemon:
• ACCEPT—User authentication succeeds and service begins. If the Cisco Nexus device requires user
authorization, authorization begins.
• REJECT—User authentication failed. The TACACS+ daemon either denies further access to the
user or prompts the user to retry the login sequence.
• ERROR—An error occurred at some time during authentication dither at the daemon or in the network
connection between the daemon and the Cisco Nexus device. If the Cisco Nexus deviceh receives
an ERROR response, the switch tries to use an alternative method for authenticating the user.
The user also undergoes an additional authorization phase, if authorization has been enabled on the Cisco
Nexus device. Users must first successfully complete TACACS+ authentication before proceeding to
TACACS+ authorization.
3
If TACACS+ authorization is required, the Cisco Nexus device again contacts the TACACS+ daemon
and it returns an ACCEPT or REJECT authorization response. An ACCEPT response contains attributes
that are used to direct the EXEC or NETWORK session for that user and determines the services that the
user can access.
Services include the following:
Telnet, rlogin, Point-to-Point Protocol (PPP), Serial Line Internet Protocol (SLIP), or EXEC services
•
◦
Connection parameters, including the host or client IP address (IPv4), access list, and user timeouts
◦
Default TACACS+ Server Encryption Type and Preshared Key
You must configure the TACACS+ that is preshared key to authenticate the switch to the TACACS+ server.
A preshared key is a secret text string shared between the Cisco Nexus device and the TACACS+ server host.
The length of the key is restricted to 63 characters and can include any printable ASCII characters (white
spaces are not allowed). You can configure a global preshared secret key for all TACACS+ server configurations
on the Cisco Nexus device to use.
You can override the global preshared key assignment by using the key option when configuring an individual
TACACS+ server.
TACACS+ Server Monitoring
An unresponsive TACACS+ server can delay the processing of AAA requests. A Cisco Nexus device can
periodically monitor an TACACS+ server to check whether it is responding (or alive) to save time in processing
AAA requests. The Cisco Nexus device marks unresponsive TACACS+ servers as dead and does not send
AAA requests to any dead TACACS+ servers. The Cisco Nexus device periodically monitors dead TACACS+
servers and brings them to the alive state once they are responding. This process verifies that a TACACS+
server is in a working state before real AAA requests are sent to the server. Whenever an TACACS+ server
changes to the dead or alive state, a Simple Network Management Protocol (SNMP) trap is generated and the
Cisco Nexus device displays an error message that a failure is taking place before it can impact performance.
The following figure shows the different TACACS+ server states:
Figure 3: TACACS+ Server States
TACACS+ Server Monitoring
Note
The monitoring interval for alive servers and dead servers are different and can be configured by the user.
The TACACS+ server monitoring is performed by sending a test authentication request to the TACACS+
server.
Prerequisites for TACACS+
TACACS+ has the following prerequisites:
You must obtain the IPv4 or IPv6 addresses or hostnames for the TACACS+ servers.
•
You must obtain the preshared keys from the TACACS+ servers, if any.
•
Ensure that the Cisco Nexus device is configured as a TACACS+ client of the AAA servers.
TACACS+ has the following configuration guidelines and limitations:
You can configure a maximum of 64 TACACS+ servers on the Cisco Nexus device.
•
Configuring TACACS+
TACACS+ Server Configuration Process
This section describes how to configure TACACS+ servers.
Procedure
Configuring TACACS+
Step 1
Step 2
Step 3
Step 4
Step 5
Enable TACACS+.
See Enabling TACACS+ , on page 48.
Establish the TACACS+ server connections to the Cisco Nexus device.
Configuring TACACS+ Server Hosts, on page 49
Configure the preshared secret keys for the TACACS+ servers.
Configuring TACACS+ Global Preshared Keys, on page 50
If needed, configure TACACS+ server groups with subsets of the TACACS+ servers for AAA authentication
methods.
Configuring TACACS+ Server Groups, on page 51
If needed, configure periodic TACACS+ server monitoring.
Configuring Periodic TACACS+ Server Monitoring, on page 54
Enabling TACACS+
Although by default, the TACACS+ feature is disabled on the Cisco Nexus device. You can enable the
TACACS+ feature to access the configuration and verification commands for authentication.
Enters global configuration mode.switch# configure terminal
Enables TACACS+.switch(config)# feature tacacs+
Exits configuration mode.switch(config)# exit
Page 63
Configuring TACACS+
TACACS+ Server Configuration Process
PurposeCommand or Action
Step 4
switch# copy running-config
startup-config
Configuring TACACS+ Server Hosts
To access a remote TACACS+ server, you must configure the IPv4 or IPv6 address or the hostname for the
TACACS+ server on the Cisco Nexus device. All TACACS+ server hosts are added to the default TACACS+
server group.You can configure up to 64 TACACS+ servers.
If a preshared key is not configured for a configured TACACS+ server, a warning message is issued if a global
key is not configured. If a TACACS+ server key is not configured, the global key (if configured) is used for
that server.
(See Configuring TACACS+ Global Preshared Keys and Configuring TACACS+ Server Preshared Keys
sections for more details.)
Before you configure TACACS+ server hosts, you should do the following:
Enable TACACS+. See Enabling TACACS+ , on page 48 for more information.
•
Obtain the IPv4 or IPv6 addresses or the hostnames for the remote TACACS+ servers.
•
Procedure
(Optional)
Copies the running configuration to the startup
configuration.
You can configure preshared keys at the global level for all servers used by the Cisco Nexus device. A preshared
key is a shared secret text string between the Cisco Nexus device and the TACACS+ server hosts.
Before you configure preshared keys, you should do the following:
Enable TACACS+.
•
Obtain the preshared key values for the remote TACACS+ servers.
•
Procedure
Configuring TACACS+
PurposeCommand or Action
Step 1
Step 2
Step 3
Step 4
Step 5
tacacs-server key [0 | 6 | 7]
key-value
Example:
switch(config)# tacacs-server
key 0 QsEfThUkO
Example:
switch(config)# tacacs-server
key 7 "fewhg”
switch# show tacacs-server
switch# copy running-config
startup-config
Enters global configuration mode.switch# configure terminal
Specifies a TACACS+ key for all TACACS+ server. You can
specify that the key-value is in clear text format (0), is type-6
encrypted (6), or is type-7 encrypted (7). The Cisco NX-OS
software encrypts a clear text key before saving it to the
running configuration. The default format is clear text. The
maximum length is 63 characters.
By default, no secret key is configured.
Note
If you already configured a shared secret using the
generate type7_encrypted_secret command, enter
it in quotation marks, as shown in the second example.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
Note
The preshared keys are saved in encrypted form in
the running configuration. Use the showrunning-config command to display the encrypted
preshared keys.
(Optional)
Copies the running configuration to the startup configuration.
The following example shows how to configure global preshared keys:
You can specify one or more remote AAA servers to authenticate users using server groups. All members of
a group must belong to the TACACS+ protocol. The servers are tried in the same order in which you configure
them.
You can configure these server groups at any time but they only take effect when you apply them to an AAA
service.
Before You Begin
You must use the feature tacacs+ command to enable TACACS+ before you configure TACACS+.
Procedure
TACACS+ Server Configuration Process
PurposeCommand or Action
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
switch(config)# aaa group server
tacacs+ group-name
The following example shows how to configure a TACACS+ server group:
switch# configure terminal
switch(config)# aaa group server tacacs+ TacServer
switch(config-tacacs+)# server 10.10.2.2
switch(config-tacacs+)# deadtime 30
switch(config-tacacs+)# exit
switch(config)# show tacacs-server groups
switch(config)# copy running-config startup-config
Configuring the Global Source Interface for TACACS+ Server Groups
You can configure a global source interface for TACACS+ server groups to use when accessing TACACS+
servers. You can also configure a different source interface for a specific TACACS+ server group.
Procedure
PurposeCommand or Action
Configuring TACACS+
Step 1
Step 2
Step 3
Step 4
Step 5
ip tacacs source-interface interface
Example:
switch(config)# ip tacacs
source-interface mgmt 0
Example:
switch(config)# exit
switch#
show tacacs-server
Example:
switch# show tacacs-server
copy running-config startup config
Example:
switch# copy running-config
startup-config
Enters global configuration mode.configure terminal
Configures the global source interface for all
TACACS+ server groups configured on the
device. The source interface can be the
management or the VLAN interface.
Exits configuration mode.exit
(Optional)
Displays the TACACS+ server configuration
information.
(Optional)
Copies the running configuration to the startup
configuration.
Configuring the Global TACACS+ Timeout Interval
You can set a global timeout interval that the Cisco Nexus device waits for responses from all TACACS+
servers before declaring a timeout failure. The timeout interval determines how long the switch waits for
responses from TACACS+ servers before declaring a timeout failure.
You can set a timeout interval that the Cisco Nexus device waits for responses from a TACACS+ server before
declaring a timeout failure. The timeout interval determines how long the switch waits for responses from a
TACACS+ server before declaring a timeout failure.
Procedure
Enters global configuration mode.switch# configure terminal
Specifies the timeout interval for TACACS+ servers.
The default timeout interval is 5 second and the range
is from 1 to 60 seconds.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
(Optional)
Copies the running configuration to the startup
configuration.
Step 1
Step 2
Step 3
Step 4
Configuring TCP Ports
You can configure another TCP port for the TACACS+ servers if there are conflicts with another application.
By default, the Cisco Nexus device uses port 49 for all TACACS+ requests.
switch# show tacacs-server
switch# copy running-config
startup-config
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
(Optional)
Copies the running configuration to the startup
configuration.
The following example shows how to configure TCP ports:
switch# configure terminal
switch(config)# tacacs-server host 10.10.1.1 port 2
switch(config)# exit
switch# show tacacs-server
switch# copy running-config startup-config
Configuring Periodic TACACS+ Server Monitoring
You can monitor the availability of TACACS+ servers. These parameters include the username and password
to use for the server and an idle timer. The idle timer specifies the interval in which a TACACS+ server
receives no requests before the Cisco Nexus device sends out a test packet.You can configure this option to
test servers periodically, or you can run a one-time only test.
Enters global configuration mode.switch# configure terminal
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
(Optional)
Copies the running configuration to the startup
configuration.
Note
To protect network security, we recommend that you use a username that is not the same as an existing
username in the TACACS+ database.
The test idle timer specifies the interval in which a TACACS+ server receives no requests before the Cisco
Nexus device sends out a test packet.
Note
The default idle timer value is 0 minutes. When the idle time interval is 0 minutes, periodic TACACS+
server monitoring is not performed.
You can configure the dead-time interval for all TACACS+ servers. The dead-time interval specifies the time
that the Cisco Nexus device waits, after declaring a TACACS+ server is dead, before sending out a test packet
to determine if the server is now alive.
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
(Optional)
Copies the running configuration to the startup
configuration.
Note
When the dead-time interval is 0 minutes, TACACS+ servers are not marked as dead even if they are not
responding. You can configure the dead-time interval per group. See Configuring TACACS+ Server
Groups, on page 51
Procedure
PurposeCommand or Action
Step 1
Step 2
switch(config)# tacacs-server deadtime
minutes
Enters global configuration mode.switch# configure terminal
Configures the global dead-time interval. The
default value is 0 minutes. The range is from 1 to
1440 minutes.
Step 3
Step 4
switch# show tacacs-server
Exits configuration mode.switch(config)# exit
(Optional)
Displays the TACACS+ server configuration.
This example shows how to enable tacacs+ and how to configure the tacacs+ server preshared keys to specify
remote AAA servers to authenticate server group TacServer1:
Configuration Example for X.509v3 Certificate-Based SSH Authentication, page 70
•
Configuring Telnet, page 71
•
Verifying the SSH and Telnet Configuration, page 73
•
Default Settings for SSH, page 73
•
Information About SSH and Telnet
SSH Server
The Secure Shell Protocol (SSH) server feature enables a SSH client to make a secure, encrypted connection
to a Cisco Nexus device. SSH uses strong encryption for authentication. The SSH server in the Cisco Nexus
device switch interoperates with publicly and commercially available SSH clients.
The user authentication mechanisms supported for SSH are RADIUS, TACACS+, and the use of locally
stored user names and passwords.
SSH Client
The SSH client feature is an application running over the SSH protocol to provide device authentication and
encryption. The SSH client enables a switch to make a secure, encrypted connection to another Cisco Nexus
device or to any other device running an SSH server. This connection provides an outbound connection that
is encrypted. With authentication and encryption, the SSH client allows for a secure communication over an
insecure network.
The SSH client in the Cisco Nexus device works with publicly and commercially available SSH servers.
SSH Server Keys
SSH requires server keys for secure communications to the Cisco Nexus device. You can use SSH keys for
the following SSH options:
Be sure to have an SSH server key-pair with the appropriate version before enabling the SSH service. You
can generate the SSH server key-pair according to the SSH client version used. The SSH service accepts three
types of key-pairs for use by SSH version 2:
Configuring SSH and Telnet
SSH version 2 using Rivest, Shamir, and Adelman (RSA) public-key cryptography
•
SSH version 2 using the Digital System Algrorithm (DSA)
•
The dsa option generates the DSA key-pair for the SSH version 2 protocol.
•
The rsa option generates the RSA key-pair for the SSH version 2 protocol.
•
By default, the Cisco Nexus device generates an RSA key using 1024 bits.
SSH supports the following public key formats:
OpenSSH
•
IETF Secure Shell (SECSH)
•
If you delete all of the SSH keys, you cannot start the SSH services.Caution
SSH Authentication Using Digital Certificates
SSH authentication on CiscoNX-OS devices provide X.509 digital certificate support for host authentication.
An X.509 digital certificate is a data item that ensures the origin and integrity of a message. It contains
encryption keys for secured communications and is signed by a trusted certification authority (CA) to verify
the identity of the presenter. The X.509 digital certificate support provides either DSA or RSA algorithms for
authentication.
The certificate infrastructure uses the first certificate that supports the Secure Socket Layer (SSL) and is
returned by the security infrastructure, either through a query or a notification. Verification of certificates is
successful if the certificates are from any of the trusted CAs.
You can configure your device for SSH authentication using an X.509 certificate. If the authentication fails,
you are prompted for a password.
Beginning with Cisco NX-OS Release 7.0(3)I5(1), you can configure SSH authentication using X.509v3
certificates (RFC 6187). X.509v3 certificate-based SSH authentication uses certificates combined with a
smartcard to enable two-factor authentication for Cisco device access. The SSH client is provided by Cisco
partner Pragma Systems.
The Telnet protocol enables TCP/IP connections to a host. Telnet allows a user at one site to establish a TCP
connection to a login server at another site, and then passes the keystrokes from one system to the other. Telnet
can accept either an IP address or a domain name as the remote system address.
The Telnet server is enabled by default on the Cisco Nexus device.
Guidelines and Limitations for SSH
SSH has the following configuration guidelines and limitations:
The Cisco Nexus device supports only SSH version 2 (SSHv2).
•
Configuring SSH
Telnet Server
Generating SSH Server Keys
You can generate an SSH server key based on your security requirements. The default SSH server key is an
RSA key that is generated using 1024 bits.
Procedure
Step 1
Step 2
[force] | rsa [bits [force]]}
Step 3
Step 4
switch# show ssh key [dsa | rsa]
[md5]
PurposeCommand or Action
Enters global configuration move.switch# configure terminal
Generates the SSH server key.switch(config)# ssh key {dsa
The bits argument is the number of bits used to generate the
key. The range is from 768 to 2048 and the default value is
1024.
Use the force keyword to replace an existing key.
Exits global configuration mode.switch(config)# exit
(Optional)
Displays the SSH server keys.
For Cisco NX-OS Release 7.0(3)I4(6) and any later 7.0(3)I4(x)
release, this command displays the fingerprint in SHA256
format by default. SHA256 is more secure than the old default
format of MD5. However, the md5 option has been added, if
you want to see the fingerprint in MD5 format for backward
compatibility.
You can configure an SSH public key to log in using an SSH client without being prompted for a password.
You can specify the SSH public key in one of three different formats:
Open SSH format
•
IETF SECSH format
•
Public Key Certificate in PEM format
•
Specifying the SSH Public Keys in Open SSH Format
You can specify the SSH public keys in SSH format for user accounts.
Procedure
PurposeCommand or Action
Step 1
Step 2
switch(config)# username username
Enters global configuration move.switch# configure terminal
Configures the SSH public key in SSH format.
sshkey ssh-key
Step 3
Step 4
switch# show user-account
Exits global configuration mode.switch(config)# exit
(Optional)
Displays the user account configuration.
Step 5
switch# copy running-config
startup-config
(Optional)
Copies the running configuration to the startup
configuration.
The following example shows how to specify an SSH public key in open SSH format:
This example shows how to configure the SSH source interface:
switch(config)# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# ip ssh source-interface ethernet 1/7
switch(config)# show ip ssh source-interface
VRF NameInterface
defaultEthernet1/7
Starting SSH Sessions to Remote Devices
You can start SSH sessions to connect to remote devices from your Cisco Nexus device.
You can configure SSH authentication using X.509v3 certificates.
Before You Begin
Enable the SSH server on the remote device.
Procedure
PurposeCommand or Action
Step 1
Step 2
Example:
switch# configure terminal
switch(config)#
username user-id [password [0 | 5]
password]
Example:
switch(config)# username jsmith
password 4Ty18Rnt
Enters global configuration mode.configure terminal
Configures a user account. The user-id argument is a
case-sensitive, alphanumeric character string with a
maximum length of 28 characters. Valid characters are
uppercase letters A through Z, lowercase letters a through
z, numbers 0 through 9, hyphen (-), period (.), underscore
(_), plus sign (+), and equal sign (=). The at symbol (@)
is supported in remote usernames but not in local
usernames.
Usernames must begin with an underscore (_), which is
supported starting with Cisco NX-OS Release 7.0(3)I2(2),
or an alphanumeric character.
The default password is undefined. The 0 option indicates
that the password is clear text, and the 5 option indicates
that the password is encrypted. The default is 0 (clear
text).
Note
If you do not specify a password, the user might
not be able to log in to the Cisco NX-OS device.
Note
If you create a user account with the encrypted
password option, the corresponding SNMP user
will not be created.
switch(config)# username jsmith
ssh-cert-dn "/O = ABCcompany, OU
= ABC1,
emailAddress =
jsmith@ABCcompany.com, L =
Metropolis, ST = New York, C = US,
CN = jsmith" rsa
[no] crypto ca trustpoint trustpoint
Example:
switch(config)# crypto ca
trustpoint winca
trustpoint
Example:
switch(config)# crypto ca
authentication winca
crypto ca crl request trustpoint
bootflash:static-crl.crl
Example:
switch(config)# crypto ca crl
request winca
bootflash:crllist.crl
Specifies an SSH X.509 certificate distinguished name
and DSA or RSA algorithm to use for authentication for
an existing user account. The distinguished name can be
up to 512 characters and must follow the format shown
in the examples. Make sure the email address and state
are configured as emailAddress and ST, respectively.
Configures a trustpoint.
Configures a certificate chain for the trustpoint.[no] crypto ca authentication
Configures the certificate revocation list (CRL) for the
trustpoint. The CRL file is a snapshot of the list of
revoked certificates by the trustpoint. This static CRL list
is manually copied to the device from the Certification
Authority (CA).
Note
Static CRL is the only supported revocation
check method.
Step 7
Step 8
Step 9
Step 10
show crypto ca certificates
Example:
switch(config)# show crypto ca
certificates
show crypto ca crl trustpoint
Example:
switch(config)# show crypto ca crl
winca
show user-account
Example:
switch(config)# show user-account
show users
Example:
switch(config)# show users
(Optional)
Displays the configured certificate chain and associated
trustpoint.
(Optional)
Displays the contents of the CRL list of the specified
trustpoint.
(Optional)
Displays configured user account details.
(Optional)
Displays the users logged into the device.
Configuration Example for X.509v3 Certificate-Based SSH
Authentication
The following example shows how to configure SSH authentication using X.509v3 certificates:
configure terminal
username jsmith password 4Ty18Rnt
username jsmith ssh-cert-dn "/O = ABCcompany, OU = ABC1,
emailAddress = jsmith@ABCcompany.com, L = Metropolis, ST = New York, C = US, CN = jsmith"
rsa
crypto ca trustpoint tp1
crypto ca authentication tp1
crypto ca crl request tp1 bootflash:crl1.crl
show crypto ca certificates
Trustpoint: tp1
CA certificate 0:
subject= /CN=SecDevCA
issuer= /CN=SecDevCA
serial=01AB02CD03EF04GH05IJ06KL07MN
notBefore=Jun 29 12:36:26 2016 GMT
notAfter=Jun 29 12:46:23 2021 GMT
SHA1 Fingerprint=47:29:E3:00:C1:C1:47:F2:56:8B:AC:B2:1C:64:48:FC:F4:8D:53:AF
purposes: sslserver sslclient
show crypto ca crl tp1
Trustpoint: tp1 CRL: Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: /CN=SecDevCA
Last Update: Aug 8 20:03:15 2016 GMT
Next Update: Aug 16 08:23:15 2016 GMT
CRL extensions:
Enters global configuration move.switch# configure terminal
Configures the source interface for all Telnet packets.
The following list contains the valid values for interface.
ethernet
•
loopback
•
mgmt
•
port-channel
•
71
Page 86
Starting Telnet Sessions to Remote Devices
This example shows how to configure the Telnet source interface:
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# ip telnet source-interface ethernet 1/6
switch(config)# show ip telnet source-interface
VRF NameInterface
defaultEthernet1/6
switch(config)#
Starting Telnet Sessions to Remote Devices
Before you start a Telnet session to connect to remote devices, you should do the following:
Configuring SSH and Telnet
PurposeCommand or Action
vlan
•
Obtain the hostname for the remote device and, if needed, obtain the username on the remote device.
•
Enable the Telnet server on the Cisco Nexus device.
•
Enable the Telnet server on the remote device.
•
Procedure
Step 1
switch# telnet hostname
The following example shows how to start a Telnet session to connect to a remote device:
switch# telnet 10.10.1.1
Trying 10.10.1.1...
Connected to 10.10.1.1.
Escape character is '^]'.
switch login:
Clearing Telnet Sessions
PurposeCommand or Action
Creates a Telnet session to a remote device. The hostname
argument can be an IPv4 address, an IPv6 address, or a device
name.
You can clear Telnet sessions from the Cisco Nexus device.
Displays user session information.switch# show users
Clears a user Telnet session.
Verifying the SSH and Telnet Configuration
To display the SSH configuration information, perform one of the following tasks:
PurposeCommand or Action
switch# show ssh key [dsa | rsa][md5]
switch# show running-config security [all]
Displays SSH server keys.
For Cisco NX-OS Release 7.0(3)I4(6) and any later
7.0(3)I4(x) release, this command displays the
fingerprint in SHA256 format by default. SHA256 is
more secure than the old default format of MD5.
However, the md5 option has been added, if you want
to see the fingerprint in MD5 format for backward
compatibility.
Displays the SSH and user account configuration in
the running configuration. The all keyword displays
the default values for the SSH and user accounts.
switch# show crypto ca certificates
switch# show crypto ca crl trustpoint
Default Settings for SSH
The following table lists the default settings for SSH parameters.
Displays the SSH server configuration.switch# show ssh server
Displays user account information.switch# show user-account
Displays the users logged into the device.switch# show users
Displays the configured certificate chain and
associated trustpoint for X.509v3 certificate-based
SSH authentication.
Displays the contents of the CRL list of the specified
trustpoint for X.509v3 certificate-based SSH
authentication.
This chapter describes how to configure IP access control lists (ACLs) on Cisco NX-OS devices.
Unless otherwise specified, the term IP ACL refers to IPv4 and IPv6 ACLs.
Information About ACLs, page 75
•
ACL TCAM Regions, page 78
•
Licensing Requirements for ACLs, page 79
•
Prerequisites for ACLs, page 79
•
Guidelines and Limitations for ACLs, page 80
•
Default ACL Settings, page 80
•
ACL Logging , page 81
•
Configuring IP ACLs, page 81
•
About System ACLs, page 89
•
Configuring ACL Logging, page 92
•
Configuring ACL TCAM Region Sizes, page 95
•
Configuring ACLs on Virtual Terminal Lines, page 97
•
Information About ACLs
An access control list (ACL) is an ordered set of rules that you can use to filter traffic. Each rule specifies a
set of conditions that a packet must satisfy to match the rule. When the switch determines that an ACL applies
to a packet, it tests the packet against the conditions of all rules. The first match determines whether the packet
is permitted or denied. If there is no match, the switch applies the applicable default rule. The switch continues
processing packets that are permitted and drops packets that are denied.
You can use ACLs to protect networks and specific hosts from unnecessary or unwanted traffic. For example,
you could use ACLs to disallow HTTP traffic from a high-security network to the Internet. You could also
use ACLs to allow HTTP traffic but only to specific sites, using the IP address of the site to identify it in an
IP ACL.
The Cisco Nexus device supports IPv4, IPv6, and MAC ACLs for security traffic filtering. The switch allows
you to use IP access control lists (ACLs) as port ACLs, and Router ACLs as shown in the following table.
Table 10: Security ACL Applications
Configuring IP ACLs
Types of ACLs SupportedSupported InterfacesApplication
Port ACL
Router ACL
Application Order
An ACL is considered a port ACL when you apply it to
one of the following:
Ethernet interface
•
Ethernet port-channel interface
•
Physical Layer 3 interfaces
•
Layer 3 Ethernet subinterfaces
•
Layer 3 Ethernet port-channel interfaces
•
Layer 3 Ethernet port-channel subinterfaces
•
Management interfaces
•
Switched Virtual Interfaces (SVIs)
•
VTYsVTY ACL
IPv4 ACLs
IPv6 ACLs
MAC ACLs
IPv4 ACLs
IPv6 ACLs
IPv4 ACLs
IPv6 ACLs
Rules
76
When the device processes a packet, it determines the forwarding path of the packet. The path determines
which ACLs that the device applies to the traffic. The device applies the ACLs in the following order:
1
Port ACL
2
Ingress Router ACL
You can create rules in access-list configuration mode by using the permit or deny command. The switch
allows traffic that matches the criteria in a permit rule and blocks traffic that matches the criteria in a deny
rule. You have many options for configuring the criteria that traffic must meet in order to match the rule.
In each rule, you specify the source and the destination of the traffic that matches the rule. You can specify
both the source and destination as a specific host, a network or group of hosts, or any host.
Protocols
IPv4, IPv6, and MAC ACLs allow you to identify traffic by protocol. For your convenience, you can specify
some protocols by name. For example, in an IPv4 ACL, you can specify ICMP by name.
You can specify any protocol by the integer that represents the Internet protocol number.
Implicit Rules
IP and MAC ACLs have implicit rules, which means that although these rules do not appear in the running
configuration, the switch applies them to traffic when no other rules in an ACL match.
All IPv4 ACLs include the following implicit rule:
deny ip any any
This implicit rule ensures that the switch denies unmatched IP traffic.
All IPv6 ACLs include the following implicit rule:
deny ipv6 any any
All MAC ACLs include the following implicit rule:
deny any any protocol
This implicit rule ensures that the device denies the unmatched traffic, regardless of the protocol specified in
the Layer 2 header of the traffic.
Rules
Additional Filtering Options
You can identify traffic by using additional options. IPv4 ACLs support the following additional filtering
options:
Layer 4 protocol
•
TCP and UDP ports
•
IGMP types
•
Established TCP connections
•
Sequence Numbers
The Cisco Nexus device supports sequence numbers for rules. Every rule that you enter receives a sequence
number, either assigned by you or assigned automatically by the device. Sequence numbers simplify the
following ACL tasks:
• Adding new rules between existing rules—By specifying the sequence number, you specify where in
the ACL a new rule should be positioned. For example, if you need to insert a rule between rules numbered
100 and 110, you could assign a sequence number of 105 to the new rule.
• Removing a rule—Without using a sequence number, removing a rule requires that you enter the whole
rule, as follows:
switch(config-acl)# no permit tcp 10.0.0.0/8 any
However, if the same rule had a sequence number of 101, removing the rule requires only the following
command:
switch(config-acl)# no 101
• Moving a rule—With sequence numbers, if you need to move a rule to a different position within an
ACL, you can add a second instance of the rule using the sequence number that positions it correctly,
and then you can remove the original instance of the rule. This action allows you to move the rule without
disrupting traffic.
If you enter a rule without a sequence number, the device adds the rule to the end of the ACL and assigns a
sequence number that is 10 greater than the sequence number of the preceding rule to the rule. For example,
if the last rule in an ACL has a sequence number of 225 and you add a rule without a sequence number, the
device assigns the sequence number 235 to the new rule.
In addition, the device allows you to reassign sequence numbers to rules in an ACL. Resequencing is useful
when an ACL has rules numbered contiguously, such as 100 and 101, and you need to insert one or more
rules between those rules.
Logical Operators and Logical Operation Units
IP ACL rules for TCP and UDP traffic can use logical operators to filter traffic based on port numbers.
The Cisco Nexus device stores operator-operand couples in registers called logical operation units (LOUs)
to perform operations (greater than, less than, not equal to, and range) on the TCP and UDP ports specified
in an IP ACL.
ACL TCAM Regions
You can change the size of the ACL ternary content addressable memory (TCAM) regions in the hardware.
The IPv4 TCAMs are single wide.
You can create IPv6 port ACLs, router ACLs, and you can match IPv6 addresses for QoS. Cisco NX-OS
provides simultaneous support for all three TCAMs. You must remove or reduce the size of the existing
TCAMs to enable these new IPv6 TCAMs.
TCAM region sizes have the following guidelines and limitations:
To revert to the default ACL TCAM size, use the no hardware access list tcam region command. You
•
need to reload the modules when you revert to default sizes.
Depending upon the platform, each TCAM region might have a different minimum/maximum/aggregate
•
size restriction.
The total number of TCAMs is 16.
•
◦ There are 12 large TCAMs—Each has 2048 entries that are 160 bit key size.
◦ There are 4 small TCAMs—Each has 256 entries that are 160 bit key size.
The TCAM regions RACL v6, QoS, CoPP, and Multicast cannot be set to 0.
You must be familiar with IP addressing and protocols to configure IP ACLs.
•
You must be familiar with the interface types that you want to configure with ACLs.
•
Guidelines and Limitations for ACLs
IP ACLs have the following configuration guidelines and limitations:
As an enhancement to HTTP method match, the tcp-option-length option has been added to the ACE
•
syntax to specify the length of the TCP options header in the packets. You can configure up to 4
tcp-option-lengths in the ACEs, which includes the TCP option length of 0. If you do not configure the
tcp-option-length option, the length is considered as 0. It means that only the packets without the TCP
options header can match this ACE. This feature gives more flexibility in such a way that the HTTP
method can be matched even on the packets that have the variable length TCP options header.
We recommend that you perform ACL configuration using the Session Manager. This feature allows
•
you to verify ACL configuration and confirm that the resources required by the configuration are available
prior to committing them to the running configuration. This is especially useful for ACLs that include
more than about 1000 rules.
Configuring IP ACLs
You can configure any number of ACLs as long as TCAM space is available.
•
Packets that fail the Layer 3 maximum transmission unit check and therefore require fragmenting.
•
IPv4 packets that have IP options (additional IP packet header fields following the destination address
•
field).
When you apply an ACL that uses time ranges, the device updates the ACL entries whenever a time
•
range referenced in an ACL entry starts or ends. Updates that are initiated by time ranges occur on a
best-effort priority. If the device is especially busy when a time range causes an update, the device may
delay the update by up to a few seconds. Make sure that the time range is valid and in an active state.
To use the match-local-traffic option for all inbound and outbound traffic, you must first enable the
•
ACL in the software.
Default ACL Settings
The following table lists the default settings for IP ACLs parameters.
Table 12: Default IP ACLs Parameters
DefaultParameters
No IP ACLs exist by default.IP ACLs
Implicit rules apply to all ACLs .ACL rules
The following table lists the default settings for MAC ACLs parameters.
The Cisco Nexus device supports ACL logging, which allows you to monitor flows that hit specific access
control lists (ACLs). To enable the feature for the ACL entry, configure specific ACEs with the optional log
keyword.
ACL Logging
DefaultParameters
No MAC ACLs exist by default.MAC ACLs
Implicit rules apply to all ACLs .ACL rules
Configuring IP ACLs
Creating an IP ACL
You can create an IPv4 or IPv6 ACL on the switch and add rules to it.
Enters global configuration mode.switch# configure terminal
Creates the IP ACL and enters IP ACL configuration
mode. The name argument can be up to 64 characters.
Creates the IP ACL and enters IP ACL configuration
mode. The name argument can be up to 64 characters.
Creates a rule in the IP ACL. You can create many rules.
The sequence-number argument can be a whole number
between 1 and 4294967295.
The permit and deny commands support many ways of
identifying traffic. For more information, see the
Command Reference for the specific Cisco Nexus device.
To configure the IPv4 ACL logging process, you first create the access list, then enable filtering of IPv4 traffic
on an interface using the specified ACL, and finally configure the ACL logging process parameters.
Procedure
Step 1
(Optional)
Copies the running configuration to the startup
configuration.
PurposeCommand or Action
Enters global configuration mode.configure terminal
Step 2
Step 3
Step 4
Example:
switch# configure terminal
switch(config)#
ip access-list name
Example:
switch(config)# ip access-list
logging-test
switch(config-acl)#
{permit | deny} ip source-address
destination-address log
Example:
switch(config-acl)# permit ip any
10.30.30.0/24 log
exit
Example:
switch(config-acl)# exit
switch(config)#
Creates an IPv4 ACL and enters IP ACL configuration
mode. The name argument can be up to 64 characters.
Creates an ACL rule that permits or denies IPv4 traffic
matching its conditions. To enable the system to generate
an informational logging message about each packet
that matches the rule, you must include the log keyword.
The source-address and destination-address arguments
can be the IP address with a network wildcard, the IP
address and variable-length subnet mask, the host
address, or any to designate any address.
Updates the configuration and exits IP ACL
configuration mode.
Enables the filtering of IPv4 traffic on an interface using
the specified ACL. You can apply an ACL to inbound
traffic.
Updates the configuration and exits interface
configuration mode.
Configures the log-update interval (in seconds) for the
ACL logging process. The default value is 300 seconds.
The range is from 5 to 86400 seconds.
Specifies the maximum number of flows to be monitored
by the ACL logging process. The default value is 8000.
The range of values supported is from 0 to 1048576.
If the specified number of packets is logged before the
expiry of the alert interval, the system generates a syslog
message.
Enables the ACL name, the sequence number of ACE,
action, ACL direction, ACL filter type, and the ACL
applied interface are displayed in the output of the showlogging ip access-list cache command.
Configures rate limits in packets per second for packets
copied to the supervisor module for ACL logging. The
range is from 0 to 30000.
Note
Cisco Nexus NX-OS 7.0(3)F3(1) does not
support the hardware rate-limiteraccess-list-log command.
You can add and remove rules in an existing IPv4 or IPv6 ACL. You cannot change existing rules. Instead,
to change a rule, you can remove it and recreate it with the desired changes.
If you need to add more rules between existing rules than the current sequence numbering allows, you can
use the resequence command to reassign sequence numbers.
acllog match-log-level severity-level
Example:
switch(config)# acllog
match-log-level 5
show logging ip access-list cache
[detail]
Example:
switch(config)# show logging ip
access-list cache
Specifies the minimum severity level to log ACL
matches. The default is 6 (informational). The range is
from 0 (emergency) to 7 (debugging).
(Optional)
Displays information on the active logged flows, such
as source IP and destination IP addresses, source port
and destination port information, source interfaces, and
so on. If you entered the logging ip access-list detailed
command, the output also includes the ACL name, the
sequence number of ACE, action, ACL direction, ACL
filter type, and the ACL applied interface .
switch(config-acl)# no
{sequence-number | {permit | deny}
protocol source destination}
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Enters IP ACL configuration mode for the ACL that you
specify by name.
Enters IP ACL configuration mode for the ACL that you
specify by name.
Creates a rule in the IP ACL. Using a sequence number
allows you to specify a position for the rule in the ACL.
Without a sequence number, the rule is added to the end
of the rules. The sequence-number argument can be a
whole number between 1 and 4294967295.
The permit and deny commands support many ways of
identifying traffic. For more information, see the CommandReference for your Cisco Nexus device.
(Optional)
Removes the rule that you specified from the IP ACL.
The permit and deny commands support many ways of
identifying traffic. For more information, see the CommandReference for your Cisco Nexus device.
Step 6
Step 7
Related Topics
Changing Sequence Numbers in an IP ACL, on page 86
Removing an IP ACL
You can remove an IP ACL from the switch.
Before you remove an IP ACL from the switch, be sure that you know whether the ACL is applied to an
interface. The switch allows you to remove ACLs that are currently applied. Removing an ACL does not
affect the configuration of interfaces where you have applied the ACL. Instead, the switch considers the
removed ACL to be empty.
Procedure
switch#show ip access-lists name
switch# copy running-config
startup-config
(Optional)
Displays the IP ACL configuration.
(Optional)
Copies the running configuration to the startup
configuration.
Step 1
Step 2
Step 3
Step 4
Step 5
switch(config)# no {ip | ipv6}
access-list name
switch(config)# no ip access-list name
switch# show running-config
switch# copy running-config
startup-config
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Removes the IP ACL that you specified by name
from the running configuration.
Removes the IP ACL that you specified by name
from the running configuration.
(Optional)
Displays the ACL configuration. The removed IP
ACL should not appear.
(Optional)
Copies the running configuration to the startup
configuration.