Guest

Cisco Catalyst 6000 Series Switches

Managing Software Images and Working with Configuration Files on Catalyst Switches

Cisco - Managing Software Images and Working with Configuration Files on Catalyst Switches

Introduction

This document describes how to work with configuration files and software images on these switches:

  • Cisco Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches that run Catalyst OS (CatOS)

  • Catalyst 2900XL/3500XL and 2950 Series Switches

  • Catalyst 3550 Series Switches

  • Catalyst 1900 and 2820 Series of Digital Switches

Refer to Resetting Catalyst Switches to Factory Defaults in order to restore a Catalyst switch to its default configuration.

See the Related Information

Related Cisco Support Community Discussions section for upgrade instructions on Catalyst switches.

Prerequisites

Requirements

Cisco recommends that you have knowledge of Cisco switch hardware administration.

Components Used

The information in this document is based on Catalyst Series Switches.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Catalyst 4500/4000, 5500/5000, and 6500/6000 Series

The Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches store software images and configurations in two different types of devices:

  • NVRAM—This device contains the current configuration of the switch. Any modification to the configuration immediately saves to the NVRAM. Therefore, the NVRAM always contains the current configuration of the switch.

    Note: The Cisco IOS® software concept of a startup configuration and a running configuration does not apply here.

  • Flash—Each switch of these series has at least one Flash memory module, which is much larger in capacity than the NVRAM. Generally, you use Flash memory in order to store software images for a Supervisor Engine to run.

The management of the NVRAM is consistent over the Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches. However, in terms of the Flash handling, there is a group of Catalyst 5500/5000 Supervisor Engines that behave differently than the other switches. This group includes:

  • All Catalyst 5500/5000 Supervisor Engines I, II, IIG, and IIIG

  • Catalyst 2901, 2902, and 2926T Switches that are based on Supervisor Engines I, II, IIG, and IIIG

The rest of the Catalyst 4500/4000, 5500/5000, and 6500/6000 Switches implement a Flash file system that allows you to save several software images as well as some backup configuration files in Flash.

Note: Catalyst 4500/4000 Switches also include the 2948G, 4912G, and 2980G Switches.

Note: In software versions 6.3.x and later, Catalyst 4500/4000, 5500/5000, and 6500/6000 Switches support text configuration mode instead of the default binary mode. You use text mode if the configuration is too large for storage in binary format in the NVRAM. Refer to the Setting the Text File Configuration Mode section of Working With the Flash File System for further configuration instructions. Remember that, when the configuration is in text mode, you must issue the write memory command whenever you make configuration changes for storage in the NVRAM configuration. This requirement is similar to that of the Cisco IOS routers.

Manage the NVRAM Configuration on the Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches That Run CatOS

This section describes the commands for management of the configuration in NVRAM. The commands are common to the Catalyst 4500/4000, 5500/5000, and 6500/6000 Switches.

Display the Configuration

Issue the show config command in order to view the current configuration file. The command shows all modules in the configuration file in sequence, and starts with module one.

Issue this command in order to restrict the display of the configuration to a specific module:

show config module_number

Download/Upload a Configuration

Complete these steps in order to download and/or upload a configuration:

  1. Enter enable mode.

  2. Establish IP connectivity to the TFTP server.

    In this example, the ping command accesses the TFTP server.

    Console> enable
    Enter password: 
    Console> (enable) ping 10.200.8.200
    10.200.8.200 is alive
  3. Issue the write network command or the configure network command.

    Note: Catalyst switches that run CatOS by default operate in binary configuration mode. When you operate in binary configuration mode, most user settings are automatically saved to NVRAM. Issue the set config mode text command in order to change the configuration mode to text mode. Text mode typically uses less NVRAM or Flash memory space than binary configuration mode. You must issue the write memory command while you operate in text mode to save the configuration in NVRAM. Issue the set config mode text auto-save command in order to automatically save the text configuration in NVRAM.

    • Issue the write network command in order to upload the current configuration in NVRAM to a TFTP server.

      Console> (enable) write network 
      IP address or name of remote host? 10.200.8.200 
      Name of configuration file? config 
      Upload configuration to config on 10.200.8.200 (y/n) [n]? y 
      ... 
      .......... 
      .......... 
      .. 
      \ 
      Finished network upload.  (5210 bytes)
    • Issue the configure network command in order to download a configuration file from a TFTP server directly into NVRAM.

      Console> (enable) configure network 
      IP address or name of remote host? 10.200.8.200 
      Name of configuration file? config
      Configure using config from 10.200.8.200 (y/n) [n]? y
      

Manage Images on the Catalyst 5500/5000 Series Flash with Supervisor Engine I, II, IIG, and IIIG

The onboard Flash memory of these Supervisor Engines can handle only one software image at a time. The management is limited but straightforward. You only need a single command to download a configuration into the Flash.

Complete these steps:

  1. Enter enable mode.

    Issue the enable command and the enable password in order to enter enable mode. By default, the enable command has no password, so you can press Enter at the password prompt.

  2. Establish IP connectivity to the TFTP server that holds the image.

    See Appendix A: Connect to a TFTP Server for information about how to get IP connectivity to the TFTP server.

  3. Issue the download command in order to download the image.

    This example downloads the cat5000-sup.4-5-4.bin image from the TFTP server with IP address 10.200.8.200. The syntax for the command is download host_file [mod_num]. The additional module-number argument allows you to download an image on a board that differs from the current Supervisor Engine. This argument is useful for an upgrade of intelligent Catalyst modules, such as FDDI modules or nine-port Gigabit modules.

    Console> (enable) download 10.200.8.200 cat5000-sup.4-5-4.bin
    Download image cat5000-sup.4-5-4.bin from 10.200.8.200 to module 1 FLASH (y/n) 
     [n]? y
    / 
    Finished network single module download. (2828632  bytes)
  4. Check the content of the Flash.

    The show flash command lists the bundle of images in the cat5000-sup.4-5-4.bin image that were downloaded into the Flash. When you download a new image, Supervisor Engine DRAM first receives the file before the file is written into the Flash. Therefore, there is no risk of Flash corruption because of an interrupted file transfer. The Supervisor Engine uses the new image at the next reset.

    Console> (enable) show flash 
    File            Version              Sector       Size    Built 
    --------------- -------------------- ------------ ------- ----------------- 
    c5000 nmp       4.5(4)               02-11        2000782 10/18/99 18:06:43 
          epld      4.5                  30             73392 10/18/99 18:06:43 
          lcp xa2   4.5(4)               12-15          57752 10/18/99 11:06:15 
          lcp xa1   4.5(4)               12-15          88390 10/18/99 11:04:10 
          lcp atm   4.5(4)               12-15          26147 10/18/99 10:56:25 
          mcp 360   4.5(4)               12-15         224200 10/18/99 11:06:41 
          lcp tr    4.5(4)               12-15          32120 10/18/99 10:57:09 
          lcp c5ip  4.5(4)               12-15          25468 10/18/99 11:00:57 
          lcp 64k   4.5(4)               12-15          54457 10/18/99 11:00:56 
          atm/fddi  4.5(4)               12-15          26171 10/18/99 10:55:39 
          lcp 360   4.5(4)               12-15         130696 10/18/99 11:01:54 
          lcp       4.5(4)               12-15          26362 10/18/99 10:55:37
          smcp      4.5(4)               12-15          33302 10/18/99 10:49:13 
          mcp       4.5(4)               12-15          25221 10/18/99 10:52:33 
    Console> (enable)

    Note: A Supervisor Engine module upgrade can require several successive upgrades. Refer to the Supervisor Engine Module Software Release Notes (Catalyst 5500/5000 Switches) for more information.

Manage Files on the Flash for the Catalyst 4500/4000, 5500/5000, and 6500/6000 with Supervisor Engine III and IIIF

The Supervisor Engine of these switches implements a file system, after which the Supervisor Engine can handle several images. Supervisor Engines have at least one Flash device, which has the name bootflash:. There can also be a slot0: and a slot1: Flash device available. This depends on the number of Flash PC card (PCMCIA) slots on the Supervisor Engine. The most basic operations are available on these devices, such as the list, copy, and deletion of files. You use approximately the same command syntax as you use in DOS. Here is a list of common commands:

  • Format Flash—format device:

  • List files on Flash—dir [device:] [all]

  • Change the default Flash device—cd device:

  • Copy files—copy [device:]file_name [device:]file_name

  • Mark files as deleted—delete [device:]file_name

  • Squeeze Flash—squeeze device:

The format Command

A Flash device can require you to format it if it is a new Flash PC card or if you want to erase all files. The output in this section shows the screen log of the format of a Flash PC card in slot0. Supervisor 1A and 2 supports PCMCIA 16, 24, and 64 MB, which is accessed using slot0:.

Console> (enable) format slot0:

All sectors will be erased, proceed (y/n) [n]? y

Enter volume id (up to 30 characters): flash_PCcard_0

Formatting sector 1 
Format device slot0 completed 
Console> (enable)

On the Catalyst 6500/6000 Series with Supervisor Engine 720, there are two external slots for a Flash card, disk0: and disk1:. Supervisor Engine 32 has one slot for a Flash card, which is accessed using disk0:. Both Supervisor 32 and 720 support Compact flash type II-64, 128, and 256 MB. Supervisor 1A and 2 also support ATA 64 MB, which is accessed using disk0:.

Switch-6509#format disk0:
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "disk0:".  Continue? [confirm]

Format: Drive communication & 1st Sector Write OK...
Writing Monlib sectors.
Monlib Version        = 2        (0.2)
................................................................................
...............................................................
Monlib write complete
...................
Format: All system sectors written. OK...

Format: Total sectors in formatted partition: 500553
Format: Total bytes in formatted partition: 256283136
Format: Operation completed successfully.

Format of disk0 complete

Refer to Catalyst 6000 Family Flash Card Install Note and to table 2 in Cisco Catalyst 6500 / Cisco 7600 Series Supervisor Engine 32 for more information on the Flash card.

The dir Command

The dir command lists the files that are available in the Flash device that you specify. This example shows how to list files in bootflash: and slot0:

Note: Use disk0: or disk1: if you have a Supervisor Engine 720.

Configuration has been copied successfully. 
Console> (enable) dir bootflash: 
-#- -length- -----date/time------ name 
  1  4577929 Jun 14 2000 20:59:30 cat6000-sup.5-3-1a-CSX.bin 
  2     1187 Nov 19 1999 10:00:56 vbMSM

11411408 bytes available (4579376 bytes used) 
Console> (enable) dir slot0: 
-#- -length- -----date/time------ name 
  1     8855 Dec 02 1999 02:55:55 config

16375016 bytes available (8984 bytes used) 
Console> (enable)

The cd Command

If you issue the dir command but do not specify a Flash device, the default Flash that displays is bootflash:. You can change this default with the cd command. Here is the output of the dir command before and after you issue the cd command:

Console> (enable) dir 
-#- -length- -----date/time------ name 
  1  4577929 Jun 14 2000 20:59:30 cat6000-sup.5-3-1a-CSX.bin 
  2     1187 Nov 19 1999 10:00:56 vbMSM

11411408 bytes available (4579376 bytes used) 
Console> (enable) cd slot0: 
Console> (enable) dir 
-#- -length- -----date/time------ name 
  1     8855 Dec 02 1999 02:55:55 config

16375016 bytes available (8984 bytes used) 
Console> (enable)

The copy Command

Use the copy command in order to duplicate a file. You can duplicate a file across different devices. This example shows how to duplicate a file from bootflash: into slot0:.

Note: Use disk0: or disk1: if you have a Supervisor Engine 720.

Console> (enable) copy bootflash:vbMSM slot0:

16374888 bytes available on device slot0, proceed (y/n) [n]? y

File has been copied successfully. 
Console> (enable) dir slot0: 
-#- -length- -----date/time------ name 
  1     8855 Dec 02 1999 02:55:55 config 
  2     1187 Dec 02 1999 03:05:05 vbMSM

16373700 bytes available (10300 bytes used)

Note: If you do not specify a file system, the default system is assumed.

Console> (enable) cd bootflash: 
Console> (enable) copy vbMSM vbMSM2

11411280 bytes available on device bootflash, proceed (y/n) [n]? y

File has been copied successfully. 
Console> (enable) dir
-#- -length- -----date/time------ name 
  1  4577929 Jun 14 2000 20:59:30 cat6000-sup.5-3-1a-CSX.bin 
  2     1187 Nov 19 1999 10:00:56 vbMSM 
  3     1187 Dec 02 1999 03:05:21 vbMSM2

11410092 bytes available (4580692 bytes used)

The delete, undelete, and squeeze Commands

The delete command allows you to mark a file as deleted. The file system does not immediately delete a file. The file carries a special "D" flag. When you issue the dir command, the file no longer displays. Issue the dir command with the all option in order to see all files, which includes deleted ones.

Note: The delete command does not increase the available space on Flash because the deletion of files does not, in fact, remove them.

Console> (enable) delete bootflash:vbMSM2 
Console> (enable) dir bootflash: 
-#- -length- -----date/time------ name 
  1  4577929 Jun 14 2000 20:59:30 cat6000-sup.5-3-1a-CSX.bin 
  2     1187 Nov 19 1999 10:00:56 vbMSM

11410092 bytes available (4580692 bytes used) 
Console> (enable) dir bootflash: all 
-#- ED --type-- --crc--- -seek-- nlen -lngth- ---date/time---- name 
  1 .. ffffffff 4e84d429  49db0c  26  4577929 Jun14 00 20:59:30 cat6000-sup.5-3-1a-
   CSX.bin 
  2 .. ffffffff 4888b935  49e030   5     1187 Nov19 99 10:00:56 vbMSM 
  3 .D ffffffff 4888b935  49e554   6     1187 Dec02 99 03:05:21 vbMSM2

11410092 bytes available (4580692 bytes used) 
Console> (enable)

The undelete command allows you to recover a file that the system has marked with the "D" flag. You must specify the index of the file that you want to recover because you can have several deleted files with the same name.

Note: Issue the dir all command in order to see files with the "D" flag.

Here is an example of how to recover the file vbMSM2, which has been deleted:

Console> (enable) undelete 3 bootflash:vbMSM2 
Console> (enable) dir 
-#- -length- -----date/time------ name 
  1  4577929 Jun 14 2000 20:59:30 cat6000-sup.5-3-1a-CSX.bin 
  2     1187 Nov 19 1999 10:00:56 vbMSM 
  3     1187 Dec 02 1999 03:05:21 vbMSM2

11410092 bytes available (4580692 bytes used)

Issue the squeeze command in order to remove all files with the "D" flag from a Flash device.

caution Caution: There is no way to recover files after you issue the squeeze command.

Note: This operation can consume time, especially if you have deleted files that appear first on the list.

The operation releases the memory that the deleted files use. The available space on the Flash increases.

Console> (enable) delete vbMSM2
Console> (enable) dir all
-#- ED --type-- --crc--- -seek-- nlen -lngth- ---date/time---- name 
  1 .. ffffffff 4e84d429  49db0c   26 4577929 Jun14 00 20:59:30 cat6000-sup.5-3-1a-
   CSX.bin 
  2 .. ffffffff 4888b935  49e030    5    1187 Nov19 99 10:00:56 vbMSM 
  3 .D ffffffff 4888b935  49e554    6    1187 Dec02 99 03:05:21 vbMSM2

11410092 bytes available (4580692 bytes used) 
Console> (enable) squeeze bootflash:

All deleted files will be removed, proceed (y/n) [n]? y

Squeeze operation may take a while, proceed (y/n) [n]? y
Erasing squeeze log 
Console> (enable) dir all
-#- ED --type-- --crc--- -seek-- nlen -lngth- ---date/time---- name 
  1 .. ffffffff 4e84d429  49db0c  26  4577929 Jun14 00 20:59:30 cat6000-sup.5-3-1a-
   CSX.bin 
  2 .. ffffffff 4888b935  49e030   5     1187 Nov19 99 10:00:56 vbMSM

11411408 bytes available (4579376 bytes used)

Squeeze device bootflash failed (could not allocate squeeze buffer)

The error message is displayed when the flash file system does not have enough buffer space to remove the deleted files.

Console> (enable) squeeze bootflash:

All deleted files will be removed, proceed (y/n) [n]? y
Squeeze operation may take a while, proceed (y/n) [n]? y
error = -64
Squeeze device bootflash failed (could not allocate squeeze buffer)

As a workaround to this issue, take the backup of required files from the flash to the TFTP server, and then format the flash device and restore the files. The format operation does not need buffer space as mandated by the squeeze operation.

Download and Upload to a TFTP Server

You can use the keyword tftp in order to download and upload to a TFTP server. The keyword designates a TFTP server to use with the Flash file system. Copy to or from TFTP in order to access the TFTP server. This example uploads a file to a TFTP server and then downloads the file again, under a different name:

Console> (enable) ping 172.17.247.195 
172.17.247.195 is alive 
Console> (enable) dir 
-#- -length- -----date/time------ name 
  1  3107688 Sep 02 1999 05:33:27 cat4000.5-1-2a.bin 
  2  3292568 Oct 27 1999 15:43:37 cat4000.5-2-1.bin 
  3    12047 Oct 27 1999 17:43:48 clac.cfg

5121648 bytes available (6412688 bytes used) 
Console> (enable) copy clac.cfg tftp 
IP address or name of remote host []? 172.17.247.195 
Name of file to copy to [clac.cfg]? testfile 
| 
File has been copied successfully. 
Console> (enable) copy tftp bootflash:clac2 
IP address or name of remote host [172.17.247.195]? 
Name of file to copy from [clac.cfg]? testfile

5121520 bytes available on device bootflash, proceed (y/n) [n]? y

File has been copied successfully. 
Console> (enable) dir 
-#- -length- -----date/time------ name 
  1  3107688 Sep 02 1999 05:33:27 cat4000.5-1-2a.bin 
  2  3292568 Oct 27 1999 15:43:37 cat4000.5-2-1.bin 
  3    12047 Oct 27 1999 17:43:48 clac.cfg 
  4    12047 Dec 02 1999 13:35:42 clac2

5109472 bytes available (6424864 bytes used)

Select an Image from Which to Boot

When you have several images in Flash, you can select one for the Supervisor Engine to use at bootup. You can specify an ordered list of images to try so that if, for any reason, the boot of an image fails, the Supervisor Engine can try the next image in the sequence. Issue the show boot command in order to see the current list of images to use. If you do not specify an image, the Supervisor Engine tries the first available image. The first available image depends on the configuration register setting.

Console> (enable) show boot 
BOOT variable =

Configuration register is 0x102 
ignore-config: disabled 
console baud: 9600 
boot: image specified by the boot system commands

Issue the set boot system flash device:file_name [prepend] command in order to specify an image from which to boot. Here is an example:

Console> (enable) set boot system flash bootflash:cat4000.5-1-2a.bin 
BOOT variable = bootflash:cat4000.5-1-2a.bin,1; 
Console> (enable) set boot system flash bootflash:cat4000.5-2-1.bin 
BOOT variable = bootflash:cat4000.5-1-2a.bin,1;bootflash:cat4000.5-2-1.bin,1; 
Console> (enable) show boot 
BOOT variable = bootflash:cat4000.5-1-2a.bin,1;bootflash:cat4000.5-2-1.bin,1;

Configuration register is 0x102 
ignore-config: disabled 
console baud: 9600 
boot: image specified by the boot system commands

You can see that each additional image that you add is appended to the list. Use the prepend keyword in the command if you want to add an image name at the start of the list. Here is an example:

Console> (enable) set boot system flash bootflash:cat4000.5-2-1.bin prepend 
BOOT variable = bootflash:cat4000.5-2-1.bin,1;bootflash:cat4000.5-1-2a.bin,1; 
Console> (enable) show boot 
BOOT variable = bootflash:cat4000.5-2-1.bin,1;bootflash:cat4000.5-1-2a.bin,1;

Configuration register is 0x102 
ignore-config: disabled 
console baud: 9600 
boot: image specified by the boot system commands

This document does not cover the step-by-step procedure to upgrade the software image on Catalyst 4500/4000, 5500/5000, and 6500/6000 Switches that run CatOS. Refer to these documents for more information on how to upgrade the software image:

Additional Configuration Handling-Related Commands

The file system also allows you to use the configuration as a file. In this case, you can issue the copy command in order to save the configuration into Flash or to a TFTP server.

Here is an example of a configuration upload to a TFTP server and a subsequent download:

Console> (enable) ping 10.200.8.200 
10.200.8.200 is alive 
Console> (enable) copy config tftp 
IP address or name of remote host []? 10.200.8.200 
Name of file to copy to []? config

Upload configuration to tftp:config, (y/n) [n]? y 
... 
.............. 
.............. 
.. 
| 
Configuration has been copied successfully. 
Console> (enable) copy tftp config 
IP address or name of remote host [10.200.8.200]? 
Name of file to copy from [config]?

Configure using tftp:config (y/n) [n]? y

Manage the NVRAM Configuration on Catalyst 6500/6000 MSFC

Refer to the Working with Configuration Files on the MSFC section of Working with Configuration Files for information on how to manage the NVRAM configuration on the Catalyst 6500/6000 Multilayer Switch Feature Card (MSFC).

Catalyst 2900XL, 3500XL, and 2950 Series

The Catalyst 2900XL, 3500XL, and 2950 Switches have a very powerful Flash file system with some UNIX-like commands. A single Flash device stores both configuration files and software images. Some environment variables specify the file to use in order to boot the switch and the file that serves as the configuration file. Only the size of the Flash itself limits this very flexible system. This section provides the commands to manage files on the Flash and the commands to set the environment variables.

Here is a brief presentation of the typical files on a Catalyst 2900XL/3500XL/2950 Series Switch:

  • At least one software image from which the switch can boot

    An example software image is c2900XL-h2s-mz-120.5-XP.bin.

  • An HTML directory

    This directory holds all the HTML and GIF files for use with the web interface.

  • A configuration file

    The default configuration file is config.text. This file corresponds to the startup configuration of a Cisco IOS router. You can have several configuration files and specify the one to use.

  • A vlan.dat file

    This file appears if you have configured a VLAN database on the switch.

  • An env_vars file

    This file lists environment variables. This file is very important because it provides the system with information such as:

    • The image from which to boot

    • Which configuration file to use, if it differs from the default

Manage Files on the Flash

The keyword flash: refers to the Flash device. You can simply refer to a file in Flash by flash:file_name . Another keyword, tftp:, allows you to directly refer to a file on a TFTP server. With these keywords, you can easily download or upload files to a TFTP server in the same way as a simple copy in Flash.

This series of switches uses this set of configuration commands:

  • List files in Flash—dir

  • Copy files—copy

  • Delete files—delete

  • Display the content of a file—more

  • Access a TFTP server with use of the tftp keyword

  • Extract a tape archive (TAR) file into Flash

This example shows part of an upgrade from a TFTP server. The dir command lists the files in Flash:

Switch#dir flash: 
Directory of flash:

  3  -r--     1117595   Mar 01 1993 05:37:51  c2900XL-h2s-mz-112.8.2-SA6 
227  -r--          55   Mar 01 1993 05:38:41  env_vars 
  4  drwx       18752   Mar 01 1993 00:08:15  html 
  6  -rwx           0   Mar 04 1993 17:51:19  config.text 
228  -rwx         856   Mar 08 1993 04:10:21  vlan.dat 
230  -rwx     1490584   Mar 01 1993 00:07:50  c2900XL-h2s-mz-120.5-XP.bin

3612672 bytes total (112128 bytes free) 
Switch#dir /all flash:

Issue the copy command in order to copy files in Flash. Specify the source and destination file names. The example duplicates the file config.text to the config2.text file:

Switch#copy flash:config.text flash:config2.text 
Source filename [config.text]? 
Destination filename [config2.text]? 
Switch#dir flash: 
Directory of flash:

  3  -r--     1117595   Mar 01 1993 05:37:51  c2900XL-h2s-mz-112.8.2-SA6 
227  -r--          55   Mar 01 1993 05:38:41  env_vars 
  4  drwx       18752   Mar 01 1993 00:08:15  html 
  6  -rwx           0   Mar 04 1993 17:51:19  config.text 
229  -rwx           0   Mar 01 1993 00:03:31  config2.text 
228  -rwx         856   Mar 08 1993 04:10:21  vlan.dat 
230  -rwx     1490584   Mar 01 1993 00:07:50  c2900XL-h2s-mz-120.5-XP.bin

3612672 bytes total (112128 bytes free) 
Switch#

Issue the delete command in order to delete the files. Specify the full name of the file to delete. Here is an example:

Switch#delete flash:config2.text 
Delete filename [config2.text]? 
Delete flash:config2.text? [confirm] 
Switch#dir flash: 
Directory of flash:

  3  -r--     1117595   Mar 01 1993 05:37:51  c2900XL-h2s-mz-112.8.2-SA6 
227  -r--          55   Mar 01 1993 05:38:41  env_vars 
  4  drwx       18752   Mar 01 1993 00:08:15  html 
  6  -rwx           0   Mar 04 1993 17:51:19  config.text 
228  -rwx         856   Mar 08 1993 04:10:21  vlan.dat 
230  -rwx     1490584   Mar 01 1993 00:07:50  c2900XL-h2s-mz-120.5-XP.bin

3612672 bytes total (112128 bytes free) 
Switch#

You can issue the more command in order to show the contents of a text file, such as a configuration file or the env_vars file. You cannot issue this command in order to view binary files, such as software images or the vlan.dat file. Here is an example:

Switch#more flash:config.text 
Display filename [config.text]? 
! 
version 11.2 
no service pad 
no service udp-small-servers 
no service tcp-small-servers 
! 
hostname Switch 
! 
...

Upload/Download Files to/from a TFTP Server

You can issue the copy command in order to upload and download files to a TFTP server. Use the tftp keyword as the destination file name when you copy a file in order to upload the file to a TFTP server. The system then prompts you for the TFTP server IP address and remote file name. Also, you can use the tftp: syntax to specify both the address of the TFTP server and the file name, at once. The syntax is copy tftp://tftp_server_address/file_name . Here is an example:

Switch#ping 10.200.8.200

Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 10.200.8.200, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/5 ms 
Switch#copy flash:config.text tftp: 
Source filename [config.text]? 
Destination IP address or hostname []? 10.200.8.200 
Destination filename [config.text]? 
!! 
912 bytes copied in 0.100 secs 
Switch#copy tftp://10.200.8.200/config.text flash:config2.text 
Source IP address or hostname [10.200.8.200]? 
Source filename [config.text]? 
Destination filename [config2.text]? 
Loading config.text from 10.200.8.200 (via VLAN1): ! 
[OK - 912 bytes]

912 bytes copied in 1.128 secs (912 bytes/sec) 
Switch#

The last important command that is available is the tar command. In the typical use, the command allows the direct extraction into Flash from a TAR archive on a TFTP server. Here is an excerpt from the upgrade procedure that illustrates this process:

Switch#tar /x tftp://10.200.8.200/c2900XL-h2s-mz-120.5-XP.tar flash: 
Loading c2900XL-h2s-mz-120.5-XP.tar from 10.200.8.200 (via VLAN1): ! 
extracting info (104 bytes) 
extracting c2900XL-h2s-mz-120.5-XP.bin (1490584bytes)

html/ (directory) 
extracting html/Detective.html.gz (1148 bytes)! 
extracting html/ieGraph.html.gz (553 bytes) 
extracting html/DrawGraph.html.gz (787 bytes) 
extracting html/GraphFrame.html.gz (802 bytes) 
extracting html/GraphFrameIE.html.gz (687 bytes)! 
.... 
extracting html/tmp/test (334 bytes) 
extracting info.ver (104 bytes)!! 
[OK - 2109440 bytes]

The example shows how to access the TAR file c2900XL-h2s-mz-120.5-XP.tar, which is stored in the TFTP server 10.200.8.200. The example also shows how to extract the file content directly into Flash. You can see that this TAR file is a bundle that contains the software image c2900XL-h2s-mz-120.5-XP.bin as well as the HTML directory and all the directory files. A single command downloads the entire bundle into the switch.

Specify the Boot Parameters

Show the Current Boot Parameters

Issue the show boot command in order to see the current boot parameters:

Switch#show boot 
BOOT path-list:      flash:c2900XL-h2s-mz-112.8.2-SA6 
Config file:         flash:config.text 
Enable Break:        no 
Manual Boot:         no 
HELPER path-list: 
NVRAM/Config file 
      buffer size:   32768

These are the parameters that you typically want to tune:

  • The boot path list, which specifies the image from which the switch will try to boot

  • The configuration file, which tells the switch which file to use as a configuration file

Specify an Image from Which to Boot

Issue the dir command in order to be sure that the image is available in Flash. You can also check that the file size of the image is consistent with the file size of the image on Cisco.com.

Switch#dir flash:

Directory of flash:

  3  -r--     1117595   Mar 01 1993 05:37:51  c2900XL-h2s-mz-112.8.2-SA6 
227  -rwx        1130   Mar 01 1993 00:01:43  config.text 
  4  drwx       18752   Mar 01 1993 00:08:15  html 
  6  -rwx         912   Mar 01 1993 00:40:13  config2.text 
229  -rwx          38   Mar 01 1993 00:02:22  env_vars 
228  -rwx         856   Mar 08 1993 04:10:21  vlan.dat 
230  -rwx     1490584   Mar 01 1993 00:07:50  c2900XL-h2s-mz-120.5-XP.bin

3612672 bytes total (109568 bytes free)

Each time that you enter a long file name, use the cut-and-paste function of your terminal emulator in order to avoid a misspelling of the file name. Here, you see how to configure the switch to boot the Cisco IOS Software Release 12.0(5)XP image that the switch has on Flash. Issue the configure terminal command in order to enter configuration mode. Then, issue the boot system flash:image_file_name command:

Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
Switch(config)#boot system flash:c2900XL-h2s-mz-120.5-XP.bin 
Switch(config)#exit

Issue the show boot command in order to see if the changes were effective:

Switch#show boot 
BOOT path-list:      flash:c2900XL-h2s-mz-120.5-XP.bin 
Config file:         flash:config.text 
Enable Break:        no 
Manual Boot:         no 
HELPER path-list: 
NVRAM/Config file 
      buffer size:   32768

This document does not cover the step-by-step procedure to upgrade the software image on Catalyst 2900XL/3500XL Switches. Refer to Upgrading Software in Catalyst 2900XL and 3500XL Switches Using the Command Line Interface for more information on how to upgrade the software image.

Specify the Configuration File

The selection of which configuration file to use basically requires the same steps as the selection of a software image from which to boot. In configuration mode, issue the boot config-file flash:file_name command. This feature can be useful when you want to create a backup of a configuration that you are about to change, for instance. This example changes the default configuration file name from config.text to config2.text:

Note: Make sure to check that the file that you specify exists in the Flash.

Switch#show boot 
BOOT path-list:      flash:c2900XL-h2s-mz-120.5-XP.bin 
Config file:         flash:config.text 
Enable Break:        no 
Manual Boot:         no 
HELPER path-list: 
NVRAM/Config file 
      buffer size:   32768 
Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
Switch(config)#boot config-file config2.text 
Switch(config)#exit 
Switch# show boot 
BOOT path-list:      flash:c2900XL-h2s-mz-120.5-XP.bin 
Config file:         config2.text 
Enable Break:        no 
Manual Boot:         no 
HELPER path-list: 
NVRAM/Config file 
      buffer size:   32768 
Switch#

Catalyst 3550 Series

Refer to Working with the IOS File System, Configuration Files, and Software Images (Catalyst 3550 Switches) for information on how to work with the configuration files and the software images on the Catalyst 3550 Series Switches.

The startup configuration is stored in NVRAM and the running configuration is stored in DRAM. When you issue the write memory command or the copy running-config startup-config command, you can receive this output in some situations:

Router#dir system:
Directory of system:/

2 dr-x 0 <no date> memory
1 -rw- 35402 <no date> running-config
9 dr-x 0 <no date> vfiles

No space information available

Note: The running configuration is greater than the NVRAM size of 32 KB, as this example shows:

Router#dir nvram:
Directory of nvram:/

1 -rw- 4687 <no date> startup-config
2 ---- 0 <no date> private-config

32768 bytes total (28081 bytes free)
Router#
Router#write memory
Building configuration...

% Configuration buffer full, can't add command: ip prefix-list CBB_out
% Aborting Save. Compress the config.[OK] 

Cannot execute compress-config :

The 3550 Switch does not support compression of the configuration file, as this example shows:

Router(config)#service compress-config
Boot ROMs do not support NVRAM compression.
Disabling service compress-config.

The workaround is to save the running configuration file in the flash: device and issue the boot config-file command. The command instructs the router to boot from that file instead of nvram: on reload.

router#copy running-config flash:newconfig.cfg 
Destination filename [newconfig.cfg]? 
31585 bytes copied in 3.552 secs (10528 bytes/sec) 
 router(config)#boot config-file flash:newconfig.cfg

The solution is to use the boot buffersize size configuration command in order to increase the size of the simulated NVRAM. The configuration file cannot be larger than the buffer size allocation. The range is from 4096 to 524,288 bytes.

Note: You must reload the 3550 Switch configuration for the new simulated NVRAM to take effect. Issue the reload command or cold boot the switch.

After you issue the boot buffersize command, you do not need to use the boot config-file workaround. The boot buffersize command simulates a larger NVRAM.

Catalyst 1900 Series and Catalyst 2820 Series

The management of software images and configuration is very simple on the Catalyst 1900 and 2820 Switches. These switches implement a NVRAM in order to store the configuration and a Flash to hold a running image. There are two major hardware releases for the Catalyst 1900 and 2820 Series. The first generation only allows you to download a new software image. The second generation provides a way to upload and download the configuration. The first generation runs software versions 5.x and earlier. The second generation runs software versions 6.x and later.

Download a New Image

Complete these steps:

  1. From the main menu, choose [F] Firmware in order to access the Firmware configuration menu.

  2. Specify the name of the new image to download from the TFTP server and the IP address of the TFTP server.

    For firmware upgrades, enter [F] Filename in order to specify the file name of the image. Enter [S] TFTP Server name or IP address in order to specify the IP address of the TFTP server.

    Enter Selection:  F
    
    Specify the name of a firmware upgrade file residing on a TFTP server. 
    Use the [S] Server:  IP address of TFTP server command to specify 
    the address of that server.  Then issue the appropriate TFTP upgrade 
    command to carry out the firmware upgrade process.
    
    Enter upgrade filename (80 characters max):
    
    Current setting ===>
    
        New setting ===> cat1900EN.9.00.00.bin
    
        [S] TFTP Server name or IP address
    
    Enter Selection:  S
    
    Specify the name or IP address of a TFTP server where an upgrade file is located. 
    Use the [F] Filename for firmware upgrades command to define the name of 
    the upgrade file residing on that server.  Then issue the appropriate TFTP 
    upgrade command to carry out the firmware upgrade process.
    
    Enter TFTP server name IP address in dotted quad format (nnn.nnn.nnn.nnn):
    
    Current setting ===>
    
        New setting ===> 10.200.8.200 
    
             Catalyst 1900 - Firmware Configuration
    
        ----------------------- System Information ----------------------------- 
         FLASH:  1024K bytes 
         V8.01.02    : Enterprise Edition 
         Upgrade status: 
         No upgrade currently in progress.
    
        ----------------------- Settings --------------------------------------- 
         [S] TFTP Server name or IP address              10.200.8.200 
         [F] Filename for firmware upgrades              cat1900EN.9.00.00.bi 
         [A] Accept upgrade transfer from other hosts    Enabled
    
        ----------------------- Actions ---------------------------------------- 
         [U] System XMODEM upgrade          [D] Download test subsystem (XMODEM) 
         [T] System TFTP upgrade            [X] Exit to Main Menu
    
    Enter Selection:
  3. Enter [T] System TFTP upgrade in order to start the download.

    This example sets the collection file name to cat1900EN.9.00.00.bin. The IP address of the TFTP server is 10.200.8.200.

    This upgrade will overwrite the firmware version V8.01 in FLASH memory.   
    
    AT THE END OF THE UPGRADE, THE SWITCH MAY NOT RESPOND 
    TO COMMANDS FOR AS LONG AS ONE MINUTE. 
    THIS IS NORMAL BEHAVIOR AND DO NOT TURN SWITCH OFF DURING THAT TIME.
    
    The TFTP protocol will be used to perform this firmware upgrade. 
    This command requires the IP address of a TFTP server and the name 
    of an upgrade file residing on that server.  Use the following commands 
    [S] Server:  IP address of TFTP server, and 
    [F] Filename for firmware upgrades 
    to complete these requirements before starting the upgrade.
    
    Do you wish to continue with the upgrade process, [Y]es or [N]o?  Yes  
    
    TFTP transfer of cat1900EN.9.00.00.bin from server at 10.200.8.200 initiated...
    
    Press any key to continue.

    When the download is in progress, in progress appears in the menu:

    Catalyst 1900 - Firmware Configuration
    
        ----------------------- System Information ----------------------------- 
         FLASH:  1024K bytes 
         V8.01.02    : Enterprise Edition 
         Upgrade status: 
         V9.00.00 written from 010.200.008.200: in progress
    
         ----------------------- Settings --------------------------------------- 
         [S] TFTP Server name or IP address              10.200.8.200 
         [F] Filename for firmware upgrades              cat1900EN.9.00.00.bi 
         [A] Accept upgrade transfer from other hosts    Enabled
    
        ----------------------- Actions ---------------------------------------- 
         [U] System XMODEM upgrade          [D] Download test subsystem (XMODEM) 
         [T] System TFTP upgrade            [X] Exit to Main Menu
    
    Enter Selection:

    The switch then restarts with the newly downloaded image. This is an example:

    Catalyst 1900 Management Console 
    Copyright (c) Cisco Systems, Inc.  1993-1999 
    All rights reserved. 
    Enterprise Edition Software 
    Ethernet Address:      00-50-50-E1-9B-80
    
    PCA Number:            73-2439-01 
    PCA Serial Number:     FAA02479FD0 
    Model Number:          WS-C1924F-EN 
    System Serial Number:  FAA0249P01F 
    Power Supply S/N:      PHI0246012A 
    -------------------------------------------------
    
    1 user(s) now active on Management Console.
    
            User Interface Menu
    
         [M] Menus 
         [K] Command Line 
         [I] IP Configuration 
         [P] Console Password
    
    Enter Selection:

Upload/Download the Configuration File

You can upload and download the configuration file only with the latest hardware release of the Catalyst 1900/2820 Switches. The release must run software version 6.x or later.

Complete these steps:

  1. Enter [K], the command line interpreter.

  2. Issue the copy command.

    • Use this syntax in order to upload a file to a TFTP server:

      copy nvram tftp://tftp_server_ip_address/file_name
      
      
    • Use this syntax in order to download the configuration from a TFTP server:

      copy tftp://tftp_server_ip_address/file_name nvram
      

    This example shows how to save the current configuration under the name config on a TFTP server with IP address 10.200.8.200:

    #ping 10.200.8.200 
    Sending 5, 100-byte ICMP Echos to 10.200.8.200, time out is 2 seconds: 
    !!!!! 
    Success rate is 100 percent (5/5), round-trip min/avg/max 0/0/0/ ms 
    #copy nvram tftp://10.200.8.200/config 
    Configuration upload is successfully completed
    
    You just need to enter this in order to configure the switch from the 
    configuration file "config" stored on the TFTP server 10.200.8.200: 
    
    #copy tftp://10.200.8.200/config nvram 
    TFTP successfully downloaded configuration file 
    #

Reset Catalyst Switches to Factory Defaults

Refer to Resetting Catalyst Switches to Factory Defaults in order to reset the Catalyst switch configurations to the factory defaults.

Appendix A: Connect to a TFTP Server

You can use a TFTP server from any vendor in order to operate all Cisco devices.

Note: A file upload to a UNIX TFTP server can require you to create the file on the TFTP server first. This can be necessary when you upload the file with a new name. Issue the touch command, for example, to create the file on the TFTP server. Make sure that you correctly set the file permissions and owner name.

This action requires IP connectivity between your switch and the TFTP server. Assign an IP address to your switch and, if the switch management interface is not in the same IP subnet as the TFTP server, provide the switch with a default gateway.

Note: In terms of IP connectivity, a switch behaves just like an IP host.

This section provides some examples of how to assign an IP address and a default gateway on the different Catalyst switches. By default, these IP settings are valid for VLAN 1. Ports that are assigned to VLAN 1 establish connectivity, which is the default setting for ports.

Set an IP Address and Default Gateway on the Catalyst 4500/4000, 5500/5000, and 6500/6000 Series

These Catalyst switches have an interface with the name sc0 to which you can assign an IP address and a VLAN. This example assigns the address 10.200.8.199 in VLAN 1, and also specifies the subnet mask. The command is set interface sc0 vlan_# ip_address subnet_mask :

Console> (enable) set interface sc0 1 10.200.8.199 255.255.252.0 
Interface sc0 vlan set, IP address and netmask set.

The Catalyst switch can now ping any device in VLAN 1 with an IP address in the subnet 10.200.8.0/22. Next, add a default gateway so that the Catalyst switch can reach hosts that are outside of the switch subnet. The command is set ip route 0.0.0.0 default_gateway_ip_address . This example assigns the IP address 10.200.8.1, which is a router IP address, to the default gateway:

Console> (enable) set ip route 0.0.0.0 10.200.8.1 
Route added.

Check the connectivity to the TFTP server before you attempt an upload or download:

Console> (enable) ping  172.17.247.195 
172.17.247.195 is alive.

Set an IP Address and Default Gateway on the Catalyst 2900XL Series and the Catalyst 3500XL Series

These series of Catalyst switches implement a virtual interface with the name interface vlan 1. With this interface, you can only assign an IP address in VLAN 1.

Note: In Cisco IOS Software Release 12.0XP, some of these switches allow the use of a different VLAN. Refer to the Cisco documentation for your switch in order to determine if the switch allows a different VLAN.

This example assigns the IP address 10.200.8.51 to the switch. The subnet mask is 255.255.252.0:

Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
Switch(config)# interface vlan 1 
Switch(config-if)#ip address 10.200.8.51 255.255.252.0 
Switch(config-if)#exit

The Catalyst switch can now ping any device in VLAN 1 with an IP address in the subnet 10.200.8.0/22. Next, add a default gateway so that the Catalyst switch can reach hosts that are outside of the switch subnet. Issue the ip default-gateway command in global configuration mode. This example assigns the address 10.200.8.1, which is a router IP address, as the default gateway:

Switch(config)#ip default-gateway 10.200.8.1 
Switch(config)#exit 
Switch#

Check the connectivity to the TFTP server before you attempt an upload or download:

Switch#ping 172.17.247.195

Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.17.247.195, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/6 ms 
Switch#

Set an IP Address and Default Gateway on the Catalyst 1900 Series and the Catalyst 2820 Series

Use menus or the command line in order to set an IP address and default gateway on the Catalyst 1900 and the Catalyst 2820 Series Switches.

Menus

Complete these steps in order to use the menus:

  1. Choose [N] Network Management.

  2. Choose [I] IP Configuration.

Command Line

From the command line, complete these steps:

  1. Enter enable mode.

  2. Enter configuration mode.

  3. Issue the ip address ip_address subnet_mask command in order to assign an IP address.

    This example assigns to the switch the IP address 10.200.8.26 with a subnet mask of 255.255.252.0:

    > enable 
    #configure terminal 
    Enter configuration commands, one per line.  End with CNTL/Z 
    (config)#ip address 10.200.8.26 255.255.252.0
    

Note: If the switch already has an IP address assignment and you change the IP address settings, reset the switch for the changes to take effect.

Now, the Catalyst switch is reachable from any host in VLAN 1 with an IP address in subnet 10.200.8.0/22.

This next example configures 10.200.8.1, which is a router IP address, as a default gateway. The configuration allows the switch to reach devices that are outside of the switch IP subnet. While still in configuration mode, issue the ip default-gateway ip_address command. Here is the example:

(config)#ip default-gateway 10.200.8.1 
(config)#exit

Check the connectivity to the TFTP server before you attempt a download or upload:

#ping 172.17.247.195 
Sending 5, 100-byte ICMP Echos to 172.17.247.195, time out is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max 0/0/0/ ms 
#

Related Information

Updated: Oct 15, 2009
Document ID: 12012