Working with Configuration Files

Similar documents
Using the Cisco NX-OS Setup Utility

Upgrading or Downgrading the Cisco Nexus 3500 Series NX-OS Software

Using the Cisco NX-OS Setup Utility

Software Images. About Software Images. Dependent Factors. Send documentation comments to CHAPTER

Backing Up and Restoring the Configuration

Performing Software Maintenance Upgrades (SMUs)

Nexus 9500 Spine Supervisor Failure Recovery

VSB Backup and Recovery

Performing Software Maintenance Upgrades

Cisco Nexus 3500 Series NX-OS Software Upgrade and Downgrade Guide, Release 7.x

Configuring DNS. Finding Feature Information. Information About DNS Clients. DNS Client Overview

Using PowerOn Auto Provisioning

Configuring Session Manager

B Commands. bandwidth (interface) Send document comments to

Configuring SSH and Telnet

Performing Software Maintenance Upgrades

Configuring Administrative Operations

Cisco Nexus 1000V Software Upgrade Guide, Release 4.2(1)SV1(4a)

Exporting and Importing a Virtual Service Blade

Lab 6.2.7a Managing Switch Operating System Files

User and System Administration

Reimage Procedures. Firepower 2100 Series Software Reimage and Disaster Recovery

Configuring Password Encryption

Upgrading the Cisco VSG and the Cisco Prime NSC

Initial Configuration

Troubleshoot Firmware

Configuring Host Router and Cisco Analog Video Gateway Module Interfaces

Configuring System Message Logging

Server Utilities. Enabling Or Disabling Smart Access USB. This chapter includes the following sections:

No Service Password-Recovery

Lab Troubleshooting RIP

Configuration Import/Export

Cisco Nexus 9000 Series FPGA/EPLD Upgrade Release Notes, Release 7.0(3)F1(1)

Using the Device File Systems, Directories, and Files

Lab Using the Boot System Command. Objective. Background/Preparation

Configuring Static Routing

Before Contacting Technical Support

Upgrading the Cisco IOS XE Software

Configuring sflow. Information About sflow. sflow Agent. This chapter contains the following sections:

Configuring the Scheduler

File Transfers. Contents

Upgrading the Software

Backup a copy of a router IOS from flash to a TFTP server. Reload the backup IOS software image from a TFTP server into flash on a router.

Configuring Administrative Operations

Lab 7 Configuring Basic Router Settings with IOS CLI

Lab Selecting the Root Bridge

CCNA 1 Chapter 2 v5.0 Exam Answers %

Configuring Rate Limits

Virtual Services Container

Using FTP to Manage System Images

Configuring ECMP for Host Routes

Cisco 7500 Series Line Card Configuration Commands

Managing Modules. About Modules. Send documentation comments to CHAPTER

Backing Up and Restoring Data

Working with the Cisco IOS File System, Configuration Files, and Software Images

Overview of the Cisco NCS Command-Line Interface

Configuring Online Diagnostics

Managing Controller Software and Configurations

Configurations for the Layer 3 Switch Router

Lab Spanning-Tree Recalculation

Using the Offline Diagnostic Monitor Menu

Configuration Guide. Upgrading AOS Firmware L1-29.1D July 2011

Configuring Online Diagnostics

Configuring Policy-Based Routing

This table describes the supervisor module options for switches in the Cisco MDS 9000 Family.

Cisco 4000 Series Virtual Configuration Register

Converting from Cisco NX-OS to ACI Boot Mode

Cisco Nexus 1000V Software Upgrade Guide, Release 4.0(4)SV1(3d)

CCNA 1 Chapter 2 v5.0 Exam Answers 2013

Configuring TACACS+ About TACACS+

Configuring Terminal Settings and Sessions

Configuring IPv4. Finding Feature Information. This chapter contains the following sections:

Performing Maintenance Operations

Cisco Nexus 5000 Series NX-OS Fundamentals Configuration Guide, Release 5.2(1)N1(1)

IOS and Configuration Basics

Configuring Layer 3 Interfaces

Configuring User Accounts and RBAC

Dr. Tom Hicks. Computer Science Department Trinity University

Lab Firmware Upgrade of a Catalyst 2900 Series Switch

Lab Configuring OSPF Timers

Managing the ACE Software

Configuring EEE. Finding Feature Information. This chapter describes how to configure Energy Efficient Ethernet (EEE) on Cisco NX-OS devices.

Configuring TACACS+ Information About TACACS+ Send document comments to CHAPTER

MiPDF.COM. 3. Which procedure is used to access a Cisco 2960 switch when performing an initial configuration in a secure environment?

Configuring the SMA 500v Virtual Appliance

Configure Initial Router Settings on Cisco 4000 Series ISRs

Configuring IP TCP MSS

Maintaining the MGX RPM-PR

Cisco IOS File System Commands

Cisco Nexus 7000 Series NX-OS Software Upgrade and Downgrade Guide, Release 7.x

File Menu Commands. Save Running Config to PC. Deliver Configuration to Router CHAPTER40. Save Running Config to Router s Startup Config

Configure Dynamic Host Configuration Protocol (DHCP) Image Upgrade Settings on a Switch through the Command Line Interface (CLI)

Configuring and Managing Zones

Powering On the Cisco VG224 Voice Gateway

Lab 3: Basic Device Configuration

GSS Administration and Troubleshooting

Configuring LDAP. Finding Feature Information

Basic Device Management

Configuring User Accounts and RBAC

Firmware Management. Overview of Firmware. This chapter includes the following sections:

Transcription:

This chapter contains the following sections: Finding Feature Information, page 1 Information About Configuration Files, page 1 Licensing Requirements for Configuration Files, page 2 Managing Configuration Files, page 2 Verifying the Device Configuration, page 11 Examples of, page 12 Additional References for Configuration Files, page 12 Finding Feature Information Your software release might not support all the features documented in this module. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the New and Changed Information chapter or the Feature History table below. Information 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. To change the startup configuration file, you can either save the running-configuration file to the startup configuration using the copy running-config startup-config command or copy a configuration file from a file server to the startup configuration. 1

Types of Configuration Files Types of Configuration Files The Cisco NX-OS software has two types of configuration files, running configuration and startup configuration. The device uses the startup configuration (startup-config) during device startup to configure the software features. The running configuration (running-config) contains the current changes that you make to the startup-configuration file. The two configuration files can be different. You might want to change the device configuration for a short time period rather than permanently. In this case, you would change the running configuration by using commands in global configuration mode but not save the changes to the startup configuration. 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. To change the startup-configuration file, you can either save the running configuration file to the startup configuration or download a configuration file from a file server to the startup configuration. Related Topics Saving the Running Configuration to the Startup Configuration, on page 2 Downloading the Startup Configuration From a Remote Server, on page 5 Licensing Requirements for Configuration Files The following table shows the licensing requirements for this feature: Product Cisco NX-OS License Requirement Configuration files require no license. Any feature not included in a license package is bundled with the Cisco NX-OS system images and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing GuideCisco NX-OS Licensing Guide. Managing Configuration Files This section describes how to manage configuration files. Saving the Running Configuration to the Startup Configuration You can save the running configuration to the startup configuration to save your changes for the next time you that reload the device. 2

Copying a Configuration File to a Remote Server show running-config switch# show running-config copy running-config startup-config startup-config Displays the running configuration. Copies the running configuration to the startup configuration. Copying a Configuration File to a Remote Server You can copy a configuration file stored in the internal memory to a remote server as a backup or to use for configuring other Cisco NX-OS devices. copy running-config scheme://server/[url /]filename tftp://10.10.1.1/sw1-run-config.bak Copies the running-configuration file to a remote server. For the scheme argument, you can enter tftp:, ftp:, scp:, or sftp:. The server argument is the address or name of the remote server, and the url argument is the path to the source file on the remote server. The server, url, and filename arguments are case sensitive. copy startup-config scheme://server/[url /]filename switch# copy startup-config tftp://10.10.1.1/sw1-start-config.bak Copies the startup-configuration file to a remote server. For the scheme argument, you can enter tftp:, ftp:, scp:, or sftp:. The server argument is the address or name of the remote server, and the url argument is the path to the source file on the remote server. The server, url, and filename arguments are case sensitive. This example shows how to copy the bootflash file using FTP: switch# copy ftp: bootflash: Enter source filename: n5000-uk9-kickstart.5.0.2.n2.1.bin Warning: There is already a file existing with this name. Do you want to overwrite (y/n)?[n] y Enter vrf (If no input, current vrf 'default' is considered): management Enter hostname for the ftp server: 172.1.1.10 Enter username: xxx Password: 3

Downloading the Running Configuration From a Remote Server ***** Transfer of file Completed Successfully ***** Note: Boot variable kickstart is set to bootflash:/n5000-uk9-kickstart.5.0.2.n2.1.bin 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. Before You Begin Ensure that the configuration file that you want to download is in the correct directory on the remote server. Ensure that the permissions on the file are set correctly. Permissions on the file should be set to world-read. Ensure that your Cisco NX-OS device has a route to the remote server. The Cisco NX-OS device and the remote server must be in the same subnetwork if you do not have a router or a default gateway to route traffic between subnets. Check connectivity to the remote server using the ping or ping6 command. Step 3 Step 4 copy scheme://server/[url/]filename running-config switch# copy tftp://10.10.1.1/my-config running-config show running-config switch# show running-config copy running-config startup-config startup-config show startup-config switch# show startup-config Downloads the running-configuration file from a remote server. For the scheme argument, you can enter tftp:, ftp:, scp:, or sftp:. The server argument is the address or name of the remote server, and the url argument is the path to the source file on the remote server. The server, url, and filename arguments are case sensitive. Displays the running configuration. Copies the running configuration to the startup configuration. Displays the startup configuration. 4

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. Caution This procedure disrupts all traffic on the Cisco NX-OS device. Before You Begin Log in to a session on the console port. Ensure that the configuration file that you want to download is in the correct directory on the remote server. Ensure that the permissions on the file are set correctly. Permissions on the file should be set to world-read. Ensure that your Cisco NX-OS device has a route to the remote server. The Cisco NX-OS device and the remote server must be in the same subnetwork if you do not have a router or a default gateway to route traffic between subnets. Check connectivity to the remote server using the ping or ping6 command. write erase Erases the startup configuration file. Step 3 switch# write erase reload switch# reload This command will reboot the system. (y/n)? [n] y... Enter the password for "admin": <password> Confirm the password for "admin": <password>... Would you like to enter the basic configuration dialog (yes/no): n switch# copy scheme://server/[url /]filename running-config switch# copy tftp://10.10.1.1/my-config running-config Reloads the Cisco NX-OS device. Note Do not use the setup utility to configure the device. Downloads the running configuration file from a remote server. For the scheme argument, you can enter tftp:, ftp:, scp:, or sftp:. The server argument is the address or name of the remote server, and the url argument is the path to the source file on the remote server. 5

Copying Configuration Files to an External Flash Memory Device The server, url, and filename arguments are case sensitive. Step 4 Step 5 copy running-config startup-config startup-config show startup-config switch# show startup-config Saves the running configuration file to the startup configuration file. Displays the running configuration. Copying Configuration Files to an External Flash Memory Device You can copy configuration files to an external flash memory device as a backup for later use. Before You Begin Insert the external Flash memory device into the active supervisor module. Step 3 dir {slot0: usb1: usb2:}[directory/] switch# dir slot0: copy running-config {slot0: usb1: usb2:}[directory/]filename slot0:dsn-running-config.cfg copy startup-config {slot0: usb1: usb2:}[directory/]filename switch# copy startup-config slot0:dsn-startup-config.cfg Displays the files on the external flash memory device. Copies the running configuration to an external flash memory device. The filename argument is case sensitive. Copies the startup configuration to an external flash memory device. The filename argument is case sensitive. 6

Copying the Running Configuration from an External Flash Memory Device Copying the Running Configuration from an External Flash Memory Device You can configure your Cisco NX-OS 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. Step 3 Step 4 Step 5 dir {slot0: usb1: usb2:}[directory/] switch# dir slot0: copy {slot0: usb1: usb2:}[directory/]filename running-config switch# copy slot0:dsn-config.cfg running-config show running-config switch# show running-config copy running-config startup-config startup-config show startup-config switch# show startup-config Displays the files on the external flash memory device. Copies the running configuration from an external flash memory device. The filename argument is case sensitive. Displays the running configuration. Copies the running configuration to the startup configuration. Displays the startup configuration. Copying Configuration Files to an Internal File System You can copy configuration files to the internal memory as a backup for later use. copy running-config [filesystem:][directory/] [directory/]filename Copies the running-configuration file to internal memory. 7

Rolling Back to a Previous Configuration bootflash:sw1-run-config.bak copy startup-config [filesystem:][directory/] [directory/]filename switch# copy startup-config bootflash:sw1-start-config.bak The filesystem, directory, and filename arguments are case sensitive. Copies the startup-configuration file to internal memory. The filesystem, directory, and filename arguments are case sensitive. Related Topics Copying Files Rolling Back to a Previous Configuration Problems, such as memory corruption, can occur that make it necessary for you to recover your configuration from a backed up version. Note Each time that you enter a copy running-config startup-config command, a binary file is created and the ASCII file is updated. A valid binary configuration file reduces the overall boot time significantly. A binary file cannot be uploaded, but its contents can be used to overwrite the existing startup configuration. The write erase command clears the binary file. write erase Clears the current configuration of the switch. switch# write erase reload switch# reload Restarts the device. You will be prompted to provide a kickstart and system image file for the device to boot and run. Note By default, the reload command reloads the device from a binary version of the startup configuration. Beginning with Cisco NX-OS 6.2(2), you can use the reload ascii command to copy an ASCII version of the configuration to the start up configuration when reloading the device. 8

Removing the Configuration for a Missing Module Step 3 Step 4 copy configuration_file running-configuration switch# copy bootflash:start-config.bak running-configuration copy running-config startup-config startup-config Copies a previously saved configuration file to the running configuration. Note The configuration_file filename argument is case sensitive. Copies the running configuration to the start-up configuration. Removing the Configuration for a Missing Module When you remove an I/O module from the chassis, you can also remove the configuration for that module from the running configuration. Note You can only remove the configuration for an empty slot in the chassis. Before You Begin Remove the I/O module from the chassis. Step 3 show hardware switch# show hardware purge module slot running-config switch# purge module 3 running-config copy running-config startup-config startup-config Displays the installed hardware for the device. Removes the configuration for a missing module from the running configuration. Copies the running configuration to the startup configuration. 9

Erasing a Configuration Erasing a Configuration You can erase the configuration on your device to return to the factory defaults. You can erase the following configuration files saved in the persistent memory on the device: Startup Boot Debug Note The write erase command erases the entire startup configuration, except for the following: Boot variable definitions The IPv4 configuration on the mgmt0 interface, including the following: Address Subnet mask To remove the boot variable definitions and the IPv4 configuration on the mgmt0 interface, use the write erase boot command. write erase [boot debug] switch# write erase Warning: This command will erase the startup-configuration. Do you wish to proceed anyway? Erases configurations in persistent memory. The default action erases the startup configuration. The boot option erases the boot variable definitions and the IPv4 configuration on the mgmt0 interface. The debug option erases the debugging configuration. (y/n) [n] y Note The running configuration file is not affected by this command. Clearing Inactive Configurations You can clear inactive Quality of Service (QoS) and/or access control list (ACL) configurations. 10

Verifying the Device Configuration show running-config type inactive-if-config # show running-config ipqos inactive-if-config Displays any inactive ACL or QoS configurations. The values for the type argument are aclmgr and ipqos. aclmgr Displays any inactive configurations for aclmgr. ipqos Displays any inactive configurations for qosmgr. clear inactive-config policy # clear inactive-config qos clear qos inactive config Inactive if config for QoS manager is saved at/bootflash/qos_inactive_if_config.cfg for vdc default & for other than default vdc: /bootflash/vdc_x/qos_inactive_if_config.cfg (where x is vdc number) you can see the log file @ show inactive-if-config log Clears inactive configurations. The values for the policy argument are qos and acl. The following describes the values: qos Clears inactive QoS configurations. acl Clears inactive ACL configurations. acl qos Clears inactive ACL configurations and inactive QoS configurations. Step 3 show inactive-if-config log # show inactive-if-config log Displays the commands that were used to clear the inactive configurations. Verifying the Device Configuration To verify the configuration after bootstrapping the device using POAP, use one of the following commands: Command show running-config show startup-config Displays the running configuration. Displays the startup configuration. For detailed information about the fields in the output from these commands, see the Cisco Nexus command reference for your device. 11

Examples of Examples of This section includes examples of working with configuration files. Copying Configuration Files This example shows how to copy a running configuration to the bootflash: file system: switch# copy bootflash:running-config bootflash:my-config Backing Up Configuration Files This example shows how to back up the startup configuration to the bootflash: file system (ASCII file): switch# copy startup-config bootflash:my-config This example shows how to back up the startup configuration to the TFTP server (ASCII file): switch# copy startup-config tftp://172.16.10.100/my-config This example shows how to back up the running configuration to the bootflash: file system (ASCII file): bootflash:my-config Rolling Back to a Previous Configuration To roll back your configuration to a snapshot copy of a previously saved configuration, you need to perform the following steps: 1 Clear the current running image with the write erase command. 2 Restart the device with the reload command. Note By default, the reload command reloads the device from a binary version of the startup configuration. Beginning with Cisco NX-OS 6.2(2), you can use the reload ascii command to copy an ASCII version of the configuration to the start up configuration when reloading the device. 3 Copy the previously saved configuration file to the running configuration with the copy configuration_file running-configuration command. 4 Copy the running configuration to the start-up configuration with the copy running-config startup-config command. Additional References for Configuration Files This section includes additional information related to managing configuration files. 12

Related Documents for Configuration Files Related Documents for Configuration Files Related Topic Licensing Command reference Document Title Cisco NX-OS Licensing Guide Cisco Nexus 5000 Series NX-OS Command Reference 13

Related Documents for Configuration Files 14