cc/td/doc/product/software/ios112/112cg_cr
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Loading Images and Configuration Files

Loading Images and Configuration Files

This chapter describes how to load and maintain system images, microcode images, and configuration files.

The instructions in this chapter describe copying system images from routers to network servers (and vice versa), displaying and comparing different configuration files, and listing the Cisco IOS software version running on the router.

This chapter also explains how to manually load system images from ROM monitor so that you can successfully boot the router when typical startup processes malfunction.

To benefit most from the instructions and organization of this chapter, your router must contain a minimal configuration that allows you to interact with the system software. You can create a basic configuration file using the setup command facility. See the user guide for your hardware platform for more information on using setup at first-time startup. See the "Using Setup for Configuration Changes" chapter in this publication for information on using setup after first-time startup.

For a complete description of the commands mentioned in this chapter, refer to the "Image and Configuration File Load Commands" chapter in the Configuration Fundamentals Command Reference.


Note One or more of the commands that previously appeared in this chapter have been replaced by new commands. Table 3 maps the old commands to their replacements. The old commands continue to perform their normal functions in the current release, but support for these commands will cease in a future release. See the Configuration Fundamentals Command Reference for detailed command information.


Table 3: Mapping Old Commands to New Commands
Old Command New Command

configure network

copy rcp running-config (for an rcp server)

copy tftp running-config (for a TFTP server)

configure overwrite-network

copy rcp startup-config (for an rcp server)

copy tftp startup-config (for a TFTP server)

copy erase flash

erase flash

copy verify or copy verify flash

verify flash (on all systems except Cisco 7200 and Cisco 7500)

verify (on Cisco 7000, Cisco 7200, and Cisco 7500)

copy verify bootflash

verify bootflash

show configuration

show startup-config

tftp-server system

tftp-server

write erase

erase startup-config

write memory

copy running-config startup-config

write network

copy running-config rcp (for an rcp server)

copy running-config tftp (for a TFTP server)

write terminal

show running-config

Image and Configuration File Load Task List

To load and maintain system images, microcode images, and configuration files needed for startup, complete the tasks in the following sections.


Note The organization of tasks assumes you have a minimal configuration that you want to modify.

The tasks in the first three sections are typical tasks for all routers. Perform the tasks in the remaining sections as needed for your particular routing environment.

Retrieve System Images and Configuration Files

If you have a minimal configuration that allows you to interact with the system software, you can retrieve other system images and configuration files from a network server and modify them for use in your particular routing environment. This section describes tasks related to retrieving system images and configuration files for modification.

Retrieve System Images and Configuration File Task List

When retrieving system images and configuration files, perform the following tasks. The first two tasks are required.

Copy System Images from a Network Server to Flash Memory

You can copy system images from a TFTP, rcp, or MOP server. The following sections describe these tasks:

Refer to the "Cisco's Implementation of Environment Variables" section for an explanation of the Flash memory card that can be used on a Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series.


Note When you are upgrading or changing to a different Cisco IOS release, refer to the appropriate release notes for information on system requirements and limitations.

Copy from a TFTP Server to Flash Memory

To copy a system image from a Trivial File Transfer Protocol (TFTP) server to Flash memory, complete the following tasks:

Task Command

    Step 1. Make a backup copy of the current system software image.

See the instructions in the section "Copy System Images from Flash Memory to a Network Server."

    Step 2. Copy a system image to Flash memory.

copy tftp flash

copy tftp file-id (Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series only)

    Step 3. When prompted, enter the IP address or domain name of the server.

ip-address or name

    Step 4. If prompted, enter the filename of the server system image.

filename

    Step 5. If prompted, enter the Flash memory device that is to receive the copy of the system image.

device


Note Be sure there is ample space available before copying a file to Flash memory. Use the show flash command and compare the size of the file you want to copy to the amount of available Flash memory shown. If the space available is less than the space required by the file you want to copy, the copy process will continue, but the entire file will not be copied into Flash memory. The failure message "buffer overflow - xxxx/xxxx" will appear, where xxxx/xxxx is the number of bytes read in relation to the number of bytes available.

The server system image copied to the Flash memories for Cisco 3000, Cisco 4000, and Cisco 7000 series, must be at least Software Version 9.1 or later. For Cisco 2500 series, the server system image must be at least Software Version 9.21 or later.

When you issue the copy tftp flash command, the system prompts you for the IP address or domain name of the TFTP server. This server can be another router serving ROM or Flash system software images. The system then prompts you for the filename of the software image to copy.

For the copy tftp flash and copy tftp file-id commands, the router gives you the option of erasing the existing Flash memory before writing to it when there is space available to do so. If there is no free Flash memory available, or if the Flash memory has never been written to, the erase routine is required before new files can be copied. The system will inform you of these conditions and prompt you for a response. Note that on the Cisco 7000 series, the Flash memory is erased at the factory before shipment.

The file-id argument of the copy tftp file-id command specifies a device and filename as the destination of the copy operation. You can omit the device, entering only copy tftp filename. When you omit the device, the system uses the default device specified by the cd command. On the Cisco 7000 series, you can choose flash: or slot0: as the Flash memory device. On the Cisco 7200 series and Cisco 7500 series, you can choose bootflash:, slot0:, or slot1: as the Flash memory device.

If you attempt to copy a file into Flash memory that is already there, a prompt informs you that a file with the same name already exists. This file is "deleted" when you copy the new file into Flash. The first copy of the file still resides within Flash memory, but it is rendered unusable in favor of the newest version, and is listed with the "deleted" tag when you use the show flash command. If you terminate the copy process, the newer file is marked "deleted" because the entire file was not copied and is not valid. In this case, the original file in Flash memory is valid and available to the system.

The following example shows how to use the copy tftp flash command to copy a system image named gs7-k when Flash memory is too full to copy the file. The filename gs7-k can be in either lowercase or uppercase; the system sees GS7-K as gs7-k. If more than one file of the same name is copied to Flash, regardless of case, the last file copied becomes the valid file.

env-chassis# copy tftp flash IP address or name of remote host [255.255.255.255]? dirt Translating "DIRT"...domain server (255.255.255.255) [OK] Name of file to copy? gs7-k Copy gs7-k from 172.16.13.111 into flash memory? [confirm] Flash is filled to capacity. Erasure is needed before flash may be written. Erase flash before writing? [confirm] Erasing flash EPROMs bank 0 Zeroing bank...zzzzzzzzzzzzzzzz Verify zeroed...vvvvvvvvvvvvvvvv Erasing bank...eeeeeeeeeeeeeeee Erasing flash EPROMs bank 1 Zeroing bank...zzzzzzzzzzzzzzzz Verify zeroed...vvvvvvvvvvvvvvvv Erasing bank...eeeeeeeeeeeeeeee Erasing flash EPROMs bank 2 Zeroing bank...zzzzzzzzzzzzzzzz Verify zeroed...vvvvvvvvvvvvvvvv Erasing bank...eeeeeeeeeeeeeeee Erasing flash EPROMs bank 3 Zeroing bank...zzzzzzzzzzzzzzzz Verify zeroed...vvvvvvvvvvvvvvvv Erasing bank...eeeeeeeeeeeeeeee Loading from 172.16.1.111:!!!!... [OK - 1906676/4194240 bytes] Verifying via checksum... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvv Flash verification successful. Length = 1906676, checksum = 0x12AD

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully. A series of "V" characters indicates that a checksum verification of the image is occurring after the image is written to Flash memory.


Note  If you enter n after the "Erase flash before writing?" prompt, the copy process continues. If you enter y and confirm the erasure, the erase routine begins. Be sure to have ample Flash memory space before entering n at the erasure prompt.

The following example shows how to copy a system image named gs7-k into the current Flash configuration in which a file named gs7-k already exists:

env-chassis# copy tftp flash IP address or name of remote host [172.16.13.111]? Name of file to copy? gs7-k File gs7-k already exists; it will be invalidated! Copy gs7-k from 172.16.13.111 into flash memory? [confirm] 2287500 bytes available for writing without erasure. Erase flash before writing? [confirm]n Loading from 172.16.1.111:!!!!... [OK - 1906676/2287500 bytes] Verifying via checksum... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvv Flash verification successful. Length = 1902192, checksum = 0x12AD

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully. A series of "V" characters indicates that a checksum verification of the image is occurring after the image is written to Flash memory.

In the following example, the Flash security jumper is not installed, so you cannot write files to Flash memory. On the Cisco 7000 series, you cannot write to internal Flash memory or to a Flash memory card inserted in the Personal Computer Memory Card International Association (PCMCIA) slot. Also, be sure to set the write protect switch on the Flash memory card to unprotected.

Router# copy tftp flash Flash: embedded flash security jumper(12V) must be strapped to modify flash memory
Note To terminate this copy process, press Ctrl-^ (the Ctrl, Shift, and 6 keys on a standard keyboard) simultaneously. Although the process will terminate, the partial file copied before the termination will remain until the entire Flash memory is erased. Refer to the Troubleshooting Internetworking Systems publication for procedures on how to resolve Flash memory problems.

On the Cisco 7000 series, Cisco 7200 series, or Cisco 7500 series, the following example copies the router-config file from a TFTP server to the Flash memory card inserted in slot 0 of the Route Processor (RP), Network Processing Engine (NPE), or Route Switch Processor (RSP) card, respectively. The copied file has the name new-config.

Router# copy tftp:router-config slot0:new-config

You can copy normal or compressed images to Flash memory. You can produce a compressed system image on any UNIX platform using the compress command. Refer to your UNIX platform's documentation for the exact usage of the compress command.

The following example shows how to copy a system image named IJ09140Z into the current Flash configuration:

Router# copy tftp flash IP address or name of remote host [255.255.255.255]? server1 Name of tftp filename to copy into flash []? IJ09140Z copy IJ09140Z from 172.31.101.101 into flash memory? [confirm] <Return> xxxxxxxx bytes available for writing without erasure. erase flash before writing? [confirm] <Return> Clearing and initializing flash memory (please wait)####... Loading from 172.31.13.110:!!!!... [OK - 324572/524212 bytes] Verifying checksum... VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... Flash verification successful. Length = 1204637, checksum = 0x95D9

The series of pound signs (#) indicates that each Flash device is being cleared and initialized—one per device. Different platforms use different ways of indicating that Flash is being cleared. The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully. The series of "V" characters indicates that a checksum is being calculated. An "O" indicates an out-of-order packet. A period (.) indicates a timeout. The last line in the sample configuration indicates that the copy is successful.

Copy from an rcp Server to Flash Memory

You can copy a system image from an rcp network server to Flash memory. For the rcp command to execute properly, an account must be defined on the network server for the remote username. You can override the default remote username sent on the rcp copy request by configuring the remote username. For example, if the system image resides in the home directory of a user on the server, you can specify that user's name as the remote username. The rcp protocol implementation copies the system image from the remote server relative to the directory of the remote username if the remote server has a directory structure, as do UNIX systems.

To copy a system image from an rcp server to Flash memory, complete the following tasks:

Task Command

    Step 1. Make a backup copy of the current system software image.

See the instructions in the section "Copy System Images from Flash Memory to a Network Server."

    Step 2. Enter configuration mode from the terminal.

This step is required only if you override the default remote username (see Step 3).

configure terminal

    Step 3. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 4. Exit configuration mode.

^Z

    Step 5. Copy the system image from an rcp server to Flash memory.

copy rcp flash

copy rcp file-id (Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series only)

    Step 6. When prompted, enter the IP address or domain name of the network server.

ip-address or name

    Step 7. When prompted, enter the filename of the server system image to be copied.

filename

The copy command automatically displays the Flash memory directory, including the amount of free space. On Cisco 2500, Cisco 3000, and Cisco 4000 systems, if the file being downloaded to Flash memory is an uncompressed system image, the copy command automatically determines the size of the file being downloaded and validates it with the space available in Flash memory.

The server system image copied to the Flash memories must be Cisco Internetwork Operating System (Cisco IOS) Release 10.2 or later.

When you issue the copy rcp flash or copy rcp file-id command, the system prompts you for the IP address or domain name of the server. This server can be another router serving Flash system software images. The system then prompts you for the filename of the software image to copy. With the copy rcp flash command, the system also prompts you to name the system image file that will reside in Flash memory once the copy is complete. You can use the filename of the source file, or you can choose another name.

When free space is available in Flash memory, you are given the option of erasing the existing Flash memory before writing onto it. If no free Flash memory space is available, or if the Flash memory has never been written to, the erase routine is required before new files can be copied. The system informs you of these conditions and prompts you for a response. If you accept the erasure, the system prompts you again to confirm before erasing. Note that the Flash memory is erased at the factory before shipment.

If you attempt to copy a file into Flash memory that is already there, a prompt informs you that a file with the same name already exists. The older file is "deleted" when you copy the new file into Flash. The first copy of the file still resides within Flash memory, but it is rendered unusable in favor of the newest version, and is listed with the "deleted" tag when you use the show flash command. If you terminate the copy process, the newer file is marked "deleted" because the entire file was not copied. In this case, the original file in Flash memory is valid and available to the system.

The following example shows how to copy a system image named mysysim1 from the netadmin1 directory on the remote server named SERVER1.CISCO.COM with an IP address of 172.16.101.101 to Flash memory. To ensure that enough Flash memory is available to accommodate the system image to be copied, the Cisco IOS software allows you to erase the contents of Flash memory first.

Router1# configure terminal Router1(config)# ip rcmd remote-username netadmin1 ^Z Router# copy rcp flash System flash directory: File name/status    1 mysysim1 [2076072 bytes used, 21080 bytes available] Address or name of remote host[UNKNOWN]? 172.16.101.101 Name of file to copy? mysysim1 Copy mysysim1 from SERVER1.CISCO.COM?[confirm]
Checking for file `mysysim1' on SERVER1.CISCO.COM...[OK] Erase Flash device before writing?[confirm] Are you sure?[confirm] Erasing device...ezeeze...erased. Connected to 172.16.101.101 Loading 2076007 byte file mysysim1:!!!!... [OK] Verifying checksum... (0x87FD)...[OK] Router#

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.


Note If you enter n after the "Erase Flash device before writing?" prompt, the copy process continues. If you enter y and confirm the erasure, the erasing routine begins. Be sure to have ample Flash memory space before entering n at the erasure prompt.

The following example uses the copy rcp file-id command to copy the router-image file from a network server using rcp to the Flash memory card inserted in slot 0 of the RP or RSP card:

Router1# configure terminal Router1(config)# ip rcmd remote-username netadmin1 ^Z Router1# copy rcp slot0:router-image

You can copy normal or compressed images to Flash memory. You can produce a compressed system image on any UNIX platform using the compress command. Refer to your UNIX platform's documentation for the exact usage of the compress command.

Copy from a MOP Server to Flash Memory

Standard Cisco IOS images can not be downloaded from a MOP server. However, you may have access to specially modified Cisco IOS images which contain a special MOP-specific header. In these cases you can copy a system image from a MOP server to Flash memory. To do so, perform the following task in EXEC mode:

Task Command

Copy a specialized boot image using MOP.

copy mop flash

This command is not supported on the Cisco 7200 series or the Cisco 7500 series.

The following example shows a sample output from the copy mop flash command. In this example, the system image mopimage, which already exists in Flash memory, is copied to Flash memory, and there is enough memory to copy the file without erasing any existing files.

Router# copy mop flash
System flash directory: File Length Name/status 1 984       router image[deleted] 2 984       router image [2096 bytes used, 8386512 available, 8388608 total] Source file name? mopimage Destination file name [mopimage]? Erase flash device before writing? [confirm] Flash contains files. Are you sure you want to erase? [confirm] Copy 'mopimage' from server as 'mopimage' into Flash WITH erase? [yes/no]yes Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased Loading mopimage from 1234.5678.9abc via Ethernet0: ! [OK - 984/8388608 bytes] Verifying checksum... OK (0x14B3) Flash copy took 0:00:01 [hh:mm:ss]

Copy Configuration Files from a Network Server to the Router

You can also copy configuration files from a TFTP server or an rcp server to the router. You might use this process to restore a configuration file to the router if you have backed up the file to a server. If you replace a router and want to use the configuration file that you created for the original, you can restore that file instead of recreating it. You can also use this process to copy a different configuration to the router that is stored on a network server.

The following sections describe these tasks:

Copy from a TFTP Server to the Router

You can copy a configuration file from a TFTP server to the running configuration or to the startup configuration. When you copy a configuration file to the running configuration, you copy to and run the file from RAM.

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, when you copy a configuration file to the startup configuration, you copy it to the nonvolatile random-access memory (NVRAM). On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, when you copy a file to the startup configuration, you copy the file to a location specified by the CONFIG_FILE environment variable.

To copy a configuration file from a TFTP server to the router, complete the following tasks from EXEC mode:

Task Command

    Step 1. Copy a file from a TFTP server to the router.

copy tftp running-config

or

copy tftp startup-config

    Step 2. When prompted, enter the IP address or domain name of the server.

ip-address or name

    Step 3. If prompted, enter the filename of the server system image.

filename

Copy from an rcp Server to the Router

You can copy a configuration file from an rcp server to the local router. As with TFTP, you can copy the configuration file to the running configuration or to the startup configuration. When you copy a configuration file to the running configuration, you copy to and run the file from RAM.

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, when you copy a configuration file to the startup configuration, you copy it to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, when you copy a file to the startup configuration, you copy the file to a location specified by the CONFIG_FILE environment variable.

The rcp protocol requires that a client send the remote username on each rcp request to a network server. When you issue a request to copy a configuration file from an rcp network server, the Cisco IOS software sends a default remote username unless you override the default by configuring a remote username. As the default value of the remote username, the software sends the remote username associated with the current TTY process, if that name is valid. If the TTY username is invalid, the software uses the host name as the both the remote and local usernames. You can also specify the path of an existing directory along with the remote username.

For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username. If you copy the configuration file from a personal computer used as a file server, the remote host computer must support the remote shell protocol.

Copy a Configuration File to the Running Configuration

You can copy a configuration file from an rcp server to the running configuration.

A host configuration file contains commands that apply to one network server in particular. A network configuration file contains commands that apply to all network servers on a network.

To copy a configuration file from an rcp server to the running configuration, perform the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal. This step is required only if you override the default remote username (see Step 2).

configure terminal

    Step 2. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 3. Exit configuration mode.

^Z

    Step 4. Using rcp, copy the configuration file from a network server to running memory.

copy rcp running-config

    Step 5. When prompted, enter the IP address of the server.

ip-address

    Step 6. When prompted, enter the name of the configuration file.

filename

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 that file on the router:

Router# configure terminal Router(config)# ip rcmd remote-username netadmin1 ^Z Router# copy rcp running-config Host or network configuration file [host]? Address of remote host [255.255.255.255]? 172.16.101.101 Name of configuration file [Router-confg]? host1-confg Configure using host1-confg from 172.16.101.101? [confirm] Connected to 172.16.101.101 Loading 1112 byte file host1-confg:![OK] Router# %SYS-5-CONFIG: Configured from host1-config by rcp from 172.16.101.101
Copy a Configuration File to the Startup Configuration

You can retrieve the commands stored in a configuration file on a server and write them to the startup configuration.

A host configuration file contains commands that apply to one network server in particular. A network configuration file contains commands that apply to all network servers on a network.

To copy a configuration file from an rcp server to the startup configuration, perform the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

This step is required only if you override the default remote username (see Step 2).

configure terminal

    Step 2. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 3. Exit configuration mode.

^Z

    Step 4. Using rcp, copy the configuration file from a network server to the startup configuration.

copy rcp startup-config

    Step 5. When prompted, enter the IP address of the network server.

ip-address

    Step 6. When prompted, enter the name of the configuration file.

filename

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the copy rcp startup-config command copies the configuration file from the network server to the configuration file pointed to by the CONFIG_FILE environment variable. If you want to write the configuration file from the server to NVRAM on the router, be sure to set the CONFIG_FILE environment variable to NVRAM. Refer to the "Download the CONFIG_FILE Environment Variable Configuration on Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series" section for instructions on setting the CONFIG_FILE environment variable with the boot config command.

The following example specifies a remote username of netadmin1. Then it copies a host configuration file host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101 to NVRAM.

Rtr2# configure terminal Rtr2(config)# ip rcmd remote-username netadmin1 ^Z Rtr2# copy rcp startup-config Address of remote host [255.255.255.255]? 172.16.101.101 Name of configuration file[rtr2-confg]? host2-confg Configure using rtr2-confg from 172.16.101.101?[confirm] Connected to 172.16.101.101 Loading 1112 byte file rtr2-confg:![OK] [OK] Rtr2# %SYS-5-CONFIG_NV:Non-volatile store configured from rtr2-config by rcp from 172.16.101.101

Change the Buffer Size for Loading Configuration Files

The buffer that holds the configuration commands is generally the size of NVRAM. Complex configurations might need a larger configuration file buffer size. To change the buffer size, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Change the buffer size to use for booting a host or network configuration file from a network server.

boot buffersize bytes

    Step 3. Exit configuration mode.

^Z

    Step 4. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

In the following example, the buffer size is set to 50000 bytes:

Router1# configure terminal Router1(config)# boot buffersize 50000 ^Z Router1# copy running-config startup-config

Compress Configuration Files

On the Cisco 7000 series, Cisco 4000 series, and Cisco 3000, you can compress configuration files. To do so, perform the following tasks:

Task Command

    Step 1. Verify that your system's ROMs support file compression. If not, you can install new ROMs that support file compression.

Refer to the appropriate hardware installation and maintenance publication.

    Step 2. Specify that the configuration file is to be compressed.

service compress-config

    Step 3. Enter the privileged EXEC mode.

enable [password]1

    Step 4. Enter the new configuration.

Use TFTP or rcp to copy the new configuration. If you try to load a configuration that is more than three times larger than the NVRAM size, the following error message is displayed:

"[buffer overflow - file-size/buffer-size bytes]."

or

configure terminal

    Step 5. Save the new configuration.

copy running-config startup-config

1This command is documented in the "User Interface Commands" chapter of the Configuration Fundamentals Command Reference.

Installing new ROMs is a one-time operation and is necessary only if you do not already have Cisco IOS Release 10 in ROM. Before you can load a configuration file that is larger than the size of NVRAM, you must issue the service compress-config command. The service compress-config command works only if you have Release 10 boot ROMs or later.

Verify the Image in Flash Memory

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 system software image. The checksum of the image in Flash memory is displayed at the bottom of the screen when you issue the copy tftp flash, copy rcp flash, or copy rcp bootflash commands. The README file was copied to the network server automatically when you installed the system software image on the server.

Caution If the checksum value does not match the value in the README file, do not reboot the router. Instead, issue the copy command and compare the checksums again. If the checksum is repeatedly wrong, copy the original system software image back into Flash memory before you reboot the router from Flash memory. If you have a corrupted image in Flash memory and try to boot from Flash, the router will start the system image contained in ROM (assuming that booting from a network server is not configured). If ROM does not contain a fully functional system image, the router will not function and must be reconfigured through a direct console port connection.

Display System Image and Configuration Information

Perform the following tasks in EXEC mode to display information about system software, system image files, and configuration files:

Task Command

List the contents of the BOOT environment variable, the name of the configuration file pointed to by the CONFIG_FILE environment variable, and the contents of the BOOTLDR environment variable.

show boot (Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series only)

List the names of the Flash devices currently supported on the router.

show flash devices (Cisco 7200 series and Cisco 7500 series only)

List the configuration information stored in a specified file.

show file device:filename (Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series only)

List information about Flash memory, including system image filenames and amounts of memory used and remaining.

show flash

List information about Flash memory, including system image filenames, amounts of memory used and remaining, and Flash partitions.

show flash [all | chips | detailed | err | partition number [all | chips | detailed | err] | summary]

show flash [all | chips | filesys] [device:] (Cisco 7000 series PCMCIA slot, Cisco 7200 series, and Cisco 7500 series only)

View the console output generated during the Flash load helper operation.

show flh-log

List the configuration information in running memory.

show running-config

List the startup configuration information.

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the startup configuration is usually NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the CONFIG_FILE environment variable points to the startup configuration.

show startup-config

List the system software release version, configuration register setting, and so on.

show version

Refer to the Configuration Fundamentals Command Reference for examples of these commands.

You can also use the o command in ROM monitor mode to list the configuration register settings on some models.

The Flash memory content listing does not include the checksum of individual files. To recompute and verify the image checksum after the image is copied into Flash memory, complete the following task in EXEC mode:

Task Command

Recompute and verify the image checksum after the image is copied into Flash memory. On the Cisco 7000 series, you can verify the checksum of the image in internal Flash memory only with this command.

verify flash

When you enter this command, the screen prompts you for the filename to verify. By default, it prompts for the last (most recent) file in Flash. Press Return to recompute the default file checksum, or enter the filename of a different file at the prompt. Note that the checksum for microcode images is always 0x0000.

The following example illustrates how to use this command:

Router# verify flash Name of file to verify [gsxx]? Verifying via checksum... vvvvvvvvvvvvvvvvvvvvvvvvvvvvv Flash verification successful. Length = 1923712, checksum = 0xA0C1 Router#

On a Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can verify the checksum of individual files on a Flash memory device. On the Cisco 7000 series, you can verify the checksum of a file located in internal Flash (flash:) or in the PCMCIA slot (slot0:). On the Cisco 7200 series and Cisco 7500 series, you can verify the checksum of a file located in internal Flash (bootflash:) or in one of the PCMCIA slots (slot0:, slot1:). To do so, perform the following task in EXEC mode:

Task Command

Verify the checksum of a file on a specific Flash memory device.

verify [device:]filename

The following example verifies the gsxx file on the Flash memory card inserted in slot 0 of a Cisco 7000, Cisco 7200 series, or Cisco 7500 series:

router#verify slot0:gsxx CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC File slot0:gsxx verified OK

Reexecute the Configuration Commands in Startup Configuration

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can reexecute the configuration commands stored in NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the same command allows you to reexecute the configuration specified by the CONFIG_FILE environment variable.

To reexecute the commands located in the startup configuration, complete the following task in privileged EXEC mode:

Task Command

Reexecute the configuration commands located in NVRAM.

or

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, configure the router to reexecute the configuration specified by the CONFIG_FILE environment variable.

configure memory

Clear the Configuration Information

To clear the contents of your startup configuration, perform the following task in EXEC mode:

Task Command

Clear the contents of your startup configuration.

On most platforms, this command erases the contents of NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this command erases the configuration specified by the CONFIG_FILE environment variable.

erase startup-config

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, when you use the erase startup-config command, the router erases or deletes the configuration pointed to by CONFIG_FILE environment variable. If this variable points to NVRAM, the router erases NVRAM. If the CONFIG_FILE environment variable specifies a Flash memory device and configuration filename, the router deletes the configuration file. That is, the router marks the file as "deleted," rather than erasing it. This feature allows you to recover a "deleted" file. Refer to the "Manage Flash Files" section for more information on recovering deleted files.

To erase a saved configuration from a specific Flash device on a Cisco 7000 series and Cisco 7200 series, complete the following task in EXEC mode:

Task Command

Erase or delete a specified configuration file on a specified Flash device.

erase [device:]filename

or

delete [device:]filename

As with the erase startup-config command, when you erase or delete a specific file, the system marks the file as deleted, allowing you to later recover a "deleted" file. If you omit the device name, the Cisco IOS software uses the default device specified by the cd command.

If you attempt to erase or delete the configuration file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to erase or delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.


Note On the Cisco 7000 series, the erase [device:]filename command differs from the erase flash command. The erase [device:]filename command erases a specified file located in internal Flash memory or on the Flash memory card inserted in the PCMCIA slot. The erase flash command erases internal Flash memory.

The following example erases the myconfig file from a Flash memory card inserted in slot 0:

Router# erase slot0:myconfig

The following example deletes the myconfig file from a Flash memory card inserted in slot 0:

Router# delete slot0:myconfig

Perform General Startup Tasks

When modifying your routing environment, you perform some general startup tasks. For example, to modify a configuration file, you enter configuration mode. You also modify the configuration register boot field to tell the router if and how to load a system image upon startup. Also, instead of using the default system image and configuration file to start up, you can specify a particular system image and configuration file that the router uses to start up. Although not a startup task, this section also describes how to schedule a reload of the system image to occur at a later time.

General Startup Task List

General startup tasks include the following:

Enter Configuration Mode and Select a Configuration Source

To enter configuration mode, enter the configure command at the privileged EXEC prompt. The Cisco IOS software responds with the following prompt asking you to specify the terminal or memory, or a file stored on a network server (network) as the source of configuration commands:

Configuring from terminal, memory, or network [terminal]?

Each of these three methods is described in the following three sections:

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 EXEC command. Also, when the startup configuration is NVRAM, comments do not show up when you list the startup configuration with the show startup-config EXEC command. Comments are stripped out of the configuration file when it is loaded onto the router. However, you can list the comments in configuration files stored on a TFTP, rcp, or MOP server.

Configure the Cisco IOS Software from the Terminal

When you configure the software from the terminal, the software executes the commands you enter at the system prompts. To configure the software from the terminal, complete the following tasks:

Task Command

    Step 1. Enter configuration mode and select the terminal option.

configure terminal

    Step 2. Enter the necessary configuration commands.

See the appropriate chapter for specific configuration commands.

    Step 3. Quit configuration mode.

^Z

    Step 4. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

In the following example, the software is configured from the terminal. The comment The following command provides the router host name identifies the purpose of the next command line. The hostname command changes the router name from router1 to router2. By pressing Ctrl-Z (^Z), the user quits configuration mode. Finally, the copy running-config startup-config command saves the current configuration to the startup configuration.

Router1# configure terminal Router1(config)# !The following command provides the router host name. Router1(config)# hostname router2 ^Z Router2# copy running-config startup-config

When the startup configuration is NVRAM, it stores the current configuration information in text format as configuration commands, recording only nondefault settings. The memory is checksummed to guard against corrupted data.

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the startup software always checks for configuration information in NVRAM. If NVRAM holds valid configuration commands, the Cisco IOS software executes the commands automatically at startup. If the software detects a problem with NVRAM or the configuration it contains, it enters setup mode and prompts for configuration. Problems can include a bad checksum for the information in NVRAM or the absence of critical configuration information. See the publication Troubleshooting Internetworking Systems for troubleshooting procedures. See the "Using Setup for Configuration Changes" chapter in this publication for details on the setup command facility.

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the router startup software uses the configuration pointed to by the CONFIG_FILE environment variable to start up. When the CONFIG_FILE environment variable does not exist or is null (such as at first-time startup), the router uses NVRAM as the default startup device. When the router uses NVRAM to start up and the system detects a problem with NVRAM or the configuration it contains, the router enters setup mode. Refer to the "Using Setup for Configuration Changes" chapter in this publication for more information on the setup command facility. For more information on environment variables, refer to the "Cisco's Implementation of Environment Variables" section.

Configure the Cisco IOS Software from Memory

On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can configure the software to execute the commands located in NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the same command configures the software to execute the configuration specified by the CONFIG_FILE environment variable.

To configure the software to execute the commands located in NVRAM or to execute the configuration specified by the CONFIG_FILE environment variable, complete the following task in privileged EXEC mode:

Task Command

Configure the software to execute the commands located in NVRAM.

or

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, configure the router to execute the configuration specified by the CONFIG_FILE environment variable.

configure memory

Configure the Cisco IOS Software from the Network

You can configure the software by retrieving and modifying a configuration file stored on one of your network servers. To do so, complete the following tasks:

Task Command

    Step 1. Enter configuration mode with the network option.

copy rcp running-config

or

copy tftp running-config

    Step 2. At the system prompt, select a network or host configuration file. The network configuration file contains commands that apply to all network servers and terminal servers on the network. The host configuration file contains commands that apply to one network server in particular.

host or network

    Step 3. At the system prompt, enter the optional IP address of the remote host from which you are retrieving the configuration file.

ip-address

    Step 4. At the system prompt, enter the name of the configuration file or accept the default name.

filename

    Step 5. Confirm the configuration filename that the system supplies.

y

In the following example, the software is configured from the file tokyo-config at IP address 172.16.2.155:

Router1# copy tftp running-config Host or network configuration file [host]? IP address of remote host [255.255.255.255]? 172.16.2.155 Name of configuration file [tokyo-confg]? Configure using tokyo-confg from 172.16.2.155? [confirm] y Booting tokyo-confg from 172.16.2.155:!!! [OK - 874/16000 bytes]

Copy a Configuration File Directly to the Startup Configuration

You can copy a configuration file directly to your startup configuration without affecting the running configuration. On all platforms except the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this task loads a configuration file directly into NVRAM without affecting the running configuration.

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this task loads a configuration file directly into the location specified by the CONFIG_FILE environment variable without affecting the running configuration. If the CONFIG_FILE environment variable specifies NVRAM, the command functions as on all other platforms.

To copy a configuration file directly to the startup configuration, perform the following task in EXEC mode:

Task Command

Load a configuration file directly into NVRAM or directly into the location specified by the CONFIG_FILE environment variable.

copy rcp startup-config

or

copy tftp startup-config

Modify the Configuration Register Boot Field

The configuration register boot field determines whether the router loads an operating system image, and if so, where it obtains this system image. The following sections describe the process for using the configuration register boot field, your process for setting this field, and the tasks you must perform to modify the configuration register boot field.

How the Router Uses the Boot Field

The lowest four bits of the 16-bit configuration register (bits 3, 2, 1, and 0) form the boot field. The following boot field values determine if the router loads an operating system and where it obtains the system image:

When loading a default system image from a network server, the router uses the configuration register settings to determine the default system image filename for booting from a network server. The router forms the default boot filename by starting with the word cisco and then appending the octal equivalent of the boot field number in the configuration register, followed by a hyphen (-) and the processor type name (cisconn-cpu). See the appropriate hardware installation guide for details on the configuration register and default filename.

Setting the Boot Field

You must correctly set the configuration register boot field to ensure that your router loads the operating system image as you intend. To set the boot field, follow this general procedure:


Step 1   Obtain the current configuration register setting. This setting is a hexadecimal value.

Step 2   Modify the current configuration register setting to reflect the way in which you want to load a system image. To do so, change the least significant hexadecimal digit to one of the following:

For example, if the current configuration register setting is 0x101 and you want to load a system image from boot system commands in the startup configuration file, you would change the configuration register setting to 0x102.

Step 3   Reboot the router to make your changes to the configuration register take effect.

Perform the Boot Field Modification Tasks

You modify the boot field from either the hardware configuration register or the software configuration register, depending on the platform.

Use the hardware configuration register to modify the boot field of a Cisco 7000 series that contains boot ROMs earlier than Cisco IOS Release 10.

The hardware configuration register can be changed only on the processor card or with dual in-line package (DIP) switches located at the back of the router. For information on modifying the hardware configuration register, refer to the appropriate hardware installation guide.

Use the software configuration register to modify the boot field of a

To modify the software configuration register boot field, complete the following tasks:

Task Command

    Step 1. Obtain the current configuration register setting.

show version

    Step 2. Enter configuration mode, selecting the terminal option.

configure terminal

    Step 3. Modify the existing configuration register setting to reflect the way in which you want to load a system image.

config-register value

    Step 4. Exit configuration mode.

^Z

    Step 5. Reboot the router to make your changes take effect.

reload

Use the show version EXEC command to display the current configuration register setting. In ROM monitor mode, use the o command to list the value of the configuration register boot field.

In the following example, the show version command indicates that the current configuration register is set so that the router does not automatically load an operating system image. Instead, it enters ROM monitor mode and waits for user-entered ROM monitor commands. The new setting instructs the router to a load a system image from commands in the startup configuration file or from a default system image stored on a network server.

Router1# show version GS Software, Version 9.0(1) Copyright (c) 1986-1992 by cisco Systems, Inc. Compiled Fri 14-Feb-92 12:37 System Bootstrap, Version 4.3 Router1 uptime is 2 days, 10 hours, 0 minutes System restarted by reload System image file is unknown, booted via tftp from 172.16.13.111 Host configuration file is "thor-boots", booted via tftp from 172.16.13.111 Network configuration file is "network-confg", booted via tftp from 172.16.13.111 CSC3 (68020) processor with 4096K bytes of memory. X.25 software. Bridging software. 1 MCI controller (2 Ethernet, 2 Serial). 2 Ethernet/IEEE 802.3 interface. 2 Serial network interface. 32K bytes of non-volatile configuration memory. Configuration register is 0x0 Router1# configure terminal Router1(config)# config-register 0xF ^Z Router1# reload

Specify the Startup System Image

You can enter multiple boot commands in the startup configuration file or in the BOOT environment variable to provide backup methods for loading a system image onto the router. There are three ways to load a system image:


Note The Cisco 7200 series and Cisco 7500 series cannot boot from ROM.

You can enter the different types of boot commands in any order in the startup configuration file or in the BOOT environment variable. If you enter multiple boot commands, the Cisco IOS software tries them in the order they are entered.

Load from Flash Memory

Use the following sections to configure your Cisco 2500 series, Cisco 3000 series, Cisco 4000 series, Cisco 7000 series, Cisco 7200 series, Cisco 7500 series, and AccessPro PC card to boot from Flash memory. With a CSC-MC+ Flash memory card and CSC-MCI controller and appropriate cables, system software images can be written to Flash memory for booting. Depending on the hardware platform, Flash memory might be available as EPROMs, single in-line memory modules (SIMMs), or Flash memory cards. Check the appropriate hardware installation and maintenance guide for information about types of Flash memory available on a specific platform.

In the Cisco 7000 series, Flash memory is located on the RP card or a Flash memory card inserted in the PCMCIA slot. In the Cisco 7200 series, Flash memory is located on the I/O card or on a Flash memory card inserted in PCMCIA slot 1 of the NPE card. In the Cisco 7500 series, Flash memory is located on the RSP card or on a Flash memory card inserted in one of the PCMCIA slots (slot 0 or slot 1) of the RSP card. You can store or boot software images in Flash memory as necessary. Flash memory can reduce the effects of network failure by reducing dependency on files that can only be accessed over the network.


Note Booting from ROM is faster than booting from Flash memory. However, if you are booting from a network server, Flash memory is faster and more reliable.
What You Can Do from Flash Memory

Flash memory allows you to do the following:

Flash Memory Features

Flash memory features include the following:

Security Precautions

Take the following precautions when loading from Flash memory:

Flash Memory Configuration Process for Cisco 2500, Cisco 3000 Series, Cisco 4000 Series, and AccessPro

To configure your Cisco 2500, Cisco 3000 series, Cisco 4000 series, and AccessPro systems to boot from Flash memory, follow this general procedure. Refer to the appropriate hardware installation and maintenance publication for complete instructions on installing the hardware and for information about the jumper settings required for your configuration.


Step 1   On the Cisco 2500, Cisco 3000, and AccessPro, you cannot run the system from Flash memory and copy to it at the same time. Therefore, do one of the following:

Step 2   On the Cisco 2500, Cisco 3000, and AccessPro, if you ran the image from boot ROMs, reload the system image.

Step 3   Copy a system image to Flash memory using TFTP or rcp. See the "Copy System Images from a Network Server to Flash Memory" section for more information on performing this step.

Step 4   Configure the system to automatically boot from the desired file in Flash memory. You might need to change the configuration register value. See the "Modify the Configuration Register Boot Field" section for more information on the modifying configuration register.

Step 5   Save your configurations.

Step 6   Power-cycle and reboot your system to ensure that all is working as expected.

Flash Memory Configuration Process for Cisco 4500 Series

To configure your Cisco 4500 router to boot from Flash memory using a bootstrap image, follow this general procedure:


Step 1   Copy the bootstrap image into Flash memory using rcp or TFTP. See the "Copy Bootstrap Images from a Network Server to Flash Memory (Cisco 4500 series only)" section for more information on performing this step.

Step 2   Configure your system to automatically boot from Flash memory. You might need to change the configuration register value. See the "Modify the Configuration Register Boot Field" section for more information on modifying the configuration register.

Step 3   Save your configurations.

Step 4   Reboot your system to ensure that all is working as expected.

Flash Memory Configuration Process for Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series

For the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, the configuration process is similar to the previous two processes, except you can specify the Flash device that contains the rxboot image. When you receive your Cisco 7000 series router from the factory, ROM contains the rxboot image. When you receive your the Cisco 7200 series or Cisco 7500 series router, bootflash contains the rxboot image. You can change the location of this image to a Flash memory card inserted in a PCMCIA slot. To specify the rxboot image Flash device, you set the BOOTLDR environment variable.


Note When no BOOTLDR environment variable exists, the default rxboot image on the Cisco 7000 series is the image in ROM. On the Cisco 7200 series and Cisco 7500 series, the default rxboot image is the first image file in bootflash.

The Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series configuration process is as follows:


Step 1   Set the BOOTLDR environment variable if you want to change the location of the rxboot image that ROM uses for booting.

Step 2   Optionally, use rcp or TFTP to update the system image that resides in internal Flash memory (bootflash on the Cisco 7200 series and Cisco 7500 series) or on one of the Flash memory cards inserted in a PCMCIA slot. Performing this step allows you to update a degraded system image with one that is not degraded.

Step 3   Configure your system to automatically boot from the desired file in Flash memory. You might need to change the configuration register value. See the "Modify the Configuration Register Boot Field" section for more information on modifying the configuration register.

Step 4   Save your configurations.

Step 5   Power-cycle and reboot your system to ensure that all is working as expected.

Perform Flash Memory Configuration Tasks

Flash memory configuration tasks discussed in this section include the following:

Set the BOOTLDR Environment Variable

To set the BOOTLDR environment variable on your Cisco 7000, Cisco 7200 series, or Cisco 7500 series router, perform the following tasks, beginning in privileged EXEC mode:

Task Command

    Step 1. Verify that internal Flash or bootflash contains the rxboot image.

dir [/all | /deleted] [/long] [device:][filename]

    Step 2. Enter the configuration mode from the terminal.

configure terminal

    Step 3. Set the BOOTLDR environment variable to specify the Flash device and filename of the rxboot image. This step modifies the runtime BOOTLDR environment variable.

boot bootldr device:filename

    Step 4. Exit configuration mode.

^Z

    Step 5. Save this runtime BOOTLDR environment variable to your startup configuration.

copy running-config startup-config

    Step 6. Optionally, verify the contents of the BOOTLDR environment variable.

show boot

The following example sets the BOOTLDR environment to change the location of the rxboot image from internal Flash to slot 0.

Router# dir bootflash: -#- -length- -----date/time------ name 1 620 May 04 1995 26:22:04 rsp-boot-m 2 620 May 24 1995 21:38:14 config2 7993896 bytes available (1496 bytes used) Router# configure terminal Router (config)# boot bootldr slot0:rsp-boot-m ^Z Router# copy running-config startup-config [ok] Router# show boot BOOT variable = slot0:rsp-boot-m CONFIG_FILE variable = nvram: Current CONFIG_FILE variable = slot0:router-config Configuration register is 0x0 Router#
Configure the Router to Automatically Boot from an Image in Flash Memory

To configure a router (including Cisco 3000 series, Cisco 4000 series, Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series) to automatically boot from an image in Flash memory, perform the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Enter the filename of an image stored in Flash memory.

boot system flash [filename]

boot system flash flash:[filename]

boot system flash slot0:[filename] (Cisco 7000 series only)

boot system flash bootflash:[filename]

boot system flash slot0:[filename]

boot system flash slot1:[filename] (Cisco 7200 series and Cisco 7500 series only)

    Step 3. Set the configuration register to enable loading of the system image from Flash memory.

config-register value1

    Step 4. Exit configuration mode.

^Z

    Step 5. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

    Step 6. Optionally, verify the contents of the startup configuration.

show startup-config

    Step 7. Power-cycle and reboot the system to ensure that all works as expected.

reload

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

If you enter more than one image filename, the router tries them in the order entered.

If a filename already appears in the configuration file and you want to specify a new filename, remove the existing filename with the no boot system flash filename command.


Note The no boot system configuration command disables all boot system configuration commands regardless of argument. Specifying the flash keyword or the filename argument with the no boot system command disables only the commands specified by these arguments.

The following example shows how to configure the router to automatically boot from an image in Flash memory:

Router# configure terminal Router (config)# boot system flash gsnew-image Router (config)# config-register 0x010F ^Z Router# copy running-config startup-config [ok] Router# reload [confirm] %SYS-5-RELOAD: Reload requested System Bootstrap, Version 4.6(0.16), BETA SOFTWARE Copyright (c) 1986-1995 by cisco Systems RP1 processor with 16384 Kbytes of memory F3: 1871404+45476+167028 at 0x1000 Booting gsnew-image from flash memory RRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR [OK - 1916912/13767448 bytes] F3: 1871404+45476+167028 at 0x1000 Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134 GS Software (GS7), Version 10.2, Copyright (c) 1986-1995 by cisco Systems, Inc. Compiled Thu 05-Nov-94 14:16 by mlw

Once you have successfully configured Flash memory, you might want to configure the system with the no boot system flash command to revert to booting from ROM or, on a Cisco 7200 series and Cisco 7500 series, from bootflash. You might want to revert to booting from ROM or bootflash if you do not yet need this functionality, if you choose to boot from a network server, or if you do not have the proper image in Flash memory.

Load from a Network Server

You can configure the Cisco IOS software to load a system image file from a network server using TFTP, rcp, or MOP.

To do so, you must set the configuration register boot field to the correct value. See the "Modify the Configuration Register Boot Field" section.

If you do not boot from a network server using MOP and you do not specify either TFTP or rcp, by default the system image that you specify is booted from a network server via TFTP.


Note If you are using a Sun workstation as a network server and TFTP to transfer the file, set up the workstation to enable verification and generation of User Datagram Protocol (UDP) checksums. See the Sun documentation for details.

For increased performance and reliability, use rcp to boot a system image from a network server. The rcp implementation uses the Transmission Control Protocol (TCP), which ensures reliable delivery of data.

You cannot explicitly specify a remote username when you issue the boot command. Instead, the host name of the router is used. If the remote server has a directory structure, as do UNIX systems, and you boot the router from a network server using rcp, the Cisco IOS software searches for the system image on the server relative to the directory of the remote username.

You can also boot from a compressed image on a network server. One reason to use a compressed image is to ensure that there is enough memory available for storage. On routers that do not contain a run-from-ROM image in EPROM, when the router boots software from a network server, the image being booted and the running image both must fit into memory. If the running image is large, there might not be room in memory for the image being booted from the network server.

If there is not enough room in memory to boot a regular image from a network server, you can produce a compressed software image on any UNIX platform using the compress command. Refer to your UNIX platform's documentation for the exact usage of the compress command.

To specify the loading of a system image from a network server, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Specify the system image file to be booted from a network server using rcp, TFTP, or MOP.

boot system [rcp | tftp] filename [ip-address]

or

boot system mop filename [mac-address] [interface]

    Step 3. Set the configuration register to enable loading of the system image from a network server.

config-register value1

    Step 4. Exit configuration mode.

^Z

    Step 5. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

In the following example, a router uses rcp to boot from the testme5.tester system image file on a network server at IP address 172.16.0.1:

Router1# configure terminal Router1(config)# boot system rcp testme5.tester 172.16.0.1 Router (config)# config-register 0x010F ^Z Router1# copy running-config startup-config

Load from ROM

To specify the use of the ROM system image as a backup to other boot instructions in the configuration file, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Specify use of the ROM system image as a backup image.

boot system rom

    Step 3. Set the configuration register to enable loading of the system image from ROM.

config-register value1

    Step 4. Exit configuration mode.

^Z

    Step 5. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

In the following example, a router is configured to boot from ROM:

Router1# configure terminal Router1(config)# boot system rom Router (config)# config-register 0x0101 ^Z Router1# copy running-config startup-config
Note The Cisco 7200 series and Cisco 7500 series cannot load from ROM.

Use a Fault-Tolerant Booting Strategy

Occasionally network failures make booting from a network server impossible. To lessen the effects of network failure, consider the following booting strategy. After Flash is installed and configured, you might want to configure the router to boot in the following order:

    1. Boot an image from Flash.

    2. Boot an image from a system file on a network server.

    3. Boot from ROM image.

This boot order provides the most fault-tolerant booting strategy. Perform the following tasks to allow the router to boot first from Flash, then from a system file from a network server, and finally from ROM:

Task Command

    Step 1. Enter configuration mode from the terminal

configure terminal

    Step 2. Configure the router to boot from Flash memory.

boot system flash [filename]

boot system flash flash:[filename]

boot system flash slot0:[filename] (Cisco 7000 series only)

boot system flash bootflash:[filename]

boot system flash slot0:[filename]

boot system flash slot1:[filename] (Cisco 7200 series and Cisco 7500 series only)

    Step 3. Configure the router to boot from a network server.

boot system [rcp | tftp] filename [ip-address]

    Step 4. Configure the router to boot from ROM.

boot system rom

    Step 5. Set the configuration register to enable loading of the system image from a network server or Flash.

config-register value 1

    Step 6. Exit configuration mode.

^Z

    Step 7. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

The following example illustrates the order of the commands needed to implement this strategy. In the example, a router is configured to first boot an internal Flash image called gsxx. Should that image fail, the router will boot the configuration file gsxx from a network server. If that method should fail, then the system will boot from ROM.

Router# configure terminal Router(config)# boot system flash gsxx Router(config)# boot system gsxx 172.16.101.101 Router(config)# boot system rom Router(config)# config-register 0x010F ^Z Router# copy running-config startup-config [ok]

Using this strategy, a router has three alternative sources from which to boot. These alternative sources help lessen the negative effects of a failure on network or file server from which the system image is copied.

Specify the Startup Configuration File

Configuration files can be stored on network servers. You can configure the router to automatically request and receive two configuration files from the network server at startup:

The first file the server attempts to load is the network configuration file. This file contains information that is shared among several routers. For example, it can be used to provide mapping between IP addresses and host names.

The second file the server attempts to load is the host configuration file. This file contains commands that apply to one router in particular. Both the network and host configuration files must reside on a network server reachable via TFTP, rcp, or MOP, and must be readable.

You can specify an ordered list of network configuration and host configuration filenames. The Cisco IOS software scans this list until it successfully loads the appropriate network or host configuration file.

In addition to storing configuration files on network servers, with the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series you can store configuration files in NVRAM and on Flash memory cards. The CONFIG_FILE environment variable specifies the device and filename of the configuration file to use during initialization. For more information on environment variables, refer to the "Cisco's Implementation of Environment Variables" section.

You can set the CONFIG_FILE environment variable to specify the startup configuration on a Cisco 7000 series, Cisco 7200 series, or Cisco 7500 series.

Specify the Startup Configuration File Task List

To specify a startup configuration file, perform either the first two tasks or the third task:

Download the Network Configuration File

To configure the Cisco IOS software to download a network configuration file from a server at startup, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Enter the network configuration filename to download a file using TFTP, rcp, or MOP.

boot network mop filename [mac-address] [interface]

boot network [tftp | rcp] filename [ip-address]

    Step 3. Enable the router to automatically load the network file upon restart.

service config

    Step 4. Exit configuration mode.

^Z

    Step 5. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

For Step 2, if you do not specify a network configuration filename, the Cisco IOS software uses the default filename network-confg. If you omit both the tftp and the rcp keywords, the software assumes that the you are using TFTP to transfer the file and that the server whose IP address you specify supports TFTP.

If you configure the software to download the network configuration file from a network server using rcp and the server has a directory structure as do UNIX systems, the software searches for the system image on the server relative to the directory of the remote username. The router host name is used as the remote username.

You can specify more than one network configuration file. The software tries them in order until it loads one successfully. This procedure can be useful for keeping files with different configuration information loaded on a network server.

Download the Host Configuration File

To configure the Cisco IOS software to download a host configuration file from a server at startup, complete the following tasks. Step 2 is optional. If you do not specify a host configuration filename, the router uses its own name to form a host configuration filename by converting the name to all lowercase letters, removing all domain information, and appending -confg. If no host name information is available, the software uses the default host configuration filename router-confg.

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Optionally, enter the host configuration filename to be download using MOP, rcp, or TFTP.

boot host mop filename [mac-address] [interface]

boot host [tftp | rcp] filename [ip-address]

    Step 3. Enable the device to automatically load the host file upon restart.

service config

    Step 4. Exit configuration mode.

^Z

    Step 5. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

    Step 6. Reset the router with the new configuration information.

reload

You can specify more than one host configuration file. The Cisco IOS software tries them in order until it loads one successfully. This procedure can be useful for keeping files with different configuration information loaded on a network server.

In the following example, a router is configured to boot from the host configuration file hostfile1 and from the network configuration file networkfile1:

Router1# configure terminal Router1(config)# boot host hostfile1 Router1(config)# boot network networkfile1 Router1(config)# service config ^Z Router1# copy running-config startup-config

If the network server fails to load a configuration file during startup, it tries again every ten minutes (the default setting) until a host provides the requested files. With each failed attempt, the network server displays a message on the console terminal. If the network server is unable to load the specified file, it displays the following message:

Booting host-confg... [timed out]

Refer to the Troubleshooting Internetworking Systems publication for troubleshooting procedures. If there are any problems with the startup configuration file, or if the configuration register is set to ignore NVRAM, the router enters the setup command facility. See the "Using Setup for Configuration Changes" chapter in this publication for details on the setup command.

Download the CONFIG_FILE Environment Variable Configuration on Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series

In addition to loading startup configuration files from a server, on the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series using Cisco IOS Release 11.0 or later you can configure the Cisco IOS software to load a startup configuration file specified by the CONFIG_FILE environment variable. To do so, complete the following tasks, beginning in EXEC mode:

Task Command

    Step 1. Copy the configuration file to the device from which the router will load the file upon restart.

copy

copy flash

copy mop

copy rcp

copy running-config

copy startup-config

copy tftp

    Step 2. Enter configuration mode from the terminal.

configure terminal

    Step 3. Set the CONFIG_FILE environment variable. This step modifies the runtime CONFIG_FILE environment variable.

boot config device:filename

    Step 4. Exit configuration mode.

^Z

    Step 5. Save this runtime CONFIG_FILE environment variable to your startup configuration.

copy running-config startup-config

    Step 6. Optionally, verify the contents of the CONFIG_FILE environment variable.

show boot

When saving the runtime CONFIG_FILE environment variable to the startup configuration, the router 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 router prompts you to confirm your overwrite of the complete version with the distilled version. If NVRAM contains a distilled configuration, the router does not prompt you for confirmation and proceeds with overwriting the existing distilled configuration file in NVRAM.

The following example copies the running configuration file to the first PCMCIA slot of the RSP card in a Cisco 7500 series. This configuration is then used as the startup configuration when the system is restarted.

Router# copy running-config slot0:config2 Router# configure terminal Router (config)# boot config slot0:config2 ^Z Router# copy running-config startup-config [ok] Router# show boot BOOT variable = slot0:rsp-boot-m CONFIG_FILE variable = nvram: Current CONFIG_FILE variable = slot0:config2 Configuration register is 0x010F Router#

Schedule a Reload of the System Image

You may want to schedule a reload of the system image to occur on the router at a later time (for example, late at night or during the weekend when the router is used less), or you may want to synchronize a reload network-wide (for example, to perform a software upgrade on all routers in the network).


Note A scheduled reload must take place within approximately 24 days.

To configure the router to reload the Cisco IOS software at a later time, perform one of the following tasks in privileged EXEC command mode:

Task Command

Schedule a reload of the software to take effect in the specified minutes or hours and minutes.

reload in [hh:]mm [text]

Schedule a reload of the software to take place at the specified time (using a 24-hour clock).

reload at hh:mm [month day | day month] [text]

If you specify the month and day, the reload is scheduled to take place at the specified time and date. If you do not specify the month and day, the reload takes place at the specified time on the current day (if the specified time is later than the current time), or on the next day (if the specified time is earlier than the current time). Specifying 00:00 schedules the reload for midnight.


Note The at keyword can only be used if the system clock has been set on the router (either through NTP, the hardware calendar, or manually). The time is relative to the configured time zone on the router. To schedule reloads across several routers to occur simultaneously, the time on each router must be synchronized with NTP.

To display information about a previously scheduled reload or to determine if a reload has been scheduled on the router, perform the following task in EXEC command mode:

Task Command

Display reload information including the time the reload is scheduled to occur, and the reason for the reload if it was specified when the reload was scheduled.

show reload

To cancel a previously scheduled reload, perform the following task in privileged EXEC command mode:

Task Command

Cancel a previously scheduled reload of the software.

reload cancel

The following example illustrates how to use the reload command to reload the software on the router on the current day at 7:30 p.m.:

router#reload at 19:30 Reload scheduled for 19:30:00 UTC Wed Jun 5 1996 (in 2 hours and 25 minutes) Proceed with reload? [confirm] router#

The following example illustrates how to use the reload command to reload the software on the router at a future time:

router#reload at 02:00 jun 20 Reload scheduled for 02:00:00 UTC Thu Jun 20 1996 (in 344 hours and 53 minutes) Proceed with reload? [confirm] router#

The following example illustrates how to use the reload cancel command to stop a scheduled reload:

router #reload cancel router# *** *** --- SHUTDOWN ABORTED --- ***

Store System Images and Configuration Files

After modifying and saving your routing environment's unique configurations, you might want to store them on a network server. You can use these network server copies of system images and configuration files as backup copies.

Store System Images and Configuration Files Task List

To store system images and configuration files, perform the following tasks:

Copy System Images from Flash Memory to a Network Server

You can copy system images from Flash memory to a TFTP server or to an rcp server. You can use this server copy of the system image as a backup copy, or you can use it to verify that the copy in Flash is the same as the original file on disk. The following sections describe these tasks:

Copy from Flash Memory to a TFTP Server

You can copy a system image to a TFTP network server. In some implementations of TFTP, you must first 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.

To copy a system image to a TFTP network server, perform the following task in EXEC mode:

Task Command

    Step 1. (Optional) If you do not already know it, learn the exact spelling of the system image filename in Flash memory. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can learn the spelling of the system image filename on a specified Flash memory device.

show flash all

show flash [device:] (Cisco 7000 series PCMCIA slot, Cisco 7200 series, and Cisco 7500 series only)

    Step 2. Copy the system image from Flash memory to a TFTP server. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can copy the system image from a specified Flash memory device to a TFTP server.

copy flash tftp

or

copy file-id tftp (Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series only)

    Step 3. When prompted, enter the IP address or domain name of the TFTP server.

ip-address or name

    Step 4. When prompted, enter the filename of the system image in Flash memory.

filename

The following example uses the show flash all command to learn the name of the system image file and the copy flash tftp command to copy the system image to a TFTP server. The name of the system image file (xk09140z) is listed near the end of the show flash all output.

Router# show flash all 2048K bytes of flash memory on embedded flash (in XX). ROM socket code bytes name 0 U42 89BD 0x40000 INTEL 28F020 1 U44 89BD 0x40000 INTEL 28F020 2 U46 89BD 0x40000 INTEL 28F020 3 U48 89BD 0x40000 INTEL 28F020 4 U41 89BD 0x40000 INTEL 28F020 5 U43 89BD 0x40000 INTEL 28F020 6 U45 89BD 0x40000 INTEL 28F020 7 U47 89BD 0x40000 INTEL 28F020   security jumper(12V) is installed,   flash memory is programmable. file  offset length name 0 0x40 1204637 xk09140z   [903848/2097152 bytes free] Router# copy flash tftp IP address of remote host [255.255.255.255]? 172.16.13.110 filename to write on tftp host? xk09140z writing xk09140z !!!!... successful tftp write. Router#

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully. To stop the copy process, press Ctrl-^. Refer to the Troubleshooting Internetworking Systems publication for procedures on how to resolve Flash memory problems.

The following example uses the show flash [device:] command on a Cisco 7200 series and Cisco 7500 series to display the name of the system image file to copy. In the example, the Flash memory device containing the system image is the second PCMCIA slot. The file to copy is test. The example uses the copy file-id tftp command to copy test to a TFTP server.

Router#show flash slot1: -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1   .. 1 46A11866 2036C 4 746 May 16 1995 16:24:37 test Router#copy slot1:test tftp IP address of remote host [255.255.255.255]? 172.16.13.110 filename to write on tftp host? [test]y writing test!!!!... successful tftp write. Router#

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.

Once you have configured Flash memory, you might want to configure the system (using the configure terminal command) with the no boot system flash configuration command to revert to booting from ROM. For example, you might want to revert to booting from ROM if you do not yet need this functionality, if you choose to boot from a network server, or if you do not have the proper image in Flash memory. After you enter the no boot system flash command, use the copy running-config startup-config command to save the new configuration command to the startup configuration.

This procedure on the Cisco 7000 series also requires changing the processor's configuration register. Refer to the "Modify the Configuration Register Boot Field" section for instructions.

Copy from Flash Memory to an rcp Server

You can also copy a system image from Flash memory to an rcp network server.

The rcp protocol requires that a client send the remote username on each rcp request to the server. When you copy an image from Flash memory to a network server using rcp, the Cisco IOS software sends the remote username associated with the current TTY (terminal) process, if that name is valid. If the TTY remote username is invalid, the software uses the router host name as both the remote and local usernames.


Note For Cisco, TTYs are commonly used for access services. The concept of TTY originated with UNIX. For UNIX systems, each physical device is represented in the file system. Terminals are called TTY devices, which stands for teletype, the original UNIX terminal.

You can configure a different remote username to be sent to the server. If the network server has a directory structure, as do UNIX systems, the rcp protocol implementation writes the system image relative to the directory associated with the remote username on the network server.

For the rcp command to execute properly, an account must be defined on the destination server for the remote username.

The rcp server must be properly configured to accept the rcp write request from the user on the router. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the rcp server. For example, if the router contains the following configuration lines:

hostname Rtr1 ip rcmd remote-username User0

and the router's IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:

Router1.company.com Rtr1

Refer to the documentation for your rcp server for more details.

To stop the copy process, press Ctrl-^. Refer to the Troubleshooting Internetworking Systems publication for procedures on how to resolve Flash memory problems.

If you copy the system image to a personal computer used as a file server, the computer must support the rcp protocol.

To copy the system image from Flash memory to a network server, perform the following tasks:

Task Command

    Step 1. (Optional) If you do not already know it, learn the exact spelling of the system image filename in Flash memory. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can learn the spelling of the system image filename on a specified Flash memory device.

show flash all

show flash [device:] (Cisco 7000 series PCMCIA slot, Cisco 7200 series, and Cisco 7500 series only)

    Step 2. Enter configuration mode from the terminal. This step is required only if you are going to override the default remote username (see Step 3).

configure terminal

    Step 3. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 4. Exit configuration mode.

^Z

    Step 5. Using rcp, copy the system image in Flash memory to a network server.

copy flash rcp

copy file-id rcp (Cisco 7200 series and Cisco 7500 series only)

    Step 6. When prompted, enter the IP address or domain name of the rcp server.

ip-address or name

    Step 7. When prompted, enter the filename of the system image in Flash memory.

filename

The following example copies the system image gsxx to a network server using rcp:

Router# configure terminal Router(config)# ip rcmd remote-username netadmin1 ^Z Router# copy flash rcp System flash directory: File name/status   1 gsxx [2076072 bytes used, 21080 bytes available] Name of file to copy? gsxx Address or name of remote host [UNKNOWN]? 172.16.1.111 File name to write to? gsxx Verifying checksum for `gsxx' (file # 1)...[OK] Writing gsxx - Router#

The following example copies a system image file called test from the second PCMCIA slot on a Cisco 7500 series to a network server using rcp:

Router# configure terminal Router(config)# ip rcmd remote-username netadmin1 ^Z Router# copy slot1:test rcp System flash directory: File name/status   1 test [2076072 bytes used, 21080 bytes available] Name of file to copy? [test] y Address or name of remote host [UNKNOWN]? 172.16.1.111 File name to write to? test Verifying checksum for `test' (file # 1)...[OK] Writing test!!!!... Router#

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.

Copy Configuration Files from the Router to a Network Server

You can copy configuration files from the router to a TFTP server or rcp server. You might do this task to back up a current configuration file to a server before changing its contents, thereby allowing you to later restore the original configuration file from the server. The following sections describe these tasks:

Copy from the Router to a TFTP Server

Usually, the configuration file that you copy to must already exist on the TFTP server and be globally writable before the TFTP server allows you to write to it.

To store configuration information on a TFTP network server, complete the following tasks in the EXEC mode:

Task Command

    Step 1. Specify that the running or startup configuration file be stored on a network server.

copy running-config tftp

or

copy startup-config tftp

    Step 2. Enter the IP address of the network server.

ip-address

    Step 3. Enter the name of the configuration file to store on the server.

filename

    Step 4. Confirm the entry.

y

The command prompts you for the destination host's address and a filename, as the following example illustrates.

The following example copies a configuration file from a router to a TFTP server:

Tokyo# copy running-config tftp Remote host [172.16.2.155]? Name of configuration file to write [tokyo-confg]? Write file tokyo-confg on host 172.16.2.155? [confirm] y # Writing tokyo-confg!!! [OK]

Copy from the Router to an rcp Server

You can use rcp to copy configuration files from the local router to a network server. You can copy a running configuration file or a startup configuration file to the server.

The rcp protocol requires a client to send the remote username on each rcp request to a server. When you issue a command to copy a configuration file from the router to a server using rcp, the Cisco IOS software sends a default remote username unless you override the default by configuring a remote username. The default value of the remote username is the remote username associated with the current TTY (terminal) process, if that name is valid.


Note For UNIX systems, each physical device is represented in the file system. Terminals are called TTY devices, which stands for teletype, the original UNIX terminal.

If the TTY remote username is invalid, the software uses the router host name as both the remote and local usernames. If the server has a directory structure, as do UNIX systems, the rcp protocol implementation writes the configuration file to relative to the directory associated with the remote username on the server.

For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username.

The rcp server must be properly configured to accept the rcp write request from the user on the router. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the rcp server. For example, if the router contains the following configuration lines:

hostname Rtr1 ip rcmd remote-username User0

and the router's IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:

Router1.company.com Rtr1

Refer to the documentation for your rcp server for more details.

If you copy the configuration file to a personal computer used as a file server, the computer must support rcp.

To copy a startup configuration file or a running configuration file from the router to an rcp server, use one of following tasks:

Copy a Running Configuration File to an rcp Server

You can copy the running configuration file to an rcp server. The copied file can serve as a backup configuration file.

To store a running configuration file on a server, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

This step is required only if you override the default remote username (see Step 2).

configure terminal

    Step 2. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 3. Specify that the router's running configuration file be stored on a network server.

copy running-config rcp

    Step 4. Enter the IP address of the network server.

ip-address

    Step 5. Enter the name of the configuration file to store on the server.

filename

    Step 6. Confirm the entry.

y

The following example copies the running configuration file named Rtr2-confg to the netadmin1 directory on the remote host with an IP address of 172.16.101.101:

Rtr#2 configure terminal Rtr2(config)# ip rcmd remote-username netadmin1 ^Z Rtr2# copy running-config rcp Remote host[]? 172.16.101.101 Name of configuration file to write [Rtr2-confg]? Write file rtr2-confg on host 172.16.101.101?[confirm] Building configuration...[OK] Connected to 172.16.101.101 Rtr2#
Copy a Startup Configuration File to an rcp Server

You can copy the contents of the startup configuration file to an rcp server. The copied file can serve as a backup configuration file.

To copy a startup configuration file to a network server using rcp, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

This step is required only if you override the default remote username (see Step 2).

configure terminal

    Step 2. Specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 3. Specify that the startup configuration file be copied to an rcp server. On most platforms, this step copies the configuration from NVRAM to the rcp server. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step copies the configuration file specified by the CONFIG_FILE environment variable to an rcp server.

copy startup-config rcp

    Step 4. Enter the IP address of the network server.

ip-address

    Step 5. Enter the name of the configuration file to store on the server.

filename

    Step 6. Confirm the entry.

y

The following example shows how to store a startup configuration file on a server by using rcp to copy the file:

Rtr2# configure terminal Rtr2(config)# ip rcmd remote-username netadmin2 ^Z Rtr2# copy startup-config rcp Remote host[]? 172.16.101.101 Name of configuration file to write [rtr2-confg]? Write file rtr2-confg on host 172.16.101.101?[confirm] ![OK]

Configure a Router as a TFTP or RARP Server

It is too costly and inefficient to have a dedicated server on every network segment. However, when you do not have a server on every segment, your network operations can incur enormous time delays across network segments. You can configure a router as a RARP or TFTP server to reduce costs and time delays in your network.

Typically, a router that is configured as a server provides other routers with operating system images from its Flash memory. You can also configure the router to respond to other types of service requests, such as Reverse Address Resolution Protocol (RARP) requests.

Configure a Router as a Server Task List

To configure the router as a server, perform any of the following tasks. The tasks are not mutually exclusive.

Configure a Router as a TFTP Server

As a TFTP server host, the router responds to TFTP Read Request messages by sending a copy of the system image contained in ROM or one of the system images contained in Flash memory to the requesting host. The TFTP Read Request message must use one of the filenames that are specified in the configuration.

To specify TFTP server operation, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Specify TFTP server operation.

tftp-server flash [partition-number:]filename1 [alias filename2] [access-list-number]

tftp-server rom alias filename1 [access-list-number]

tftp-server flash device:filename (Cisco 7000 series, Cisco 7200 series, or Cisco 7500 series only)

    Step 3. Exit configuration mode.

^Z

    Step 4. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

The TFTP session can sometimes fail. TFTP generates the following special characters to help you determine why a TFTP session fails:

The transfer session might still succeed even if TFTP generates these characters, but the output is useful for diagnosing the transfer failure. For troubleshooting procedures, refer to the Troubleshooting Internetworking Systems publication.

In the following example, the system uses TFTP to send a copy of the Flash memory file version-10.3 in response to a TFTP Read Request for that file. The requesting host is checked against access list 22.

tftp-server flash version-10.3 22

In the following example, the system uses TFTP to send a copy of the ROM image gs3-k.101 in response to a TFTP Read Request for the gs3-k.101 file:

tftp-server rom alias gs3-k.101

Configure Flash Memory as a TFTP Server

Flash memory can be used as a TFTP file server for other routers on the network. This feature allows you to boot a remote router with an image that resides in the Flash server memory.

With Cisco IOS Release 11.0, the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series allow you to specify one of the different Flash memory devices as the TFTP server. On the Cisco 7000 series, you can specify internal Flash (flash:) or the PCMCIA slot (slot0:) as the TFTP server. On the Cisco 7200 series and Cisco 7500 series, you can specify its internal Flash (bootflash:) or one of the two PCMCIA slots (slot0:, slot1:) as the TFTP server.

In the description that follows, one Cisco 7000 router is referred to as the Flash server, and all other routers are referred to as client routers. Example configurations for the Flash server and client routers include commands as necessary.

Configure Flash Memory as a TFTP Server Task List

To configure Flash memory as a TFTP server, perform the following tasks:

Perform Prerequisite Tasks

The Flash server and client router must be able to reach each other before the TFTP function can be implemented. Verify this connection by pinging between the Flash server and client router (in either direction) with the ping command.

An example use of the ping command is as follows:

Router# ping 172.16.101.101

In this example, the Internet Protocol (IP) address of 172.16.101.101 belongs to the client router. Connectivity is indicated by a series of exclamation points (!), while a series of periods (.) plus [timed out] or [failed] indicates no connection. If the connection fails, reconfigure the interface, check the physical connection between the Flash server and client router, and ping again.

After you verify the connection, ensure that a TFTP-bootable image is present in Flash memory. This is the system software image the client router will boot. Note the name of this software image so you can verify it after the first client boot.


Note The filename used must represent a software image that is present in Flash memory. If no image resides in Flash memory, the client router will boot the server's ROM image as a default.
Caution For full functionality, the software residing in the Flash memory must be the same type as the ROM software installed on the client router. For example, if the server has X.25 software, and the client does not have X.25 software in ROM, the client will not have X.25 capabilities after booting from the server's Flash memory.

Configure the Flash Server

Perform the following task to configure the Flash server:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Specify the TFTP server operation for the router.

tftp-server flash [partition-number:]filename1 [alias filename2] [access-list-number]

or

tftp-server flash device:filename (Cisco 7000 series, Cisco 7200 series, or Cisco 7500 series only)

The following example configures the Flash server. This example gives the filename of the software image in the Flash server and one access list (labeled 1). The access list must include the network where the client router resides. Thus, in the example, the network 172.16.101.0 and any client routers on it are permitted access to the Flash server filename gs7-k.9.17.

Server# configure terminal Enter configuration commands, one per line. Edit with DELETE, CRTL/W, and CRTL/U; end with CTRL/Z Server(config)# tftp-server flash gs7-k.9.17 1 Server(config)# access-list 1 permit 172.16.101.0 0.0.0.255 ^Z Server# copy running-config startup-config <Return> [ok] Server#

Configure the Client Router

Configure the client router to first load a system image from the Flash server. As a backup, configure the client router to then load its own ROM image if the load from a Flash server fails.

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Remove all previous boot system statements from the configuration file.

no boot system

    Step 3. Specify that the client router load a system image from the Flash server.

boot system [rcp | tftp] filename [ip-address]

    Step 4. As a backup, specify that the client router loads its own ROM image.

boot system rom

    Step 5. Set the configuration register to enable the client router to load a system image from a network server.

config-register value1

    Step 6. Exit configuration mode.

^Z

    Step 7. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

    Step 8. Reload the router to make your changes take effect.

reload

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

Caution Using the no boot system command, as in the following example, will invalidate all other boot system commands currently in the client router system configuration. Before proceeding, determine whether the system configuration stored in the client router should first be saved (uploaded) to a TFTP file server so you have a backup copy.

The following example shows how to use these commands:

Client# configure terminal Enter configuration commands, one per line. Edit with DELETE, CRTL/W, and CRTL/U; end with CTRL/Z Client(config)# no boot system Client(config)# boot system gs7-k.9.17 172.31.111.111 Client(config)# boot system rom Client(config)# config-register 0x010F ^Z Client# copy running-config startup-config [ok] Server# reload

In this example, the no boot system command invalidates all other boot system commands currently in the configuration memory, and any boot system commands entered after this command will be executed first. The second command, boot system filename address, tells the client router to look for the file gs7-k.9.17 in the (Flash) server with an IP address of 172.31.111.111. Failing this, the client router will boot from its system ROM in response to the boot system rom command, which is included as a backup in case of a network problem. The copy running-config startup-config command copies the configuration to NVRAM or, on the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, to the location specified by the CONFIG_FILE environment variable, and the reload command boots the system.

Caution The system software (gs7-k.9.17 in the example) to be booted from the Flash server (172.31.111.111 in the example) must reside in Flash memory on the server. If it is not in Flash memory, the client router will boot the Flash server's system ROM.

Use the show version command on the client router to verify that the software image booted from the Flash server is the image present in Flash memory. To do so, perform the following task:

Task Command

Verify that the software image booted from the Flash server is the image present in Flash memory of the client router.

show version

Following is sample output of the show version command:

env-chassis> show version GS Software (GS7), Version 9.1.17 Copyright (c) 1986-1992 by cisco Systems, Inc. Compiled Wed 21-Oct-92 22:49 System Bootstrap, Version 4.6(0.15) Current date and time is Thu 10-22-1992 13:15:03 Boot date and time is Thu 10-22-1992 13:06:55 env-chassis uptime is 9 minutes System restarted by power-on System image file is "gs7-k.9.17", booted via tftp from 172.31.111.111 RP1 (68040) processor with 16384K bytes of memory. X.25 software. Bridging software. 1 Switch Processor. 1 EIP controller (6 Ethernet). 6 Ethernet/IEEE 802.3 interface. 128K bytes of non-volatile configuration memory. 4096K bytes of flash memory on embedded flash (in RP1). Configuration register is 0x010F

The important information in this example is contained in the first line "GS Software..." and in the line that begins "System image file...." The "GS Software..." line shows the version of the operating system in the client router's RAM. The "System image file...." line show the filename of the system image loaded from the Flash server.


Note If no bootable image is present in the Flash server memory when the client server is booted, the version currently running (the first line of the show version output) is the system ROM version of the Flash server by default.

Verify that the software shown in the first line of the show version output is the software residing in the Flash server memory.

Configure a Router as a RARP Server

You can configure the router as a RARP server. This feature enables the Cisco IOS software to answer RARP requests, making diskless booting of various systems possible (for example, Sun workstations or PCs on networks where the client and server are on separate subnets).

To configure the router as a RARP server, perform the following task in interface configuration mode:

Task Command

Configure the router as a RARP server.

ip rarp-server ip-address

Figure 6 illustrates a network configuration in which a router is configured to act as a RARP server. Figure 7 illustrates a similar configuration with an access server.


Figure 6: Configuring a Router as a RARP Server


Router A's configuration

! Allow the router to forward broadcast portmapper requests ip forward-protocol udp 111 ! Provide the router with the IP address of the diskless sun arp 172.30.2.5 0800.2002.ff5b arpa interface ethernet 0 ! Configure the router to act as a RARP server, using the Sun Server's IP ! address in the RARP response packet. ip rarp-server 172.30.3.100 ! Portmapper broadcasts from this interface are sent to the Sun Server. ip helper-address 172.30.3.100

The Sun client and server's IP addresses must use the same major network number because of a limitation with the current SunOS rpc.bootparamd daemon.


Figure 7:
Configuring an Access Server as a RARP Server


In the following example, the access server is configured to act as a RARP server. Figure 7 illustrates the network configuration.

! Allow the access server to forward broadcast portmapper requests ip forward-protocol udp 111 ! Provide the access server with the IP address of the diskless sun arp 172.30.2.5 0800.2002.ff5b arpa interface ethernet 0 ! Configure the access server to act as a RARP server, using the Sun Server's ! IP address in the RARP response packet. ip rarp-server 172.30.3.100 ! Portmapper broadcasts from this interface are sent to the Sun Server. ip helper-address 172.30.3.100

The Sun client and server's IP addresses must use the same major network number because of a limitation with the current SunOS rpc.bootparamd daemon.

Configure for Other Types of Servers

You can configure the Cisco IOS software to work with various types of servers. Specifically, you configure the software to forward different types of service requests.

Configure for Other Types of Servers Task List

You can configure the Cisco IOS software to forward extended BOOTP requests over asynchronous interfaces and MOP server boot requests. The following sections describe these tasks. The tasks are not mutually exclusive.

Specify Asynchronous Interface Extended BOOTP Requests

The Boot Protocol (BOOTP) server for asynchronous interfaces supports the extended BOOTP requests specified in RFC 1084. The following command is useful in conjunction with using the auxiliary port as an asynchronous interface.

To configure extended BOOTP requests for asynchronous interfaces, perform the following task in global configuration mode:

Task Command

Configure extended BOOTP requests for asynchronous interfaces.

async-bootp tag [:hostname] data

You can display the extended BOOTP requests by performing the following task in EXEC mode:

Task Command

Show parameters for BOOTP requests.

show async-bootp

Specify MOP Server Boot Requests

To change the Cisco IOS software parameters for retransmitting boot requests to a MOP server, complete the following tasks, starting in privileged EXEC mode:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Change MOP server parameters.

mop device-code {cisco | ds200}

mop retransmit-timer seconds

mop retries count

    Step 3. Exit configuration mode.

^Z

    Step 4. Save the configuration file to your startup configuration. On most platforms, this step saves the configuration to NVRAM. On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, this step saves the configuration to the location specified by the CONFIG_FILE environment variable.

copy running-config startup-config

By default, when the software transmits a request that requires a response from a MOP boot server and the server does not respond, the message will be retransmitted after 4 seconds. If the MOP boot server and router are separated by a slow serial link, it may take longer than 4 seconds for the router to receive a response to its message. Therefore, you might want to configure the software to wait longer than 4 seconds before retransmitting the message if you are using such a link.

In the following example, if the MOP boot server does not respond within 10 seconds after the router sends a message, the software will retransmit the message:

Router# configure terminal Router (config)# mop retransmit-timer 10 ^Z Router# copy running-config startup-config

Perform Cisco 2500, 3000, 4000, 4500, AS5100 Series, and AccessPro
Startup Tasks

The startup tasks in this section apply only to the Cisco 2500, 3000, 4000, 4500, AS5100 series, and AccessPro. The tasks in this section are optional.

Cisco 2500, 3000, 4000, 4500, AS5100 Series, and AccessPro Startup Task List

You can perform the following optional startup tasks for your Cisco 2500, 3000,  4000, 4500 series, or AccessPro router or access server:

Partition Flash Memory Using Dual Flash Bank

Dual Flash bank allows you to partition banks of Flash memory into separate, logical devices so that the router can hold and maintain two different software images. No downtime is required: you can write software into Flash memory while running software in another bank of Flash memory.

Systems that Support Dual Flash Bank

To use dual Flash bank, you must have at least two banks of Flash memory; a bank is a set of 4 chips. The minimum partition size is the size of a bank.

Dual Flash bank is supported on low-end systems that have at least two banks of Flash memory, including systems that support a single SIMM that has two banks of Flash memory (the AccessPro card and the Cisco 4500). Systems that support dual Flash bank include the AccessPro PC card, Cisco 1003, Cisco 2500 series, Cisco 3000 series, and Cisco 4000 series. CiscoFlash MIB variables support dual Flash bank. Refer to the Cisco Management Information Base (MIB) User Quick Reference for more information on these variables.

Benefits

Partitioning Flash memory provides the following benefits:

Flash Load Helper versus Dual Flash Bank

You might use Flash load helper rather than dual Flash bank for one of the following reasons:

See the "Use Flash Load Helper to Upgrade Software on Run-from-Flash Systems (Cisco 2500 series and Cisco 3000 series only)" section for information about using Flash load helper.

Understanding Relocatable Images

Because partitioning requires that run-from-Flash images be loaded into different Flash memory banks at different physical addresses, images must be relocatable. A relocatable image is an image that contains special relocation information that allows the following:

Run-from-Flash systems (that is, the Cisco 2500 series and some Cisco 3000 series) formerly ran nonrelocatable images that needed to be stored in Flash memory at a specific address. As a result, the image had to be stored as the first file in Flash memory. If the image was stored at any other location in Flash memory, it could not be executed in Flash memory, nor could the image be executed from RAM. The relocatable image overcomes this limitation.

With Flash partitioning, the run-from-Flash images will not work unless they are loaded into the first device as the first file. This requirement defeats the purpose of partitioning. However, relocatable images can be loaded into any Flash partition (and not necessarily as the first file within the partition) and executed in place.

Note that unless the image is downloaded as the first file in the first partition, this download must be performed by an image that recognizes relocatable images.

In contrast, a nonrelocatable image is an image that does not recognize relocatable images. The following are nonrelocatable images:

You can identify a relocatable image by its name. The naming convention for images that are stored on a UNIX system is as follows:

platform-capabilities-type

The letter "l" in the type field indicates a relocatable image. Examples of some relocatable image names are

Only images with the "igs" prefix used by the Cisco 3000 series and Cisco 2500 series are available as relocatable images. Images distributed on floppy diskettes might have different naming conventions.

For backward compatibility, the relocatable images have been linked to execute as the first file in the first Flash memory bank. This makes the images similar to previous Flash memory images. Thus, if you download a relocatable image into a nonrelocatable image system, the image runs correctly from Flash memory.

Dual Flash Bank Configuration Task List

To use dual Flash memory bank, perform the tasks in one or more of the following sections:

See the "Load System Images on Systems with Dual-Bank Flash Memory (Cisco 4500 series and AccessPro only)" section for information about booting systems that have two banks of Flash memory.

See the "Display System Image and Configuration Information" section for information about monitoring dual Flash bank.

To upgrade your software, you must erase Flash memory when you are prompted during the download. This is to ensure that the image is downloaded as the first file in Flash memory.

Partition Flash Memory

To partition Flash memory, perform the following task in global configuration mode:

Task Command

Partition Flash memory.

partition flash partitions [size1 size2]

This task will succeed only if the system has at least two banks of Flash and the partitioning does not cause an existing file in Flash memory to be split across the two partitions.

Copy a File into a Flash Partition

To download a file into a Flash partition, perform one of the following tasks in EXEC mode:

Task Command

Download a file from a TFTP server into a Flash partition.

copy tftp flash

Download a file from a MOP server into a Flash partition.

copy mop flash

Download a file from an rcp server into a Flash partition.

copy rcp flash

The prompts displayed after you execute these tasks indicate the method by which the file can downloaded into each partition. The possible methods are as follows:

If the image download can be done into more than one partition, you are prompted for the partition number. Enter any of the following at the partition number prompt to obtain help:

Manually Boot from Flash Memory

To manually boot the router from Flash memory, perform one of the following tasks in ROM monitor mode:

Task Command

Boot the first bootable file found in any partition.

boot flash

or

boot flash flash:

Boot the first bootable file from the specified partition.

boot flash partition-number:

or

boot flash flash:partition-number:

Boot the specified file from the first partition.

boot flash filename

or

boot flash flash:filename

Boot the specified file from the specified partition.

boot flash partition-number:filename

or

boot flash flash:partition-number:filename

The result of booting a relocatable image from Flash memory depends on where and how the image was downloaded into Flash memory. Table 4 describes the various ways an image might be downloaded and the corresponding results of booting from Flash memory.


Table 4:
Downloading an Image and Booting from Flash
Method of Downloading Result of Booting from Flash

The image was downloaded as the first file by a nonrelocatable image.

The image will execute in place from Flash memory, like a run-from-Flash image.

The image was downloaded not as the first file by a nonrelocatable image.

The nonrelocatable image will not relocate the image before storage in Flash memory. This image will not be booted.

The image was downloaded as the first file by a relocatable image.

The image will execute in place from Flash memory, like a run-from-Flash image.

The image was downloaded not as the first file by a relocatable image (including download into the second partition).

The relocatable image relocates the image before storage in Flash memory. Hence, the image will execute in place from Flash memory, like any other run-from-Flash image.

Configure the Router to Automatically Boot from Flash Memory

To configure the router to boot automatically from Flash memory, perform one of the following tasks in global configuration mode:

Task Command

Boot the first bootable file found in any partition.

boot system flash

or

boot system flash:

Boot the first bootable file from the specified partition.

boot system flash partition-number:

or

boot system flash flash:partition-number:

Boot the specified file from the first partition.

boot system flash filename

or

boot system flash flash:filename

Boot the specified file from the specified partition.

boot system flash partition-number:filename

or

boot system flash flash:partition-number:filename

The result of booting a relocatable image from Flash memory depends on where and how the image was downloaded into Flash memory. Table 4 described the various ways an image might be downloaded and the corresponding results of booting from Flash memory.

Configure a Flash Partition as a TFTP Server

To configure a Flash partition as a TFTP server, perform one of the following tasks in global configuration mode:

Task Command

Specify a file.

tftp-server flash filename1

Specify a file in the first partition of Flash.

tftp-server flash filename1

Specify a file in the specified partition of Flash.

tftp-server flash partition-number:filename1

Once you have specified TFTP server operation, exit configuration mode and save the configuration information to your startup configuration.

Use Flash Load Helper to Upgrade Software on Run-from-Flash Systems (Cisco 2500 series and Cisco 3000 series only)

Flash load helper is a software option that enables you to upgrade system software on run-from-Flash systems that have a single bank of Flash memory. It is a lower-cost software upgrade solution than dual-bank Flash, which requires two banks of Flash memory on one SIMM.

The Flash load helper software upgrade process is simple and does not require additional hardware; however, it does require some brief network downtime. A system image running from Flash can use Flash load helper only if the boot ROMs support Flash load helper. Otherwise, you must perform the Flash upgrade manually. See the "Manually Boot from Flash Memory" section.

Flash load helper is an automated procedure that reloads the ROM-based image, downloads the software to Flash memory, and reboots to the system image in Flash memory. Flash load helper performs checks and validations to maximize the success of a Flash upgrade and minimize the chance of leaving Flash memory either in an erased state or with a file that cannot boot.

In run-from-Flash systems, the software image is stored in and executed from the Flash EPROM rather than from RAM. This method reduces memory cost. A run-from-Flash system requires enough Flash EPROM to hold the image and enough main system RAM to hold the routing tables and data structures. The system does not need the same amount of main system RAM as a run-from-RAM system because the full image does not reside in RAM. Run-from-Flash systems include the Cisco 2500 series and some Cisco 3000 series.

Flash load helper includes the following features:

Flash load helper can also be used on systems with multiple banks of Flash memory that support Flash memory partitioning. Flash load helper enables you to download a new file into the same partition from which the system is executing an image.

For information about how to partition multiple banks of Flash memory so your system can hold two different images, see the "Partition Flash Memory Using Dual Flash Bank" section.

Flash Load Helper Configuration Task List

Perform the tasks in the following sections to use and monitor Flash load helper:

Download a File Using Flash Load Helper

To download a new file to Flash memory using Flash load helper, check to make sure that your boot ROMs support Flash load helper and then perform the following task in privileged EXEC mode:

Task Command

Download a new file to Flash memory.

copy tftp flash

or

copy mop flash

The following error message displays if you are in a Telnet session and the system is set for manual booting (the boot bits in the configuration register are zero):

ERR: Config register boot bits set for manual booting

In case of any catastrophic failure in the Flash memory upgrade, this error message helps to minimize the chance of the system going down to ROM monitor mode and being taken out of the remote Telnet user's control.

The system tries to bring up at least the boot ROM image if it cannot boot an image from Flash memory. Before reinitiating the copy tftp flash command, you must set the configuration register boot field to a nonzero value, using the config-register global configuration command.

The copy tftp flash command initiates a series of prompts to which you must provide responses. The dialog is similar to the following:

Router# copy tftp flash *************************** NOTICE ******************************* Flash load helper v1.0 This process will accept the TFTP copy options and then terminate the current system image to use the ROM based image for the copy. Router functionality will not be available during that time. If you are logged in via telnet, this connection will terminate. Users with console access can see the results of the copy operation. ******************************************************************

If terminals other than the one on which this command is being executed are active, the following message appears:

There are active users logged into the system. Proceed? [confirm] y System flash directory: File Length  Name/status 1    2251320 abc/igs-kf.914 [2251384 bytes used, 1942920 available, 4194304 total]

Enter the IP address or the name of the remote host you are copying from:

Address or name of remote host [255.255.255.255]? 172.16.1.111

Enter the name of the file you want to copy:

Source file name? abc/igs-kf.914

Enter the name of the destination file:

Destination file name [default = source name]? <Return> Accessing file `abc/igs-kf.914' on 172.16.1.111.... Loading from 172.16.13.111: Erase flash device before writing? [confirm] <Return>

If you choose to erase Flash memory, the dialog continues as follows. The copy tftp flash operation verifies the request from the running image by trying to copy a single block from the remote TFTP server. Then the Flash load helper is executed, causing the system to reload to the ROM-based system image.

Erase flash device before writing? [confirm] y Flash contains files. Are you sure? [confirm] y

If the file does not seem to be a valid image for the system, a warning is displayed and a separate confirmation is sought from you.

Copy `abc/igs-kf.914' from TFTP server as `abc/igs-kf.914' into Flash WITH erase? y %SYS-5-RELOAD: Reload requested %FLH: rxboot/igs-kf.914r from 172.16.1.111 to flash...

If you choose not to erase Flash memory and there is no file duplication, the dialog continues as follows:

Erase flash device before writing? [confirm] n Copy `abc/igs-kf.914' from TFTP server as `abc/igs-kf.914' into Flash WITHOUT erase? y

If you choose not to erase Flash memory, and there was file duplication, the dialog continues as follows:

Erase flash device before writing? [confirm] n File `abc/igs-kf.914' already exists; it will be invalidated! Invalidate existing copy of `abc/igs-kf' in flash memory? [confirm] y Copy `abc/igs-kf.914' from TFTP server as `abc/igs-kf.914' into Flash WITHOUT erase? y

If the configuration has been modified but not yet saved, you are prompted to save the configuration:

System configuration has been modified. Save? [confirm]

If you confirm to save the configuration, you might also receive this message:

Warning: Attempting to overwrite an NVRAM configuration previously written by a different version of the system image. Overwrite the previous NVRAM configuration? [confirm]

Users with open Telnet connections are notified of the system reload, as follows:

**System going down for Flash upgrade**

If the TFTP process fails, the copy operation is retried up to three times. If the failure happens in the middle of a copy operation so that only part of the file has been written to Flash memory, the retry does not erase Flash memory unless you specified an erase operation. The partly written file is marked as deleted, and a new file is opened with the same name. If Flash memory runs out of free space in this process, the copy operation is terminated.

After Flash load helper finishes copying (whether the copy operation is successful or not), it automatically attempts an automatic or a manual boot, depending on the value of bit zero of the configuration register boot field:

Monitor Flash Load Helper

To view the system console output generated during the Flash load helper operation, use the image that has been booted up after the Flash memory upgrade. Perform the following task in privileged EXEC mode:

Task Command

View the console output generated during the Flash load helper operation.

show flh-log

If you are a remote Telnet user performing the Flash upgrade without a console connection, this task allows you to retrieve console output when your Telnet connection has terminated due to the switch to the ROM image. The output indicates what happened during the download, and is particularly useful if the download fails.

Understand Additional Cisco 3000 Series and Cisco 4000 Series Features

The following sections describe additional Cisco 3000 series and Cisco 4000 series features:

Copying and Automatic Booting Features

On the Cisco 3000 and 4000, the following automatic booting features are implemented on systems that do not run from Flash memory:

Flash Upgrade Features

On the Cisco 4000 series systems and Cisco 3000 series routers that do not run from Flash memory, the upgrade feature of checks and validations are performed to maximize the success of a Flash upgrade and minimize the chances of leaving Flash memory in either an erased state or with a nonbootable file. The software performs the following checks:

Load System Images on Systems with Dual-Bank Flash Memory (Cisco 4500 series and AccessPro only)

The AccessPro card and the Cisco 4500 have two banks of Flash memory on one SIMM, referred to as dual-bank Flash memory. The dual-bank Flash SIMM is used for storing system images.

Dual-bank Flash provides partitioning support on systems that can accommodate only one Flash SIMM device. See the "Partition Flash Memory Using Dual Flash Bank" section for information about how to partition Flash memory.

To load system images on systems with dual-bank Flash memory, perform the following tasks:

Copy a Boot Image on a Cisco 4500

You can copy a boot image from an rcp, TFTP, or MOP server to boot Flash memory. You can also copy the boot image from the boot Flash memory to an rcp or TFTP server.

To copy a boot image from a TFTP or rcp server to boot Flash memory, perform the following task in EXEC mode:

Task Command

Copy a boot image from an TFTP or rcp server to boot Flash memory.

copy tftp bootflash

or

copy rcp bootflash

To copy a boot image from a MOP server to boot Flash memory, perform the following task in EXEC mode:

Task Command

Copy a boot image from a MOP server to boot Flash memory.

copy mop bootflash

To copy a boot image from boot Flash memory to an rcp or TFTP server, perform the following task in EXEC mode:

Task Command

Copy a boot image from boot Flash memory to an rcp or TFTP server.

copy bootflash {rcp | tftp}

Verify a Boot Image's Checksum on a Cisco 4500

To verify the checksum of a boot image in boot Flash memory, perform the following task in EXEC mode:

Task Command

Verify the checksum of a boot image.

verify bootflash

Erase Boot Flash Memory on a Cisco 4500

To erase the contents of boot Flash memory, perform the following task at the EXEC prompt:

Task Command

Erase boot Flash memory.

erase bootflash

Copy Bootstrap Images from a Network Server to Flash Memory (Cisco 4500 series only)

For the Cisco 4500 router, you can copy a bootstrap image stored on a TFTP or rcp network server to Flash memory.

The rcp protocol requires that a client send the remote username on each rcp request. When you copy a bootstrap image from a network server using rcp, the Cisco IOS software sends the remote username associated with the current TTY (terminal) process, if that name is valid. If the TTY username is invalid, the software uses the router host name as the both the remote and local usernames.

You can configure a different remote username to be sent to the server. If the remote server has a directory structure, as do UNIX systems, the rcp protocol implementation searches for the bootstrap image to copy from the remote server relative to the directory of the remote username.


Note For Cisco, TTYs are commonly used for access services. The concept of TTY originated with UNIX. For UNIX systems, each physical device is represented in the file system. Terminals are called TTY devices, which stands for teletype, the original UNIX terminal.

For the rcp command to execute properly, an account must be defined on the destination server for the remote username.

When you request the bootstrap image to copy using rcp, the Cisco IOS software prompts you for the name or address of the server and the name of the file to be copied. It provides an option to erase existing Flash memory before writing onto it, and allows you to confirm the erasure. The entire copying process takes several minutes and differs from network to network.

To copy a bootstrap image from a TFTP or rcp server to Flash memory on a Cisco 4500 router, complete the following tasks

Tasks Command

    Step 1. Make a backup copy of the current system or bootstrap software image.

See the instructions in the section "Copy System Images from Flash Memory to a Network Server."

    Step 2. Enter configuration mode from the terminal.

This step is required if you are going to override the default remote username (see Step 3).

configure terminal

    Step 3. If the copy is performed via rcp, specify the remote username. This step is optional, but recommended.

ip rcmd remote-username username

    Step 4. Exit configuration mode.

^Z

    Step 5. Copy the bootstrap image from the TFTP or rcp network server to Flash memory.

copy tftp bootflash

or

copy rcp bootflash

    Step 6. When prompted, enter the IP address or domain name of the server.

ip-address or name

    Step 7. When prompted, enter the filename of the bootstrap image to be copied from the server.

filename

:

Before booting the router from Flash memory, verify that the checksum of the bootstrap image in Flash memory matches the checksum listed in the README file that was distributed with the system software image. The checksum of the bootstrap image in Flash memory is displayed at the bottom of the display output when you issue the copy request. The README file was copied to the server automatically when you installed the system software.

Caution If the checksum value does not match the value in the README file, do not reboot the router. Instead, issue the copy command and compare the checksums again. If the checksum is repeatedly wrong, copy the original bootstrap image back into Flash memory before you reboot from Flash memory. If you have a corrupted image in Flash memory and try to boot from Flash, the router loads the system image contained in ROM (unless the system is configured to boot from a network server).

If you use rcp to copy the bootstrap image from a personal computer used as a file server, the computer must support rsh. If you use TFTP to copy the bootstrap image from a personal computer used as a file server, the computer must be configured as a TFTP server.

The following example shows how to copy a bootstrap image from the server to Flash memory:

Router1# configure terminal Router1(config)# ip rcmd remote-username netadmin1 ^Z Router1# copy rcp bootflash System flash directory: File name/status    1 btxx [2076072 bytes used, 21080 bytes available] Address or name of remote host[UNKNOWN]? 172.16.1.111 Name of file to copy? btxx Copy btxx from UTOPIA.CISCO.COM?[confirm] Checking for file `btxx' on UTOPIA.CISCO.COM...[OK] Erase flash device before writing?[confirm] Are you sure?[confirm] Erasing device...ezeeze...erased. Connected to 172.16.1.111 Loading 2076007 byte file btxx:!!!!... [OK] Verifying checksum... (0x87FD)...[OK] Router1#

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.

Perform Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series Startup Tasks

This section describes Cisco's implementation of environment variables on the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series. Additionally, the section discusses startup tasks pertaining to these high-end routers.

Cisco's Implementation of Environment Variables

With Cisco IOS Release 11.0, you can use Flash memory cards in the Personal Computer Memory Card International Association (PCMCIA) Flash memory card slots on your Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series. The Cisco 7000 series Route Processor (RP) card contains one PCMCIA slot, the Cisco 7200 series Network Processing Engine (NPE) contains two PCMCIA slots, and the Cisco 7500 series Route Switch Processor (RSP) card contains two PCMCIA slots.

These Flash memory cards can store executable images and configuration files. The router can now boot images and load configuration files from Flash memory cards as well as from internal flash (or "bootflash" on the Cisco 7200 series and Cisco 7500 series), NVRAM, and the network.

Because the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series can boot images and load configuration files from several locations, these systems use special ROM monitor environment variables to specify the location and filename of images and configuration files that the router is to use for various functions. These special environment variables are as follows:

BOOT Environment Variable

The BOOT environment variable specifies a list of bootable images on various devices. For the Cisco 7000 series, valid devices are internal flash (flash:), the PCMCIA slot (slot0:), mop, rom, tftp, and rcp. For the Cisco 7200 series and Cisco 7500 series, valid devices are internal flash (bootflash:), the first PCMCIA slot (slot0:), the second PCMCIA slot (slot1:), and tftp. After you save the BOOT environment variable to your startup configuration, the router checks the variable upon startup to determine the device and filename of the image to boot.

The router tries to boot the first image in the BOOT environment variable list. If the router is unsuccessful at booting that image, it tries to boot the next image specified in the list. The router tries each image in the list until it successfully boots. If the router cannot boot any image in the BOOT environment variable list, then the router attempts to boot the ROM image (if the router is a Cisco 7000 series) or the rxboot image (if the router is a Cisco 7200 series or Cisco 7500 series).

If an entry in the BOOT environment variable list does not specify a device, the router assumes the device is tftp. If an entry in the BOOT environment variable list specifies an invalid device, the router skips that entry.

BOOTLDR Environment Variable

The BOOTLDR environment specifies the flash device and filename containing the rxboot image that the ROM monitor uses. For the Cisco 7000 series, valid devices are flash: and slot0:. For the Cisco 7200 series and Cisco 7500 series, valid devices are bootflash:, slot0:, and slot1:.

This environment variable allows you to have several rxboot images. Moreover, you can instruct the ROM monitor to use a specific rxboot image without having to switch out ROMs. Once you save the BOOTLDR environment variable to your startup configuration, the router checks the variable upon startup to determine which rxboot image to use.

CONFIG_FILE Environment Variable

The CONFIG_FILE environment variable specifies the device and filename of the configuration file to use for initialization (startup). For the Cisco 7000 series, valid devices are flash:, nvram:, and slot0:. For the Cisco 7200 series and Cisco 7500 series, valid devices are bootflash:, nvram:, slot0:, and slot1:. Once you save the CONFIG_FILE environment variable to your startup configuration, the router checks the variable upon startup to determine the location and filename of the configuration file to use for initialization.

The router uses the NVRAM configuration during initialization when the CONFIG_FILE environment variable does not exist or when it is null (such as at first-time startup). If the router detects a problem with NVRAM or the configuration it contains, the router enters setup mode. Refer to the "Using Setup for Configuration Changes" chapter in this publication for more information on the setup command facility.

Controlling Environment Variables

Although the ROM monitor controls environment variables, you can create, modify, or view them with certain system image commands. To create or modify the BOOT, BOOTLDR, and CONFIG_FILE environment variables, use the boot system, boot bootldr, and boot config system image commands, respectively. Always use these three commands to change the variable.


Note When you use these three global configuration commands, you affect only the running configuration. You must save the environment variable settings to your startup configuration to place the information under ROM monitor control and for the environment variables to function as expected. Use the
copy running-config startup-config command to save the environment variables from your running configuration to your startup configuration.

You can view the contents of the BOOT, BOOTLDR, and the CONFIG_FILE environment variables by issuing the show boot command. This command displays the settings for these variables as they exist in the startup configuration as well as in the running configuration if a running configuration setting differs from a startup configuration setting.

Use the show startup-config command to display the contents of the configuration file pointed to by the CONFIG_FILE environment variable.

For complete information on the commands presented in this section, refer to the Configuration Fundamentals Command Reference.

Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series Startup Task List

Perform the following Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series startup tasks. The first task is required if you are using a new PCMCIA Flash memory card. All other tasks are optional.

Format Flash Memory

On the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you must format a new Flash memory card before using it in a PCMCIA slot. On the Cisco 7200 series and Cisco 7500 series, you can also format internal Flash memory (bootflash).

Flash memory cards have sectors that can fail. You can reserve certain Flash memory sectors as "spares" for use when other sectors fail. Use the format command to specify between 0 and 16 sectors as spares. If you reserve a small number of spare sectors for emergencies, you do not waste space because you can use most of the Flash memory card. If you specify zero spare sectors and some sectors fail, you must reformat the Flash memory card and thereby erase all existing data.

The system requires a monlib file for the format operation. The monlib file is the ROM monitor library. The ROM monitor uses the monlib file to access files in the Flash file system. The Cisco IOS Release 11.0 system software contains the monlib file.

Format Flash Memory Process

Caution The following formatting procedure erases all information in Flash memory. To prevent the loss of important data, proceed carefully.

Use the following procedure to format Flash memory. If you are formatting bootflash, you can skip the first step. If you are formatting a Flash memory card, complete both steps.


Step 1   Insert the new Flash memory card into a PCMCIA slot. Refer to instructions on maintaining the router and replacing PCMCIA cards in your router's hardware documentation for instructions on performing this step.

Step 2   Format Flash memory.

To format Flash memory, complete the following task in EXEC mode:

Task Command

Format Flash memory.

format [spare spare-number] device1: [[device2:][monlib-filename]]

The following example shows the format command that formats a Flash memory card inserted in slot 0.

Router# format slot0: Running config file on this device, proceed? [confirm]y All sectors will be erased, proceed? [confirm]y Enter volume id (up to 31 characters): <Return> Formatting sector 1 (erasing) Format device slot0 completed

When the router returns you to the EXEC prompt, the new Flash memory card is successfully formatted and ready for use.

Caution You can read from or write to Flash memory cards formatted for Cisco 7000 series Route Processor (RP) cards in your Cisco 7200 series or Cisco 7500 series, but you cannot boot the Cisco 7200 series or Cisco 7500 series from a Flash memory card that is formatted for the Cisco 7000 series. Similarly, you can read from or write to Flash memory cards formatted for the Cisco 7200 series or Cisco 7500 series in your Cisco 7000 series, but you cannot boot the Cisco 7000 series from a Flash memory card that is formatted for the Cisco 7200 series or Cisco 7500 series.

Recovering from Locked Blocks

You also format a Flash memory card to recover from locked blocks. A locked block of Flash memory occurs when power is lost or a Flash memory card is unplugged during a write or erase operation. When a block of Flash memory is locked, it cannot be written to or erased, and the operation will consistently fail at a particular block location. The only way to recover from locked blocks is by reformatting the Flash memory card with the format command.

Caution Formatting a Flash memory card to recover from locked blocks will cause existing data to be lost.

Configure High System Availability Operation (Cisco 7500 series only)

High system availability (HSA) refers to how quickly your router returns to an operational status after a failure occurs. On the Cisco 7507 and Cisco 7513, you can install two RSP cards in a single router to improve system availability.

Two RSP cards in a router provide the most basic level of increased system availability through a "cold restart" feature. A "cold restart" means that when one RSP card fails, the other RSP card reboots the router. In this way, your router is never in a failed state for very long, thereby increasing system availability.

When one RSP card takes over operation from another, system operation is interrupted. This change is similar to issuing the reload command. The following events occur when one RSP card fails and the other takes over:


Note HSA does not impact performance in terms of packets per second or overall bandwidth. Additionally, HSA does not provide fault-tolerance or redundancy.

Master and Slave Operation

A router configured for HSA operation has one RSP card that is the master and one that is the slave. The master RSP card functions as if it were a single processor, controlling all functions of the router. The slave RSP card does nothing but actively monitor the master for failure.

A system crash can cause the master RSP to fail or go into a nonfunctional state. When the slave RSP detects a nonfunctional master, the slave resets itself and takes part in master-slave arbitration. Master-slave arbitration is a ROM monitor process that determines which RSP card is the master and which is the slave upon startup (or reboot).

If a system crash causes the master RSP to fail, the slave RSP becomes the new master RSP and uses its own system image and configuration file to reboot the router. The failed RSP card now becomes the slave. The failure state of the slave (formerly the master) can be accessed from the console via the show stacks command.

With HSA operation, the following items are important to note:

Implementation Methods

There are two common ways to use HSA. You can use HSA for:

  Use this method to protect against an RSP card failure. With this method, you configure both RSP cards with the same software image and configuration information. Also, you configure the router to automatically synchronize configuration information on both cards when changes occur.
  Use this method to protect against critical Cisco IOS software errors in a particular release. With this method, you configure the RSP cards with different software images, but with the same configuration information.

You can also use HSA for advanced implementations. For example, you can configure the RSP cards with


Note While other, more complex uses are possible, the configuration information in this guide describes tasks for only the two common methods—simple hardware backup and software error protection.

System Requirements

To configure HSA operation, you must have a Cisco 7507 or Cisco 7513 containing two RSP processor cards and Cisco IOS Release 11.1 or later.

Configure HSA Operation Task List

When configuring HSA operation, complete the following tasks. The first task is required. Depending on the outcome of the first task, either the second or third task is also required. The fourth and fifth tasks are optional.

Determine the HSA Implementation Method to Use

Before you can configure HSA operation, you must first decide how you want to use HSA in your internetwork. Do you want to use HSA for simple hardware backup or for software error protection? If you are using new or experimental Cisco IOS software, consider using the software error protection method; otherwise, use the simple hardware backup method.

Once you have decided which method to use, proceed to either the "Configure HSA for Simple Hardware Backup" section or the "Configure HSA for Software Error Protection" section.

Configure HSA for Simple Hardware Backup

With the simple hardware backup method, you configure both RSP cards with the same software image and configuration information. To configure HSA for simple hardware backup, perform the following tasks. The first task is optional.


Step 1  
Specify the Default Slave RSP

Step 2   Ensure That Both RSP Cards Contain the Same Images

Step 3   Ensure That Both RSP Cards Contain the Same Configuration File

Specify the Default Slave RSP

Because your view of the environment is always from the master RSP perspective, you define a default slave RSP. The router uses the default slave information when booting:

To define the default slave RSP, perform the following task, beginning in global configuration mode:

Tasks Command

    Step 1. Enter the configuration mode from the terminal.

configure terminal

    Step 2. Define the default slave RSP.

slave default-slot processor-slot-number

    Step 3. Exit configuration mode.

^Z

    Step 4. Save this information to your startup configuration.

copy running-config startup-config

Upon the next system reboot, the above changes take effect (if both RSP cards are operational). Thus, the specified default slave becomes the slave RSP card. The other RSP card takes over mastership of the system and controls all functions of the router.

If you do not specifically define the default slave RSP, the RSP card located in the higher number processor slot is the default slave. On the Cisco 7507, processor slot 3 contains the default slave RSP. On the Cisco 7513, processor slot 7 contains the default slave RSP.

The following example sets the default slave RSP to processor slot 2 on a Cisco 7507:

Router# configure terminal Router (config)# slave default-slot 2 ^Z Router# copy running-config startup-config
Ensure That Both RSP Cards Contain the Same Images

To ensure that both RSP cards have the same system image, perform the following tasks in EXEC mode:

Tasks Command

    Step 1. Display the contents of the BOOT environment variable to learn the current booting parameters for the master and slave RSP.

show boot

    Step 2. Verify the location and version of the master RSP software image.

dir [/all | /deleted] [/long] {bootflash | slot0 | slot1} [filename]

    Step 3. Determine if the slave RSP contains the same software image in the same location.

dir [/all | /deleted] [/long] {slavebootflash | slaveslot0 | slaveslot1} [filename]

    Step 4. If the slave RSP does not contain the same system image in the same location, copy the master's system image to the appropriate slave location.

copy file-id {slavebootflash | slaveslot0 | slaveslot1}

Note that you might also have to use the delete and/or squeeze command in conjunction with the copy command to accomplish this step. Refer to the "Manage Flash Files" section for more information on these commands.

The following example ensures that both RSP cards have the same system image. Note that because no environment variables are set, the default environment variables are in effect for both the master and slave RSP.

Router# show boot BOOT variable = CONFIG_FILE variable = Current CONFIG_FILE variable = BOOTLDR variable does not exist Configuration register is 0x0 current slave is in slot 7 BOOT variable = CONFIG_FILE variable = BOOTLDR variable does not exist Configuration register is 0x0 Router# dir slot0: -#- -length- -----date/time------ name 1    3482498  May 4 1993 21:38:04 rsp-k-mz11.2 7993896 bytes available (1496 bytes used) Router# dir slaveslot0: -#- -length- -----date/time------ name 1    3482498  May 4 1993 21:38:04 rsp-k-mz11.1 7993896 bytes available (1496 bytes used) Router# delete slaveslot0:rsp-k-mz11.1 Router# copy slot0:rsp-k-mz11.2 slaveslot0:rsp-k-mz11.2

To ensure that both RSP cards have the same microcode images, perform the following tasks beginning in privileged EXEC mode:

Tasks Command

    Step 1. Determine the microcode images used on the interface processors. If all interface processors are running from the bundled system microcode, no further action is required.

show controller cbus1

    Step 2. If any interface processors are running from the flash file system, verify the location and version of the master RSP's supplementary microcode.

dir [/all | /deleted] [/long] {bootflash | slot0 | slot1} [filename]

    Step 3. Determine if the slave RSP contains the same microcode image in the same location.

dir [/all | /deleted] [/long] {slavebootflash | slaveslot0 | slaveslot1} [filename]

    Step 4. If the slave RSP does not contain the same microcode image in the same location, copy the master's microcode image to the appropriate slave location.

copy file-id {slavebootflash | slaveslot0 | slaveslot1}

Note that you might also have to use the delete and/or squeeze command in conjunction with the copy command to accomplish this step. Refer to the "Manage Flash Files" section for more information on these commands.

1This command is documented in the "Interface Commands" chapter of the Configuration Fundamentals Command Reference.

The following example ensures that both RSP cards have the same microcode image. Notice that slots 0, 1, 4, 9, and 10 load microcode from the bundled software, as noted by the statement software loaded from system. Slot 11, the (Fast Serial Interface Processor) FSIP processor, does not use the microcode bundled with the system. Instead, it loads the microcode from slot0:pond/bath/rsp_fsip20-1. Thus, you must ensure that the slave RSP has a copy of the same FSIP microcode in the same location.

Router# show controller cbus MEMD at 40000000, 2097152 bytes (unused 416, recarves 3, lost 0)   RawQ 48000100, ReturnQ 48000108, EventQ 48000110   BufhdrQ 48000128 (2948 items), LovltrQ 48000140 (5 items, 1632 bytes)   IpcbufQ 48000148 (16 items, 4096 bytes)   3571 buffer headers (48002000 - 4800FF20)   pool0: 28 buffers, 256 bytes, queue 48000130   pool1: 237 buffers, 1536 bytes, queue 48000138   pool2: 333 buffers, 4544 bytes, queue 48000150   pool3: 4 buffers, 4576 bytes, queue 48000158   slot0: EIP, hw 1.5, sw 20.00, ccb 5800FF30, cmdq 48000080, vps 4096 software loaded from system Ethernet0/0, addr 0000.0ca3.cc00 (bia 0000.0ca3.cc00) gfreeq 48000138, lfreeq 48000160 (1536 bytes), throttled 0 rxlo 4, rxhi 42, rxcurr 0, maxrxcurr 2 txq 48000168, txacc 48000082 (value 27), txlimit 27  ......... slot1: FIP, hw 2.9, sw 20.02, ccb 5800FF40, cmdq 48000088, vps 4096 software loaded from system Fddi1/0, addr 0000.0ca3.cc20 (bia 0000.0ca3.cc20) gfreeq 48000150, lfreeq 480001C0 (4544 bytes), throttled 0 rxlo 4, rxhi 165, rxcurr 0, maxrxcurr 0 txq 480001C8, txacc 480000B2 (value 0), txlimit 95 slot4: AIP, hw 1.3, sw 20.02, ccb 5800FF70, cmdq 480000A0, vps 8192 software loaded from system ATM4/0, applique is SONET (155Mbps) gfreeq 48000150, lfreeq 480001D0 (4544 bytes), throttled 0 rxlo 4, rxhi 165, rxcurr 0, maxrxcurr 0 txq 480001D8, txacc 480000BA (value 0), txlimit 95 slot9: MIP, hw 1.0, sw 20.02, ccb 5800FFC0, cmdq 480000C8, vps 8192 software loaded from system T1 9/0, applique is Channelized T1 gfreeq 48000138, lfreeq 480001E0 (1536 bytes), throttled 0 rxlo 4, rxhi 42, rxcurr 0, maxrxcurr 0 txq 480001E8, txacc 480000C2 (value 27), txlimit 27  ....... slot10: TRIP, hw 1.1, sw 20.00, ccb 5800FFD0, cmdq 480000D0, vps 4096 software loaded from system TokenRing10/0, addr 0000.0ca3.cd40 (bia 0000.0ca3.cd40) gfreeq 48000150, lfreeq 48000200 (4544 bytes), throttled 0 rxlo 4, rxhi 165, rxcurr 1, maxrxcurr 1 txq 48000208, txacc 480000D2 (value 95), txlimit 95  ......... slot11: FSIP, hw 1.1, sw 20.01, ccb 5800FFE0, cmdq 480000D8, vps 8192 software loaded from flash slot0:pond/bath/rsp_fsip20-1 Serial11/0, applique is Universal (cable unattached) gfreeq 48000138, lfreeq 48000240 (1536 bytes), throttled 0 rxlo 4, rxhi 42, rxcurr 0, maxrxcurr 0 txq 48000248, txacc 480000F2 (value 5), txlimit 27  ........... Router# dir slot0:pond/bath/rsp_fsip20-1 -#- -length- -----date/time------ name 3 10242 Jan 01 1995 03:46:31 pond/bath/rsp_fsip20-1 Router# dir slaveslot0:pond/bath/rsp_fsip20-1 No such file 4079832 bytes available (3915560 bytes used) Router# copy slot0:pond/bath/rsp_fsip20-1 slaveslot0: 4079704 bytes available on device slaveslot0, proceed? [confirm] Router# dir slaveslot0:pond/bath/rsp_fsip20-1 -#- -length- -----date/time------ name 3 10242 Mar 01 1993 02:35:04 pond/bath/rsp_fsip20-1 4069460 bytes available (3925932 bytes used) Router#
Ensure That Both RSP Cards Contain the Same Configuration File

With both the simple hardware backup and software error protection implementation methods, you always want your master and slave configuration files to match. To ensure that they match, turn on automatic synchronization. In automatic synchronization mode, the master copies its startup configuration to the slave's startup configuration when you issue a copy command that specifies the master's startup configuration (startup-config) as the target.

Automatic synchronization mode is on by default; however, to turn it on manually, perform the following tasks, beginning in global configuration mode:

Tasks Command

    Step 1. Enter the configuration mode from the terminal.

configure terminal

    Step 2. Turn on automatic synchronization mode.

slave auto-sync config

    Step 3. Exit configuration mode.

^Z

    Step 4. Save this information to your startup configuration and copy the configuration to the slave's startup configuration.

copy running-config startup-config

The following example turns on automatic configuration file synchronization:

Router# configure terminal Router (config)# slave auto-sync config ^Z Router# copy running-config startup-config

Configure HSA for Software Error Protection

With the software error protection method, you configure the RSP cards with different software images, but with the same configuration information. To configure HSA for software error protection, perform the following tasks. The first task is optional.


Step 1  
Specify the Default Slave RSP. (Refer to this task in the previous section "Configure HSA for Simple Hardware Backup.")

Step 2   Ensure That Both RSP Cards Contain the Same Configuration File. (Refer to this task in the previous section "Configure HSA for Simple Hardware Backup.")

Step 3   Specify Different Startup Images for the Master and Slave RSP.

Specify Different Startup Images for the Master and Slave RSP

When the factory sends you a new Cisco 7507 or Cisco 7513 with two RSPs, you receive the same system image on both RSP cards. For the software error protection method, you need two different software images on the RSP cards. Thus, you copy a desired image to the master RSP card and modify the boot system commands to reflect booting two different system images. Each RSP card uses its own image to boot the router when it becomes the master.

To specify different startup images for the master and slave RSP, perform the following tasks, beginning in EXEC mode:

Tasks Command

    Step 1. Verify the location and version of the master RSP software image.

dir [/all | /deleted] [/long] {bootflash | slot0 | slot1} [filename]

    Step 2. Determine if the slave RSP contains the same software image in the same location.

dir [/all | /deleted] [/long] {slavebootflash | slaveslot0 | slaveslot1} [filename]

    Step 3. Copy a different system image to the master RSP.

copy file-id {bootflash | slot0 | slot1}

copy flash {bootflash | slot0 | slot1}

copy rcp {bootflash | slot0 | slot1}

copy tftp {bootflash | slot0 | slot1}

    Step 4. Enter configuration mode from the terminal.

configure terminal

    Step 5. From global configuration mode, configure the master RSP to boot the new image from the appropriate location.

boot system flash bootflash:[filename]

boot system flash slot0:[filename]

boot system flash slot1:[filename]

    Step 6. Also, add a boot system command that specifies the slave's boot image and location. This is the boot image that the slave uses when it becomes the master RSP and boots the system. Note that the because the slave will boot this image when the slave is actually the new master RSP, the command syntax does not use a "slave" prefix.

boot system flash bootflash:[filename]

boot system flash slot0:[filename]

boot system flash slot1:[filename]

    Step 7. Configure the master RSP to boot from a network server.

boot system [rcp | tftp] filename [ip-address]

    Step 8. Set the configuration register to enable the system to load the system image from a network server or from Flash.

config-register value 1

    Step 9. Exit configuration mode.

^Z

    Step 10. Save the configuration file to the master's startup configuration. Because automatic synchronization is turned on, this step saves the boot system commands to the master and slave startup configuration.

copy running-config startup-config

    Step 11. Reset the router with the new configuration information.

reload

1Refer to the "Modify the Configuration Register Boot Field" section for more information on systems that can use this command to modify the software configuration register.

In the following example, assume that:

Figure 8 illustrates the software error protection configuration for this example. The configuration commands for this configuration follow the figure.


Figure 8: Software Error Protection: Upgrading to a New Software Version

Because you always view the environment from the master RSP perspective, in the following command you view the master's slot 0 to verify the location and version of the master's software image:

Router# dir slot0: -#- -length- -----date/time------ name 1    3482496  May 4 1993 21:38:04 rsp-k-mz11.1 7993896 bytes available (1496 bytes used)

Now view the slave's software image location and version:

Router# dir slaveslot0: -#- -length- -----date/time------ name 1    3482496  May 4 1993 21:38:04 rsp-k-mz11.1 7993896 bytes available (1496 bytes used)

Because you want to run the Release 11.2 system image on one RSP card and the Release 11.1 system image on the other RSP card, copy the Release 11.2 system image to the master's slot 0:

Router# copy tftp slot0:rsp-k-mz11.2

Enter global configuration mode and configure the system to boot first from a Release 11.2 system image and then from a Release 11.1 system image.

Router# configure terminal Router (config)# boot system flash slot0:rsp-k-mz11.2 Router (config)# boot system flash slot0:rsp-k-mz11.1

With this configuration, when the slot 6 RSP card is master, it looks first in its PCMCIA slot 0 for the system image file rsp-k-mz11.2 to boot. Finding this file, the router boots from that system image. When the slot 7 RSP card is master, it also looks first in its slot 0 for the system image file rsp-k-mz11.2 to boot. Because that image does not exist in that location, the slot 7 RSP card looks for the system image file rsp-k-mz11.1 in slot 0 to boot. Finding this file in its PCMCIA slot 0, the router boots from that system image. In this way, each RSP card can reboot the system using its own system image when it becomes the master RSP card.

Configure the system further with a fault-tolerant booting strategy:

Router (config)# boot system tftp rsp-k-mz11.1 192.168.1.25

Set the configuration register to enable loading of the system image from a network server or from Flash and save the changes to the master and slave startup configuration file:

Router (config)# config-register 0x010F ^Z Router# copy running-config startup-config

Reload the system so that the master RSP uses the new Release 11.2 system image:

Router# reload

In the following example scenario, assume that

In this scenario, you begin with the configuration shown in Figure 9.


Figure 9: Software Error Protection: Backing Up with an Older Software Version, Part I

Next, you copy the rsp-k-mz11.1 image to the master and slave RSP card, as shown in Figure 10.


Figure 10: Software Error Protection: Backing Up with an Older Software Version, Part II

Lastly, you delete the rsp-k-mz11.2 image from the slave RSP card:


Figure 11: Software Error Protection: Backing Up with an Older Software Version, Part III

The following commands configure software error protection for this example scenario.

View the master and slave slot 0 to verify the location and version of their software images:

Router# dir slot0: -#- -length- -----date/time------ name 1    3482498  May 4 1993 21:38:04 rsp-k-mz11.2 7993896 bytes available (1496 bytes used) Router# dir slaveslot0: -#- -length- -----date/time------ name 1    3482498  May 4 1993 21:38:04 rsp-k-mz11.2 7993896 bytes available (1496 bytes used)

Copy the Release 11.1 system image to the master and slave slot 0:

Router# copy tftp slot0:rsp-k-mz11.1 Router# copy tftp slaveslot0:rsp-k-mz11.1

Delete the rsp-k-mz11.2 image from the slave RSP card:

Router# delete slaveslot0:rsp-k-mz11.2

Configure the system to boot first from a Release 11.2 system image and then from a Release 11.1 system image.

Router# configure terminal Router (config)# boot system flash slot0:rsp-k-mz11.2 Router (config)# boot system flash slot0:rsp-k-mz11.1

Configure the system further with a fault-tolerant booting strategy:

Router (config)# boot system tftp rsp-k-mz11.1 192.168.1.25

Set the configuration register to enable loading of the system image from a network server or from Flash and save the changes to the master and slave startup configuration file:

Router (config)# config-register 0x010F ^Z Router# copy running-config startup-config
Note You do not need to reload the router in this example, because the router is currently running the Release 11.2 image.

Set Environment Variables on the Master and Slave RSP

You can optionally set environment variables on both RSP cards in a Cisco 7507 and Cisco 7513. For more information on environment variables, refer to the "Cisco's Implementation of Environment Variables" section.


Note When configuring HSA operation, Cisco recommends that you use the default environment variables. If you change the variables, Cisco recommends setting the same device for equivalent environment variables on each RSP card. For example, if you set one RSP card's CONFIG_FILE environment variable device to NVRAM, set the other RSP card's CONFIG_FILE environment variable device to NVRAM also.

You set environment variables on the master RSP just as you would if it were the only RSP card in the system. Refer to the following sections for more information on these steps:

You can set the same environment variables on the slave RSP card, manually or automatically. The following sections describe these two methods:

Manually Set Environment Variables on the Slave RSP

Once you set the master's environment variables, you can manually set the same environment variables on the slave RSP card using the slave sync config command.

To manually set environment variables on the slave RSP, perform the following steps beginning in global configuration mode:

Tasks Command

    Step 1. Set the master's environment variables as described in the "Controlling Environment Variables," "Set the BOOTLDR Environment Variable," and "Download the CONFIG_FILE Environment Variable Configuration on Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series" sections.

boot system

boot bootldr

boot config

    Step 2. Save the settings to the startup configuration. This also puts the information under that RSP card's ROM monitor control.

copy running-config startup-config

    Step 3. Save the same environment variables to the slave RSP by manually synchronizing their configuration files.

slave sync config

    Step 4. Verify the environment variable settings.

show boot

Automatically Set Environment Variables on the Slave RSP

With automatic synchronization turned on, the system automatically saves the same environment variables to the slave's startup configuration when you set the master's environment variables and save them.


Note Automatic synchronization mode is on by default.

To set environment variables on the slave RSP when automatic synchronization is on, perform the following steps beginning in global configuration mode:

Tasks Command

    Step 1. Set the master's environment variables as described in the "Controlling Environment Variables," "Set the BOOTLDR Environment Variable," and "Download the CONFIG_FILE Environment Variable Configuration on Cisco 7000 Series, Cisco 7200 Series, and Cisco 7500 Series" sections.

boot system

boot bootldr

boot config

    Step 2. Save the settings to the startup configuration. This also puts the information under that RSP card's ROM monitor control.

copy running-config startup-config

    Step 3. Verify the environment variable settings.

show boot

Monitor and Maintain HSA Operation

To monitor and maintain HSA operation, complete the following tasks:

Perform General Maintenance

You can override the slave image that is bundled with the master image. To do so, perform the following task in global configuration mode:

Tasks Command

Specify which image the slave runs.

slave image {system | device:filename}

You can manually synchronize configuration files and ROM monitor environment variables on the master and slave RSP card. To do so, perform the following task in privileged EXEC mode:

Tasks Command

Manually synchronize master and slave configuration files.

slave sync config

Caution When you install a second RSP card for the first time, you must immediately configure it using the slave sync config command. This ensures that the new slave is configured consistently with the master. Failure to do so can result in an unconfigured slave RSP card taking over mastership of the router when the master fails, rendering the network inoperable.

The slave sync config command is also a useful tool for more advanced implementation methods not discussed in this chapter.

Troubleshoot a Failed RSP Card

When a new master RSP card takes over mastership of the router, it automatically reboots the failed RSP card as the slave RSP card. You can access the state of the failed RSP card in the form of a stack trace from the master console using the show stacks command.

You can also manually reload a failed RSP card from the master console. To do so, perform the following task from global configuration mode:

Tasks Command

Reload the inactive slave RSP card.

slave reload

Display Information About Master and Slave RSP Cards

You can also display information about both the master and slave RSP cards. To do so, perform any of the following tasks from EXEC mode:

Tasks Command

Display the environment variable settings and configuration register settings for both the master and slave RSP cards.

show boot

Show a list of flash devices currently supported on the router.

show flash devices

Display the software version running on the master and slave RSP card.

show version

Display the stack trace and version information of the master and slave RSP cards.

show stacks 1

Enable slave error message logging.

service slave-log2

1This command is documented in the "System Management Commands" chapter of the Configuration Fundamentals Command Reference.
2This command is documented in the "System Management Commands" chapter of the Configuration Fundamentals Command Reference.

Disable Access to Slave Console

The slave console does not have enable password protection. Thus, an individual connected to the slave console port can enter privileged EXEC mode and view or erase the configuration of the router. Use the no slave terminal command to disable slave console access and prevent security problems. When the slave console is disabled, users cannot enter commands.

If slave console access is disabled, the following message appears periodically on the slave console:

%%Slave terminal access is disabled. Use "slave terminal" command in master RSP configuration mode to enable it.

Manage Flash Files

With the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you must manage files on as many as three different Flash memory devices. To help you manage your Flash files, you can

Some ciscoFlash MIB variables support the Flash file system on the Cisco 7200 series and Cisco 7500 series. Refer to the Cisco Management Information Base (MIB) User Quick Reference for more information on these variables.

Set the System Default Flash Device

You can specify the Flash device that the system uses as the default device. Setting the default Flash device allows you to omit an optional device: argument from related commands. For all EXEC commands that have an optional device: argument, the system uses the device specified by the cd command when you omit the optional device: argument. For example, the dir command contains an optional device: argument and displays a list of files on a Flash memory device.

To specify a default Flash device, complete the following task from EXEC mode:

Task Command

Set a default Flash memory device.

cd device:

The following example sets the default device to the Flash memory card inserted in slot 0:

cd slot0:

Display the Current Default Flash Device

You might want to show the current setting of the cd command to see which device is the current default Flash device. To display the current default Flash device specified by the cd command, complete the following task from EXEC mode:

Task Command

Display the current Flash memory device.

pwd

The following example shows that the present working device specified by the cd command is slot 0:

Router> pwd slot0 Router>

The following example uses the cd command on the Cisco 7500 series to change the present working device to bootflash and then uses the pwd command to display that present working device:

Router> cd bootflash: Router> pwd bootflash Router>

Show a List of Files on a Flash Device

You might want to view a list of the contents of a Flash memory device before manipulating its contents. For example, before copying a new configuration file to a Flash device, you may want to verify that the device does not already contain a configuration file with the same name. Similarly, before copying a Flash configuration file to another location, you may want to verify its filename for use in another command. You can check the contents a Flash device with the dir EXEC command.

To show a list of files on a specified Flash device, complete the following task from EXEC mode:

Task Command

Display a list of files on a Flash memory device.

dir [/all | /deleted] [/long] [device:][filename]

The following example instructs the router to list undeleted files for the default device specified by the cd command. Notice that the router displays the information in short format because no keywords are used:

Router# dir -#- -length- -----date/time------ name 1 620 May 4 1993 21:38:04 config1 2 620 May 4 1993 21:38:14 config2 7993896 bytes available (1496 bytes used)

The following example displays the long version of the same device:

Router# dir /long -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1   ... 1 37CEC52E 202EC 7 620 May 4  1993 21:38:04 config1 2   ... 1 37CEC52E 205D8 7 620 May 4  1993 21:38:14 config2 7993896 bytes available (1496 bytes used)

Delete Files on a Flash Device

When you no longer need a file on a Flash memory device, you can delete it.

To delete a file from a specified Flash device, complete the following task from EXEC mode:

Task Command

Delete a file from a Flash memory device.

delete [device:]filename

or

erase [device:]filename


Note The erase command is supported only on the Cisco 7000 series.

If you omit the device, the router uses the default device specified by the cd command.

If you attempt to delete the configuration file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion. When you delete a file, the router simply marks the file as deleted, but does not erase the file. This feature allows you to recover a "deleted" file, as discussed in the following section.

The following example deletes the myconfig file from a Flash memory card inserted in slot 0:

delete slot0:myconfig

The following example erases the myconfig file from a Flash memory card inserted in slot 0:

erase slot0:myconfig

Recover Deleted Files on a Flash Device

You can undelete a deleted file. For example, you may want to revert to a previous configuration file because the current one is corrupt.


Note With the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can use the undelete command only on the Flash memory card inserted in the PCMCIA slot (slot0:). You cannot use this command on a Cisco 7000's internal Flash memory.

To undelete a deleted file on a Flash memory device, complete the following task from EXEC mode:

Task Command

Undelete a deleted file on a Flash memory device.

undelete index [device:]

You must undelete a file by its index because you can have multiple deleted files with the same name. For example, the "deleted" list could contain multiple configuration files with the name router-config. You undelete by index to indicate which of the many router-config files from the list to undelete. Use the dir command to learn the index number of the file you want to undelete.

You cannot undelete a file if a valid (undeleted) one with the same name exists. Instead, you first delete the existing file and then undelete the file you want. For example, if you had an undeleted version of the router-config file and you wanted to use a previous, deleted version instead, you cannot simply undelete the previous version by index. You must first delete the existing router-config file and then undelete the previous router-config file by index. You can undelete a file as long as the file has not been permanently erased via the squeeze command. You can delete and undelete a file up to 15 times.

The following example recovers the deleted file whose index number is 1 to the Flash memory card inserted in slot 0:

undelete slot0: 1

Permanently Delete Files on a Flash Device

When a Flash memory device is full, you may need to rearrange the files so that the space used by the "deleted" files can be reclaimed. To determine whether a Flash memory device is full, use the show flash command.


Note With the Cisco 7000 series, Cisco 7200 series, and Cisco 7500 series, you can use the squeeze command only on the Flash memory card inserted in the PCMCIA slot (slot0:). You cannot use this command on a Cisco 7000's internal Flash memory.

To permanently delete files on a Flash memory device, complete the following task from privileged EXCE mode:

Task Command

Permanently delete all deleted file on a Flash memory card.

squeeze device:

When you issue the squeeze command, the router copies all valid files to the beginning of Flash memory and erases all files marked "deleted." At this point, you cannot recover "deleted" files, and you can now write to the reclaimed Flash memory space.


Note The squeeze operation can take as long as several minutes because it can involve erasing and rewriting almost an entire Flash memory space.

Load and Display Microcode Images

On the Cisco 7000 series and Cisco 7500 series, you can also load and display microcode images, as described in the following sections:

Load Microcode Images Over the Network

Cisco 7000 interface processors and the switch processor (SP) each have a writable control store (WCS). The WCS stores microcode. You can load updated microcode onto the WCS from the onboard ROM or from Flash memory on the Route Processor (RP) card. On the Cisco 7500 series, you can load updated microcode onto the WCS from bootflash or a Flash memory card inserted in one of the PCMCIA slots of the RSP card.

With this feature, you can update microcode without having physical access to the router, and you can load new microcode without rebooting the system.

To load microcode from Flash, complete the following tasks:

Task Command

    Step 1. Copy microcode files into Flash.

copy tftp flash

or

copy tftp file-id (Cisco 7000 series and Cisco 7500 series only)

See the section "Copy System Images from a Network Server to Flash Memory" for more information about how to copy TFTP images to Flash memory.

    Step 2. Load microcode from Flash memory into the WCS.

microcode interface [flash filename [slot] | rom [slot] | system [slot]]

microcode interface [flash file-id [slot] | system [slot]] (Cisco 7500 series only)

    Step 3. Exit configuration mode.

^Z

    Step 4. Retain new configuration information when the system is rebooted.

copy running-config startup-config

If an error occurs when you are attempting to download microcode, the system loads the default system microcode image. For releases after Software Release 9.17 (6.2), the default microcode image is bundled with the system software.


Note Microcode images cannot be compressed.

These configuration commands are implemented following one of three events:

After you have entered a microcode configuration command and one of these events has taken place, all cards are reset, loaded with microcode from the appropriate sources, tested, and enabled for operation.

To signal to the system that all microcode configuration commands have been entered and the processor cards should be reloaded, complete the following task in global configuration mode:

Task Command

Notify the system that all microcode configuration commands have been entered and the processor cards should be reloaded.

microcode reload

If Flash memory is busy because a card is being removed or inserted, or a microcode reload command is executed while Flash is locked, the files will not be available and the onboard ROM microcode will be loaded. Issue another microcode reload command when Flash memory is available, and the proper microcode will be loaded. The show flash command will show if another user or process has locked Flash memory.

The microcode reload command should not be used while Flash is in use. For example, do not use this command when a copy tftp flash or show flash command is active.

The microcode reload command is automatically added to your running configuration when you issue a microcode command that changes the system's default behavior of loading all processors from ROM.

Display Microcode Information

To display microcode information, perform the following task in EXEC mode:

Task Command

Display microcode information.

show microcode

Configure for Remote Shell (rsh) and Remote Copy (rcp) Functions

You can optionally configure Cisco IOS software for rsh and rcp functions. This feature allows you to execute commands on remote routers and to remotely copy system images and configuration files to and from a network server or a router.

Cisco's Implementation of rsh and rcp

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. Cisco's implementation of rsh and rcp interoperates with standard implementations.

Using rsh

From the router, you can use rsh to execute commands on remote systems to which you have access. When you issue the rsh command, a shell is started on the remote system. The shell allows you to execute commands on the remote system without having to log in to the target host.

You do not need to connect to the system, router, or access server and then disconnect after you execute a command if you use rsh. For example, you can use rsh to remotely look at the status of other devices without connecting to the target device, executing the command, and then disconnecting. This capability is useful for looking at statistics on many different routers.

Maintaining rsh Security

To gain access to a remote system running rsh, such as a UNIX host, an entry must exist in the system's .rhosts file or its equivalent identifying you as a user who is authorized to execute commands remotely on the system. On UNIX systems, the .rhosts file identifies users who can remotely execute commands on the system.

You can enable rsh support on a Cisco router to allow users on remote systems to execute commands. However, our implementation of rsh does not support an .rhosts file. Instead, you must configure a local authentication database to control access to the router by users attempting to execute commands remotely using rsh. A local authentication database is similar to a UNIX .rhosts file. Each entry that you configure in the authentication database identifies the local user, the remote host, and the remote user.

Using rcp

The rcp copy commands rely on the rsh server (or daemon) on the remote system. To copy files using rcp, you do not need to 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 our rcp implementation emulates the functions of the UNIX rcp implementation—copying files among systems on the network—our command syntax differs from the UNIX rcp command syntax. Our rcp support offers a set of copy commands that use rcp as the transport mechanism. These rcp copy commands are similar in style to our 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 Transmission Control Protocol/Internet Protocol (TCP/IP) stack, which is connection-oriented. You can use rcp commands to copy system images and configuration files from the router to a network server and vice versa.

You can also enable rcp support to allow users on remote systems to copy files to and from the router.

Configure for rsh and rcp Task List

To configure the Cisco IOS software for rsh and rcp, perform the following tasks:

Configure a Router to Support Incoming rcp Requests and rsh Commands

You configure a local authentication database to control access to the router by remote users. To allow remote users to execute rcp or rsh commands, configure entries for those users in the router's authentication database.

Each entry configured in the authentication database identifies the local user, the remote host, and the remote user. You can specify the router host name as the local username. To be allowed to remotely execute commands on the router, the remote user must specify all three values—the local username, the remote host name, and the remote username—and therefore must be able to identify the local username. For rsh users, you can also grant a user permission to execute privileged EXEC commands remotely.

To make the local username available to remote users, you must communicate the username to the network administrator or the remote user. To allow a remote user to execute a command on the router, our rcp implementation requires that the local username sent by the remote user match the local username configured in the database entry.

The Cisco IOS software uses Domain Name System (DNS) to authenticate the remote host's name and address. Because DNS can return several valid IP addresses for a host name, the software checks the address of the requesting client against all IP addresses for the named host returned by DNS. If the address sent by the requester is considered invalid, because if it does not match any address listed with DNS for the host name, then the software rejects the remote command execution request.

Note that if no DNS servers are configured, then the software cannot authenticate the host in this manner. In this case, the software sends a broadcast request to attempt to gain access to DNS services on another server. If DNS services are not available, you must use the no ip domain-lookup command to disable the router's attempt to gain access to a DNS server by sending a broadcast request.

If DNS services are not available and, therefore, you bypass the DNS security check, the software accepts the request to remotely execute a command only if all three values sent with the request match exactly the values configured for an entry in the local authentication file.

If DNS is enabled but you do not want to use DNS for rcmd queries, use the no ip rcmd domain-lookup command.

To ensure security, the Cisco IOS software is not enabled to support rcp requests from remote users by default. When the software is not enabled to support rcp, the authorization database has no effect.

Configure a Router to Support Incoming rcp Requests and rsh Commands Task List

To configure the Cisco IOS software to allow users on remote systems to copy files to and from the router and execute commands on the router, perform the tasks in one of the first sections and, if desired, the task in the third section:

Configure the Router to Accept rcp Requests from Remote Users

To configure the Cisco IOS software to support incoming rcp requests, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Create an entry in the local authentication database for each remote user who is allowed to execute rcp commands.

ip rcmd remote-host local-username {ip-address | host} remote-username [enable [level]]

    Step 3. Enable the software to support incoming rcp requests.

ip rcmd rcp-enable

To disable the software from supporting incoming rcp requests, use the no ip rcmd rcp-enable command.


Note When support for incoming rcp requests is disabled, you can still use the rcp commands to copy images from remote servers. The support for incoming rcp requests is distinct from its ability to handle outgoing rcp requests.

The following example shows how to add two entries for remote users to the authentication database and then enable the software to support remote copy requests from remote users. The users, named netadmin1 on the remote host at IP address 172.16.15.55 and netadmin3 on the remote host at IP address 172.16.101.101, are both allowed to connect to the router and remotely execute rcp commands on it after the router is enabled to support rcp. Both authentication database entries give the host name Router1 as the local username. The fourth command enables the router to support for rcp requests from remote users.

configure terminal ip rcmd remote-host Router1 172.16.15.55 netadmin1 ip rcmd remote-host Router1 172.16.101.101 netadmin3 ip rcmd rcp-enable
Note In Cisco IOS Release 10.3, the ip keyword has been added to rcmd commands. If you are upgrading from Release 10.2 to 10.3, this keyword is automatically added to any rcmd commands you have in your Release 10.2 configuration files.

Configure the Router to Allow Remote Users to Execute Commands Using rsh

To configure the router as an rsh server, complete the following tasks:

Task Command

    Step 1. Enter configuration mode from the terminal.

configure terminal

    Step 2. Create an entry in the local authentication database for each remote user who is allowed to execute rsh commands.

ip rcmd remote-host local-username {ip-address | host} remote-username [enable [level]]

    Step 3. Enable the software to support incoming rsh commands.

ip rcmd rsh-enable

To disable the software from supporting incoming rsh commands, use the no ip rcmd rsh-enable command.


Note When support of incoming rsh commands is disabled, you can still issue an rsh command to be executed on other routers that support the remote shell protocol and on UNIX hosts on the network.

The following example shows how to add two entries for remote users to the authentication database, and enable a router to support rsh commands from remote users. The users, named rmtnetad1 and netadmin4, are both on the remote host at IP address 172.16.101.101. Although both users are on the same remote host, you must include a unique entry for each user. Both users are allowed to connect to the router and remotely execute rsh commands on it after the router is enabled for rsh. The user named netadmin4 is allowed to execute privileged EXEC mode commands on the router. Both authentication database entries give the router's host name Router1 as the local username. The fourth command enables the router for to support rsh commands issued by remote users.

configure terminal ip rcmd remote-host Router1 172.16.101.101 rmtnetad1 ip rcmd remote-host Router1 172.16.101.101 netadmin4 enable ip rcmd rsh-enable

Turn Off DNS Lookups for rcp and rsh

To bypass the DNS security check when DNS services are configured but not available, perform the following task in global configuration mode:

Task Command

Bypass the DNS security check.

no ip rcmd domain-lookup

The Cisco IOS software accepts the request to remotely execute a command only if all three values sent with the request match exactly the values configured for an entry in the local authentication file.

Configure the Remote Username for rcp Requests

From the router, you can use rcp to remotely copy files to and from network servers and hosts if those systems support rcp. You do not need to configure the Cisco IOS software to issue remote copy requests from the router using rcp. However, to prepare to use rcp from the router for remote copying, you can perform an optional configuration process to specify the remote username to be sent on each rcp request.

The rcp protocol requires that a client send the remote username on an rcp request. By default, the Cisco IOS software sends the remote username associated with the current TTY (terminal) process, if that name is valid, for rcp commands.


Note For Cisco, TTYs are commonly used in access servers. The concept of TTY originated with UNIX. For UNIX systems, each physical device is represented in the file system. Terminals are called TTY devices, which stands for teletype, the original UNIX terminal.

If the username for the current TTY process is not valid, the software sends the host name as the remote username. For boot commands using rcp, the software sends the router host name by default. You cannot explicitly configure the remote username.

If the remote server has a directory structure, as do UNIX systems, rcp performs its copy operations along the following lines:

To override the default remote username sent on rcp requests, complete the following tasks starting in privileged EXEC mode:

Task Command

    Step 1. Enter configuration mode from the terminal

configure terminal

    Step 2. Specify the remote username.

ip rcmd remote-username username

To remove the remote username and return to the default value, use the no ip rcmd remote-username command.

If you are copying from the router 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, you must add an entry to       the .rhosts file for the remote user on the rcp server. For example, if the router contains the following configuration lines:

hostname Rtr1 ip rcmd remote-username User0

and the router's IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:

Router1.company.com Rtr1

Refer to the documentation for your rcp server for more details.

Remotely Execute Commands Using rsh

You can use rsh to execute commands remotely on network servers that support the remote shell protocol. To use this command, the .rhosts files on the network server must include an entry that permits you to remotely execute commands on that host.

If the remote server has a directory structure, as do UNIX systems, the rsh command that you issue is remotely executed from the directory of the account for the remote user that you specify through the /user username keyword and argument pair.

If you do not specify the /user keyword and argument, the Cisco IOS software sends a default remote username. As the default value of the remote username, the software sends the remote username associated with the current TTY process, if that name is valid. If the TTY remote username is invalid, the software uses the router host name as the both the remote and local usernames.

To execute a command remotely on a network server using rsh, perform the following tasks in privileged EXEC mode:

Task Command

    Step 1. Enter privileged EXEC mode.

enable [password]1

    Step 2. Enter the rsh command to be executed remotely.

rsh {ip-address | host} [/user username] remote-command

1This command is documented in the "User Interface Commands" chapter of the Configuration Fundamentals Command Reference.

The following example shows how to execute a command remotely using rsh:

Router# enable Router1# rsh mysys.cisco.com /u sharon ls -a . .. .alias .cshrc .emacs .exrc .history .login .mailrc .newsrc .oldnewsrc .rhosts .twmrc .xsession jazz Router1#

Stop Booting and Manually Load a System Image from ROM Monitor

If your router does not find a valid system image, or if its configuration file is corrupted at startup, and the configuration register is set to enter ROM monitor mode, the system enters ROM monitor mode. From this mode, you can manually load a system image from Flash memory, from a network server file, or from ROM.

You can also enter ROM monitor mode by restarting the router and then pressing the Break key during the first 60 seconds of startup.

Task Command

    Step 1. Restart the router.

reload

    Step 2. Press the Break key during the first 60 seconds while the system is starting up.

Break1

1This key will not work on the Cisco 7000 unless it has Cisco IOS Release 10 boot ROMs.
To stop booting and enter ROM Monitor mode, perform the following tasks:

Manually Boot from Flash

To manually boot from Flash memory, complete the following tasks:

Task Command

    Step 1. Restart the router.

reload

    Step 2. Press the Break key during the first 60 seconds while the system is starting up.

Break1

    Step 3. Manually boot the router from Flash.

boot flash [filename]

boot flash [device:] partition-number:[filename]

boot flash [device:filename] (Cisco 7000 series only)

boot device:[filename] (Cisco 7200 series and Cisco 7500 series only)

1This key will not work on the Cisco 7000 unless it has Cisco IOS Release 10 boot ROMs.

In the following example, a router is manually booted from Flash memory. Because the optional filename argument is absent, the first file in Flash memory is loaded.

> boot flash F3: 1858656+45204+166896 at 0x1000 Booting gs7-k from flash memory RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR [OK - 1903912/13765276 bytes] F3: 1858676+45204+166896 at 0x1000 Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted

In the following example, the boot flash command is used with the filename gs7-k—the name of the file that is loaded:

> boot flash gs7-k F3: 1858656+45204+166896 at 0x1000 Booting gs7-k from flash memory RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRR [OK - 1903912/13765276 bytes] F3: 1858676+45204+166896 at 0x1000 Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted System Bootstrap, Version 4.6(1012) [mlw 99], INTERIM SOFTWARE Copyright (c) 1986-1992 by cisco Systems RP1 processor with 16384 Kbytes of memory

Manually Boot from a Network File

To manually boot from a network file, complete the following tasks in EXEC mode:

Task Command

    Step 1. Restart the router.

reload

    Step 2. Press the Break key during the first 60 seconds while the system is starting up.

Break1

    Step 3. Manually boot the router from a network file.

boot filename [ip-address]

1This key will not work on the Cisco 7000 unless it has Cisco IOS Release 10 boot ROMs.

In the following example, a router is manually booted from the network file network1:

>boot network1

Manually Boot from ROM

To manually boot the router from ROM, complete the following steps in EXEC mode:

Task Command

    Step 1. Restart the router.

reload

    Step 2. Press the Break key during the first 60 seconds while the system is starting up.

Break1

    Step 3. Manually boot the router from ROM.

boot

1This key will not work on the Cisco 7000 unless it has Cisco IOS Release 10 boot ROMs.

On the Cisco 7200 series and Cisco 7500 series, the boot command loads the first bootable image located in bootflash.

In the following example, a router is manually booted from ROM:

>boot

Manually Boot Using MOP

You can interactively boot system software using MOP. Typically, you do this to verify that system software has been properly installed on the MOP boot server before configuring the router to automatically boot the system software image.

To manually boot the router using MOP, perform the following tasks in EXEC mode:

Task Command

    Step 1. Restart the router.

reload

    Step 2. Press the Break key during the first 60 seconds while the system is starting up.

Break1

    Step 3. Manually boot the router using MOP.

boot mop filename [mac-address] [interface]

1This key will not work on the Cisco 7000 unless it has Cisco IOS Release 10 boot ROMs.

The Cisco 7200 series and Cisco 7500 series do not support the boot mop command.

In the following example, a router is manually booted from a MOP server:

>boot mop network1

Use the System Image Instead of Reloading

To return to EXEC mode from the ROM monitor to use the system image instead of reloading, perform the following task in ROM monitor mode:

Task Command

Return to EXEC mode to use the system image.

continue


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Jan 8 12:01:27 PST 2001
All contents are Copyright © 1992--2001 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.