- Preface
- Using the Command-Line Interface
-
- IP Multicast Routing Technology Overview
- Configuring IGMP
- Configuring IGMP Proxy
- Constraining IP Multicast in Switched Ethernet
- Configuring PIM
- Configuring PIM MIB Extension for IP Multicast
- Configuring MSDP
- Configuring Wireless Multicast
- Configuring SSM
- Configuring Basic IP Multicast Routing
- Configuring the Service Discovery Gateway
- IP Multicast Optimization: Optimizing PIM Sparse Mode in a Large IP Multicast Deployment
- IP Multicast Optimization: Multicast Subsecond Convergence
- IP Multicast Optimization: IP Multicast Load Splitting across Equal-Cost Paths
- IP Multicast Optimization: SSM Channel Based Filtering for Multicast
- IP Multicast Optimization: PIM Dense Mode State Refresh
- IP Multicast Optimization: IGMP State Limit
-
- Configuring the Device for Access Point Discovery
- Configuring Data Encryption
- Configuring Retransmission Interval and Retry Count
- Configuring Adaptive Wireless Intrusion Prevention System
- Configuring Authentication for Access Points
- Converting Autonomous Access Points to Lightweight Mode
- Using Cisco Workgroup Bridges
- Configuring Probe Request Forwarding
- Optimizing RFID Tracking
- Configuring Country Codes
- Configuring Link Latency
- Configuring Power over Ethernet
-
- Preventing Unauthorized Access
- Controlling Switch Access with Passwords and Privilege Levels
- Configuring TACACS+
- Configuring RADIUS
- Configuring Kerberos
- Configuring Local Authentication and Authorization
- Configuring Secure Shell (SSH)
- X.509v3 Certificates for SSH Authentication
- Configuring Secure Socket Layer HTTP
- Configuring IPv4 ACLs
- Configuring IPv6 ACLs
- Configuring DHCP
- Configuring IP Source Guard
- Configuring Dynamic ARP Inspection
- Configuring IEEE 802.1x Port-Based Authentication
- Configuring Web-Based Authentication
- Configuring Port-Based Traffic Control
- Configuring IPv6 First Hop Security
- Configuring Cisco TrustSec
- Configuring Control Plane Policing
- Configuring Wireless Guest Access
- Managing Rogue Devices
- Classifying Rogue Access Points
- Configuring wIPS
- Configuring Intrusion Detection System
-
- Administering the Switch
- Performing Device Setup Configuration
- Configuring Right-To-Use Licenses
- Configuring Administrator Usernames and Passwords
- Configuring 802.11 parameters and Band Selection
- Configuring Aggressive Load Balancing
- Configuring Client Roaming
- Configuring Application Visibility and Control
- Configuring Voice and Video Parameters
- Configuring RFID Tag Tracking
- Configuring Location Settings
- Cisco Hyperlocation
- Monitoring Flow Control
- Configuring SDM Templates
- Configuring System Message Logs
- Configuring Online Diagnostics
- Managing Configuration Files
- Configuration Replace and Configuration Rollback
- Working with the Flash File System
- Upgrading the Switch Software
- Conditional Debug and Radioactive Tracing
- Troubleshooting the Software Configuration
- Prerequisites for Managing Configuration Files
- Restrictions for Managing Configuration Files
- Information About Managing Configuration Files
- Types of Configuration Files
- Configuration Mode and Selecting a Configuration Source
- Configuration File Changes Using the CLI
- Location of Configuration Files
- Copy Configuration Files from a Network Server to the Device
- Copy Configuration Files from a Switch to Another Switch
- Configuration Files Larger than NVRAM
- Configuring the Device to Download Configuration Files
- Displaying Configuration File Information (CLI)
- Modifying the Configuration File (CLI)
- Copying a Configuration File from the Device to a TFTP Server (CLI)
- Copying a Configuration File from the Device to an RCP Server (CLI)
- Copying a Configuration File from the Device to the FTP Server (CLI)
- Copying a Configuration File from a TFTP Server to the Device (CLI)
- Copying a Configuration File from the rcp Server to the Device (CLI)
- Copying a Configuration File from an FTP Server to the Device (CLI)
- Maintaining Configuration Files Larger than NVRAM
- Copying Configuration Files from Flash Memory to the Startup or Running Configuration (CLI)
- Copying Configuration Files Between Flash Memory File Systems (CLI)
- Copying a Configuration File from an FTP Server to Flash Memory Devices (CLI)
- Copying a Configuration File from an RCP Server to Flash Memory Devices (CLI)
- Copying a Configuration File from a TFTP Server to Flash Memory Devices (CLI)
- Re-executing the Configuration Commands in the Startup Configuration File (CLI)
- Clearing the Startup Configuration (CLI)
- Deleting a Specified Configuration File (CLI)
- Specifying the CONFIG_FILE Environment Variable on Class A Flash File Systems (CLI)
- Configuring the Device to Download Configuration Files
Managing Configuration Files
Prerequisites for Managing Configuration Files
Restrictions for Managing Configuration Files
Information About Managing Configuration Files
- Types of Configuration Files
- Configuration Mode and Selecting a Configuration Source
- Configuration File Changes Using the CLI
- Location of Configuration Files
- Copy Configuration Files from a Network Server to the Device
- Copy Configuration Files from a Switch to Another Switch
- Configuration Files Larger than NVRAM
- Configuring the Device to Download Configuration Files
Types of Configuration Files
Configuration files contain the Cisco IOS software commands used to customize the functionality of your Cisco device. Commands are parsed (translated and executed) by the Cisco IOS software when the system is booted (from the startup-config file) or when you enter commands at the CLI in a configuration mode.
Startup configuration files (startup-config) are used during system startup to configure the software. Running configuration files (running-config) contain the current configuration of the software. The two configuration files can be different. For example, you may want to change the configuration for a short time period rather than permanently. In this case, you would change the running configuration using the configure terminal EXEC command but not save the configuration using the copy running-config startup-config EXEC command.
To change the running configuration, use the configure terminal command, as described in the “Modifying the Configuration File at the CLI ” section. As you use the Cisco IOS 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 using the copy running-config startup-config EXEC command or copy a configuration file from a file server to the startup configuration (see the “Copying a Configuration File from a TFTP Server to the Router” section for more information).
Configuration Mode and Selecting a Configuration Source
To enter configuration mode on the device, enter the configure command at the privileged EXEC prompt. The Cisco IOS software responds with the following prompt asking you to specify the terminal, memory, or a file stored on a network server (network) as the source of configuration commands:
Configuring from terminal, memory, or network [terminal]?
Configuring from the terminal allows you to enter configuration commands at the command line, as described in the following section. See the “Re-executing the Configuration Commands in the Startup Configuration File” section for more information.
Configuring from the network allows you to load and execute configuration commands over the network. See the “Copying a Configuration File from a TFTP Server to the Switch” section for more information.
Configuration File Changes Using the CLI
The Cisco IOS software accepts one configuration command per line. You can enter as many configuration commands as you want. You can add comments to a configuration file describing the commands you have entered. Precede a comment with an exclamation point (!). Because comments are not stored in NVRAM or in the active copy of the configuration file, comments do not appear when you list the active configuration with the show running-config or more system:running-config EXEC command. Comments are not displayed when you list the startup configuration with the show startup-config or more nvram:startup-config EXEC mode command. Comments are stripped out of the configuration file when it is loaded onto the device. However, you can list the comments in configuration files stored on a File Transfer Protocol (FTP), Remote Copy Protocol (RCP), or Trivial File Transfer Protocol (TFTP) server. When you configure the software using the CLI, the software executes the commands as you enter them.
Location of Configuration Files
Configuration files are stored in the following locations:
The running configuration is stored in RAM.
On all platforms except the Class A Flash file system platforms, the startup configuration is stored in nonvolatile random-access memory (NVRAM).
On Class A Flash file system platforms, the startup configuration is stored in the location specified by the CONFIG_FILE environment variable (see the “Specifying the CONFIG_FILE Environment Variable on Class A Flash File Systems” section). The CONFIG_FILE variable defaults to NVRAM and can be a file in the following file systems:
Copy Configuration Files from a Network Server to the Device
You can copy configuration files from a TFTP, rcp, or FTP server to the running configuration or startup configuration of the device. You may want to perform this function for one of the following reasons:
To restore a backed-up configuration file.
To use the configuration file for another device. For example, you may add another device to your network and want it to have a similar configuration to the original device. By copying the file to the new device, you can change the relevant parts rather than recreating the whole file.
To load the same configuration commands on to all of the devicees in your network so that all of the devicees have similar configurations.
The copy{ftp: | rcp: | tftp:system:running-config} EXEC command loads the configuration files into the device as if you were typing the commands on the command line. The device does not erase the existing running configuration before adding the commands. If a command in the copied configuration file replaces a command in the existing configuration file, the existing command is erased. For example, if the copied configuration file contains a different IP address in a particular command than the existing configuration, the IP address in the copied configuration is used. However, some commands in the existing configuration may not be replaced or negated. In this case, the resulting configuration file is a mixture of the existing configuration file and the copied configuration file, with the copied configuration file having precedence.
To restore a configuration file to an exact copy of a file stored on a server, you need to copy the configuration file directly to the startup configuration (using the copy ftp:| rcp:| tftp:} nvram:startup-config command) and reload the device.
To copy configuration files from a server to a device, perform the tasks described in the following sections.
The protocol that you use depends on which type of server you are using. The FTP and rcp transport mechanisms provide faster performance and more reliable delivery of data than TFTP. These improvements are possible because the FTP and rcp transport mechanisms are built on and use the TCP/IP stack, which is connection-oriented.
- Copying a Configuration File from the Device to a TFTP Server
- Copying a Configuration File from the Device to an RCP Server
- Copying a Configuration File from the Device to an FTP Server
- Copying files through a VRF
Copying a Configuration File from the Device to a TFTP Server
In some implementations of TFTP, you must create a dummy file on the TFTP server and give it read, write, and execute permissions before copying a file over it. Refer to your TFTP documentation for more information.
Copying a Configuration File from the Device to an RCP Server
You can copy a configuration file from the device to an RCP server.
One of the first attempts to use the network as a resource in the UNIX community resulted in the design and implementation of the remote shell protocol, which included the remote shell (rsh) and remote copy (rcp) functions. Rsh and rcp give users the ability to execute commands remotely and copy files to and from a file system residing on a remote host or server on the network. The Cisco implementation of rsh and rcp interoperates with standard implementations.
The rcp copy commands rely on the rsh server (or daemon) on the remote system. To copy files using rcp, you need not create a server for file distribution, as you do with TFTP. You need only to have access to a server that supports the remote shell (rsh). (Most UNIX systems support rsh.) Because you are copying a file from one place to another, you must have read permission on the source file and write permission on the destination file. If the destination file does not exist, rcp creates it for you.
Although the Cisco rcp implementation emulates the functions of the UNIX rcp implementation—copying files among systems on the network—the Cisco command syntax differs from the UNIX rcp command syntax. The Cisco rcp support offers a set of copy commands that use rcp as the transport mechanism. These rcp copy commands are similar in style to the Cisco TFTP copy commands, but they offer an alternative that provides faster performance and reliable delivery of data. These improvements are possible because the rcp transport mechanism is built on and uses the TCP/IP stack, which is connection-oriented. You can use rcp commands to copy system images and configuration files from the device to a network server and vice versa.
You also can enable rcp support to allow users on remote systems to copy files to and from the device.
To configure the Cisco IOS software to allow remote users to copy files to and from the device, use the ip rcmd rcp-enable global configuration command.
Restrictions
The RCP protocol requires a client to send a remote username on each RCP request to a server. When you copy a configuration file from the device to a server using RCP, the Cisco IOS software sends the first valid username it encounters in the following sequence:
The username specified in the copy EXEC command, if a username is specified.
The username set by the ip rcmd remote-username global configuration command, if the command is configured.
The remote username associated with the current tty (terminal) process. For example, if the user is connected to the device through Telnet and was authenticated through the username command, the device software sends the Telnet username as the remote username.
The device host name.
For the RCP copy request to execute successfully, an account must be defined on the network server for the remote username. If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote username on the server. For example, if the system image resides in the home directory of a user on the server, you can specify that user name as the remote username.
Use the ip rcmd remote-username command to specify a username for all copies. (Rcmd is a UNIX routine used at the super-user level to execute commands on a remote machine using an authentication scheme based on reserved port numbers. Rcmd stands for “remote command”). Include the username in the copy command if you want to specify a username for that copy operation only.
If you are writing to the server, the RCP server must be properly configured to accept the RCP write request from the user on the device. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the RCP server. For example, suppose the device contains the following configuration lines:
hostname Device1
ip rcmd remote-username User0
If the device IP address translates to device1.example.com, then the .rhosts file for User0 on the RCP server should contain the following line:
Device1.example.com Device1
Requirements for the RCP Username
The RCP protocol requires a client to send a remote username on each RCP request to a server. When you copy a configuration file from the device to a server using RCP, the Cisco IOS software sends the first valid username it encounters in the following sequence:
The username specified in the copy EXEC command, if a username is specified.
The username set by the ip rcmd remote-username global configuration command, if the command is configured.
The remote username associated with the current tty (terminal) process. For example, if the user is connected to the device through Telnet and is authenticated through the username command, the device software sends the Telnet username as the remote username.
The device host name.
For the RCP copy request to execute, an account must be defined on the network server for the remote username. If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote username on the server. For example, if the system image resides in the home directory of a user on the server, specify that user name as the remote username.
Refer to the documentation for your RCP server for more information.
Copying a Configuration File from the Device to an FTP Server
You can copy a configuration file from the device to an FTP server.
Understanding the FTP Username and Password
The FTP protocol requires a client to send a remote username and password on each FTP request to a server. When you copy a configuration file from the device to a server using FTP, the Cisco IOS software sends the first valid username it encounters in the following sequence:
The username specified in the copy EXEC command, if a username is specified.
The username set by the ip ftp username global configuration command, if the command is configured.
Anonymous.
The device sends the first valid password it encounters in the following sequence:
The password specified in the copy command, if a password is specified.
The password set by the ip ftp password command, if the command is configured.
The device forms a password username @devicename.domain . The variable username is the username associated with the current session, devicename is the configured host name, and domain is the domain of the device.
The username and password must be associated with an account on the FTP server. If you are writing to the server, the FTP server must be properly configured to accept the FTP write request from the user on the device.
If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the username on the server. For example, if the system image resides in the home directory of a user on the server, specify that user name as the remote username.
Refer to the documentation for your FTP server for more information.
Use the ip ftp username and ip ftp password global configuration commands to specify a username and password for all copies. Include the username in the copy EXEC command if you want to specify a username for that copy operation only.
Copying files through a VRF
You can copy files through a VRF interface specified in the copy command. Specifying the VRF in the copy command is easier and more efficient as you can directly change the source interface without using a change request for the configuration.
The following example shows how to copy files through a VRF, using the copy command:
Device# copy scp: flash-1: vrf test-vrf
Address or name of remote host [10.1.2.3]?
Source username [ScpUser]?
Source filename [/auto/tftp-server/ScpUser/vrf_test.txt]?
Destination filename [vrf_test.txt]?
Getting the vrf name as test-vrf
Password:
Sending file modes: C0644 10 vrf_test.txt
!
223 bytes copied in 22.740 secs (10 bytes/sec)
Copy Configuration Files from a Switch to Another Switch
You can copy the configurations from one switch to another. This is a 2-step process - Copy the configurations from the switch to the TFTP server, and then from TFTP to another switch.
To copy your current configurations from the switch, run the command copy startup-config tftp: and follow the instructions. The configurations are copied onto the TFTP server.
Then, login to another switch and run the command copy tftp: startup-config and follow the instructions. The configurations are now copied onto the other switch.
After the configurations are copied, to save your configurations, use write memory command and then either reload the switch or run the copy startup-config running-config command
For more information, see Cisco IOS Configuration Fundamentals Command Reference, Cisco IOS XE Release 16.1 (Catalyst 3850 Switches).
Configuration Files Larger than NVRAM
To maintain a configuration file that exceeds the size of NVRAM, you should be aware of the information in the following sections.
- Compressing the Configuration File
- Storing the Configuration in Flash Memory on Class A Flash File Systems
- Loading the Configuration Commands from the Network
Compressing the Configuration File
The service compress-config global configuration command specifies that the configuration file be stored compressed in NVRAM. Once the configuration file has been compressed, the device functions normally. When the system is booted, it recognizes that the configuration file is compressed, expands it, and proceeds normally. The more nvram:startup-config EXEC command expands the configuration before displaying it.
Before you compress configuration files, refer to the appropriate hardware installation and maintenance publication. Verify that your system’s ROMs support file compression. If not, you can install new ROMs that support file compression.
The size of the configuration must not exceed three times the NVRAM size. For a 128-KB size NVRAM, the largest expanded configuration file size is 384 KB.
The service compress-config global configuration command works only if you have Cisco IOS software Release 10.0 or later release boot ROMs. Installing new ROMs is a one-time operation and is necessary only if you do not already have Cisco IOS Release 10.0 in ROM. If the boot ROMs do not recognize a compressed configuration, the following message is displayed:
Boot ROMs do not support NVRAM compression Config NOT written to NVRAM
Storing the Configuration in Flash Memory on Class A Flash File Systems
On class A Flash file system devicees, you can store the startup configuration in flash memory by setting the CONFIG_FILE environment variable to a file in internal flash memory or flash memory in a PCMCIA slot.
See the “Specifying the CONFIG_FILE Environment Variable on Class A Flash File Systems” section for more information.
Care must be taken when editing or changing a large configuration. Flash memory space is used every time a copy system:running-config nvram:startup-config EXEC command is issued. Because file management for flash memory (such as optimizing free space) is not done automatically, you must pay close attention to available flash memory. Use the squeeze command to reclaim used space. We recommend that you use a large-capacity Flash card of at least 20 MB.
Loading the Configuration Commands from the Network
You can also store large configurations on FTP, RCP, or TFTP servers and download them at system startup. To use a network server to store large configurations, see the “Copying a Configuration File from the Switch to a TFTP Server” and “Configure the Switch to Download Configuration Files” sections for more information on these commands.
Configuring the Device to Download Configuration Files
You can configure the device to load one or two configuration files at system startup. The configuration files are loaded into memory and read in as if you were typing the commands at the command line. Thus, the configuration for the device is a mixture of the original startup configuration and the one or two downloaded configuration files.
Network Versus Host Configuration Files
For historical reasons, the first file the device downloads is called the network configuration file. The second file the device downloads is called the host configuration file. Two configuration files can be used when all of the devicees on a network use many of the same commands. The network configuration file contains the standard commands used to configure all of the devicees. The host configuration files contain the commands specific to one particular host. If you are loading two configuration files, the host configuration file should be the configuration file you want to have precedence over the other file. Both the network and host configuration files must reside on a network server reachable via TFTP, RCP, or FTP, and must be readable.
How to Manage Configuration File Information
- Displaying Configuration File Information (CLI)
- Modifying the Configuration File (CLI)
- Copying a Configuration File from the Device to a TFTP Server (CLI)
- Copying a Configuration File from the Device to an RCP Server (CLI)
- Copying a Configuration File from the Device to the FTP Server (CLI)
- Copying a Configuration File from a TFTP Server to the Device (CLI)
- Copying a Configuration File from the rcp Server to the Device (CLI)
- Copying a Configuration File from an FTP Server to the Device (CLI)
- Maintaining Configuration Files Larger than NVRAM
- Copying Configuration Files from Flash Memory to the Startup or Running Configuration (CLI)
- Copying Configuration Files Between Flash Memory File Systems (CLI)
- Copying a Configuration File from an FTP Server to Flash Memory Devices (CLI)
- Copying a Configuration File from an RCP Server to Flash Memory Devices (CLI)
- Copying a Configuration File from a TFTP Server to Flash Memory Devices (CLI)
- Re-executing the Configuration Commands in the Startup Configuration File (CLI)
- Clearing the Startup Configuration (CLI)
- Deleting a Specified Configuration File (CLI)
- Specifying the CONFIG_FILE Environment Variable on Class A Flash File Systems (CLI)
- Configuring the Device to Download Configuration Files
Displaying Configuration File Information (CLI)
To display information about configuration files, complete the tasks in this section:
1.
enable
2.
show
boot
3.
more
file-url
4.
show
running-config
5.
show
startup-config
DETAILED STEPS
Modifying the Configuration File (CLI)
The Cisco IOS software accepts one configuration command per line. You can enter as many configuration commands as you want. You can add comments to a configuration file describing the commands you have entered. Precede a comment with an exclamation point (!). Because comments are not stored in NVRAM or in the active copy of the configuration file, comments do not appear when you list the active configuration with the show running-config or more system:running-config EXEC commands. Comments do not display when you list the startup configuration with the show startup-config or more nvram:startup-config EXEC mode commands. Comments are stripped out of the configuration file when it is loaded onto the device. However, you can list the comments in configuration files stored on a File Transfer Protocol (FTP), Remote Copy Protocol (RCP), or Trivial File Transfer Protocol (TFTP) server. When you configure the software using the CLI, the software executes the commands as you enter them. To configure the software using the CLI, use the following commands in privileged EXEC mode:
1.
enable
2.
configure
terminal
3.
configuration
command
5.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Examples
In the following example, the device prompt name of the device is configured. The comment line, indicated by the exclamation mark (!), does not execute any command. The hostname command is used to change the device name from device to new_name. By pressing Ctrl-Z (^Z) or entering the end command, the user quits configuration mode. The copy system:running-config nvram:startup-config command saves the current configuration to the startup configuration.
Device# configure terminal Device(config)# !The following command provides the switch host name. Device(config)# hostname new_name new_name(config)# end new_name# copy system:running-config nvram:startup-config
When the startup configuration is NVRAM, it stores the current configuration information in text format as configuration commands, recording only non-default settings. The memory is checksummed to guard against corrupted data.
Note | Some specific commands might not get saved to NVRAM. You need to enter these commands again if you reboot the machine. These commands are noted in the documentation. We recommend that you keep a list of these settings so that you can quickly reconfigure your device after rebooting. |
Copying a Configuration File from the Device to a TFTP Server (CLI)
To copy configuration information on a TFTP network server, complete the tasks in this section:
1.
enable
2.
copy
system:running-config
tftp:
[[[//location ]/directory ]/filename ]
3.
copy
nvram:startup-config
tftp:
[[[//location ]/directory ]/filename ]
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
system:running-config
tftp:
[[[//location ]/directory ]/filename ]
Example:
Device# copy system:running-config tftp: //server1/topdir/file10
|
Copies the running configuration file to a TFTP server. |
Step 3 |
copy
nvram:startup-config
tftp:
[[[//location ]/directory ]/filename ]
Example:
Device# copy nvram:startup-config tftp: //server1/1stdir/file10
|
Copies the startup configuration file to a TFTP server. |
Examples
The following example copies a configuration file from a device to a TFTP server:
Device# copy system:running-config tftp://172.16.2.155/tokyo-confg
Write file tokyo-confg on host 172.16.2.155? [confirm] Y
Writing tokyo-confg!!! [OK]
What to Do Next
After you have issued the copy command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from the Device to an RCP Server (CLI)
To copy a startup configuration file or a running configuration file from the device to an RCP server, use the following commands beginning in privileged EXEC mode:
1.
enable
2.
configure
terminal
3.
ip
rcmd
remote-username
username
4.
end
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
ip
rcmd
remote-username
username
Example:
Device(config)# ip rcmd remote-username NetAdmin1
|
(Optional) Changes the default remote username. |
Step 4 |
end
Example:
Device(config)# end
|
(Optional) Exits global configuration mode. |
Step 5 | Do one of the
following:
Example:
Device# copy system:running-config rcp: //NetAdmin1@example.com/dir-files/file1
|
Examples
- Storing a Running Configuration File on an RCP Server
- Storing a Startup Configuration File on an RCP Server
Storing a Running Configuration File on an RCP Server
The following example copies the running configuration file named runfile2-confg to the netadmin1 directory on the remote host with an IP address of 172.16.101.101:
Device# copy system:running-config rcp://netadmin1@172.16.101.101/runfile2-confg Write file runfile2-confg on host 172.16.101.101?[confirm] Building configuration...[OK] Connected to 172.16.101.101 Device#
Storing a Startup Configuration File on an RCP Server
The following example shows how to store a startup configuration file on a server by using RCP to copy the file:
Device# configure terminal Device(config)# ip rcmd remote-username netadmin2 Device(config)# end Device# copy nvram:startup-config rcp: Remote host[]? 172.16.101.101 Name of configuration file to write [start-confg]? Write file start-confg on host 172.16.101.101?[confirm] ![OK]
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from the Device to the FTP Server (CLI)
To copy a startup configuration file or a running configuration file from the device to an FTP server, complete the following tasks:
1.
enable
2.
configure
terminal
3.
ip
ftp
username
username
4.
ip
ftp
password
password
5.
end
6.
Do one of the
following:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode on the device. |
Step 3 |
ip
ftp
username
username
Example:
Device(config)# ip ftp username NetAdmin1
|
(Optional) Specifies the default remote username. |
Step 4 |
ip
ftp
password
password
Example:
Device(config)# ip ftp password adminpassword
|
(Optional) Specifies the default password. |
Step 5 |
end
Example:
Device(config)# end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 2 and 3). |
Step 6 | Do one of the
following:
Example:
Device# copy system:running-config ftp:
|
Copies the running configuration or startup configuration file to the specified location on the FTP server. |
Examples
- Storing a Running Configuration File on an FTP Server
- Storing a Startup Configuration File on an FTP Server
Storing a Running Configuration File on an FTP Server
The following example copies the running configuration file named runfile-confg to the netadmin1 directory on the remote host with an IP address of 172.16.101.101:
Device# copy system:running-config ftp://netadmin1:mypass@172.16.101.101/runfile-confg Write file runfile-confg on host 172.16.101.101?[confirm] Building configuration...[OK] Connected to 172.16.101.101 Device#
Storing a Startup Configuration File on an FTP Server
The following example shows how to store a startup configuration file on a server by using FTP to copy the file:
Device# configure terminal Device(config)# ip ftp username netadmin2 Device(config)# ip ftp password mypass Device(config)# end Device# copy nvram:startup-config ftp: Remote host[]? 172.16.101.101 Name of configuration file to write [start-confg]? Write file start-confg on host 172.16.101.101?[confirm] ![OK]
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from a TFTP Server to the Device (CLI)
To copy a configuration file from a TFTP server to the device, complete the tasks in this section:
1.
enable
2.
copy
tftp:
[[[//location]/directory]/filename]
system:running-config
3.
copy
tftp:
[[[//location]/directory]/filename]
nvram:startup-config
4. copy tftp: [[[//location]/directory]/filename]flash-[n]:/directory/startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
tftp:
[[[//location]/directory]/filename]
system:running-config
Example:
Device# copy tftp://server1/dir10/datasource system:running-config
|
Copies a configuration file from a TFTP server to the running configuration. |
Step 3 |
copy
tftp:
[[[//location]/directory]/filename]
nvram:startup-config
Example:
Device# copy tftp://server1/dir10/datasource nvram:startup-config
|
Copies a configuration file from a TFTP server to the startup configuration. |
Step 4 |
copy
tftp:
[[[//location]/directory]/filename]flash-[n]:/directory/startup-config
Example:
Device# copy tftp://server1/dir10/datasource flash:startup-config
|
Copies a configuration file from a TFTP server to the startup configuration. |
Examples
In the following example, the software is configured from the file named tokyo-confg at IP address 172.16.2.155:
Device# copy tftp://172.16.2.155/tokyo-confg system:running-config
Configure using tokyo-confg from 172.16.2.155? [confirm] Y
Booting tokyo-confg from 172.16.2.155:!!! [OK - 874/16000 bytes]
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from the rcp Server to the Device (CLI)
To copy a configuration file from an rcp server to the running configuration or startup configuration, complete the following tasks:
1.
enable
2.
configure
terminal
3.
ip
rcmd
remote-username
username
4.
end
5.
Do one of the
following:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
(Optional) Enters configuration mode from the terminal. This step is required only if you override the default remote username (see Step 3). |
Step 3 |
ip
rcmd
remote-username
username
Example:
Device(config)# ip rcmd remote-username NetAdmin1
|
(Optional) Specifies the remote username. |
Step 4 |
end
Example:
Device(config)# end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username (see Step 2). |
Step 5 | Do one of the
following:
Example:
Device# copy rcp://[user1@example.com/dir10/fileone] nvram:startup-config
|
Copies the configuration file from an rcp server to the running configuration or startup configuration. |
Examples
Copy RCP Running-Config
The following example copies a configuration file named host1-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101, and loads and runs the commands on the device:
Device# copy rcp://netadmin1@172.16.101.101/host1-confg system:running-config Configure using host1-confg from 172.16.101.101? [confirm] Connected to 172.16.101.101 Loading 1112 byte file host1-confg:![OK] Device# %SYS-5-CONFIG: Configured from host1-config by rcp from 172.16.101.101
Copy RCP Startup-Config
The following example specifies a remote username of netadmin1. Then it copies the configuration file named host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101 to the startup configuration.
Device# configure terminal Device(config)# ip rcmd remote-username netadmin1 Device(config)# end Device# copy rcp: nvram:startup-config Address of remote host [255.255.255.255]? 172.16.101.101 Name of configuration file[rtr2-confg]? host2-confg Configure using host2-confg from 172.16.101.101?[confirm] Connected to 172.16.101.101 Loading 1112 byte file host2-confg:![OK] [OK] Device# %SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by rcp from 172.16.101.101
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from an FTP Server to the Device (CLI)
To copy a configuration file from an FTP server to the running configuration or startup configuration, complete the tasks in this section:
1.
enable
2.
configure
terminal
3.
ip
ftp
username
username
4.
ip
ftp
password
password
5.
end
6.
Do one of the
following:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
(Optional) Allows you to enter global configuration mode. This step is required only if you want to override the default remote username or password (see Steps 3 and 4). |
Step 3 |
ip
ftp
username
username
Example:
Device(config)# ip ftp username NetAdmin1
|
(Optional) Specifies the default remote username. |
Step 4 |
ip
ftp
password
password
Example:
Device(config)# ip ftp password adminpassword
|
(Optional) Specifies the default password. |
Step 5 |
end
Example:
Device(config)# end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 3 and 4). |
Step 6 | Do one of the
following:
Example:
Device# copy ftp:nvram:startup-config
|
Using FTP copies the configuration file from a network server to running memory or the startup configuration. |
Examples
Copy FTP Running-Config
The following example copies a host configuration file named host1-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101, and loads and runs the commands on the device:
Device# copy ftp://netadmin1:mypass@172.16.101.101/host1-confg system:running-config Configure using host1-confg from 172.16.101.101? [confirm] Connected to 172.16.101.101 Loading 1112 byte file host1-confg:![OK] Device# %SYS-5-CONFIG: Configured from host1-config by ftp from 172.16.101.101
Copy FTP Startup-Config
The following example specifies a remote username of netadmin1. Then it copies the configuration file named host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101 to the startup configuration:
Device# configure terminal Device(config)# ip ftp username netadmin1 Device(config)# ip ftp password mypass Device(config)# end Device# copy ftp: nvram:startup-config Address of remote host [255.255.255.255]? 172.16.101.101 Name of configuration file[host1-confg]? host2-confg Configure using host2-confg from 172.16.101.101?[confirm] Connected to 172.16.101.101 Loading 1112 byte file host2-confg:![OK] [OK] Device# %SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by ftp from 172.16.101.101
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Maintaining Configuration Files Larger than NVRAM
To maintain a configuration file that exceeds the size of NVRAM, perform the tasks described in the following sections:
- Compressing the Configuration File (CLI)
- Storing the Configuration in Flash Memory on Class A Flash File Systems (CLI)
- Loading the Configuration Commands from the Network (CLI)
Compressing the Configuration File (CLI)
To compress configuration files, complete the tasks in this section:
1.
enable
2.
configure
terminal
3.
service
compress-config
4.
end
6.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
service
compress-config
Example:
Device(config)# service compress-config
|
Specifies that the configuration file be compressed. |
Step 4 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 5 | Do one of the
following:
Example:
Device# configure terminal
|
Enters the new configuration:
“[buffer overflow - file-size /buffer-size bytes].” |
Step 6 |
copy
system:running-config
nvram:startup-config
Example:
Device(config)# copy system:running-config nvram:startup-config
|
When you have finished changing the running-configuration, save the new configuration. |
Examples
The following example compresses a 129-KB configuration file to 11 KB:
Device# configure terminal Device(config)# service compress-config Device(config)# end Device# copy tftp://172.16.2.15/tokyo-confg system:running-config Configure using tokyo-confg from 172.16.2.155? [confirm] y Booting tokyo-confg from 172.16.2.155:!!! [OK - 874/16000 bytes] Device# copy system:running-config nvram:startup-config Building configuration... Compressing configuration from 129648 bytes to 11077 bytes [OK]
Storing the Configuration in Flash Memory on Class A Flash File Systems (CLI)
To store the startup configuration in flash memory, complete the tasks in this section:
1.
enable
2.
copy
nvram:startup-config
flash-filesystem:filename
3.
configure
terminal
4.
boot
config
flash-filesystem:
filename
5.
end
7.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
nvram:startup-config
flash-filesystem:filename
Example:
Device# copy nvram:startup-config usbflash0:switch-config
|
Copies the current startup configuration to the new location to create the configuration file. |
Step 3 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 4 |
boot
config
flash-filesystem:
filename
Example:
Device(config)# boot config usbflash0:switch-config
|
Specifies that the startup configuration file be stored in flash memory by setting the CONFIG_FILE variable. |
Step 5 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 6 | Do one of the
following:
Example:
Device# configure terminal
|
Enters the new configuration. |
Step 7 |
copy
system:running-config
nvram:startup-config
Example:
Device(config)# copy system:running-config nvram:startup-config
|
When you have finished changing the running-configuration, save the new configuration. |
Examples
The following example stores the configuration file in usbflash0:
Device# copy nvram:startup-config usbflash0:switch-config Device# configure terminal Device(config)# boot config usbflash0:switch-config Device(config)# end Device# copy system:running-config nvram:startup-config
Loading the Configuration Commands from the Network (CLI)
To use a network server to store large configurations, complete the tasks in this section:
1.
enable
2.
copy
system:running-config
{ftp: |
rcp: |
tftp:}
3.
configure
terminal
4.
boot
network
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ]}
5.
service
config
6.
end
7.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
system:running-config
{ftp: |
rcp: |
tftp:}
Example:
Device# copy system:running-config ftp:
|
Saves the running configuration to an FTP, RCP, or TFTP server. |
Step 3 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 4 |
boot
network
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ]}
Example:
Device(config)# boot network ftp://user1:guessme@example.com/dir10/file1
|
Specifies that the startup configuration file be loaded from the network server at startup. |
Step 5 |
service
config
Example:
Device(config)# service config
|
Enables the switch to download configuration files at system startup. |
Step 6 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 7 |
copy
system:running-config
nvram:startup-config
Example:
Device# copy system:running-config nvram:startup-config
|
Saves the configuration. |
Copying Configuration Files from Flash Memory to the Startup or Running Configuration (CLI)
To copy a configuration file from flash memory directly to your startup configuration in NVRAM or your running configuration, enter one of the commands in Step 2:
1.
enable
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 | Do one of the
following:
Example:
Device# copy usbflash0:4:ios-upgrade-1 nvram:startup-config
|
Examples
The following example copies the file named ios-upgrade-1 from partition 4 of the flash memory PC Card in usbflash0 to the device startup configurations:
Device# copy usbflash0:4:ios-upgrade-1 nvram:startup-config
Copy 'ios-upgrade-1' from flash device as 'startup-config' ? [yes/no] yes
[OK]
Copying Configuration Files Between Flash Memory File Systems (CLI)
On platforms with multiple flash memory file systems, you can copy files from one flash memory file system, such as internal flash memory to another flash memory file system. Copying files to different flash memory file systems lets you create backup copies of working configurations and duplicate configurations for other devices. To copy a configuration file between flash memory file systems, use the following commands in EXEC mode:
1.
enable
2.
show
source-filesystem:
3.
copy
source-filesystem: [partition-number:][filename ]
dest-filesystem:[partition-number:][filename ]
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
show
source-filesystem:
Example:
Device# show flash:
|
Displays the layout and contents of flash memory to verify the filename. |
Step 3 |
copy
source-filesystem: [partition-number:][filename ]
dest-filesystem:[partition-number:][filename ]
Example:
Device# copy flash: usbflash0:
|
Copies a configuration file between flash memory devices. |
Example
The following example copies the file named running-config from partition 1 on internal flash memory to partition 1 of usbflash0 on a device. In this example, the source partition is not specified, so the device prompts for the partition number:
Device# copy flash: usbflash0:
System flash
Partition Size Used Free Bank-Size State Copy Mode
1 4096K 3070K 1025K 4096K Read/Write Direct
2 16384K 1671K 14712K 8192K Read/Write Direct
[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 1]
System flash directory, partition 1:
File Length Name/status
1 3142748 dirt/network/mars-test/c3600-j-mz.latest
2 850 running-config
[3143728 bytes used, 1050576 available, 4194304 total]
usbflash0 flash directory:
File Length Name/status
1 1711088 dirt/gate/c3600-i-mz
2 850 running-config
[1712068 bytes used, 2482236 available, 4194304 total]
Source file name? running-config
Destination file name [running-config]?
Verifying checksum for 'running-config' (file # 2)... OK
Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]
Copy 'running-config' from flash: device
as 'running-config' into usbflash0: device WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased!
[OK - 850/4194304 bytes]
Flash device copy took 00:00:30 [hh:mm:ss]
Verifying checksum... OK (0x16)
Copying a Configuration File from an FTP Server to Flash Memory Devices (CLI)
To copy a configuration file from an FTP server to a flash memory device, complete the task in this section:
1.
enable
2.
configure
terminal
3.
ip
ftp
username
username
4.
ip
ftp
password
password
5.
end
6.
copy
ftp:
[[//location]/directory ]/bundle_name
flash:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
(Optional) Enters global configuration mode. This step is required only if you override the default remote username or password (see Steps 3 and 4). |
Step 3 |
ip
ftp
username
username
Example:
Device(config)# ip ftp username Admin01
|
(Optional) Specifies the remote username. |
Step 4 |
ip
ftp
password
password
Example:
Device(config)# ip ftp password adminpassword
|
(Optional) Specifies the remote password. |
Step 5 |
end
Example:
Device(config)# end
|
(Optional) Exits configuration mode. This step is required only if you override the default remote username (see Steps 3 and 4). |
Step 6 |
copy
ftp:
[[//location]/directory ]/bundle_name
flash:
Example:
Device>copy ftp:/cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin flash:
|
Copies the configuration file from a network server to the flash memory device using FTP. |
What to Do Next
After you have issued the copy EXEC command, you may be prompted for additional information or for confirmation of the action. The prompt displayed depends on how much information you provide in the copy command and the current setting of the file prompt global configuration command.
Copying a Configuration File from an RCP Server to Flash Memory Devices (CLI)
To copy a configuration file from an RCP server to a flash memory device, complete the tasks in this section:
1.
enable
2.
configure
terminal
3.
ip
rcmd
remote-username
username
4.
end
5.
copy
rcp:
[[[//[username@]location ]/directory]
/bundle_name]
flash:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
(Optional) Enters global configuration mode. This step is required only if you override the default remote username or password (see Step 3). |
Step 3 |
ip
rcmd
remote-username
username
Example:
Device(config)# ip rcmd remote-username Admin01
|
(Optional) Specifies the remote username. |
Step 4 |
end
Example:
Device(config)# end
|
(Optional) Exits configuration mode. This step is required only if you override the default remote username or password (see Step 3). |
Step 5 |
copy
rcp:
[[[//[username@]location ]/directory]
/bundle_name]
flash:
Example:
Device# copy rcp://netadmin@172.16.101.101/bundle1 flash:
|
Copies the configuration file from a network server to the flash memory device using RCP. Respond to any device prompts for additional information or confirmation. Prompting depends on how much information you provide in the copy command and the current setting of the file prompt command. |
Copying a Configuration File from a TFTP Server to Flash Memory Devices (CLI)
To copy a configuration file from a TFTP server to a flash memory device, complete the tasks in this section:
1.
enable
2.
copy
tftp:
[[[//location ]/directory ]/bundle_name
flash:
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
tftp:
[[[//location ]/directory ]/bundle_name
flash:
Example:
Device#
copy tftp:/cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin flash:
|
Copies the file from a TFTP server to the flash memory device. Reply to any device prompts for additional information or confirmation. Prompting depends on how much information you provide in the copy command and the current setting of the file prompt command. |
Examples
The following example shows the copying of the configuration file named switch-config from a TFTP server to the flash memory card inserted in usbflash0. The copied file is renamed new-config.
Device#
copy tftp:switch-config usbflash0:new-config
Re-executing the Configuration Commands in the Startup Configuration File (CLI)
To re-execute the commands located in the startup configuration file, complete the task in this section:
1.
enable
2.
configure
memory
DETAILED STEPS
Command or Action | Purpose |
---|
Clearing the Startup Configuration (CLI)
You can clear the configuration information from the startup configuration. If you reboot the device with no startup configuration, the device enters the Setup command facility so that you can configure the device from scratch. To clear the contents of your startup configuration, complete the task in this section:
1.
enable
2.
erase
nvram
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. | ||
Step 2 |
erase
nvram
Example:
Device# erase nvram
|
Clears the contents of your startup configuration.
|
Deleting a Specified Configuration File (CLI)
To delete a specified configuration on a specific flash device, complete the task in this section:
1.
enable
2.
delete
flash-filesystem:filename
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. | ||
Step 2 |
delete
flash-filesystem:filename
Example:
Device# delete usbflash0:myconfig
|
Deletes the specified configuration file on the specified flash device.
|
Specifying the CONFIG_FILE Environment Variable on Class A Flash File Systems (CLI)
On Class A flash file systems, you can configure the Cisco IOS software to load the startup configuration file specified by the CONFIG_FILE environment variable. The CONFIG_FILE variable defaults to NVRAM. To change the CONFIG_FILE environment variable, complete the tasks in this section:
1.
enable
2.
copy
[flash-url
|
ftp-url |
rcp-url
|
tftp-url |
system:running-config |
nvram:startup-config]
dest-flash-url
3.
configure
terminal
4.
boot
config
dest-flash-url
5.
end
6.
copy
system:running-config
nvram:startup-config
7.
show
boot
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 | enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
copy
[flash-url
|
ftp-url |
rcp-url
|
tftp-url |
system:running-config |
nvram:startup-config]
dest-flash-url
Example:
Device# copy system:running-config nvram:startup-config
|
Copies the configuration file to the flash file system from which the device loads the file on restart. |
Step 3 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 4 |
boot
config
dest-flash-url
Example:
Device(config)# boot config 172.16.1.1
|
Sets the CONFIG_FILE environment variable. This step modifies the runtime CONFIG_FILE environment variable. |
Step 5 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 6 |
copy
system:running-config
nvram:startup-config
Example:
Device# copy system:running-config nvram:startup-config
|
Saves the configuration performed in Step 3 to the startup configuration. |
Step 7 |
show
boot
Example:
Device# show boot
|
(Optional) Allows you to verify the contents of the CONFIG_FILE environment variable. |
Examples
The following example copies the running configuration file to the device. This configuration is then used as the startup configuration when the system is restarted:
Device# copy system:running-config usbflash0:config2 Device# configure terminal Device(config)# boot config usbflash0:config2 Device(config)# end Device# copy system:running-config nvram:startup-config [ok] Device# show boot BOOT variable = usbflash0:rsp-boot-m CONFIG_FILE variable = nvram: Current CONFIG_FILE variable = usbflash0:config2 Configuration register is 0x010F
What to Do Next
After you specify a location for the startup configuration file, the nvram:startup-config command is aliased to the new location of the startup configuration file. The more nvram:startup-config EXEC command displays the startup configuration, regardless of its location. The erase nvram:startup-config EXEC command erases the contents of NVRAM and deletes the file pointed to by the CONFIG_FILE environment variable.
When you save the configuration using the copy system:running-config nvram:startup-config command, the device saves a complete version of the configuration file to the location specified by the CONFIG_FILE environment variable and a distilled version to NVRAM. A distilled version is one that does not contain access list information. If NVRAM contains a complete configuration file, the device prompts you to confirm your overwrite of the complete version with the distilled version. If NVRAM contains a distilled configuration, the device does not prompt you for confirmation and proceeds with overwriting the existing distilled configuration file in NVRAM.
Note | If you specify a file in a flash device as the CONFIG_FILE environment variable, every time you save your configuration file with the copy system:running-config nvram:startup-config command, the old configuration file is marked as “deleted,” and the new configuration file is saved to that device. Eventually, Flash memory fills up as the old configuration files still take up memory. Use the squeeze EXEC command to permanently delete the old configuration files and reclaim the space. |
Configuring the Device to Download Configuration Files
You can specify an ordered list of network configuration and host configuration filenames. The Cisco IOS XE software scans this list until it loads the appropriate network or host configuration file.
To configure the device to download configuration files at system startup, perform at least one of the tasks described in the following sections:
"Configuring the Switch to Download the Network Configuration File"
"Configuring the Switch to Download the Host Configuration File"
If the device fails to load a configuration file during startup, it tries again every 10 minutes (the default setting) until a host provides the requested files. With each failed attempt, the device displays the following message on the console terminal:
Booting host-confg... [timed out]
If there are any problems with the startup configuration file, or if the configuration register is set to ignore NVRAM, the device enters the Setup command facility.
- Configuring the Device to Download the Network Configuration File (CLI)
- Configuring the Device to Download the Host Configuration File (CLI)
Configuring the Device to Download the Network Configuration File (CLI)
To configure the Cisco IOS software to download a network configuration file from a server at startup, complete the tasks in this section:
1.
enable
2.
configure
terminal
3.
boot
network
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ]}
4.
service
config
5.
end
6.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
boot
network
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ]}
Example:
Device(config)# boot network tftp:hostfile1
|
Specifies the network configuration file to download at startup, and the protocol to be used (TFTP, RCP, or FTP).
|
Step 4 |
service
config
Example:
Device(config)# service config
|
Enables the system to automatically load the network file on restart. |
Step 5 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 6 |
copy
system:running-config
nvram:startup-config
Example:
Device# copy system:running-config nvram:startup-config
|
Saves the running configuration to the startup configuration file. |
Configuring the Device to Download the Host Configuration File (CLI)
To configure the Cisco IOS software to download a host configuration file from a server at startup, complete the tasks in this section:
1.
enable
2.
configure
terminal
3.
boot
host
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ] }
4.
service
config
5.
end
6.
copy
system:running-config
nvram:startup-config
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
boot
host
{ftp:[[[//[username [:password ]@]location ]/directory ]/filename ] |
rcp:[[[//[username@]location ]/directory ]/filename ] |
tftp:[[[//location ]/directory ]/filename ] }
Example:
Device(config)# boot host tftp:hostfile1
|
Specifies the host configuration file to download at startup, and the protocol to be used (FTP, RCP, or TFTP):
|
Step 4 |
service
config
Example:
Device(config)# service config
|
Enables the system to automatically load the host file upon restart. |
Step 5 |
end
Example:
Device(config)# end
|
Exits global configuration mode. |
Step 6 |
copy
system:running-config
nvram:startup-config
Example:
Device# copy system:running-config nvram:startup-config
|
Saves the running configuration to the startup configuration file. |
Example
In the following example, a device is configured to download the host configuration file named hostfile1 and the network configuration file named networkfile1. The device uses TFTP and the broadcast address to obtain the file:
Device# configure terminal Device(config)# boot host tftp:hostfile1 Device(config)# boot network tftp:networkfile1 Device(config)# service config Device(config)# end Device# copy system:running-config nvram:startup-config
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Cisco IOS configuration commands |
Cisco IOS Configuration Fundamentals Command Reference |
Error Message Decoder
Description | Link |
---|---|
To help you research and resolve system error messages in this release, use the Error Message Decoder tool. |
https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi |
Standards
Standard |
Title |
---|---|
No new or modified standards are supported, and support for existing standards has not been modified |
-- |
MIBs
MIB |
MIBs Link |
---|---|
|
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFC |
Title |
---|---|
No new or modified RFCs are supported, and support for existing RFCs has not been modified. |
-- |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |