For example, if the user is connected to the router through Telnet and was authenticated through the username command, the switch software sends the Telnet username as the remote username. For a successful RCP copy request, you must define an account on the network server for the remote username. If the server has a directory structure, the configuration file is written to or copied from the directory associated with the remote username on the server.
For example, if the configuration file is in the home directory of a user on the server, specify that user's name as the remote username. Before you begin downloading or uploading a configuration file by using RCP, do the following:. The switch and the server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the RCP server by using the ping command.
If you do not want to use this username, create a new RCP username by using the ip rcmd remote-username username global configuration command to be used during all copy operations. If you are accessing the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the RCP username. For UNIX systems, you must add an entry to the.
For example, suppose that the switch contains these configuration lines:. If the switch IP address translates to Switch1. Using RCP, copies the configuration file from a network server to the running configuration or to the startup configuration file. This example shows how to copy a configuration file named host1-confg from the netadmin1 directory on the remote server with an IP address of Then it copies the configuration file host2-confg from the netadmin1 directory on the remote server with an IP address of Using RCP, copies the specified configuration file from the switch running to the specified network server.
You can clear the configuration information from the startup configuration. If you reboot the switch with no startup configuration, the switch enters the setup program so that you can reconfigure the switch with new settings. To clear the contents of your startup configuration, use the erase nvram: or the erase startup-config privileged EXEC command.
To delete a saved configuration from flash memory, use the delete flash: filename privileged EXEC command. Depending on the setting of the file prompt global configuration command, you might be prompted for confirmation before you delete a file. By default, the switch prompts for confirmation on destructive file operations. The configuration replacement and rollback feature replaces the running configuration with any saved Cisco IOS configuration file.
You can use the rollback function to roll back to a previous configuration. The configuration archive provides a mechanism to store, organize, and manage an archive of configuration files.
The configure replace privileged EXEC command increases the configuration rollback capability. As an alternative, you can save copies of the running configuration by using the copy running-config destination-url privileged EXEC command, storing the replacement file either locally or remotely.
However, this method lacks any automated file management. The configuration replacement and rollback feature can automatically save copies of the running configuration to the configuration archive.
You use the archive config privileged EXEC command to save configurations in the configuration archive by using a standard location and filename prefix that is automatically appended with an incremental version number and optional timestamp as each consecutive file is saved. You can specify how many versions of the running configuration are kept in the archive. After the maximum number of files are saved, the oldest file is automatically deleted when the next, most recent file is saved.
The show archive privileged EXEC command displays information for all the configuration files saved in the configuration archive. The configure replace privileged EXEC command replaces the running configuration with any saved configuration file.
When you enter the configure replace command, the running configuration is compared with the specified replacement configuration, and a set of configuration differences is generated. The resulting differences are used to replace the configuration. The configuration replacement operation is usually completed in no more than three passes. To prevent looping behavior no more than five passes are performed. You can use the copy source-url running-config privileged EXEC command to copy a stored configuration file to the running configuration.
When using this command as an alternative to the configure replace target-url privileged EXEC command, note these major differences:.
This command does not remove commands from the running configuration that are not present in the source file. In contrast, the configure replace target-url command removes commands from the running configuration that are not present in the replacement file and adds commands to the running configuration that are not present. You must use a complete configuration file as the replacement file for the configure replace target-url command.
You can also use the configure replace command to roll back changes that were made since the previous configuration was saved.
Instead of basing the rollback operation on a specific set of changes that were applied, the configuration rollback capability reverts to a specific configuration based on a saved configuration file. If you want the configuration rollback capability, you must first save the running configuration before making any configuration changes. Then, after entering configuration changes, you can use that saved configuration file to roll back the changes by using the configure replace target-url command.
You can specify any saved configuration file as the rollback configuration. You are not limited to a fixed number of rollbacks, as is the case in some rollback models. Follow these guidelines when configuring and performing configuration replacement and rollback:. Otherwise, the configuration replacement operation fails. The replacement file must be a complete configuration generated by a Cisco IOS device for example, a configuration generated by the copy running-config destination-url command.
Note If you generate the replacement configuration file externally, it must comply with the format of files generated by Cisco IOS devices. Using the configure replace command with the configuration archive and with the archive config command is optional but offers significant benefit for configuration rollback scenarios.
Before using the archive config command , you must first configure the configuration archive. Starting in privileged EXEC mode, follow these steps to configure the configuration archive:. Specifies the location and filename prefix for the files in the configuration archive. Optional Sets the maximum number of archive files of the running configuration to be saved in the configuration archive.
Valid values are from 1 to The default is Note Before using this command, you must first enter the path archive configuration command to specify the location and filename prefix for the files in the configuration archive. Optional Sets the time increment for automatically saving an archive file of the running configuration in the configuration archive. Starting in privileged EXEC mode, follow these steps to replace the running configuration file with a saved configuration file:.
Note Enter the path archive configuration command before using this command. The total number of passes also appears. If you do not enter the configure confirm command within the specified time limit, the configuration replacement operation is automatically stopped. In other words, the running configuration file is restored to the configuration that existed before you entered the configure replace command.
Note You must first enable the configuration archive before you can use the time seconds command line option. Optional Confirms replacement of the running configuration with a saved configuration file. Note Use this command only if the time seconds keyword and argument of the configure replace command are specified. This section describes how to download, upload, and install Cisco IOS XE software bundle files, which contain the system software packages. You can use this uploaded bundle for future downloads to the same switch or to another switch of the same type.
You can install the package files on the switch or you can boot the switch from the IOS XE bundle itself. To display information about the provisioning software that is currently running on the switch, use the show version privileged EXEC command. In the display, check the line that begins with. System bundle file is When the switch is running in installed mode, this line displays the name and location of the booted Cisco IOS XE provisioning file, typically flash:packages.
When the switch is running in bundle mode, this line displays the name and location of the booted Cisco IOS XE bundle file. When the switch is running in installed mode, this command displays information about the set of package files contained in the booted provisioning file.
When the switch is running in bundle mode, this command displays information about the set of package files contained in the booted Cisco IOS XE software bundle. You can upload a Cisco IOS XE bundle file to a network server for backup purposes; the uploaded bundle can be used for future downloads to the same or another switch of the same type. Directory and bundle names are case sensitive. You can upload a bundle file from the switch to a TFTP server. You can later download this bundle to the switch or to another switch of the same type.
Directory and bundle file names are case sensitive. You can later download this bundle to the same switch or to another switch of the same type. These must be associated with an account on the FTP server. For the RCP copy request to execute successfully, an account must be defined on the network server for the remote username.
You can upload a software bundle file from the switch to an RCP server. The method that you use to upgrade Cisco IOS XE software depends on whether the switch is running in installed mode or in bundle mode. To upgrade the Cisco IOS XE software when the switch is running in installed mode, use the software install privileged EXEC command to install the packages from a new software bundle file.
The software install command expands the package files from the specified source bundle file and copies them to the local flash: storage device. When the source bundle is specified as a tftp: or ftp: URL, the bundle file is first downloaded into the switch's memory RAM ; the bundle file is not copied to local storage media.
After the package files are expanded and copied to flash: the running provisioning file flash:packages. Note The software install command is not supported when the switch is running in bundle mode.
Use the software expand privileged EXEC command to convert the switch from bundle mode to installed mode. Download the bundle file to local storage media. Configure the boot system global configuration command to point to the bundle file. Reload the switch. It shows using the copy command to copy the bundle file to flash:, configuring the boot system variable to point to the bundle file, saving a copy of the running configuration, and finally, reloading the switch. To convert the running mode of a switch from bundle mode to installed mode, use the software expand running privileged EXEC command.
This command expands the packages from the booted IOS XE software bundle and copies them and the provisioning file to the specified to destination. When you use the software expand running command to convert the switch from bundle mode to installed mode, specify the to destination as f lash:. After you execute the command, configure the boot system command to point to the expanded provisioning file flash:packages. Note The software expand running command is not supported when the switch is running in installed mode.
This example shows using the software expand running command to convert the active switch in a switch stack from the bundle running mode to the installed running mode:. For switch stacks running in installed mode, use the software install source switch privileged EXEC command to install the running software packages from an existing stack member to one or more other stack members that are running different but compatible software packages. This example shows a 2-member stack where each switch is running a different but compatible software packages.
The s oftware install source switch command is used to install the packages that are currently running on the standby switch switch 1 onto the active switch switch 2. For switch stacks running in bundle mode, follow these steps to copy the bundle file from one stack member to another:.
Use the copy privileged EXEC command to copy the running bundle from one switch in the stack to the other. To upgrade a switch that is running in installed mode with software packages that are incompatible with the switch stack also running in installed mode , use the software auto-upgrade privileged EXEC command to install the software packages from an existing stack member to the stack member that is running incompatible software. Upon completion of the auto-upgrade installation, the incompatible switch automatically reloads and joins the stack as a fully functioning member.
Note If you configure the global software auto-upgrade enable command, the auto-upgrade functionality is initiated automatically when a switch with incompatible software running in installed mode joins the stack that is running in installed mode. This example shows a 2-member switch stack; switch 2 is the active switch and switch 1 is running incompatible software.
To upgrade a switch that is running in bundle mode with a software bundle that is incompatible with the switch stack also running in bundle mode , follow these steps:. This example shows a 2-member switch stack running in bundle mode; switch 2 is the active switch and switch 1 is running an incompatible bundle.
When a switch running in bundle mode tries to join a stack running in installed mode, use the software auto-upgrade privileged EXEC command to install the incompatible switch's running packages and convert the switch to installed mode. Upon completion of the auto-upgrade running mode conversion, the incompatible switch automatically reloads and attempts to join the stack in installed mode. This example shows a 2-member switch stack running in installed mode.
You can identify the available Flash partitions by entering the show file system command. Using rcp The rcp protocol requires a client to send a remote username upon each rcp request to a server. When you copy a configuration file or image between the router and a server using rcp, the Cisco IOS software sends the first valid username in the following list:. The remote username specified in the copy command, if one is specified. The username set by the ip rcmd remote-username 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 router through Telnet and was authenticated through the username command, the router software sends the Telnet username as the remote username. For the rcp copy request to process successfully, an account must be defined on the network server for the remote username. If the network administrator of the destination server did not establish an account for the remote username, this command will not run successfully.
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's name as the remote username. 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 router.
For UNIX systems, add an entry to the. Suppose the router contains the following configuration lines:. If the router's IP address translates to Router1. Refer to the documentation for your rcp server for more details.
If you are using a personal computer as a file server, the computer must support rsh. When you copy a configuration file from the router to a server using FTP, the Cisco IOS software sends the first valid username in the following list:. The username specified in the copy command, if a username is specified. The username set by the ip ftp username command, if the command is configured. 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 router forms a password username routername. The variable username is the username associated with the current session, routername is the configured host name, and domain is the domain of the router.
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 router. 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. Refer to the documentation for your FTP server for more details. Use the ip ftp username and ip ftp password commands to specify a username and password for all copies.
Include the username in the copy command if you want to specify a username for that copy operation only. Storing Images on Servers Use the copy flash: destination-url command for example, copy flash: tftp: to copy a system image or boot image from Flash memory to a network server. Use the copy of the image as a backup copy. Also, use it to verify that the copy in Flash memory is the same as that in the original file. Copying from a Server to Flash Memory Use the copy destination-url flash: command for example, copy tftp: flash: to copy an image from a server to Flash memory.
On Class B file system platforms, the system provides an option to erase existing Flash memory before writing onto it. Verifying Images Before booting from Flash memory, verify that the checksum of the image in Flash memory matches the checksum listed in the README file that was distributed with the image by using the verify command.
The checksum of the image in Flash memory is displayed when the copy command completes. The configuration will be added to the running configuration as if the commands were typed in the command line interface. Thus, the resulting configuration file will be a combination of the previous running configuration and the loaded configuration file, with the loaded configuration file having precedence.
You can copy either a host configuration file or a network configuration file. Accept the default value of host to copy and load a host configuration file containing commands that apply to one network server in particular. Enter network to copy and load a network configuration file containing commands that apply to all network servers on a network. These commands replace the startup configuration file with the copied configuration file.
Saving the Running Configuration to the Startup Configuration Use the copy system:running-config nvram:startup-config command to copy the running configuration to the startup configuration. If you issue the copy system:running-config nvram:startup-config command from a bootstrap system image, a warning will instruct you to indicate whether you want your previous NVRAM configuration to be overwritten and configuration commands to be lost.
On all platforms except Class A file system platforms, the copy system:running-config nvram:startup-config command copies the currently running configuration to NVRAM. This variable specifies the device and configuration file used for initialization. If the current configuration is too large for NVRAM, the software displays a message and stops executing the command. A distilled version is one that does not contain access list information. If NVRAM already contains a copy of a complete configuration, the router prompts you to confirm the copy.
To view the contents of environment variables, use the show bootvar command. To modify the BOOT environment variable, use the boot system command. To save your modifications, use the copy system:running-config nvram:startup-config command. When the destination is the only valid image in the BOOT environment variable, the router also prompts you for confirmation before proceeding with the copy. On a Cisco or Cisco configured for HSA, if you copy a file to nvram:startup-configuration with automatic synchronization disabled, the system asks you if you also want to copy the file to the slave's startup configuration.
The default answer is yes. If automatic synchronization is enabled, the system automatically copies the file to the slave's startup configuration each time you use a copy command with nvram:startup-configuration as the destination. The following examples illustrate uses of the copy command. To continue this discussion, please ask a new question. Which of the following retains the information it's storing when the system power is turned off?
Submit ». Get answers from your peers along with millions of IT pros who visit Spiceworks. I can telnet to each router an laboriously do this by hand: router copy flash: tftp: router Best Answer.
David May 22, at UTC. View this "Best Answer" in the replies below ». Jon May 19, at UTC. Morphology May 19, at UTC.
0コメント