Contents

Introduction

Prerequisites

Requirements

Components Used

Conventions

Copy to Device inside the Same Router

Command Summary

Copy from One Router to Another

Related Information

Introduction

This document describes how to copy a system image from one device to another within the same router, and from one router to another.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is not restricted to specific software and hardware versions.

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.

Conventions

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

Copy to Device inside the Same Router

The next table provides command options to use to copy a system image from one device to another. The methods can vary based on different platforms.

Command Summary

Listed in this table are the various locations to which you can copy an image from a TFTP server. Refer to the Configuration Fundamentals Configuration Guide for more information and to learn more about each of these options:

Router#copy tftp ?

Syntax Description

bootflash:

Copy to bootflash: file system

disk0:

Copy to disk0: file system

disk1:

Copy to disk1: file system

flash:

Copy to flash: file system

flh:

Copy to flh: file system

ftp:

Copy to ftp: file system

lex:

Copy to lex: file system

null:

Copy to null: file system

nvram:

Copy to nvram: file system

rcp:

Copy to rcp: file system

running-config

Update (merge with) current system configuration

slot0:

Copy to slot0: file system

slot1:

Copy to slot1: file system

startup-config

Copy to startup configuration

system:

Copy to system: file system

tftp:

Copy to tftp: file system

The three most common commands used to copy images are:

- copy tftp flash

- copy rcp flash

- copy slot0: slot1:

This next example illustrates how to copy the system image from one device to another (for example, from one slot/disk to another slot/disk) on Cisco 3600 series routers.

Detailed example:

router#show slot0:

!--- This command is used to view the contents of slot 0

-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------  name

1 .D unknown 5E8B84E6 209D8 11 2392 Jan 22 2000 00:22:42 flashconfig

2 ..  image 5E7BAE19 B623C4 22 11802988 Jan 22 2000 00:23:18 rsp-jsv-mz.120-8.0.2.T

router#show slot1:

!--- This command is used to view the contents of slot 1

-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------  name

1 .. unknown 6A2B4BA7 6FA9E0 20 7186784 Jul 30 1999 15:05:19 rsp-jv-mz.111-26.CC1

2 .. config 631F0D8B 6FB1EC 6 1929 Oct 19 1999 06:15:49 config

3 .. config  631F0D8B 6FB9F8 7 1929 Oct 19 1999 06:16:03 config1

The copy command shown next is used to copy the system image file from one device to another. In this next example, the system image is copied from slot0 to slot1:

router#copy slot0: slot1

Source  filename []? rsp-jsv-mz.120-8.0.2.T

!--- Enter the file name of the system image to be copied

Destination filename [slot1]?

Erase slot1: before copying? [confirm]Erasing the slot1 filesystem will remove

all files! Continue? [confirm]

Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

...erasedeeErase of slot1: complete

Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

CCCCCCCCCCC

! --- Output Suppressed

Verifying checksum...  OK (0xE884)11802988 bytes copied in 346.312 secs

(38481 bytes/sec)

Copy from One Router to Another

To copy the Cisco IOS® software image from a router that acts as TFTP server to another router see the procedure steps. In this example, Router1 is the TFTP server and Router2 is the router on that the Cisco IOS software image is copied to.

Before you begin, verify the connectivity between Router1 and Router2 with the ping command.

1. Check the image size on Router1 with the show flash command:

Router1#show flash

System flash directory:

File Length Name/status

1 15694836 /c2500-js-l.122-10b

!--- Cisco IOS image file to be copied

[15694900 bytes used, 1082316 available, 16777216 total]

16384K bytes of processor board System flash (Read ONLY)

2. Check the image size on Router2 with the show flash command to verify if enough space is available on Router2 for the system image file to be copied:

Router2#show flash

System flash directory:

File  Length   Name/status

1   11173264  c2500-jos56i-l.120-9.bin

[11173328 bytes used, 5603888 available, 16777216 total]

16384K bytes of processor board System flash (Read ONLY)

Note: If there is enough space to copy the system image file, you can retain the original one and the new file can be copied in the additional memory space. If there is not enough space available, as in this case, the current file from the Flash needs to be erased. It is a good practice to back up the current system image to the TFTP server with the copy flash tftp command.

3. Configure Router1 as the TFTP server with the configure terminal command:

Router1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#tftp-server ?

bootflash:  Allow URL file TFTP load requests

disk0:      Allow URL file TFTP load requests

disk1:      Allow URL file TFTP load requests

flash:      Allow URL file TFTP load requests

flh:        Allow URL file TFTP load requests

lex:        Allow URL file TFTP load requests

null:       Allow URL file TFTP load requests

nvram:      Allow URL file TFTP load requests

slot0:      Allow URL file TFTP load requests

slot1:      Allow URL file TFTP load requests

system:     Allow URL file TFTP load requests

Note: The options given previously for the tftp-server command can vary for different platforms.

Router1(config)#tftp-server flash:?

flash:/c2500-js-l.122-10b

!--- The Cisco IOS image file name.

Router1(config)#tftp-server flash:/c2500-js-l.122-10b

!--- This command configures the router as a TFTP server.

Router1(config)#^Z

4. When the TFTP server is configured, download the specified image from Router1 to Router2 with the copy tftp flash command:

Router2#copy tftp flash

****  NOTICE  ****

Flash load helper v1.0

This process will accept the copy options and then terminate

the current system image to use the ROM based image for the copy.

Routing functionality will not be available during that time.

If you are logged in via telnet, this connection will terminate.

Users with console access can see the results of the copy operation.

---- ******** ----

Proceed? [confirm]

Address or name of remote host []? 10.10.10.1

!--- Enter the IP address of the TFTP Server

Source filename []? /c2500-js-l.122-10b

!--- This is the filename of the Cisco IOS image

!--- that you want to copy from the TFTP server

Destination filename [c2500-js-l.122-10b]?

!--- Press 'Enter'

Accessing tftp://10.10.10.1//c2500-js-l.122-10b...

Erase flash: before copying? [confirm]

18:37:54: %SYS-5-RELOAD: Reload requested

!--- The reload is platform-specific and is only for the

!--- Run-from-flash systems.*

** System going down for Flash upgrade **

%SYS-4-CONFIG_NEWER: Configurations from version 12.2 may not be

correctly understood.

%FLH: /c2500-js-l.122-10b from 10.10.10.1 to flash ...

System flash directory:

File Length Name/status

1 15694836 /c2500-js-l.122-10b

[15694900 bytes used, 1082316 available, 16777216 total]

Accessing file '/c2500-js-l.122-10b' on 10.10.10.1...

Loading /c2500-js-l.122-10b from 10.10.10.1 (via Ethernet0): ! [OK]

Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

eeeeeeeeeeeeee ...erased

Loading /c2500-js-l.122-10b from 10.10.10.1 (via Ethernet0):

!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!

[OK - 15694836/16777216 bytes]

Verifying checksum... OK (0x58D2)

!--- System Image file has been successfully copied

Flash copy took 0:07:37 [hh:mm:ss]

%FLH: Re-booting system after download

F3: 14732748+962056+889336 at 0x3000060

Restricted Rights Legend

Use, duplication, or disclosure by the Government is

subject to restrictions as set forth in subparagraph

(c) of the Commercial Computer Software - Restricted

Rights clause at FAR sec. 52.227-19 and subparagraph

(c) (1) (ii) of the Rights in Technical Data and Computer

Software clause at DFARS sec. 252.227-7013.

cisco Systems, Inc.

170 West Tasman Drive

San Jose, California 95134-1706

Cisco Internetwork Operating System Software

IOS (tm) 2500 Software (C2500-JS-L), Version 12.2(10b),

RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2002 by cisco Systems, Inc.

..........

5. Verify the Flash for the new system image on Router2:

Router2#show flash

System flash directory:

File Length Name/status

1 15694836 /c2500-js-l.122-10b

!--- Cisco IOS image file has been copied

[15694900 bytes used, 1082316 available, 16777216 total]

16384K bytes of processor board System flash (Read ONLY)

* The router only reloads for the Run-from-flash systems. For more details, see Copying to Flash Memory for Run-from-Flash Systems.

Note: In order to copy a startup-config file from one device to another, refer to Copying Configuration Files By Using TFTP.

Note: In scenarios where a timeout occurs while attempting to copy a file or image between devices, you can try adjusting the ip tftp blocksize to either the maximum value allowed or to a value lower than the MTU in use. Additionally, ensure that the ip tftp source-interface is correctly configured and that this interface is reachable across the devices. These commands can be changed in global configuration mode.

Related Information

- Copy Files Securely from Routers and Switches to Local PC

- Loading and Maintaining System Images

- Generate TFTP Transfer Rate Increase on a Switch and 5760 WLC

- Technical Support & Documentation - Cisco Systems