Contents

Introduction

Prerequisites

Requirements

Components Used

Information About Software Images

Image Location on the Switch

Copy Image Files Via TFTP

Prepare to Download or Upload Image

Download Image File

Upload Image File

CopyImage Files via FTP

Prepare to Download or Upload Image File

Download Image File

Upload Image File

CopyImage Files From Onboard Storage

TFTP Upgrade Example

Related Information

Introduction

This document describes the process to upgrade Cisco IOS® on Catalyst 1000 series switches.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is restricted to the Catalyst 1000 series platform and applicable software versions for the Catalyst 1000 switch.

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, ensure that you understand the potential impact of any command.

Information About Software Images

From the software portal (software.cisco.com), there are two options for the Catalyst 1000 series, either a binary file or a TAR archive. The binary is the base Cisco IOS image and can be loaded via the normal process of the boot variable pointed to this file in onboard storage. This document is focused on the archive file, which contains the Cisco IOS code and the embedded Device Manager software.

- You can download a switch image file from a TFTP, FTP, or RCP server to upgrade the switch software. If you do not have access to a TFTP server, you can download a software image file directly to your PC or workstation via a web browser (HTTP) and then use Device Manager orCisco Network Assistant to upgrade your switch.

- You can replace the current image with the new one or keep the current image in flash memory after a download.

- You upload a switch image file to a TFTP, FTP, or RCP server for backup purposes.

- You can use this uploaded image for future downloads to the same switch or to another of the same type.

The protocol that you use depends on which type of server you use. The FTP and RCP transport methods provide faster performance and more reliable delivery of data than TFTP. These improvements are possible because FTP and RCP are built on and use the TCP/IP stack, which is connection-oriented.

Image Location on the Switch

When the full image with embedded Device Manager is used, the Cisco IOS image is stored as a.binfile in a directory that shows the version number. A subdirectory contains the files needed for web management. The image is stored on the system board flash memory (flash:)

You can use the show version privileged EXEC command to see the software version that is currently booted on your switch. In the display, check the line that begins with System image file is.... It shows the directory name in flash memory where the image is stored.

You can also use the dir  <filesystem> : privileged EXEC command to see the directory names of other software images that you have stored in flash memory.

You can use the archive download-sw /directory privileged EXEC command to specify a directory once followed by a tar file or list of tar files to be downloaded instead of complete paths specified with each tar file.

Copy Image Files Via TFTP

- You can download a switch image from a TFTP server or upload the image from the switch to a TFTP server.

- You download a switch image file from a server to upgrade the switch software. You can overwrite the current image with the new one, or keep the current image after a download.

- You upload a switch image file to a server for backup purposes; this uploaded image can be used for future downloads to the same or another switch of the same type.

Note: Cisco recommends to use the archive download-sw and archive upload-sw privileged EXEC commands to download and upload software image files. For switch stacks, the archive download-sw and archive upload-sw privileged EXEC commands can only be used through the stack active switch. Software images downloaded to that switch are automatically downloaded to the rest of the stack members.

Prepare to Download or Upload Image

Before you begin to download or upload an image file via TFTP, perform these tasks:

- Ensure that the workstation that functions as the TFTP server is properly configured.

- Ensure that the switch has a route to the TFTP server. The switch and the TFTP server must be in the same network if you do not have a router to route traffic between subnets. Check connectivity to the TFTP server with the  ping command.

- Ensure that the image to be downloaded is in the correct directory on the TFTP server (usually  /tftpboot on a UNIX workstation).

- For download operations, ensure that the permissions on the file are set correctly. The permission on the file must be world-read.

- Before you upload the image file, you need to create an empty file on the TFTP server if one does not already exist (dependent on the operating system). To create an empty file, enter the touch <filename>  command, wherefilename is the name of the file to be used when you upload the image to the server.

- As part of upload operations, if you overwrite a file already present (which includes an empty file, if you had to create one) on the server, ensure that the permissions on the file are set correctly. Permissions on the file must be world-write.

Download Image File

You can download a new image file and replace the current image or keep the current image.

Begin in privileged EXEC mode, use Step 1 to download a new image from a TFTP server and to overwrite the older image. To keep the current image, use Step 2.

Command

Purpose

Step 1

archive download-sw[/directory]/overwrite /reload tftp:[[//location ] / directory ] / image-name1 .tar [ image-name2 .tar image-name3 .tar image-name4 .tar ]

Example:
Switch# archive download-sw /overwrite /reload tftp://172.20.10.30/saved/myImage.tar

(Optional) Downloads the image files from the TFTP server to the switch, and overwrites the current image.

- directory—(Optional) Specifies a directory for the images.

- /overwrite— Overwrites the software image in flash memory with the downloaded image.

- /reload— Reloads the system after download of the image unless the configuration has been changed and not been saved.

- // location —The IP address of the TFTP server.

- / directory / image-name1 .tar [/ directory / image-name2 .tar image-name3 .tar image-name4 .tar ]—The directory (optional) and the images to download.

Step 2

archive download-sw[/directory]/leave-old-sw /reload tftp:[[ // location ] / directory ] / image-name1 .tar [ image-name2 .tar image-name3 .tar image-name4 .tar ]

Example:
Switch# archive download-sw /leave-old-sw /reload tftp://172.20.10.30/saved/myImage.tar

(Optional) Downloads the images file from the TFTP server to the switch, and saves the current image.

- directory—(Optional) Specifies a directory for the images.

- /leave-old-sw —Saves the old software version after a download.

- /reload— Reloads the system after download of the image unless the configuration has been changed and not been saved.

- // location —The IP address of the TFTP server.

- / directory / image-name1 .tar [/ directory / image-name2 .tar image-name3 .tar image-name4 .tar ]—The directory (optional) and the images to download.

The download algorithm verifies that the image is appropriate for the switch model and that enough DRAM is present, or it aborts the process and reports an error. If you specify the/overwrite option, the download algorithm removes the image already present on flash device whether or not it is the same as the new one, downloads the new image, and then reloads the software.

Note: If the flash device has sufficient space to hold two images and you want to overwrite one of these images with the same version, you must specify the /overwrite option.

If you specify the /leave-old-sw, the older files are not removed. If there is not enough space to install the new image and keep the current booted image, the download process stops, and an error message is displayed.

The algorithm installs the downloaded image on the system board flash device (flash:). The image is placed into a new directory named with the software version string, and the BOOT environment variable is updated to point to the newly installed image.

If you kept the old image while the download process in progress, (you specified the /leave-old-sw keyword), you can remove it with the delete/force /recursive  <filesystem>   <file-url>  privileged EXEC command. For  filesystem, use  flash:  for the system board flash device. For  file-url, enter the directory name of the old image. All the files in the directory and the directory are removed.

Caution: For the download and upload algorithms to operate properly, do not rename image names.

Upload Image File

You can upload an image from the switch to a TFTP server. You can later download this image to the switch or to another switch of the same type.

Use the upload feature only if the web management pages associated with Device Manager have been installed with the previous image.

Begin in privileged EXEC mode and use this step to upload an image to a TFTP server:

Command

Purpose

Step 1

archive upload-sw tftp:[[//location ] / directory ] / image-name .tar

Example:
Switch# archive upload-sw tftp://172.20.10.30/saved/myImage.tar

Uploads the currently booted switch image to the TFTP server.

- // location —The IP address of the TFTP server.

- / directory / image-name .tar —The directory (optional) and the name of the software image to be uploaded.

The archive upload-sw privileged EXEC command builds an image file on the server by upload of these files in order: info, the Cisco IOS image, and the web management files. After these files are uploaded, the upload algorithm creates the file format.

Caution: For the download and upload algorithms to operate properly, do not rename image names.

Copy Image Files via FTP

You can download a switch image from an FTP server or upload the image from the switch to an FTP server.

You download a switch image file from a server to upgrade the switch software. You can overwrite the current image with the new one or keep the current image after a download.

You upload a switch image file to a server for backup purposes. You can use this uploaded image for future downloads to the switch or another switch of the same type.

Note: Cisco recommends to use the archive download-sw and archive upload-sw privileged EXEC commands to download and upload software image files. For switch stacks, the archive download-sw and archive upload-sw privileged EXEC commands can only be used through the stack active switch. Software images downloaded to that switch are automatically downloaded to the rest of the stack members.

Prepare to Download or Upload Image File

You can copy images files to or from an FTP server.

The FTP protocol requires a client to send a remote username and password on each FTP request to a server. When you copy an image file from the switch to a server via FTP, the Cisco IOS software sends the first valid username in this list:

- The username specified in the archive download-sw or archive upload-sw privileged EXEC command if a username is specified.

- The username set by the ip  ftp username <username>  global configuration command if the command is configured.

- Anonymous.

The switch sends the first valid password in this list:

- The password specified in the archive download-sw or archive upload-sw privileged EXEC command if a password is specified.

- The password set by the ip ftp password  <password>   global configuration command if the command is configured.

- The switch creates a password named<username>@<switchname>.<domain>. The  username  variable is the username associated with the current session,  switchname is the configured hostname, and  domain  is the domain of the switch.

The username and password must be associated with an account on the FTP server. If you write to the server, the FTP server must be properly configured to accept the FTP write request from you. Use the ip ftp username and ip ftp password commands to specify a username and password for all copies. Include the username in the archive download-sw  or  archive upload-sw privileged EXEC command if you want to specify a username only for that operation.

If the server has a directory structure, the image file is written to or copied from the directory associated with the username on the server. For example, if the image file resides in the home directory of a user on the server, specify that user name as the remote username.

Before you begin to download or upload an image file via FTP, complete these tasks:

- Ensure that the switch has a route to the FTP server. The switch and the FTP server must be in the same network if you do not have a router to route traffic between subnets. Check connectivity to the FTP server with the ping command.

- If you access the switch through the console or a Telnet session and do not have a valid username, ensure that the current FTP username is the one that you want to use for the FTP download. You can enter the show users  privileged EXEC command to view the valid username. If you do not want to use this username, create a new FTP username with the ip ftp username  <username>  global configuration command. This new name is used in all archive operations. The new username is stored in NVRAM. If you access the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the FTP username. Include the username in the archive download-sw or archive upload-sw privileged EXEC command if you want to specify a username for that operation only.

- When you upload an image file to the FTP server, it must be properly configured to accept the write request from the user on the switch. For more information, see the documentation for your FTP server.

Download Image File

You can download a new image file and overwrite the current image or keep the current image.

Begin in privileged EXEC mode, use Steps 1 through 7 to download a new image from an FTP server and to overwrite an image already on the device. To keep the current image, use Steps 1 through 6 and Step 8.

Command

Purpose

Step 1

configure terminal

Example:
Switch# configure terminal

(Optional) Enters global configuration mode on the switch.

This step is required only if you override the default remote username or password.

Step 2

ip ftp username<username>

Example:
Switch(confg)# ip ftp username NetAdmin1

(Optional) Changes the default remote FTP username.

Step 3

ip ftp password<password>

Example:
Switch(confg)# ip ftp password adminpassword

(Optional) Changes the default FTP password.

Step 4

end

Example:
Switch(confg)# end

Returns to privileged EXEC mode.

Step 5

archive download-sw[/directory]/overwrite /reload ftp:[[//username[:password ] @location ]/ directory ] / image-name1 .tar [ image-name2 .tar image-name3 .tar image-name4 .tar ]

Example:
Switch# archive download-sw /overwrite /reload ftp:172.20.10.30/saved/myImage.tar

(Optional) Downloads the image files from the FTP server to the switch, and overwrites the current image.

- /directory—(Optional) Specifies a directory for the images.

- /overwrite— Overwrites the software image in flash memory with the downloaded image.

- /reload— Reloads the system after download of the image unless the configuration has been changed and not been saved.

- // username [ : password ]—The username and password associated with an account on the FTP server.

- @ location —The IP address of the FTP server.

- / directory / image-name1 .tar [/ directory / image-name2 .tar image-name3 .tar image-name4 .tar ]—The directory (optional) and the images to download.

Step 6

archive download-sw [ /directory ] /leave-old-sw /reload ftp: [[ // username[:password ] @location ]/ directory ] / image-name1 .tar [ image-name2 .tar image-name3 .tar image-name4 .tar ]

Example:
Switch# archive download-sw /leave-old-sw /reload ftp:172.20.10.30/saved/myImage.tar

(Optional) Downloads the image files from the FTP server to the switch, and saves the current image.

- /directory—(Optional) Specifies a directory for the images.

- /leave-old-sw —Saves the old software version after a download.

- /reload— Reloads the system after download of the image unless the configuration has been changed and not been saved.

- // username [ : password ]—The username and password associated with an account on the FTP server.

- @ location —The IP address of the TFTP server.

- / directory / image-name1 .tar [/ directory / image-name2 .tar image-name3 .tar image-name4 .tar ]—The directory (optional) and the images to download.

The download algorithm verifies that the image is appropriate for the switch model and that enough DRAM is present, or it aborts the process and reports an error. If you specify the /overwrite option, the download algorithm removes the older image on the flash device, whether or not it is the same as the new one, downloads the new image, and then reloads the software.

Note: If the flash device has sufficient space to hold two images and you want to overwrite one of these images with the same version, you must specify the /overwrite option.

If you specify the /leave-old-sw option, the older files are not removed. If there is not enough space to install the new image and keep the booted image, the download process stops, and an error message is displayed. The algorithm installs the downloaded image onto the system board flash device (flash:). The image is placed into a new directory named with the software version string, and the BOOT environment variable is updated to point to the newly installed image.

If you kept the old image while the download process in progress, (you specified the /leave-old-sw keyword), you can remove it with the delete/force /recursive  <filesystem>   <file-url>  privileged EXEC command. For  filesystem, use  flash:  for the system board flash device. For  file-url, enter the directory name of the old image. All the files in the directory and the directory are removed.

Caution: For the download and upload algorithms to operate properly, do not rename image names.

Upload Image File

You can upload an image from the switch to an FTP server. You can later download this image to the same switch or to another switch of the same type.

Use the upload feature only if the web management pages associated with Device Manager have been installed with the older image.

Begin in privileged EXEC mode, and use these steps to upload an image to an FTP server:

Command

Purpose

Step 1

configure terminal

Example:
Switch# configure terminal

(Optional) Enters global configuration mode on the switch.

This step is required only if you override the default remote username or password.

Step 2

ip ftp username<username>

Example:
Switch(confg)# ip ftp username NetAdmin1

(Optional) Changes the default remote FTP username.

Step 3

ip ftp password<password>

Example:
Switch(confg)# ip ftp password adminpassword

(Optional) Changes the default FTP password.

Step 4

end

Example:
Switch(confg)# end

Returns to privileged EXEC mode.

Step 5

archive upload-sw ftp:[[// [ username [ : password ] @ ] location ] / directory ] / image-name .tar.

Example:
Switch# archive upload-sw ftp://172.20.10.30/myImage.tar

Uploads the currently booted switch image to the FTP server.

- // username : password —The username and password associated with an account on the FTP server.

- @ location —The IP address of the FTP server.

- / directory / image-name .tar —The directory (optional) and the name of the software image to be uploaded.

The archive upload-sw command builds an image file on the server by upload of these files in order: info, the Cisco IOS image, and the web management files. After these files are uploaded, the upload algorithm creates the file format.

Caution: For the download and upload algorithms to operate properly, do not rename image names.

Copy Image Files From Onboard Storage

You can also extract and install an image from a file that has been copied to flash already via FTP, TFTP, or the onboard USB port.

Command

Purpose

Step 1

archive download-sw [ /directory ] /overwrite /reload flash: [/ directory / ] image-name1 .tar

Example:
Switch#  archive download-sw /overwrite /reload flash:myImage.tar

(Optional) Extracts the image files from the local flash to the switch, and overwrites the current image.

- directory—(Optional) Specifies a directory for the images.

- /overwrite— Overwrites the software image in flash memory with the new image.

- /reload— Reloads the system after download of the image unless the configuration has been changed and not been saved.

- / directory / image-name1 .tar —The directory (optional) and the image to install.

TFTP Upgrade Example

In this example, TFTP is used to upgrade the switch.

Switch#archive download-sw /overwrite tftp://172.20.10.30/c1000-universalk9-tar.152-7.E3k.tar

Loading c1000-universalk9-tar.152-7.E3k.tar from 172.20.10.30 (via GigabitEthernet1/0/48): !!!!!!!!!!

[OK - 38492160 bytes]

Loading c1000-universalk9-tar.152-7.E3k.tar from 172.20.10.30 (via GigabitEthernet1/0/48): !!!!!!!!!!

[OK - 38492160 bytes]

examining image stack version...

extracting info (107 bytes)

Read major stacking number 1.

Read minor stacking number 1.

examining image...

extracting info (107 bytes)

extracting c1000-universalk9-mz.152-7.E3k/info (961 bytes)

extracting info (107 bytes)

Stacking Version Number: 1.1

System Type: 0x00000001

Cisco IOS Image File Size: 0x00FB4200

Total Image File Size: 0x024B5A00

Minimum Dram required: 0x08000000

Image Suffix: universalk9-152-7.E3k

Image Directory: c1000-universalk9-mz.152-7.E3k

Image Name: c1000-universalk9-mz.152-7.E3k.bin

Image Feature: IP|LAYER_2|SSH|3DES|MIN_DRAM_MEG=128

Old image for switch 1: flash:/c1000-universalk9-mz.152-7.E3

Old image will be deleted before download. <--Overwrite keyword used, current image will be deleted

Deleting `flash:/c1000-universalk9-mz.152-7.E3' to create required space <-- Delete old image

Extracting images from archive into flash...

<multiple files are extracted to flash and directories built here>

New software image installed in flash:/c1000-universalk9-mz.152-7.E3k <-- Install new iage

Deleting old files from dc profile dir "flash:/dc_profile_dir"

extracting dc profile file from "flash:/c1000-universalk9-mz.152-7.E3k/dc_default_profiles.txt" to

"flash:/dc_profile_dir/dc_default_profiles.txt"

extracting day0 file from "flash:/c1000-universalk9-mz.152-7.E3k/day0.cfg" to

"flash:/dc_profile_dir/day0.cfg"

All software images installed.

Switch#show boot

BOOT path-list : flash:/c1000-universalk9-mz.152-7.E3k/c1000-universalk9-mz.152-7.E3k.bin

<-- boot points to new image

Config file : flash:/config.text

Private Config file : flash:/private-config.text

Enable Break : yes

Manual Boot : no

Allow Dev Key : yes

HELPER path-list :

Boot optimization : disabled

NVRAM/Config file

buffer size: 524288

Timeout for Config

Download: 0 seconds

Config Download

via DHCP: disabled (next boot: disabled)

Switch#reload

Related Information

- Software Configuration Guide, Cisco IOS Release 15.2(7)Ex (Catalyst 1000 Switches)

- Cisco Catalyst 1000 Series Switches Data Sheet

- Cisco Technical Support & Downloads