Cisco Nexus 9000 Series Configuration Manual

Cisco Nexus 9000 Series Configuration Manual

Nx-os fundamentals configuration guide
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents
Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide,
Release 7.x
First Published: 2015-02-01
Last Modified: 2017-06-16
Americas Headquarters
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
Table of Contents
loading

Summary of Contents for Cisco Nexus 9000 Series

  • Page 1 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x First Published: 2015-02-01 Last Modified: 2017-06-16 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883...
  • Page 2 This product includes software written by Tim Hudson ([email protected]). https:/ 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: /www.cisco.com/go/trademarks .
  • Page 3: Table Of Contents

    Switched Port Analyzer Ethanalyzer Smart Call Home Online Diagnostics Embedded Event Manager Manageability Simple Network Management Protocol Configuration Verification and Rollback Role-Based Access Control Cisco NX-OS Device Configuration Methods Programmability Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 4 Setting up the DHCP Server without DNS for POAP Downloading and Using User Data, Agents, and Scripts as part of POAP POAP Process Power-Up Phase DHCP Discovery Phase POAP Dynamic Breakout Script Execution Phase Post-Installation Reload Phase Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 5 Identifying Your Location in the Command Hierarchy Using the no Form of a Command Configuring CLI Variables About CLI Variables Configuring CLI Session-Only Variables Configuring Persistent CLI Variables Command Aliases About Command Aliases Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 6 Sending Commands to Modules Sending Command Output in Email BIOS Loader Prompt Examples Using the CLI Using the System-Defined Timestamp Variable Using CLI Session Variables Defining Command Aliases Running a Command Script Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 7 Licensing Requirements for Basic Device Management Default Settings for Basic Device Parameters Changing the Device Hostname Configuring the MOTD Banner Configuring the Time Zone Configuring Summer Time (Daylight Saving Time) Manually Setting the Device Clock Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 8 Displaying File Checksums Compressing and Uncompressing Files Displaying the Last Lines in a File Redirecting show Command Output to a File Finding Files Working with Archive Files Creating an Archive File Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x viii...
  • Page 9 Copying Configuration Files to an Internal File System Rolling Back to a Previous Configuration Removing the Configuration for a Missing Module Erasing a Configuration Clearing Inactive Configurations Configuration Archive and Configuration Log Information About Configuration Archive Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 10 Verifying the Device Configuration Examples of Working with Configuration Files Copying Configuration Files Backing Up Configuration Files Rolling Back to a Previous Configuration Additional References for Configuration Files Related Documents for Configuration Files Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 11: Document Conventions

    • Documentation Feedback, page xii • Obtaining Documentation and Submitting a Service Request, page xiii Audience This publication is for network administrators who install, configure, and maintain Cisco Nexus switches. Document Conventions Command descriptions use the following conventions: Convention Description...
  • Page 12: Documentation Feedback

    An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line. Related Documentation for Cisco Nexus 9000 Series Switches The entire Cisco Nexus 9000 Series switch documentation set is available at the following URL: http://www.cisco.com/en/US/products/ps13386/tsd_products_support_series_home.html Documentation Feedback To provide technical feedback on this document, or to report an error or omission, please send your comments to [email protected].
  • Page 13: Obtaining Documentation And Submitting A Service Request

    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.
  • Page 14 Preface Obtaining Documentation and Submitting a Service Request Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 15: Chapter

    New and Changed Information, page 1 New and Changed Information This table summarizes the new and changed features for the Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x and tells you where they are documented. Table 1: New and Changed Features for Cisco NX-OS Release 7.x...
  • Page 16 Introduced the POAP 7.0(3)I4(1) Using PowerOn Auto personality and dynamic Provisioning, on page 23 breakout features. copy command Added support for the HTTPS 7.0(3)I1(1) Copying Files, on page 103 file system. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 17: Chapter

    This image runs on all Cisco Nexus 9000 Series switches. Software Compatibility The Cisco NX-OS software interoperates with Cisco products that run any variant of the Cisco IOS software. The Cisco NX-OS software also interoperates with any networking operating system that conforms to the IEEE and RFC compliance standards.
  • Page 18: Modular Software Design

    Overview Modular Software Design This figure shows an example of a spine/leaf topology with four leaf switches (Cisco Nexus 9396 or 93128) connecting into two spine switches (Cisco Nexus 9508) and two 40G Ethernet uplinks from each leaf to each spine.
  • Page 19: Smart Call Home

    GOLD, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide. Embedded Event Manager Cisco Embedded Event Manager (EEM) is a device and system management feature that helps you to customize behavior based on network events as they happen. For information about configuring EEM, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide.
  • Page 20: Python Api

    CLI. For more information, see the Cisco NX-OS XML Interface User Guide. • The Cisco Data Center Network Management (DCNM) client, which runs on your local PC and uses web services on the Cisco DCNM server. The Cisco DCNM server configures the device over the XML management interface.
  • Page 21: Cisco Nx-Api

    ASICs. You can use the CLI to access the command-line shell (bcm shell) for these ASICs. The benefit of using this method to access the bcm shell is that you can use Cisco NX-OS command extensions such as pipe include and redirect output to file to manage the output. In addition, the activity is recorded in the system accounting log for audit purposes, unlike commands entered directly from the bcm shell, which are not recorded in the accounting log.
  • Page 22: Ip Routing

    Nexus 9000 Series NX-OS Layer 2 Switching Configuration Guide. IP Routing The Cisco NX-OS software supports IP version 4 (IPv4) and IP version 6 (IPv6) and the following routing protocols: • Open Shortest Path First (OSPF) Protocol Versions 2 (IPv4) and 3 (IPv6) •...
  • Page 23: Quality Of Service

    The Cisco NX-OS software supports quality of service (QoS) functions for classification, marking, queuing, policing, and scheduling. Modular QoS CLI (MQC) supports all QoS features. You can use MQC to provide uniform configurations across various Cisco platforms. For more information, see the Cisco Nexus 9000 Series NX-OS Quality of Service Configuration Guide.
  • Page 24: Licensing

    Licensing Licensing The Cisco NX-OS software licensing feature allows you to access premium features on the device after you install the appropriate license for that feature. Any feature not included in a license package is bundled with the Cisco NX-OS software and is provided to you at no extra charge.
  • Page 25 Bestpath transition avoidance (draft-ietf-idr-avoid-transition-05.txt) ietf-draft Peer table objects (draft-ietf-idr-bgp4-mib-15.txt) ietf-draft Dynamic Capability (draft-ietf-idr-dynamic-cap-03.txt) IP Multicast RFC 2236 Internet Group Management Protocol, Version 2 RFC 3376 Internet Group Management Protocol, Version 3 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 26 IP Services RFC 768 RFC 783 TFTP RFC 791 RFC 792 ICMP RFC 793 RFC 826 RFC 854 Telnet RFC 959 RFC 1027 Proxy ARP RFC 1305 NTP v3 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 27 RFC 3847 Restart Signaling for IS-IS ietf-draft Internet Draft Point-to-point operation over LAN in link-state routing protocols (draft-ietf-isis-igp-p2p-over-lan-06.txt) OSPF RFC 2328 OSPF Version 2 RFC 2370 OSPF Opaque LSA Option Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 28 RFC 2579 Textual Conventions for SMIv2 RFC 2863 The Interfaces Group MIB RFC 3413 Simple Network Management Protocol (SNMP) Applications RFC 3417 Transport Mappings for the Simple Network Management Protocol (SNMP) Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 29: Using The Cisco Nx-Os Setup Utility

    About the Cisco NX-OS Setup Utility The Cisco NX-OS setup utility is an interactive command-line interface (CLI) mode that guides you through a basic (also called a startup) configuration of the system. The setup utility allows you to configure only enough connectivity for system management.
  • Page 30 SNMP access. If you enable IPv4 routing, the device uses the IPv4 route and the default network IPv4 address. If IPv4 routing is disabled, the device uses the default gateway IPv4 address. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 31: Prerequisites For The Setup Utility

    • Connect the Ethernet management port on the supervisor module to the network. If you have dual supervisor modules, connect the Ethernet management ports on both supervisor modules to the network. Setting Up Your Cisco NX-OS Device To configure basic management of the Cisco NX-OS device using the setup utility, follow these steps: Procedure Step 1 Power on the device.
  • Page 32 Enter the default user role. Example: Enter the user role (network-operator|network-admin) [network-operator]: default_user_role For information on the default user roles, see the Cisco Nexus 9000 Series NX-OS Security Configuration Guide. Step 6 Configure an SNMP community string by entering yes.
  • Page 33 Configure read-only SNMP community string (yes/no) [n]: yes SNMP community string : snmp_community_string For information on SNMP, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide. Step 7 Enter a name for the device (the default name is switch).
  • Page 34 Example: Configure default switchport interface state (shut/noshut) [shut]: default_state Step 20 Enter the best practices profile for control plane policing (CoPP). For more information, see the Cisco Nexus 9000 Series NX-OS Security Configuration Guide. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 35: Additional References For The Setup Utility

    Cisco Nexus 9000 Series NX-OS Security Configuration Guide IPv4 and IPv6 Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide SNMP and NTP Cisco Nexus 9000 Series NX-OS System Management Configuration Guide Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 36 Using the Cisco NX-OS Setup Utility Related Documents for the Setup Utility Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 37: Using Poweron Auto Provisioning

    The DHCP information is used only during the POAP process. Note Checking for a USB device containing the configuration script file in POAP mode is not supported on the Note Cisco Nexus 9000 Series switches. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 38: Network Requirements For Poap

    The POAP script can be found at https://github.com/datacenter/nexus9000/blob/master/nx-os/poap/poap.py. To modify the script using Python, see the Cisco NX-OS Python API Reference Guide for your platform. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 39: Using The Poap Script And Poap Script Options

    The interface MAC address to determine the configuration filename. The format for the hostname in the configuration file is conf_macaddress.cfg. Example: conf_7426CC5C9180.cfg ◦ raw The configuration filename is used exactly as provided in the options. The filename is not altered in any way. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 40 The name of the configuration file when raw mode is used. The default is poap.cfg. • vrf The VRF to use for downloads and so on. The VRF is automatically set by the POAP process. The default is the POAP_VRF environment variable. • destination_config Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 41: Setting Up The Dhcp Server Without Dns For Poap

    Setting up the DHCP Server without DNS for POAP Beginning with Cisco NX-OS Release 7.0(3)I6(1), the tftp-server-name can be used without the DNS option. To enable POAP functionality without DNS on earlier releases, a custom option of 150 must be used to specify the tftp-server-address.
  • Page 42: Downloading And Using User Data, Agents, And Scripts As Part Of Poap

    Since older Cisco NX-OS versions do not support recursive copy of directories, such directories must be put into a tarball (TAR archive) and then unpacked once on the switch.
  • Page 43 Using PowerOn Auto Provisioning POAP Process Within these phases, other process and decision points occur. The following illustration shows a flow diagram of the POAP process. Figure 4: POAP Process Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 44 Using PowerOn Auto Provisioning POAP Process Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 45: Power-Up Phase

    DHCP offers from the DHCP server or servers. (See the following figure.) The DHCP client on the Cisco Nexus switch uses the switch serial number in the client-identifier option to identify itself to the DHCP server. The DHCP server can use this identifier to send information, such as the IP address and script filename, back to the DHCP client.
  • Page 46 If no DHCP offers meet the requirements, the switch does not complete the DHCP negotiation (request and acknowledgment) and an IP address is not assigned. Figure 5: DHCP Discovery Process Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 47: Poap Dynamic Breakout

    • If you use POAP to bootstrap a Cisco Nexus device that is a part of a virtual port channel (vPC) pair using static port channels on the vPC links, the Cisco Nexus device activates all of its links when POAP starts up.
  • Page 48: Setting Up The Network Environment To Use Poap

    To work around this issue, you can configure Link Aggregation Control Protocol (LACP) on the vPC links so that the links do not incorrectly start forwarding traffic to the Cisco Nexus device that is being bootstrapped using POAP.
  • Page 49: Creating Md5 Files

    Procedure Command or Action Purpose Step 1 Enters global configuration mode. configure terminal Example: switch# configure terminal switch(config)# Step 2 feature bash-shell Enable BASH shell feature. Example: switch(config)# feature bash-shell Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 50 Configuration and Software Server. Example: copy bootflash:poap.cfg.md5 scp://10.1.100.3/ Enter vrf (If no input, current vrf 'default' is considered): management Enter username: root [email protected]'s password: poap.cfg.md5 100% 0.1KB/s 00:00 Copy complete. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 51: Verifying The Device Configuration

    POAP Personality The POAP personality feature, which is introduced in Cisco NX-OS Release 7.0(3)I4(1), enables user data, Cisco NX-OS and third-party patches, and configuration files to be backed up and restored. In previous releases, POAP can restore only the configuration.
  • Page 52: Backing Up The Poap Personality

    Note If you are using the Cisco scheduler feature for backups, you can configure it to also back up the POAP personality, as shown in the following example. For more information on the scheduler, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide.
  • Page 53 POAP personality is restored. You can enter this command multiple times (in order of Example: priority) to specify multiple locations. switch(config-personality)# binary-location scp://remote-dir1/nxos_patches/ Example: switch(config-personality)# binary-location tftp://1.2.3.4/remote-dir2/packages/ Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 54: Restoring The Poap Personality

    During the POAP script execution phase, the personality module in the script restores the POAP personality, provided that the currently booted switch image is Cisco NX-OS Release 7.0(3)I4(1) or later. If necessary, upgrade the switch to the correct software image.
  • Page 55 # The VRF to use for downloading and restoration vrf = "default" if os.environ.has_key('POAP_VRF'): vrf = os.environ['POAP_VRF'] # Initialize housekeeping stuff (logs, temp dirs, etc.) p = POAPPersonality(download_path, personality_tarball, protocol, username, password, server, vrf) p.get_personality() p.apply_personality() sys.exit(0) Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 56 Using PowerOn Auto Provisioning POAP Personality Sample Script Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 57: Understanding The Command-Line Interface

    Setting CLI Display Colors, page 71 • Sending Commands to Modules, page 72 • Sending Command Output in Email, page 73 • BIOS Loader Prompt, page 74 • Examples Using the CLI, page 74 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 58: About The Cli Prompt

    This section describes command modes in the Cisco NX-OS CLI. EXEC Command Mode When you first log in, the Cisco NX-OS software places you in EXEC mode. The commands available in EXEC mode include the show commands that display the device status and configuration information, the clear commands, and other commands that perform actions that you do not save in the device configuration.
  • Page 59: Global Configuration Command Mode

    You must enable many features on a per-interface basis. Interface configuration commands modify the operation of the interfaces on the device, such as Ethernet interfaces or management interfaces (mgmt 0). For more information about configuring interfaces, see the Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide.
  • Page 60: Subinterface Configuration Command Mode

    Saving and Restoring a Command Mode The Cisco NX-OS software allows you to save the current command mode, configure a feature, and then restore the previous command mode. The push command saves the command mode, and the pop command restores the command mode.
  • Page 61: Exiting A Configuration Command Mode

    In most cases, you should exit a configuration mode using the exit or end command. Command Mode Summary This table summarizes information about the main command modes. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 62: Special Characters

    Special Characters This table lists the characters that have special meaning in Cisco NX-OS text strings and should be used only in regular expressions or other special contexts. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 63: Keystroke Shortcuts

    Moves the cursor to the end of the line. Ctrl-F Moves the cursor one character to the right. Ctrl-G Exits to the previous command mode without removing the command string. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 64 Up arrow key Displays the previous command in the command history. Down arrow key Displays the next command in the command history. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 65 You cannot access remote machines using Note the cd command. If you are on slot 27 and enter the cd bootflash://module-28 command, the following message appears: "Changing directory to a non-local server is not allowed." Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 66: Abbreviating Commands

    For example, entering co lists all commands available in EXEC mode beginning with co: switch# co configure copy switch# co Note that the characters you entered appear at the prompt again to allow you to complete the command entry. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 67: Identifying Your Location In The Command Hierarchy

    RADIUS servers are configured: 10.10.1.1: available for authentication on port:1812 available for accounting on port:1813 10.10.2.2: Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 68: Configuring Cli Variables

    • Cannot have nested references through another variable • Can persist across switch reloads or exist only for the current session Cisco NX-OS supports one predefined variable: TIMESTAMP. This variable refers to the current time when the command executes in the format YYYY-MM-DD-HH.MM.SS.
  • Page 69: Configuring Cli Session-Only Variables

    The Example: maximum length is 31 characters. switch(config)# cli var name testinterface ethernet 2/1 Beginning with Cisco NX-OS Release Note 7.0(3)I4(1), variables can include hyphens (-) and underscores (_). Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 70: Command Aliases

    • Command alias configuration takes effect for other user sessions immediately. • The Cisco NX-OS software provides one default alias, alias, which is the equivalent to the show cli alias command that displays all user-defined aliases. • You cannot delete or change the default command alias alias.
  • Page 71: Defining Command Aliases

    Configuring Command Aliases for a User Session You can create a command alias for the current user session that is not available to any other user on the Cisco NX-OS device. You can also save the command alias for future use by the current user account.
  • Page 72: Command Scripts

    You cannot create the script files at the CLI prompt. You can create the script file on a remote device and Note copy it to the bootflash: or volatile: directory on the Cisco NX-OS device. Procedure Command or Action...
  • Page 73: Delaying Command Action

    You can delay a command action for a period of time, which is particularly useful within a command script. Procedure Command or Action Purpose Step 1 sleep seconds Causes a delay for a number of seconds. The range is from 0 to 2147483647. Example: switch# sleep 30 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 74: Context-Sensitive Help

    Context-Sensitive Help Context-Sensitive Help The Cisco NX-OS software provides context-sensitive help in the CLI. You can use a question mark (?) at any point in a command to list the valid input options. CLI uses the caret (^) symbol to isolate input errors. The ^ symbol appears at the point in the command string where you have entered an incorrect command, keyword, or argument.
  • Page 75 13:32:00 18 April ? <2000-2030> Enter the year (no abbreviation) switch# clock set 13:32:00 18 April Enters the correct syntax for the clock set command. switch# clock set 13:32:00 18 April 2013 switch# Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 76: Understanding Regular Expressions

    Understanding the Command-Line Interface Understanding Regular Expressions Understanding Regular Expressions The Cisco NX-OS software supports regular expressions for searching and filtering in CLI output, such as the show commands. Regular expressions are case sensitive and allow for complex matching requirements. Special Characters You can also use other keyboard characters (such as ! or ~) as single-character patterns, but certain keyboard characters have special meanings when used in regular expressions.
  • Page 77: Anchoring

    Searching and Filtering show Command Output Often, the output from showcommands can be lengthy and cumbersome. The Cisco NX-OS software provides the means to search and filter the output so that you can easily locate information. The searching and filtering options follow a pipe character (|) at the end of the show command.
  • Page 78: Filtering And Searching Keywords

    Include lines that match Filtering and Searching Keywords The Cisco NX-OS CLI provides a set of keywords that you can use with the show commands to search and filter the command output. This table lists the keywords for filtering and searching the CLI output.
  • Page 79: Diff Utility

    Removes diff temporary files from all sessions (past and present sessions) of the current user. all-users Removes diff temporary files from all sessions (past and present sessions) of all users. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 80: Grep And Egrep Utilities

    Understanding the Command-Line Interface grep and egrep Utilities The Cisco NX-OS software creates temporary files for the most current output for a show command for all current and previous users sessions. You can remove these temporary files using the diff-clean command.
  • Page 81: Less Utility

    AWK is a simple but powerful utility to summarize text output. You can use this utility after a pipe (|) to further process the text output of a command. Cisco NX-OS supports a mini AWK, which takes an inline program as an argument.
  • Page 82: Searching And Filtering From The --More-- Prompt

    The initial default is 1 line. If you use the optional lines argument, that value becomes the new default number of lines to display for this command. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 83: Using The Command History

    Repeats the previous command. Using the Command History The Cisco NX-OS software CLI allows you to access the command history for the current user session. You can recall and reissue commands, with or without modification. You can also clear the command history.
  • Page 84: Controlling Cli History Recall

    You can control the commands that you recall from the CLI history using the Ctrl-P and Ctrl-N keystroke shortcuts. Cisco NX-OS software recalls all commands from the current command mode and higher command modes. For example, if you are working in global configuration mode, the command recall keystroke shortcuts recall both EXEC mode and global configuration mode commands.
  • Page 85: Enabling Or Disabling The Cli Confirmation Prompts

    Enabling or Disabling the CLI Confirmation Prompts For many features, the Cisco NX-OS software displays prompts on the CLI that ask for confirmation before continuing. You can enable or disable these prompts. The default is enabled.
  • Page 86: Sending Commands To Modules

    Software BIOS: version 6.20 system: version 6.1(2)I1(1) [build 6.1(2)] *************** *** 12,16 **** Hardware bootflash: 0 blocks (block size 512b) uptime is 0 days 1 hours 45 minute(s) 34 second(s) Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 87: Sending Command Output In Email

    Example: switch(config-email)# vrf management Step 5 from email-address Specifies the sender's email address. Example: switch(config-email)# from [email protected] Step 6 reply-to email-address Specifies the recipient's email address. Example: switch(config-email)# reply-to [email protected] Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 88: Bios Loader Prompt

    If a valid nx-os image is not found, the following BIOS loader prompt displays: loader> For information on how to load the Cisco NX-OS software from the prompt, see the Cisco Nexus loader>...
  • Page 89: Using Cli Session Variables

    | include up | include ethernet This example shows how to use a command alias: switch# configure terminal switch(config)# ethint 2/3 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 90: Running A Command Script

    This example shows how to send the output of the show interface brief command to an email address using the pipe operator (|): switch# email switch(config-email)# smtp-host 198.51.100.1 smtp-port 25 switch(config-email)# vrf management switch(config-email)# from [email protected] Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 91: Additional References For The Cli

    Additional References for the CLI This section includes additional information related to the CLI. Related Documents for the CLI Related Topic Document Title Cisco NX-OS Licensing Cisco NX-OS Licensing Guide Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 92 Understanding the Command-Line Interface Related Documents for the CLI Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 93: Configuring Terminal Settings And Sessions

    About Terminal Settings and Sessions This section includes information about terminal settings and sessions. Terminal Session Settings The Cisco NX-OS software features allow you to manage the following characteristics of terminals: Terminal type Name used by Telnet when communicating with remote hosts...
  • Page 94: Console Port

    For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 95: Default Settings For File System Parameters

    Step 3 databits bits Configures the number of data bits per byte. The range is from 5 to 8. The default is 8. Example: switch(config-console)# databits 7 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 96: Configuring Virtual Terminals

    Configuring Virtual Terminals This section describes how to configure virtual terminals on Cisco NX-OS devices. Configuring the Inactive Session Timeout You can configure a timeout for inactive virtual terminal sessions on the device. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 97: Configuring The Session Limit

    You can limit the number of virtual terminal sessions on your device. Procedure Command or Action Purpose Step 1 Enters global configuration mode. configure terminal Example: switch# configure terminal switch(config)# Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 98: Clearing Terminal Sessions

    Displays the user sessions on the device. Example: switch# show users Step 2 clear line name Clears a terminal session on a specific line. The line name is case sensitive. Example: switch# clear line pts/0 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 99: Displaying Terminal And Session Information

    The all keyword displays the default values for the user accounts. Additional References for Terminal Settings and Sessions This section includes additional references for terminal settings and sessions on Cisco NX-OS devices. Related Documents for Terminal Settings and Sessions Related Topic...
  • Page 100 Configuring Terminal Settings and Sessions Related Documents for Terminal Settings and Sessions Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 101: Basic Device Management

    You can change the device hostname displayed in the command prompt from the default (switch) to another character string. When you give the device a unique hostname, you can easily identify the device from the command-line interface (CLI) prompt. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 102: Message-Of-The-Day Banner

    Clock Manager The Cisco NX-OS device might contain clocks of different types that might need to be synchronized. These clocks are a part of various components (such as the supervisor, line card processors, or line cards), and each might be using a different protocol.
  • Page 103: Default Settings For Basic Device Parameters

    Step 3 exit Exits global configuration mode. Example: Engineering2(config)# exit Engineering2# Step 4 (Optional) copy running-config startup-config Copies the running configuration to the startup configuration. Example: Engineering2# copy running-config startup-config Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 104: Configuring The Motd Banner

    Copies the running configuration to the startup configuration. Example: switch# copy running-config startup-config Configuring the Time Zone You can configure the time zone to offset the device clock time from UTC. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 105: Configuring Summer Time (Daylight Saving Time)

    Purpose Step 1 configure terminal Enters global configuration mode. Example: switch# configure terminal switch(config)# Step 2 clock summer-time zone-name Configures summer time or daylight saving time. start-week start-day start-month start-time Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 106: Manually Setting The Device Clock

    You can set the clock manually if your device cannot access a remote time source. Before You Begin Configure the time zone. Procedure Command or Action Purpose Step 1 clock set time day month year Configures the device clock. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 107: Setting The Clock Manager

    (Optional) Displays the current clock value. Example: switch(config)# show clock Setting the Clock Manager You can configure the clock manager to synchronize all the clocks of the components in the Cisco Nexus device. Procedure Command or Action Purpose Step 1 clock protocol protocol Configures the clock manager.
  • Page 108: Managing Users

    10 minutes! Verifying the Device Configuration To verify the configuration after bootstrapping the device using POAP, use one of the following commands: Command Purpose show running-config Displays the running configuration. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 109: Additional References For Basic Device Management

    Additional References for Basic Device Management You can find additional information related to basic device management. Related Documents for Basic Device Management Related Topic Document Title Licensing Cisco NX-OS Licensing Guide Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 110 Basic Device Management Related Documents for Basic Device Management Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 111: Chapter 8 Using The Device File Systems, Directories, And Files

    Additional References for File Systems, page 113 About the Device File Systems, Directories, and Files This section describes file systems, directories, and files on the Cisco NX-OS device. File Systems The syntax for specifying a local file system is filesystem:[//modules/].
  • Page 112: Directories

    You can download files, such as the nx-os image file, from remote servers using FTP, Secure Copy (SCP), Secure Shell FTP (SFTP), and TFTP. You can also copy files from an external server to the device, because the device can act as an SCP server. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 113: Licensing Requirements For File Systems, Directories, And Files

    [no] ip {ftp | http | tftp} source-interface {ethernet Configures the source interface for all slot/port | loopback number} FTP, HTTP, or TFTP packets. Example: switch(config)# ip tftp source-interface ethernet 2/1 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 114: Working With Directories

    Example: switch(config)# copy running-config startup-config Working with Directories This section describes how to work with directories on the Cisco NX-OS device. Identifying the Current Directory You can display the directory name of your current directory. Procedure Command or Action...
  • Page 115: Creating A Directory

    The file system and directory names are case sensitive. Example: switch# dir bootflash:test Deleting a Directory You can remove directories from the file systems on your device. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 116: Accessing Directories On The Standby Supervisor Module

    Working with Files This section describes how to work with files on the Cisco NX-OS device. Moving Files You can move a file from one directory to another directory.
  • Page 117: Copying Files

    Step 3 copy [filesystem:[//module/][directory/] | Copies a file. The file system, module, and directory names are case sensitive. The source-filename argument directory/]source-filename | is alphanumeric, case sensitive, and has a maximum Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 118: Deleting Files

    Displaying File Contents You can display the contents of a file. Procedure Command or Action Purpose Step 1 show file [filesystem:[//module/]][directory/]filename Displays the file contents. Example: switch# show file bootflash:test-results Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 119: Displaying File Checksums

    .gz suffix. After the file is uncompressed, it does not have the .gz suffix. Example: switch# gunzip show_tech.gz Displaying the Last Lines in a File You can display the last lines of a file. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 120: Redirecting Show Command Output To A File

    You can find the files in the current working directory and its subdirectories that have names that begin with a specific character string. Procedure Command or Action Purpose Step 1 (Optional) Displays the name of your current default directory. Example: switch# pwd Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 121: Working With Archive Files

    Working with Archive Files The Cisco NX-OS software supports archive files. You can create an archive file, append files to an existing archive file, extract files from an archive file, and list the files in an archive file.
  • Page 122: Appending Files To An Archive File

    This example shows how to append a file to an existing archive file: switch# tar append bootflash:config-archive.tar.gz bootflash:new-config Extracting Files from an Archive File You can extract files to an existing archive file on your device. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 123: Displaying The Filenames In An Archive File

    Examples of Using the File System This section includes examples of how to use the file system on the Cisco NX-OS device. Accessing Directories on Standby Supervisor Modules This example shows how to list the files on the standby supervisor module:...
  • Page 124: Moving Files

    FTP, TFTP, SFTP, or SCP server. Deleting a Directory You can remove directories from the file systems on your device. Before You Begin Ensure that the directory is empty before you try to delete it. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 125: Displaying File Contents

    This example shows how to display the checksum of a file: switch# show file bootflash:trunks2.cfg cksum 583547619 This example shows how to display the MD5 checksum of a file: switch# show file bootflash:trunks2.cfg md5sum 3b94707198aabefcf46459de10c9281c Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 126: Compressing And Uncompressing Files

    1527808 bytes used 19443712 bytes free 20971520 bytes total Finding Files This example shows how to find a file in the current default directory: switch# find smm_shm.cfg /usr/bin/find: ./lost+found: Permission denied ./smm_shm.cfg Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 127: Additional References For File Systems

    ./newer-fs/isan/etc/smm_shm.cfg Additional References for File Systems This section includes additional information related to the file systems. Related Documents for File Systems Related Topic Document Title Licensing Cisco NX-OS Licensing Guide Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 128 Using the Device File Systems, Directories, and Files Related Documents for File Systems Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 129: Working With Configuration Files

    Additional References for Configuration Files, page 131 About Configuration Files Configuration files contain the Cisco NX-OS software commands used to configure the features on a Cisco NX-OS device. Commands are parsed (translated and executed) by the Cisco NX-OS software when the system is booted (from the startup-config file) or when you enter commands at the CLI in a configuration mode.
  • Page 130: Licensing Requirements For Configuration Files

    To change the running configuration, use the configure terminal command to enter global configuration mode. As you use the Cisco NX-OS configuration modes, commands generally are executed immediately and are saved to the running configuration file either immediately after you enter them or when you exit a configuration mode.
  • Page 131: Copying A Configuration File To A Remote Server

    Downloading the Running Configuration From a Remote Server You can configure your Cisco NX-OS device by using configuration files that you created on another Cisco NX-OS device and uploaded to a remote server. You then download the file from the remote server to your device using TFTP, FTP, Secure Copy (SCP), or Secure Shell FTP (SFTP) to the running configuration.
  • Page 132: Downloading The Startup Configuration From A Remote Server

    Downloading the Startup Configuration From a Remote Server You can configure your Cisco NX-OS device by using configuration files that you created on another Cisco NX-OS device and uploaded to a remote server. You then download the file from the remote server to your device using TFTP, FTP, Secure Copy (SCP), or Secure Shell FTP (SFTP) to the startup configuration.
  • Page 133 Saves the running configuration file to the startup configuration file. Example: switch# copy running-config startup-config Step 5 show startup-config (Optional) Displays the running configuration. Example: switch# show startup-config Related Topics Copying Files, on page 110 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 134: Copying Configuration Files To An External Flash Memory Device

    Copying Files, on page 110 Copying the Running Configuration from an External Flash Memory Device You can configure your device by copying configuration files created on another Cisco NX-OS device and saved to an external flash memory device. Before You Begin Insert the external flash memory device into the active supervisor module.
  • Page 135: Copying The Startup Configuration From An External Flash Memory Device

    You can recover the startup configuration on your device by downloading a new startup configuration file saved on an external flash memory device. Before You Begin Insert the external flash memory device into the active supervisor module. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 136: Copying Configuration Files To An Internal File System

    [filesystem:][directory/] | Copies the startup-configuration file to internal [directory/]filename memory. The filesystem, directory, and filename Example: arguments are case sensitive. switch# copy startup-config bootflash:sw1-start-config.bak Related Topics Copying Files, on page 103 Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 137: Rolling Back To A Previous Configuration

    When you remove an I/O module from the chassis, you can also remove the configuration for that module from the running configuration. You can only remove the configuration for an empty slot in the chassis. Note Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 138: Erasing A Configuration

    ◦ Subnet mask ◦ Route address in the management VRF To remove the boot variable definitions and the IPv4 configuration on the mgmt0 interface, use the write erase boot command. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 139: Clearing Inactive Configurations

    • acl—Clears inactive ACL configurations. for vdc default you can see the log file @ show • acl qos—Clears inactive ACL configurations inactive-if-config log and inactive QoS configurations. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 140: Configuration Archive And Configuration Log

    Configuring the Characteristics of the Configuration Archive Before using the archive config command, the configuration archive must be configured. Complete the following steps to configure the characteristics of the configuration archive: Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 141 Example: • The minutes argument specifies how often, in minutes, to automatically save an archive file of the switch(config-archive)# time-period 10 current running configuration in the configuration archive. Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 142: Information About Configuration Log

    The configuration log tracks the changes that are initiated only through the CLI. For each configuration command that is executed, the following information is logged: • A configuration change sequence number • The line from which the command was executed Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 143: Displaying Configuration Log Entries

    Displays the configuration log entries by the index numbers. If you specify a number for the optional last-index, all the log entries with the index numbers in the range from the value entered for the start-number through the end-number for the specified user are displayed. Example: Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 144: Verifying The Device Configuration

    Warning: this command is going to overwrite your current startup-config. Do you wish to continue? {y/n} [y] y This command does not apply to Cisco Nexus 9300-EX Series switches. Note This example shows how to copy a running configuration to the bootflash: file system:...
  • Page 145: Rolling Back To A Previous Configuration

    Additional References for Configuration Files This section includes additional information related to managing configuration files. Related Documents for Configuration Files Related Topic Document Title Licensing Cisco NX-OS Licensing Guide Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 146 Working with Configuration Files Related Documents for Configuration Files Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x...
  • Page 147 118, 119 copy sftp 118, 119 grep copy startup-config gunzip copy startup-config {usb1 | usb2} gzip copy startup-config ftp copy startup-config scp Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x IN-1...
  • Page 148 119, 123, 131 terminal dont-ask reply-to terminal edit-mode vi rmdir 102, 111 terminal output xml run-script terminal redirection-mode ascii terminal redirection-mode zipped track send session-limit volatile Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x IN-2...
  • Page 149 Index vrf management where detail write erase 119, 123, 125, 131 write erase boot write erase debug Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x IN-3...
  • Page 150 Index Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide, Release 7.x IN-4...

Table of Contents