|
|
This chapter describes how to load and maintain system software images and configuration files. The instructions in this chapter assume that your switch contains a minimal configuration that allows you to interact with the system software, as described in the chapter "Initially Configuring the LightStream 1010 ATM Switch."
The tasks in the first four sections are typical tasks for all switches:
Perform the tasks in the remaining sections as needed for your particular switch environment:
If you are managing the LightStream 1010 ATM switch through an Ethernet interface or ATM subinterface on the ATM switch processor (ASP), and your management station or Trivial File Transfer Protocol (TFTP) server is on a different subnet than the switch, you must first configure a static IP route.
![]() | Caution Failure to configure a static IP route prior to installing the new image will result in a loss of remote administrative access to the switch. If this happens, you can regain access from a direct console connection to the switch, although this requires physical access to the console port. |
To configure a static IP route, perform the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip route prefix1 mask2 [ethernet | atm] 2/0/0[.subinterface] | Configure a static IP route on the Ethernet interface or ATM subinterface of the ASP. |
| 2 | end | Return to privileged EXEC mode. |
| 3 | copy running-config startup-config | Save the configuration to NVRAM. |
| 1The IP route prefix of the remote network where the management station or TFTP server resides. 2The subnet mask of the remote network where the management station or TFTP server resides. |
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. To retrieve system images and configuration files for modification, perform the following required tasks:
The remaining tasks are optional:
You can copy system images from a TFTP, Remote Copy Protocol (rcp), or Maintenance Operation Protocol (MOP) server to the switch's Flash memory.
Refer to the section "Cisco's Implementation of Environment Variables" for an explanation of the Flash memory card that can be used.
When free space is available in Flash memory, you can erase 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 format 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 into Flash memory a file 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 made 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.
To copy a system image from a TFTP server to Flash memory, complete the following tasks in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | Change directory to bootflash. | |
| 2 | See the instructions in the section "Copy System Images from Flash Memory to a Network Server," later in this chapter. | Make a backup copy of the current system software image. |
| 3 |
copy tftp file_id | Copy a system image to Flash memory. |
| 4 | ip-address or name | When prompted, enter the IP address or domain name of the server. |
| 5 | filename | If prompted, enter the filename of the server system image. Filenames are case sensitive. |
| 6 | device | If prompted, enter the Flash memory device that is to receive the copy of the system image. |
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 switch 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, when there is free space 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 will inform you of these conditions and prompt you for a response.
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 current device specified by the cd command. You can choose bootflash:, slot0:, or slot1: as the Flash memory device.
Switch# copy tftp flash Enter source file name: ls1010-wi-m_1.1(1) Enter destination file name [ls1010-wi-m_1.1(1)]: 7602048 bytes available on device bootflash, proceed? [confirm] y Address or name of remote host [dirt.cisco.com]? Accessing file "ls1010-wi-m_1.1(1)" on dirt.cisco.com ...FOUND Loading ls1010-wi-m_1.1(1) from 171.69.1.129 (via Ethernet2/0/0): !!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 2247751/4495360 bytes] CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
The exclamation points indicate that the process is working. A series of Cs indicates that a checksum verification of the image is occurring after the image is written to Flash memory.
The dir command confirms that the file transfer was successful, as in the following example:
Switch# dir -#- -length- -----date/time------ name 1 2247751 May 03 1996 14:32:10 ls1010-wi-m_1.1(1) 5354296 bytes available (2247880 bytes used)
The following example shows how to copy the switch-config file from a TFTP server to the Flash memory card inserted in Personal Computer Memory Card International Association (PCMCIA) card slot 0 of the ASP card. The copied file has the name backup-config.
Switch# copy tftp:switch-confg slot0:backup-config 1244732 bytes available on device slot0, proceed? [confirm] y Address or name of remote host [dirt.cisco.com]? Accessing file "switch-confg" on dirt.cisco.com ...FOUND Loading switch-confg from 171.69.1.129 (via Ethernet2/0/0): !! [OK - 5204/10240 bytes]
To copy a system image from an rcp server to Flash memory, complete the following tasks:
| Step | Command | Tasks |
|---|---|---|
| 1 | See the instructions in the section "Copy System Images from Flash Memory to a Network Server," later in this chapter. | Make a backup copy of the current system software image. |
| 2 | configure terminal | Enter global configuration mode from the terminal. This step is required only if you override the default remote username (see Step 3). |
| 3 | ip rcmd remote-username username | Specify the remote username. |
| 4 | end | Exit global configuration mode. |
| 5 |
copy rcp file_id | Copy the system image from an rcp server to Flash memory. |
| 6 | ip-address or name | When prompted, enter the IP address or domain name of the network server. |
| 7 | filename | When prompted, enter the filename of the server system image to be copied. |
The copy command automatically displays the Flash memory directory, including the amount of free space. 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.
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 switch 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 after the copy is complete. You can use the filename of the source file, or you can choose another name.
Switch1# configure terminal Switch1(config)# ip rcmd remote-username netadmin1 Switch1(config)# end Switch# copy rcp flash Enter source file name: ls1010-wi-m_1.1(1) Enter destination file name [ls1010-wi-m_1.1(1)]: 3498136 bytes available on device slot0, proceed? [confirm] y Address or name of remote host [server1.cisco.com]? Connected to 171.69.1.129 Loading 2247751 byte file ls1010-wi-m_1.1(1): Connected to 171.69.1.129 Loading 2247751 byte file ls1010-wi-m_1.1(1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! [OK] CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
The exclamation points indicate that the process is working.
Switch1# configure terminal Switch1(config)# ip rcmd remote-username netadmin1 Switch1(config)# end Switch1# copy rcp slot0:switch-image
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.
You can also copy configuration files from a TFTP server or an rcp server to the switch. You might use this process to restore a configuration file to the switch if you have backed up the file to a server. If you replace a switch and want to use the configuration file that you created for the original switch, you can restore that file instead of recreating it. You can also use this process to copy to the switch a different configuration that is stored on a network server.
You can copy a configuration file from an rcp or TFTP server to either the running configuration or the startup configuration. When you copy a configuration file to the running configuration, you copy to and run the file from RAM. When you copy a configuration file to the startup configuration, you copy it to to nonvolatile random-access memory (NVRAM) or to the location specified by the CONFIG_FILE environment variable. For more information, see the section "CONFIG_FILE Environment Variable."
To copy a configuration file from a TFTP server to the switch, complete the following tasks in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 |
or | Copy a configuration file from a TFTP server to the switch's running or startup configuration. |
| 2 | ip-address or name | When prompted, enter the IP address or domain name of the server. |
| 3 | filename | If prompted, enter the filename of the server system image. |
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 switch sends a default remote username unless you override the default by configuring a remote username. By default, the switch software sends the remote username associated with the current teletype (TTY) process, if that name is valid. If the TTY username is invalid, the switch software uses the switch host name as both the remote and local usernames. You can also specify the path of an existing directory 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.
To copy a configuration file from an rcp server to the running configuration or the startup configuration, perform the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip rcmd remote-username username | Specify the remote username. This step is optional, but recommended. |
| 2 | end | Exit configuration mode. |
| 3 |
or copy rcp startup-config | Copy a configuration file from an rcp server to the switch's running or startup configuration. |
| 4 | ip-address | When prompted, enter the IP address of the server. |
| 5 | filename | When prompted, enter the name of the configuration file. |
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 switch, be sure to set the CONFIG_FILE environment variable to NVRAM. Refer to the "Download the CONFIG_FILE Environment Variable Configuration" section in this chapter for instructions on setting the CONFIG_FILE environment variable.
Switch# configure terminal Switch(config)# ip rcmd remote-username netadmin1 Switch(config)# end Switch# copy rcp running-config Host or network configuration file [host]? Address of remote host [255.255.255.255]? 131.108.101.101 Name of configuration file [Switch-confg]? host1-confg Configure using host1-confg from 131.108.101.101? [confirm] Connected to 131.108.101.101 Loading 1112 byte file host1-confg:![OK] Switch# %SYS-5-CONFIG: Configured from host1-config by rcp from 131.108.101.101
Using the remote username netadmin1, the following example shows copying a host configuration file host2-confg from the netadmin1 directory on the remote server to the switch's startup configuration:
Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# ip rcmd remote-username netadmin1 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# Switch# copy host2-confg rcp Remote host []? dirt Name of configuration file to write [switch-confg]? Write file switch-confg on host 171.69.1.129? [confirm] Writing switch-confg !! [OK] Switch# copy rcp startup-config Address of remote host [255.255.255.255]? 171.69.1.129 Name of configuration file [switch-confg]? Configure using switch-confg from 171.69.1.129? [confirm] Connected to 171.69.1.129 Loading 5393 byte file switch-confg: !! [OK] Warning: distilled config is not generated [OK] Switch# %SYS-5-CONFIG_NV: Non-volatile store configured from switch-confg by console rcp from 171.69.1.129
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, use the following command in global configuration mode:
| Command | Task |
|---|---|
boot buffersize bytes | Change the buffer size to use for booting a host or network configuration file from a network server. |
In the following example, the buffer size is set to 50000 bytes, and the running configuration is saved to the startup-configuration:
Switch1(config)# boot buffersize 50000 Switch1(config)# end Switch1# copy running-config startup-config
To display information about system software, system image files, and configuration files, use the following privileged EXEC commands:
| Command | Task |
|---|---|
List the system software release version, configuration register setting, and so on. | |
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. | |
List the startup configuration information. The CONFIG_FILE environment variable points to the startup configuration. | |
show file device:filename | List the configuration information stored in a specified file. |
List the configuration information in running memory. | |
List information about Flash memory, including system image filenames and amounts of memory used and remaining. |
You can also use the o command in ROM monitor mode to list the configuration register settings.
When modifying your switching 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 switch 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 for the switch to use to start up.
General startup tasks include the following:
When you enter configuration mode using the configure privileged EXEC command, you must specify the source of the configuration as terminal, memory, network, or overwrite-network. Each of these methods is described in the following subsections.
The switch accepts one configuration command per line. You can enter as many configuration commands as you want. You can also add comments to a configuration file by placing an exclamation point (!) at the beginning of each comment line. Comments, as well as default settings, are not stored in NVRAM or in the active copy of the configuration file and therefore do not appear when you list the active configuration with the show running-config EXEC command or the startup configuration with the show startup-config EXEC command (when the startup configuration is stored in NVRAM). However, you can list the comments in configuration files stored on a TFTP, rcp, or MOP server.
When you configure the switch from the terminal, you do so interactively: the switch executes the commands as you enter them at the system prompts. To configure the switch from the terminal, complete the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | See the appropriate chapter for specific configuration commands. | Enter the necessary configuration commands. |
| 2 | end | Quit configuration mode. |
| 3 | Save the configuration file to your startup configuration. This step saves the configuration to the location specified by the CONFIG_FILE environment variable. |
Switch1# configure terminal Switch1(config)# hostname switch2 Switch1(config)# end Switch2# copy running-config startup-config
When you configure the switch from memory, the switch executes the commands in NVRAM, or the configuration specified by the CONFIG_FILE environment variable. To configure from memory, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
Configure the switch to execute the configuration specified by the CONFIG_FILE environment variable or NVRAM. |
For an explanation of the CONFIG_FILE environment variable, see the section "CONFIG_FILE Environment Variable."
To configure the switch by retrieving a configuration file stored on one of your network servers, perform the following tasks, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | Enter configuration mode with the network option. | |
| 2 | host or network | 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 only one network server. |
| 3 | ip-address | At the system prompt, enter the optional IP address of the remote host from which you are retrieving the configuration file. |
| 4 | filename | At the system prompt, enter the name of the configuration file or accept the default name. |
| 5 | y | Confirm the configuration filename that the system supplies. |
In the following example, the switch is configured from the file backup-config at IP address 171.69.1.129:
Switch# configure network Host or network configuration file [host]? Address of remote host [255.255.255.255]? 171.69.1.129 Name of configuration file [switch-confg]? backup-confg Configure using backup-confg from 171.69.1.129? [confirm] y Switch# %SYS-5-CONFIG: Configured from backup-confg by console tftp from 171.69.1.129
You can copy a configuration file directly to your startup configuration without affecting the running configuration. This process loads a configuration file directly into NVRAM or into the location specified by the CONFIG_FILE environment variable without affecting the running configuration.
To copy a configuration file directly to the startup configuration, perform the following tasks, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | Enter configuration mode with the network option. | |
| 2 | host or network | 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 only one network server. |
| 3 | ip-address | At the system prompt, enter the optional IP address of the remote host from which you are retrieving the configuration file. |
| 4 | filename | At the system prompt, enter the name of the configuration file or accept the default name. |
| 5 | y | Confirm the configuration filename that the system supplies. |
The configuration register boot field determines whether the switch loads an operating system image, and if so, where it obtains this system image. The following sections describe how the switch uses the configuration register boot field and how to set and modify this 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 switch loads an operating system and where the switch obtains the system image:
When loading a default system image from a network server, the switch uses the configuration register settings to determine the default system image filename for booting from a network server. The default boot filename starts with the string cisco, followed by the octal equivalent of the boot field number in the configuration register, followed by a hyphen (-) and the processor type name (for example, cisco nn-cpu).
You must correctly set the configuration register boot field to ensure that your switch loads the operating system image correctly. See Table 20-1 for boot field descriptions.
| Configuration Register | Break Enabled/Disabled1 | Description |
|---|---|---|
0x000 | Enabled | Boot manually. |
0x001 | Enabled | Boot from ROM. |
0x002 through 0x00F |
Enabled | |
0x100 | Disabled | Boot manually. |
0x101 | Disabled | Boot from ROM. |
0x102 through 0x10F |
Disabled | |
| 1Enabled allows a hardware break during the first 30 seconds. |
To set the boot field, follow this general procedure:
Step 1 Obtain the current configuration register setting, a hexadecimal value.
Step 2 Modify the current configuration register setting to reflect how you want the switch 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, change the configuration register setting to 0x102.
Step 3 Reboot the switch to make your changes to the configuration register take effect.
Use the hardware configuration register to modify the boot field of a LightStream 1010 ATM switch.
To modify the configuration register boot field, complete the following tasks, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | Obtain the current configuration register setting. | |
| 2 | configure terminal | Enter configuration mode, selecting the terminal option. |
| 3 | config-register value | Modify the existing configuration register setting to specify how you want the switch to load a system image. |
| 4 | end | Exit configuration mode. |
| 5 | Reboot the switch to make your changes take effect. |
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 switch 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 switch to load a system image from commands in the startup configuration file or from a default system image stored on a network server.
Switch# show version Cisco Internetwork Operating System Software <information deleted> 8192K bytes of Flash PCMCIA card at slot 0 (Sector size 128K). 8192K bytes of Flash internal SIMM (Sector size 256K). Configuration register is 0x0 Switch1# configure terminal Switch1(config)# config-register 0x010F
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 switch. There are two ways to load a system image:
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 switch tries them in the order they are entered.
Use the following sections to configure your LightStream 1010 ATM switch to boot from Flash memory. In the LightStream 1010 ATM switch, Flash memory is located on the ATM switch processor (ASP) card or a Flash memory card inserted in the PCMCIA card slots (slot 0 or slot 1). 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 be accessed only over the network.
Flash memory allows you to do the following:
Flash memory features include the following:
Take the following precautions when loading from Flash memory:
The LightStream 1010 ATM switch is shipped from the factory, with the rxboot image in ROM contains. You can change the location of this image to a Flash memory card inserted in a PCMCIA card slot. To specify the rxboot image Flash device, you set the BOOTLDR environment variable.
The configuration process is as follows:
Step 1 Set the BOOTLDR environment variable 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 in internal Flash memory or on one of the Flash memory cards inserted in a PCMCIA card 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.
Flash memory configuration tasks discussed in this section include the following:
To set the BOOTLDR environment variable on your LightStream 1010 ATM switch, perform the following tasks, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | dir [/all | /deleted] [/long] [device:] [filename] | Verify that internal Flash or bootflash contains the rxboot image. |
| 2 | configure terminal | Enter the configuration mode from the terminal. |
| 3 | boot bootldr device:filename | Set the BOOTLDR environment variable to specify the Flash device and filename of the rxboot image. This step modifies the runtime BOOTLDR environment variable. |
| 4 | end | Exit configuration mode. |
| 5 | Save this runtime BOOTLDR environment variable to your startup configuration. | |
| 6 | Optionally, verify the contents of the BOOTLDR environment variable. |
Switch# dir slot0: -#- -length- -----date/time------ name 1 620 May 04 1995 26:22:04 ls1010-wi-m_1.1(1) 2 620 May 24 1995 21:38:14 config2 7993896 bytes available (1496 bytes used) Switch# configure terminal Switch (config)# boot bootldr slot0:ls1010-wi-m_1.1(1) Switch (config)# end Switch# copy running-config startup-config [ok] Switch# show boot BOOT variable = slot0:ls1010-wi-m_1.1(1),1; CONFIG_FILE variable = Current CONFIG_FILE variable = nvram: BOOTLDR variable = Configuration register is 0x0
To configure a switch to automatically boot from an image in Flash memory, perform the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | boot system [filename] | Enter the filename of an image stored in Flash memory. |
| 2 | config-register value | Set the configuration register to enable loading of the system image from Flash memory. |
| 3 | end | Exit configuration mode. |
| 4 | copy running-config startup-config | Save the configuration file to your startup configuration in the location specified by the CONFIG_FILE environment variable. |
| 5 | Optionally, verify the contents of the startup configuration. | |
| 6 | Power-cycle and reboot the system to ensure that all works as expected. |
If you enter more than one image filename, the switch 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.
Switch (config)# boot system flash ls1010-wi-m_1.058.bin.Z Switch (config)# config-register 0x1000 Switch (config)# end Switch# copy running-config startup-config [ok] Switch# reload [confirm] y %SYS-5-RELOAD: Reload requested booting /tftpboot/ls1010-wi-m_1.058.bin.Z 171.69.1.129 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Uncompressing file: ########################################################### ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ###################################### Loading network-confg from 171.69.1.129 (via Ethernet2/0/0): ! [OK - 86/128975 bytes] %SYS-5-CONFIG: Configured from network-confg by console tftp from 171.69.1.129 Loading /tftpboot/Switch-confg from 171.69.1.129 (via Ethernet2/0/0): ! [OK - 962/128975 bytes] %SYS-4-CONFIG_NEWER: Configurations from version 11.1 may not be correctly understood. %SYS-5-CONFIG: Configured from /tftpboot/Switch-confg by console tftp from 171.69.1.129 Loading ls1010-wi-m_1.058.bin.Z from 171.69.1.129 (via Ethernet 2/0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 2200823/7554184 bytes] Uncompressing file: ########################################################### ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ############################################################################## <information deleted> %SYS-5-RESTART: System restarted -- <information deleted>
After 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 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.
You can configure the switch to load a system image from a network server using TFTP or rcp to copy the system image file.
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.
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 data delivery.
You cannot explicitly specify a remote username when you issue the boot command. Instead, the host name of the switch is used. If the remote server has a directory structure, as do UNIX systems, and you boot the switch from a network server using rcp, the LightStream 1010 ATM switch 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 to ensure that there is enough memory available for storage.
If there is not enough room in memory to boot a regular image from a network server, you can create a compressed software image on any UNIX platform using the compress command. Refer to the documentation for your UNIX platform for the exact usage of the compress command.
To specify the loading of a system image from a network server, complete the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | boot system [rcp | tftp] filename [ip-address] | Specify the system image file to be booted from a network server using rcp or TFTP. |
| 2 | config-register value | Set the configuration register to enable loading of the system image from a network server. |
| 3 | end | Exit configuration mode. |
| 4 | copy running-config startup-config | Save the configuration file to yhour startup configuration in the location specified by the CONFIG_FILE environment variable. |
In the following example, the switch uses rcp to boot from the testme5.tester system image file on a network server at IP address 131.108.0.1:
Switch(config)# boot system rcp testme5.tester 131.108.0.1 Switch(config)# config-register 0x010F Switch(config)# end Switch# copy running-config startup-config
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 switch 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 a ROM image.
This boot order provides the most fault-tolerant booting strategy. To allow the switch to boot first from Flash, then from a system file from a network server, and finally from ROM, perform the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | boot system [filename] | Configure the switch to boot from Flash memory. |
| 2 | Configure the switch to boot from a system filename. | |
| 3 | config-register value 1 | Set the configuration register to enable loading of the system image from a network server or Flash. |
| 4 | end | Exit configuration mode. |
| 5 | copy running-config startup-config | Save the configuration file to yhour startup configuration in the location specified by the CONFIG_FILE environment variable. |
| 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, the switch is configured to first boot an internal Flash image called gsxx. If that image fails, the switch boots the configuration file ls1010xx from a network server.
Switch(config)# boot system flash ls1010xx Switch(config)# boot system ls1010xx 131.131.101.101 Switch(config)# config-register 0x010F Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy running-config startup-config [ok]
Using this strategy, a switch has three sources from which to boot. These alternative sources help lessen the negative effects of a failure on the network or file server from which the system image is copied.
Configuration files can be stored on network servers. You can configure the switch to automatically request and receive two configuration files from the network server at startup:
The server first attempts to load the network configuration file. This file contains information that is shared among several switches. For example, it can be used to provide mapping between IP addresses and host names.
The server next attempts to load the host configuration file. This file contains commands that apply to only one switch. Both the network and host configuration files must be readable and must reside on a network server reachable via TFTP, rcp, or MOP.
You can specify an ordered list of network configuration and host configuration filenames. The switch 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 LightStream 1010 ATM switch, 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 in this chapter.
You can set the CONFIG_FILE environment variable to specify the startup configuration.
To specify a startup configuration file, perform either the first two tasks or the third task:
To configure the switch to download a network configuration file from a server at startup, perform the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | Enter the network configuration filename to download a file using TFTP, rcp, or MOP. | |
| 2 | Enable the switch to automatically load the network file upon restart. | |
| 3 | end | Exit configuration mode. |
| 4 | copy running-config startup-config | Save the configuration file to yhour startup configuration in the location specified by the CONFIG_FILE environment variable. |
For Step 2, if you do not specify a network configuration filename, the switch uses the default filename network-confg. If you omit both the tftp and the rcp keywords, the switch assumes that you are using TFTP to transfer the file and the server whose IP address you specify supports TFTP.
If you configure the switch to download the network configuration file from a network server using rcp and the server has a directory structure, as do UNIX systems, the switch software searches for the system image on the server relative to the directory of the remote username. The switch host name is used as the remote username.
You can specify more than one network configuration file. The switch tries each file in order until it loads one successfully. This procedure can be useful for keeping files with different configuration information loaded on a network server.
To configure the switch to download a host configuration file from a server at startup, complete the following tasks, beginning in global configuration mode.
| Step | Command | Task |
|---|---|---|
| 1 | boot host [tftp | rcp] filename [ip-address] | Optionally, enter the host configuration filename to be downloaded using rcp or TFTP.1 |
| 2 | Enable the switch to automatically load the host file upon restart. | |
| 3 | end | Exit configuration mode. |
| 4 | copy running-config startup-config | Save the configuration file to yhour startup configuration in the location specified by the CONFIG_FILE environment variable. |
| 5 | Reset the switch with the new configuration information. |
You can specify more than one host configuration file. The switch tries the files 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, the switch is configured to boot from the host configuration file hostfile1 and from the network configuration file networkfile1:
Switch(config)# boot host hostfile1 Switch(config)# boot network networkfile1 Switch(config)# service config Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy running-config startup-config
Booting host-confg... [timed out]
The switch 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 switch detects a problem with NVRAM or the configuration it contains, the switch enters the autoconfiguration mode. Refer to the chapter "Initially Configuring the LightStream 1010 ATM Switch."
In addition to loading startup configuration files from a server, you can configure the switch to load a startup configuration file specified by the CONFIG_FILE environment variable. To do so, complete the following tasks, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 | copy | Copy the configuration file to the device from which the switch loads the file upon restart. |
| 2 | configure terminal | Enter configuration mode from the terminal. |
| 3 | boot config device:filename | Set the CONFIG_FILE environment variable. This step modifies the runtime CONFIG_FILE environment variable. |
| 4 | end | Exit configuration mode. |
| 5 | copy running-config startup-config | Save the runtime CONFIG_FILE environment variable to your startup configuration. |
| 6 | show boot | Optionally, verify the contents of the CONFIG_FILE environment variable. |
When saving the runtime CONFIG_FILE environment variable to the startup configuration, the switch saves a complete version of the configuration file to the location specified by the CONFIG_FILE environment variable and saves a distilled version to NVRAM. The distilled version does not contain access list information. If NVRAM contains a complete configuration file, the switch prompts you to confirm the overwrite of the complete version with the distilled version. If NVRAM contains a distilled configuration, the switch does not prompt you for confirmation and overwrites the existing distilled configuration file in NVRAM.
Switch# copy running-config slot0:config2 Building configuration... Switch# dir -#- -length- -----date/time------ name 1 5204 May 03 1996 14:07:35 backup-config 2 5393 May 03 1996 15:32:57 startup-config 3 2247751 May 04 1996 12:08:51 ls1010-wi-m_1.1(1) 4 2247751 May 04 1996 13:25:14 test 5 5376 May 04 1996 13:54:23 config2 3483272 bytes available (4512120 bytes used) Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# boot config slot0:config2 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy running-config startup-config Building configuration... [OK] Switch# Switch# show boot BOOT variable = slot0:rhino/ls1010-wi-m_1.1(1),1;ls1010-wi-m_1.1(1),1; CONFIG_FILE variable = slot0:config2 Current CONFIG_FILE variable = slot0:config2 BOOTLDR variable = Configuration register is 0x000
To clear the contents of your startup configuration, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
Clear the contents of your startup configuration. This command erases the configuration specified by the CONFIG_FILE environment variable. |
When you use the erase startup-config command, the switch erases or deletes the configuration pointed to by the CONFIG_FILE environment variable. If this variable points to NVRAM, the switch erases NVRAM. If the CONFIG_FILE environment variable specifies a Flash memory device and configuration filename, the switch deletes the configuration file. That is, the switch 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 LightStream 1010 ATM switch, use one of the following commands in privileged EXEC mode:
| Command | Task |
|---|---|
erase [device:]filename or delete [device:]filename | Erase or delete a specified configuration file on a specified Flash device. |
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, the switch 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.
The following example erases the myconfig file from a Flash memory card inserted in PCMCIA card slot 0 of the ASP card:
Switch# erase slot0:myconfig
Switch# delete slot0:myconfig
After modifying and saving your unique configurations, you can store them on a network server. You can use these network server copies of system images and configuration files as backup copies.
To store system images and configuration files, perform the following tasks:
You can copy system images from Flash memory to a TFTP server or 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:
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 tasks in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 |
show flash [device:] | (Optional) Display the name and note the exact spelling of the system image filename in Flash memory or on a specific flash memory device. |
| 2 |
or copy file_id tftp | Copy the system image from Flash memory or from a specific flash memory device to a TFTP server. |
| 3 | ip-address or name | When prompted, enter the IP address or domain name of the TFTP server. |
| 4 | filename | When prompted, enter the filename of the system image in Flash memory. |
Switch# show flash all
Switch# show flash all
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. FFFFFFFF 129EECA3 214D4 13 5204 May 03 1996 14:07:35 backup-config
2 .. 1 AE9B32B 22A68 14 5393 May 03 1996 15:32:57 startup-config
3 .. FFFFFFFF E9D05582 247730 23 2247751 May 04 1996 12:08:51 ls1010-wi-m_1.1(1)
4 .. FFFFFFFF E9D05582 46C3F8 4 2247751 May 04 1996 13:25:14 test
3488776 bytes available (4506616 bytes used)
-------- F I L E S Y S T E M S T A T U S --------
Device Number = 0
DEVICE INFO BLOCK:
Magic Number = 6887635 File System Vers = 10000 (1.0)
Length = 800000 Sector Size = 20000
Programming Algorithm = 4 Erased State = FFFFFFFF
File System Offset = 20000 Length = 7A0000
MONLIB Offset = 100 Length = A570
Bad Sector Map Offset = 1FFF8 Length = 8
Squeeze Log Offset = 7C0000 Length = 20000
Squeeze Buffer Offset = 7E0000 Length = 20000
Num Spare Sectors = 0
Spares:
STATUS INFO:
<information deleted>
USAGE INFO:
Bytes Used = 44C3F8 Bytes Available = 353C08
Bad Sectors = 0 Spared Sectors = 0
OK Files = 4 Bytes = 44C1F8
Deleted Files = 0 Bytes = 0
Files w/Errors = 0 Bytes = 0
Switch#
Switch# copy flash tftp
Enter source file name: ls1010-wi-m_1.1(1)
Enter destination file name [ls1010-wi-m_1.1(1)]: backup-image
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
Address or name of remote host [dirt.cisco.com]? 171.69.1.129
!
A series of Cs indicates that a checksum verification of the image is occurring, and the exclamation point indicates that the copy process is occurring. To stop the copy process, press Ctrl-^.
For the PCMCIA card slot, the file to copy is test. The example uses the copy file_id tftp command to copy test to a TFTP server.
Switch# show flash slot0: -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1 .. FFFFFFFF 129EECA3 214D4 13 5204 May 03 1996 14:07:35 backup-config 2 .. 1 AE9B32B 22A68 14 5393 May 03 1996 15:32:57 startup-config 3 .. FFFFFFFF E9D05582 247730 23 2247751 May 04 1996 12:08:51 ls1010-wi-m_1.1(1) 4 .. FFFFFFFF E9D05582 46C3F8 4 2247751 May 04 1996 13:25:14 test 3488776 bytes available (4506616 bytes used) Switch# copy slot0:test tftp Enter destination file name [test]: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Address or name of remote host [dirt.cisco.com]? 171.69.1.129 !
A series of Cs indicates that a checksum verification of the image is occurring, and the exclamation point indicates that the copy process is occurring.
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 LightStream 1010 ATM switch also requires changing the processor's configuration register. Refer to the "Modify the Configuration Register Boot Field" section for instructions.
You can copy a system image from Flash memory to an rcp network server.
The rcp protocol requires a client to 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 switch 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 switch software uses the switch host name as both the remote and local usernames.
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 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.
To stop the copy process, press Ctrl-^.
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, beginning in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 |
show flash [device:] | (Optional) If you do not already know it, learn the exact spelling of the system image filename in Flash memory. On the LightStream 1010 ATM switch, you can learn the spelling of the system image filename on a specified Flash memory device. |
| 2 | configure terminal | Enter configuration mode from the terminal. This step is required only if you are going to override the default remote username in the next step. |
| 3 | ip rcmd remote-username username | Specify the remote username. This step is optional, but recommended. |
| 4 | end | Exit configuration mode. |
| 5 |
copy file_id rcp | Using rcp, copy the system image in Flash memory to a network server. |
| 6 | ip-address or name | When prompted, enter the IP address or domain name of the rcp server. |
| 7 | filename | When prompted, enter the filename of the system image in Flash memory. |
Switch# configure terminal Switch(config)# ip rcmd remote-username netadmin2 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy flash rcp Enter source file name: ls1010-wi-m_1.1(1) Enter destination file name [ls1010-wi-m_1.1(1)]: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Address or name of remote host [dirt.cisco.com]? 171.69.1.129 Writing ls1010-wi-m_1.1(1) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Switch# configure terminal Switch(config)# ip rcmd remote-username netadmin2 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy slot0:ls1010-wi-m_1.1(1) rcp Enter destination file name [ls1010-wi-m_1.1(1)]: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Address or name of remote host []? 171.69.1.129 Writing ls1010-wi-m_1.1(1) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The screen filled with exclamation points indicates that the process is working.
You can copy configuration files from the switch 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:
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 privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 |
or | Specify that the running or startup configuration file will be stored on a network server. |
| 2 | ip-address | Enter the IP address of the network server. |
| 3 | filename | Enter the name of the configuration file to store on the server. |
| 4 | y | Confirm the entry. |
The following example shows how to copy a running configuration file from a switch to a TFTP server:
Switch# copy running-config tftp Remote host []? 171.69.1.129 Name of configuration file to write [switch-confg]? backup-confg Write file backup-confg on host 171.69.1.129? [confirm] y Building configuration... Writing backup-confg !!! [OK]
The rcp protocol requires that a client send the remote username on each rcp request to a server. When you issue a command to copy a configuration file from the switch to a server using rcp, the switch sends a default remote username unless you override the default by configuring a remote username. By default, the switch 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 switch software uses the switch 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 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.
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 switch to an rcp server, perform one of following tasks:
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, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip rcmd remote-username username | Specify the remote username. This step is optional, but recommended. |
| 2 | end | Exit from global configuration mode. |
| 3 | Specify that the switch's running configuration file will be stored on a network server. | |
| 4 | ip-address | Enter the IP address of the network server. |
| 5 | filename | Enter the name of the configuration file to store on the server. |
| 6 | y | Confirm the entry. |
Switch(config)# ip rcmd remote-username netadmin2 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy running-config rcp Remote host []? 171.69.1.129 Name of configuration file to write [switch-confg]? Write file switch-confg on host 171.69.1.129? [confirm] y Building configuration... Writing switch-confg !! [OK]
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, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip rcmd remote-username username | Specify the remote username. This step is optional, but recommended. |
| 2 | end | Exit from global configuration mode. |
| 3 | Copy the configuration file specified by the CONFIG_FILE environment variable to an rcp server. | |
| 4 | ip-address | Enter the IP address of the network server. |
| 5 | filename | Enter the name of the configuration file to store on the server. |
| 6 | y | Confirm the entry. |
Switch# configure terminal Switch(config)# ip rcmd remote-username netadmin2 Switch(config)# end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch# copy startup-config rcp Remote host []? 171.69.1.129 Name of configuration file to write [switch-confg]? Write file switch-confg on host 171.69.1.129? [confirm] y Writing switch-confg !! [OK]
It is both costly and inefficient to have a dedicated TFTP server on every network segment. To cut costs and time delays in your network, you can configure a switch as a TFTP server.
Typically, the switch configured as a server forwards operating system images from its Flash memory to other switches. You can also configure the switch to respond to other types of service requests, such as Reverse Address Resolution Protocol (RARP) requests.
To configure the switch as a server, perform any of the following tasks. The tasks are not mutually exclusive.
As a TFTP server host, the switch 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 specified in the switch's configuration.
To specify TFTP server operation for a switch, complete the following tasks, beginning in global configuration mode:
| Step | Command | Task |
| 1 | tftp-server rom alias filename1 [access-list-number] tftp-server flash device:filename | Specify TFTP server operation. |
| 2 | end | Exit configuration mode. |
| 3 | Save the running configuration file to the startup configuration location specified by the CONFIG_FILE environment variable. |
The TFTP session can sometimes fail. TFTP generates the following special characters to help you determine why a TFTP session failed:
The transfer session might still succeed if TFTP generates these characters, but the output is useful for diagnosing the transfer failure.
In the following example, the system uses TFTP to send a copy of the Flash memory file version-1.03 in response to a TFTP Read Request for that file. The requesting host is checked against access list 22.
Switch(config)# tftp-server flash version-1.03 22
Switch(config)# tftp-server rom alias ls1010-m_1.101
Flash memory can be used as a TFTP file server for other switches on the network. This feature allows you to boot a remote switch with an image that resides in the Flash server memory.
The LightStream 1010 ATM switch allows you to specify one of the different Flash memory devices as the TFTP server. You can specify its internal Flash (bootflash:) or one of the two PCMCIA card slots (slot0: or slot1:) as the TFTP server.
In the description that follows, one switch is referred to as the Flash server, and all other switches are referred to as client switches. Example configurations for the Flash server and client switches include commands, as necessary.
To configure Flash memory as a TFTP server, perform the following tasks:
The Flash server and client switch must be able to reach each other before the TFTP function can be implemented. Verify this connection by pinging between the Flash server and the client switch (in either direction) with the ping command.
An example of the ping command follows:
Switch# ping 131.152.1.129 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 131.152.1.129, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
In this example, the IP address of 131.152.1.129 belongs to the client switch. 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 the client switch, 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 switch boots. Note the name of this software image so you can verify it after the first client boot.
![]() | Caution For full functionality, the software residing in the Flash memory must be the same type as the ROM software installed on the client switch. 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. |
To configure the Flash server, use the following command in global configuration mode:
| Command | Task |
|---|---|
tftp-server flash device:filename | Specify the TFTP server operation for a switch. |
Enter configuration commands, one per line. Edit with DELETE, CRTL/W, and CRTL/U; end with CTRL/Z Server(config)# tftp-server flash ls1010-m_1.9.17 1 Server(config)# access-list 1 permit 131.108.101.0 0.0.0.255 Server(config)# end Server# copy running-config startup-config [ok]
You can configure the client switch to first load a system image from the Flash server, then, as a backup, configure the client switch to then load its own ROM image if the load from a Flash server fails. To do so, complete the following tasks, beginning in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | Remove all previous boot system statements from the configuration file. | |
| 2 | boot system [rcp | tftp] filename [ip-address] | Specify that the client switch loads a system image from the Flash server. |
| 3 | config-register value | Set the configuration register to enable the client switch to load a system image from a network server. |
| 4 | end | Exit configuration mode. |
| 5 | Save the running configuration file to the startup configuration location specified by the CONFIG_FILE environment variable. | |
| 6 | Reload the switch to make your changes take effect. |
![]() | Caution Using the no boot system command, as in the following example, will invalidate all other boot system commands currently in the client switch system configuration. Before proceeding, determine whether the system configuration stored in the client switch 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(config)# no boot system Client(config)# boot system ls1010-m_1.9.17 131.131.111.111 Client(config)# boot system rom Client(config)# config-register 0x010F Client(config)# end 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 command entered after this command is executed first. The second command, boot system filename address, tells the client switch to look for the file ls1010-m_1.9.17 in the (Flash) server with an IP address of 131.131.111.111. Failing this, the client switch boots 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 to the location specified by the CONFIG_FILE environment variable, and the reload command boots the system.
![]() | Caution The system software (ls1010-m_1.9.17 in the example) to be booted from the Flash server (131.131.111.111 in the example) must reside in Flash memory on the server. If it is not in Flash memory, the client switch boots the Flash server's system ROM. |
To verify that the software image booted from the Flash server is the image in Flash memory, use the following EXEC command:
| Command | Task |
|---|---|
show version | Verify that the software image booted from the Flash server is the image present in Flash memory of the client switch. |
The following example shows output of the show version command:
Switch# show version Cisco Internetwork Operating System Software IOS (tm) PNNI Software (LS1010-WP-M), Version XX.X(X), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1998 by cisco Systems, Inc. Compiled Tue 07-Oct-97 04:53 by Image text-base: 0x60010910, data-base: 0x604E6000 ROM: System Bootstrap, Version XX.X(X.X.WAX.0) [integ 1.4.WAX.0], RELEASE SOFTWARE Switch uptime is 2 weeks, 2 days, 39 minutes System restarted by power-on System image file is "bootflash:ls1010-wp-mz.112-8.0.1.FWA4.0.16", booted via bootflash cisco ASP (R4600) processor with 65536K bytes of memory. R4700 processor, Implementation 33, Revision 1.0 Last reset from power-on 1 Ethernet/IEEE 802.3 interface(s) 20 ATM network interface(s) 123K bytes of non-volatile configuration memory. 8192K bytes of Flash internal SIMM (Sector size 256K). Configuration register is 0x2101
The important information in this example is contained in the second line "IOS (tm)...," which shows the version of the operating system in the client switch's RAM. The second "ROM: ...." line shows the filename of the system image loaded from the Flash server.
Verify that the software shown in the first line of the show version output is the software residing in the Flash server memory.
You can configure the switch to work with various types of servers. Specifically, you can configure the switch to forward different types of service requests.
The Boot Protocol (BOOTP) server for asynchronous interfaces supports the extended BOOTP requests specified in RFC 1084. The following command is helpful in conjunction with using the auxiliary port as an asynchronous interface.
To configure extended BOOTP requests for asynchronous interfaces, use the following command in global configuration mode:
| Command | Task |
|---|---|
async-bootp tag [:hostname] data | Configure extended BOOTP requests for asynchronous interfaces. |
To display the extended BOOTP requests, use the following privileged EXEC command:
| Command | Task |
|---|---|
Show parameters for BOOTP requests. |
The following sections describe optional startup tasks:
To download a file into a Flash, use one of the following commands in privileged EXEC mode:
| Command | Task |
|---|---|
Download a file from a TFTP server into a Flash partition. | |
Download a file from an rcp server into a Flash partition. |
To configure the switch to boot automatically from internal Flash, use the following command in global configuration mode:
| Command | Task |
|---|---|
boot system flash filename | Boot the specified file from the first partition. |
The result of booting a relocatable image from Flash depends on where and how the image was downloaded into Flash memory. Table 20-2 describes the various ways an image might be downloaded and the corresponding results of booting from Flash memory.
| Method of Downloading | Result of Booting from Flash |
|---|---|
The image was downloaded as the first file by a nonrelocatable image. | The image executes in place from Flash memory, like a run-from-Flash image. |
The image was not downloaded 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 executes in place from Flash memory, like a run-from-Flash image. |
The image was not downloaded as the first file by a relocatable image. | The relocatable image relocates the image before storage in Flash memory. Hence, the image executes in place from Flash memory, like any other run-from-Flash image. |
The following sections describe additional LightStream 1010 ATM switch features:
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 by using one of the following commands in privileged EXEC mode:
| Command | Task |
|---|---|
|
or | Copy a boot image from an TFTP or rcp server to boot Flash memory. |
To copy a boot image from boot Flash memory to an rcp or TFTP server, perform the following task in privileged EXEC mode:
| Command | Task |
|---|---|
Copy a boot image from boot Flash memory to an rcp or TFTP server. |
To verify the checksum of a boot image in boot Flash memory, use the following EXEC command:
| Command | Task |
|---|---|
Verify the checksum of a boot image. |
To erase the contents of boot Flash memory, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
erase bootflash | Erase boot Flash memory. |
This section describes Cisco's implementation of environment variables on the LightStream 1010 ATM switch. It also describes startup tasks in the following sections:
You can use Flash memory cards in the PCMCIA Flash memory card slots on your LightStream 1010 ATM switch. The ASP card contains two PCMCIA slots.
These Flash memory cards can store executable images and configuration files. The switch can now boot images and load configuration files from Flash memory cards as well as from internal Flash, NVRAM, and the network.
Because the switch 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 switch uses for various functions. These special environment variables are as follows:
The BOOT environment variable specifies a list of bootable images on various devices. Valid devices are internal flash (bootflash:), the first PCMCIA card slot (slot0:), the second PCMCIA card slot (slot1:), and tftp. Once you save the BOOT environment variable to your startup configuration, the switch checks the variable upon startup to determine the device and filename of the image to boot.
The switch tries to boot the first image in the BOOT environment variable list. If the switch cannot boot that image, it tries to boot the next image specified in the list. The switch tries each image in the list until it successfully boots. If the switch cannot boot any image in the BOOT environment variable list, it attempts to boot the ROM image.
If an entry in the BOOT environment variable list does not specify a device, the switch assumes the device is tftp. If an entry in the BOOT environment variable list specifies an invalid device, the switch skips that entry.
The BOOTLDR environment specifies the Flash device and filename containing the rxboot image that the ROM monitor uses. The valid devices are bootflash:, slot0:, and slot1:.
This environment variable allows you to have several rxboot images. You can also instruct the ROM monitor to use a specific rxboot image without having to switch out ROMs. After you save the BOOTLDR environment variable to your startup configuration, the switch checks the variable upon startup to determine which rxboot image to use.
The CONFIG_FILE environment variable specifies the device and filename of the configuration file to use for initialization (startup). Valid devices are internal flash (bootflash:), the first PCMCIA card slot (slot0:), and the second PCMCIA card slot (slot1:). After you save the CONFIG_FILE environment variable to your startup configuration, the switch checks the variable upon startup to determine the location and filename of the configuration file to use for initialization.
The switch 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 switch detects a problem with NVRAM or the configuration it contains, the switch enters the autoconfiguration mode. Refer to the chapter "Initially Configuring the LightStream 1010 ATM Switch."
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.
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 and 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.
You must format a new Flash memory card before using it in a PCMCIA card slot.
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 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 system software contains the monlib file.
![]() | 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 card slot. Refer to instructions on maintaining the switch and replacing PCMCIA cards in your switch's hardware documentation for instructions on performing this step.
Step 2 Format Flash memory.
To format Flash memory, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
format [spare spare-number] device1: [[device2:][monlib-filename]] | Format Flash memory. |
The following example shows how to use the format command to format a Flash memory card inserted in PCMCIA card slot 0:
Switch# 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): Formatting sector 1 (erasing) Format device slot0 completed
When the switch returns you to the EXEC prompt, the new Flash memory card is successfully formatted and ready for use.
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. |
You can manage files on as many as three different Flash memory devices. The following sections describe the tasks you help you manage your files:
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, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
cd device: | Set a default Flash memory device. |
Switch> cd slot0:
You may 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, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
Display the current Flash memory device. |
Switch> pwd slot0
The following example shows how to use the cd command to change the present working device to bootflash and then uses the pwd command to display that present working device:
Switch> cd bootflash: Switch> pwd bootflash
You may 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 of a Flash device with the dir EXEC command.
To show a list of files on a specified Flash device, use the following EXEC command:
| Command | Task |
|---|---|
dir [/all | /deleted] [/long] [device:] [filename] | Display a list of files on a Flash memory device. |
The following example shows how to instruct the switch to list undeleted files for the default device specified by the cd command. Notice that the switch displays the information in short format because no keywords are used:
Switch# dir -#- -length- -----date/time------ name 1 3458 Sep 29 1997 17:36:02 startup-config 2 2812732 Nov 11 1997 14:23:43 ls1010-wp-mz.113-0.8.TWA4.1.1 5178944 bytes available (2816448 bytes used)
The following example shows how to display the long version of the same device:
Switch# dir /long -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1 .. config 217B75D1 20E04 14 3458 Sep 29 1997 17:36:02 startup-config 2 .. unknown 2F9F6B8B 2CF9C0 29 2812732 Nov 11 1997 14:23:43 ls1010-wp-mz.113-0.8.TWA4.1.1 5178944 bytes available (2816448 bytes used)
When you no longer need a file on a Flash memory device, you can delete it.
![]() | Caution Be careful not to delete your only known good boot image. If your Flash device is large enough to store multiple boot images, we recommend that you store a backup image. The backup image allows you to revert to a known good boot image if you have trouble with the new image. If you delete all boot images, you can no longer download any images. |
To delete a file from a specified Flash device, use one of the following commands in privileged EXEC mode:
| Command | Task |
|---|---|
delete [device:]filename or | Delete a file from a Flash memory device. |
If you omit the device, the switch 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 switch 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 section "Recover Deleted Files on a Flash Device."
Switch# delete slot0:myconfig
Switch# erase slot0:myconfig
You can undelete a deleted file. For example, you may want to revert to a previous configuration file because the current one is corrupt.
To undelete a deleted file on a Flash memory device, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
undelete index [device:] | Undelete a deleted file on a Flash memory 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 switch-config. You undelete by index to indicate which of the switch-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 switch-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 switch-config file and then undelete the previous switch-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.
Switch# dir -#- -length- -----date/time------ name 2 5393 May 03 1996 15:32:57 startup-config 3 2247751 May 04 1996 12:08:51 ls1010-wi-m_1.1(1) 5736656 bytes available (2258736 bytes used) Switch# undelete 1 Switch# dir -#- -length- -----date/time------ name 1 5204 May 03 1996 14:07:35 backup-config 2 5393 May 03 1996 15:32:57 startup-config 3 2247751 May 04 1996 12:08:51 ls1010-wi-m_1.1(1) 5736656 bytes available (2258736 bytes used)
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.
![]() | Caution Be careful not to delete your only known good boot image. If your Flash device is large enough to store multiple boot images, we recommend that you store a backup image. The backup image allows you to revert to a known good boot image if you have trouble with the new image. If you delete all boot images, you can no longer download any images. |
To permanently delete files on a Flash memory device, use the following command in privileged EXCE mode:
| Command | Task |
|---|---|
squeeze device: | Permanently delete all deleted files on a Flash memory card. |
When you issue the squeeze command, the switch 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.
Each ASP has a writable control store (WCS) that stores software. You can load updated software onto the WCS from the onboard ROM or from Flash memory on the ASP card. You can load updated software onto the WCS from bootflash or a Flash memory card inserted in one of the PCMCIA slots of the ASP card.
With this feature, you can update software without having physical access to the switch, and you can load new software without rebooting the system.
To load software from Flash memory, complete the following tasks in privileged EXEC mode:
| Step | Command | Task |
|---|---|---|
| 1 |
or copy tftp file_id | Copy software files into Flash. See the section "Copy System Software Images from a Network Server to the Switch" in this chapter for more information about how to copy TFTP images to Flash memory. |
| 2 | copy running-config startup-config | Retain new configuration information when the system is rebooted. |
If an error occurs when you are attempting to download software, the system loads the default system software image. The default software image is bundled with the system software.
These configuration commands are implemented after one of the following three events:
After you have entered a software configuration command and one of these events has taken place, all cards are reset, loaded with software from the appropriate sources, tested, and enabled for operation.
To signal to the system that all software configuration commands have been entered and the processor cards should be reloaded, use the following command in privileged EXEC mode:
| Command | Task |
|---|---|
Notify the system that all software configuration commands have been entered and the processor cards should be reloaded. |
If Flash memory is busy because a card is being removed or inserted, or a software reload command is executed while Flash is locked, the files will not be available and the onboard ROM software will be loaded. Issue another software reload command when Flash memory is available to load the proper software. The show flash command will show if another user or process has locked Flash memory.
The software 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 software reload command is automatically added to your running configuration when you issue a software command that changes the system's default behavior.
You can optionally configure your switch for remote shell (rsh) and rcp functions. This feature allows you to execute commands on remote switches and to remotely copy system images and configuration files to and from a network server or a switch.
This section provides a description of Cisco's implementation of rsh and rcp and describes the tasks to configure the switch for rsh and rcp in the following subsections:
From the switch, 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 or switch and then disconnect after you execute a command when using rsh. For example, you can use rsh to remotely look at the status of other switches without connecting to the target switch, executing the command, and then disconnecting from the switch. This is useful for looking at statistics on many different switches.
To gain access to a remote system running rsh, such as a UNIX host, there must be an entry in the system's .rhosts file or its equivalent to identify you as a trusted user who is authorized to execute commands remotely on the system. On UNIX systems, the .rhosts file identifies trusted users who can remotely execute commands on the system.
You can enable rsh support on a Cisco switch to allow users on remote systems to execute commands on the switch. However, Cisco's implementation of rsh does not support an .rhosts file. Instead, you configure a local authentication database to control access to the switch by users attempting to execute commands remotely using rsh. A local authentication database is similar in concept and use 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.
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 only need 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 Cisco's rcp implementation emulates the behavior of the UNIX rcp implementation---copying files among systems on the network---the command syntax differs from the UNIX rcp command syntax. Cisco's rcp support offers a set of copy commands that use rcp as the transport mechanism. These rcp copy commands are similar to Cisco's TFTP copy commands, but they offer faster performance and reliable delivery of data. These improvements are possible because the rcp transport mechanism is built on and uses the TCP/IP stack, which is connection-oriented. You can use rcp commands to copy system images and configuration files from the switch to a network server, and vice versa.
You can also enable rcp support on the switch to allow users on remote systems to copy files to and from the switch.
You configure a local authentication database to control access to the switch by remote users. To allow remote users to execute rcp or rsh commands on the switch, configure entries for those users in the authentication database of the switch.
Each entry configured in the authentication database identifies the local user, the remote host, and the remote user. You can specify the switch host name as the local username. To be allowed to remotely execute commands on the switch, the remote user must specify all three values---the local username, the remote host name, and the remote username---and 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 switch, Cisco's rcp implementation requires that the local username sent by the remote user match the local username configured in the database entry.
Note that if no DNS servers are configured for the switch, then the switch cannot authenticate the host in this manner. In this case, the switch 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 attempt of the switch 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 switch 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 (remote command) queries, use the no ip rcmd domain-lookup command.
To ensure security, the switch is not enabled to support rcp requests from remote users by default. When the switch is not enabled to support rcp, the authorization database has no effect.
To configure the switch to allow users on remote systems to copy files to and from the switch and execute commands on the switch, perform the tasks in either of the first sections and, optionally, the task in the third section:
To configure the switch to support incoming rcp requests, complete the following tasks in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip rcmd remote-host local-username {ip-address | host} remote-username | Create an entry in the local authentication database for each remote user who is allowed to execute rcp commands on the switch. |
| 2 | Enable the switch to support incoming rcp requests. |
To disable the switch from supporting incoming rcp requests, use the no ip rcmd rcp-enable command.
Switch(config)# ip rcmd remote-host Switch1 131.108.15.55 netadmin1 Switch(config)# ip rcmd remote-host Switch1 131.108.101.101 netadmin3 Switch(config)# ip rcmd rcp-enable
To configure the switch as an rsh server, complete the following tasks in global configuration mode:
| Step | Command | Task |
|---|---|---|
| 1 | ip rcmd remote-host local-username {ip-address | host} remote-username [enable] | Create an entry in the local authentication database for each remote user who is allowed to execute rsh commands on the switch. |
| 2 | Enable the switch to support incoming rsh commands. |
To disable the switch from supporting incoming rsh commands, use the no ip rcmd rsh-enable command.
Switch(config)# ip rcmd remote-host Switch1 131.108.101.101 rmtnetad1 Switch(config)# ip rcmd remote-host Switch1 131.108.101.101 netadmin4 enable Switch(config)# ip rcmd rsh-enable
To bypass the DNS security check when DNS services are configured but not available, use the following command in global configuration mode:
| Command | Task |
|---|---|
Bypass the DNS security check. |
The switch 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.
From the switch, 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 switch to issue rcp requests from the switch using rcp. However, to prepare to use rcp from the switch 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 switch software sends the remote username associated with the current TTY (terminal) process, if that name is valid, for rcp commands.
If the username for the current TTY process is not valid, the switch software sends the host name as the remote username. For boot commands using rcp, the switch software sends the switch 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 as follows:
To override the default remote username sent on rcp requests, use the following command in global configuration mode:
| Command | Task |
|---|---|
ip rcmd remote-username username | Specify the remote username. |
To remove the remote username and return to the default value, use the no ip rcmd remote-username command.
You can use the rsh command 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 a username, the switch sends a default remote username. By default, the switch software sends the remote username associated with the current TTY process, if that name is valid. If the TTY remote username is invalid, the switch software uses the switch host name as 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:
| Step | Command | Task |
|---|---|---|
| 1 | enable [password] | Enter privileged EXEC mode. |
| 2 | rsh {ip-address | host} [/user username] remote-command | Enter the command to be executed remotely. |
The following example shows how to execute a command remotely using rsh:
Switch> enable
Switch# rsh mysys.cisco.com /u sharon ls -a . .. .alias .cshrc .emacs .exrc .history .login .mailrc .newsrc .oldnewsrc .rhosts .twmrc .xsession jazz Switch#
If your switch 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 might enter 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 switch and then pressing the Break key during the first 60 seconds of startup.
The following sections describe how to manually load a system image from ROM monitor mode:
To manually boot from Flash memory, complete the following tasks in privileged EXEC mode:
| Step | Command | Task |
| 1 | Restart the switch. | |
| 2 | Break | Press the Break key during the first 60 seconds while the system is starting up. |
| 3 | boot device:[filename] | Manually boot the switch from Flash. |
> boot CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Uncompressing file: ########################################################### ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ######### <information deleted> %SYS-5-RESTART: System restarted -- Cisco Internetwork Operating System Software <information deleted>
In the following example, the boot bootflash command is used with the filename ls1010-m_1, the name of the file that is loaded:
> boot bootflash: ls1010-m_1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC Uncompressing file: ########################################################### ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ######### <information deleted> %SYS-5-RESTART: System restarted -- <information deleted>
To manually boot from a network file, complete the following tasks in privileged EXEC mode:
| Step | Command | Task |
| 1 | Restart the switch. | |
| 2 | Break | Press the Break key during the first 60 seconds while the system is starting up. |
| 3 | boot filename [ip-address] | Manually boot the switch from a network file. |
In the following example, the switch is manually booted from the network file network1:
> boot network1
To manually boot the switch from ROM, complete the following steps in privileged EXEC mode:
| Step | Command | Task |
| 1 | Restart the switch. | |
| 2 | Break | Press the Break key during the first 60 seconds while the system is starting up. |
| 3 | Manually boot the switch from ROM. |
In the following example, the switch is manually booted from ROM:
> boot
To return to EXEC mode from ROM monitor mode, use the following command:
| Command | Task |
|---|---|
Return to EXEC mode to use the system image. |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Feb 5 16:01:32 PST 1999
Copyright 1989-1999©Cisco Systems Inc.