Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2 (2) SE (Catalyst 2960-X Switch)
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2 (2) SE (Catalyst 2960-X Switch)
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2 (2) SE (Catalyst 2960-X Switch)
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
© 2014 Cisco Systems, Inc. All rights reserved.
CONTENTS
CHAPTER 1 Working with the Cisco IOS File System, Configuration Files, and Software Images 1
Working with the Flash File System 1
Information About the Flash File System 1
Displaying Available File Systems 2
Setting the Default File System 4
Displaying Information About Files on a File System 4
Changing Directories and Displaying the Working Directory 5
Creating Directories 6
Removing Directories 7
Copying Files 7
Copying Files from One Switch in a Stack to Another Switch in the Same Stack 8
Deleting Files 9
Creating, Displaying and Extracting Files 9
Working with Configuration Files 11
Information on Configuration Files 11
Guidelines for Creating and Using Configuration Files 12
Configuration File Types and Location 12
Creating a Configuration File By Using a Text Editor 12
Copying Configuration Files By Using TFTP 13
Preparing to Download or Upload a Configuration File By Using TFTP 13
Downloading the Configuration File By Using TFTP 14
Uploading the Configuration File By Using TFTP 15
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
iii
Contents
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
iv
Contents
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
v
Contents
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
vi
Preface
This book describes configuration information and examples for on the switch.
Document Conventions
This document uses the following conventions:
Convention Description
^ or Ctrl Both the ^ symbol and Ctrl represent the Control (Ctrl) key on a keyboard. For
example, the key combination ^D or Ctrl-D means that you hold down the Control
key while you press the D key. (Keys are indicated in capital letters but are not
case sensitive.)
bold font Commands and keywords and user-entered text appear in bold font.
Italic font Document titles, new or emphasized terms, and arguments for which you supply
values are in italic font.
Courier font Terminal sessions and information the system displays appear in courier font.
Bold Courier font Bold Courier font indicates text that the user must enter.
... An ellipsis (three consecutive nonbolded periods without spaces) after a syntax
element indicates that the element can be repeated.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
vii
Preface
Document Conventions
Convention Description
[x | y] Optional alternative keywords are grouped in brackets and separated by vertical
bars.
[x {y | z}] Nested set of square brackets or braces indicate optional or required choices
within optional or required elements. Braces and a vertical bar within square
brackets indicate a required choice within an optional element.
string A nonquoted set of characters. Do not use quotation marks around the string or
the string will include the quotation marks.
!, # An exclamation point (!) or a pound sign (#) at the beginning of a line of code
indicates a comment line.
Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the
manual.
Tip Means the following information will help you solve a problem.
Caution Means reader be careful. In this situation, you might do something that could result in equipment damage
or loss of data.
Timesaver Means the described action saves time. You can save time by performing the action described in the
paragraph.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
viii
Preface
Related Documentation
Related Documentation
Note Before installing or upgrading the switch, refer to the switch release notes.
• Cisco SFP and SFP+ modules documentation, including compatibility matrixes, located at:
http://www.cisco.com/en/US/products/hw/modules/ps5455/tsd_products_support_series_home.html
• Error Message Decoder, located at:
https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
ix
Preface
Obtaining Documentation and Submitting a Service Request
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
x
CHAPTER 1
Working with the Cisco IOS File System,
Configuration Files, and Software Images
• Working with the Flash File System, page 1
• Working with Configuration Files, page 11
• Replacing and Rolling Back Configurations, page 23
• Working with Software Images , page 28
• Copying Image Files Using TFTP, page 30
• Copying Image Files Using FTP, page 33
• Copying Image Files Using RCP, page 38
• Copying an Image File from One Stack Member to Another, page 43
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
1
Working with the Cisco IOS File System, Configuration Files, and Software Images
Displaying Available File Systems
This example shows a switch stack. In this example, the active switch is stack member 1; the file system on
stack member 2 is displayed as flash-2:, the file system on stack member 3 is displayed as flash-3: and so on
up to stack member 9, displayed as flash-9: for a 9-member stack. The example also shows the crashinfo
directories and a USB flash drive plugged into the active switch:
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
2
Working with the Cisco IOS File System, Configuration Files, and Software Images
Displaying Available File Systems
- - network rw ftp:
- - network rw scp:
- - network rw https:
- - opaque ro cns:
- - opaque rw revrcsf:
Field Value
Size(b) Amount of memory in the file system in bytes.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
3
Working with the Cisco IOS File System, Configuration Files, and Software Images
Setting the Default File System
Field Value
Prefixes Alias for file system.
crashinfo:—Crashinfo file.
flash:—Flash file system.
ftp:—FTP server.
http:—HTTP server.
https:—Secure HTTP server.
nvram:—NVRAM.
null:—Null destination for copies. You can copy a remote file to null
to find its size.
rcp:—Remote Copy Protocol (RCP) server.
scp:—Session Control Protocol (SCP) server.
system:—Contains the system memory, including the running
configuration.
tftp:—TFTP network server.
usbflash0:—USB flash memory.
xmodem:—Obtain the file from a network machine by using the
Xmodem protocol.
ymodem:—Obtain the file from a network machine by using the
Ymodem protocol.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
4
Working with the Cisco IOS File System, Configuration Files, and Software Images
Changing Directories and Displaying the Working Directory
Command Description
dir [/all] Displays a list of files on a file system.
[filesystem:filename]
show file systems Displays more information about each of the files on a file system.
show file descriptors Displays a list of open file descriptors. File descriptors are the internal
representations of open files. You can use this command to see if another user
has a file open.
SUMMARY STEPS
1. enable
2. dir filesystem:
3. cd directory_name
4. pwd
5. cd
DETAILED STEPS
Example:
Switch> enable
Step 2 dir filesystem: Displays the directories on the specified file system.
For filesystem:, use flash: for the system board flash device.
Example:
To access flash partitions of switch members in a stack, use flash-n
Switch# dir flash: where n is the stack member number. For example, flash-4.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
5
Working with the Cisco IOS File System, Configuration Files, and Software Images
Creating Directories
Switch# cd new_configs
Example:
Switch# pwd
Example:
Switch# cd
Creating Directories
Beginning in privileged EXEC mode, follow these steps to create a directory:
SUMMARY STEPS
1. dir filesystem:
2. mkdir directory_name
3. dir filesystem:
DETAILED STEPS
Step 2 mkdir directory_name Creates a new directory. Directory names are case sensitive and are
limited to 45 characters between the slashes (/); the name cannot
Example: contain control characters, spaces, slashes, quotes, semicolons, or
colons.
Switch# mkdir new_configs
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
6
Working with the Cisco IOS File System, Configuration Files, and Software Images
Removing Directories
Example:
Switch# dir flash:
Removing Directories
To remove a directory with all its files and subdirectories, use the delete /force /recursive filesystem:/file-url
privileged EXEC command.
Use the /recursive keyword to delete the named directory and all subdirectories and the files contained in it.
Use the /force keyword to suppress the prompting that confirms a deletion of each file in the directory. You
are prompted only once at the beginning of this deletion process.
For filesystem, use flash: for the system board flash device. For file-url, enter the name of the directory to be
deleted. All of the files in the directory and the directory are removed.
Copying Files
To copy a file from a source to a destination, use the copy source-url destination-url privileged EXEC
command. For the source and destination URLs, you can use running-config and startup-config keyword
shortcuts. For example, the copy running-config startup-config command saves the currently running
configuration file to the NVRAM section of flash memory to be used as the configuration during system
initialization.
You can also copy from special file systems (xmodem:, ymodem:) as the source for the file from a network
machine that uses the Xmodem or Ymodem protocol.
Network file system URLs include ftp:, rcp:, and tftp: and have these syntaxes:
• FTP—ftp:[[//username [:password]@location]/directory]/filename
• RCP—rcp:[[//username@location]/directory]/filename
• TFTP—tftp:[[//location]/directory]/filename
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
7
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Files
Copying Files from One Switch in a Stack to Another Switch in the Same Stack
To copy a file from one switch in a stack to another switch in the same stack, use the flash-X: notation, where
X is the switch number.
To view all switches in a stack, use the show switch command in privileged EXEC mode, as in the following
example of a 9-member switch stack:
To view all file systems available to copy on a specific switch, use the copy command as in the following
example of a 5-member stack:
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
8
Working with the Cisco IOS File System, Configuration Files, and Software Images
Creating, Displaying and Extracting Files
Switch#
This example shows how to copy a config file stored in the flash partition of switch 2 to the flash partition of
switch 4. It assumes that switch 2 and switch 4 are in the same stack.
Deleting Files
When you no longer need a file on a flash memory device, you can permanently delete it. To delete a file or
directory from a specified flash device, use the delete [/force] [/recursive] [filesystem:]/file-url privileged
EXEC command.
Use the /recursive keyword for deleting a directory and all subdirectories and the files contained in it. Use
the /force keyword to suppress the prompting that confirms a deletion of each file in the directory. You are
prompted only once at the beginning of this deletion process. Use the /force and /recursive keywords for
deleting old software images that were installed by using the archive download-sw command but are no
longer needed.
If you omit the filesystem: option, the switch uses the default device specified by the cd command. For file-url,
you specify the path (directory) and the name of the file to be deleted.
When you attempt to delete any files, the system prompts you to confirm the deletion.
This example shows how to delete the file myconfig from the default flash memory device:
Switch# delete myconfig
SUMMARY STEPS
DETAILED STEPS
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
9
Working with the Cisco IOS File System, Configuration Files, and Software Images
Creating, Displaying and Extracting Files
For flash:/file-url, specify the location on the local flash file system in which the
new file is created. You can also specify an optional list of files or directories within
the source directory to add to the new file. If none are specified, all files and
directories at this level are written to the newly created file.
You can also limit the file displays by specifying a list of files or directories after
the file. Only those files appear. If none are specified, all files and directories appear.
Step 3 archive tar /xtract source-url Extracts a file into a directory on the flash file system.
flash:/file-url [dir/file...] For source-url, specify the source URL alias for the local file system. The -filename.
is the file from which to extract files. These options are supported:
Example:
• Local flash file system syntax:
switch# archive tar /xtract
tftp:/172.20.10.30/saved. flash:
flash:/new-configs
• FTP syntax:
ftp:[[//username[:password]@location]/directory]/-filename.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
10
Working with the Cisco IOS File System, Configuration Files, and Software Images
Working with Configuration Files
For flash:/file-url [dir/file...], specify the location on the local flash file system from
which the file is extracted. Use the dir/file... option to specify a list of files or
directories within the file to be extracted. If none are specified, all files and directories
are extracted.
Step 4 more [ /ascii | /binary | /ebcdic] Displays the contents of any readable file, including a file on a remote file system.
/file-url
Example:
switch# more
flash:/new-configs
You can copy (upload) configuration files from the switch to a file server by using TFTP, FTP, or RCP. You
might perform this task to back up a current configuration file to a server before changing its contents so that
you can later restore the original configuration file from the server.
The protocol you use depends on which type of server you are using. The FTP and RCP transport mechanisms
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.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
11
Working with the Cisco IOS File System, Configuration Files, and Software Images
Guidelines for Creating and Using Configuration Files
Note The copy {ftp: | rcp: | tftp:} system:running-config privileged EXEC command loads the configuration
files on the switch as if you were entering the commands at the command line. The switch does not erase
the existing running configuration before adding the commands. If a command in the copied configuration
file replaces a command in the existing configuration file, the existing command is erased. For example,
if the copied configuration file contains a different IP address in a particular command than the existing
configuration, the IP address in the copied configuration is used. However, some commands in the existing
configuration might not be replaced or negated. In this case, the resulting configuration file is a mixture
of the existing configuration file and the copied configuration file, with the copied configuration file
having precedence.
To restore a configuration file to an exact copy of a file stored on a server, copy the configuration file
directly to the startup configuration (by using the copy {ftp: | rcp: | tftp:} nvram:startup-config privileged
EXEC command), and reload the switch.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
12
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using TFTP
SUMMARY STEPS
1.
2.
3.
4.
5.
DETAILED STEPS
Command or Purpose
Action
Step 1 Copy an existing configuration from a switch to a server.
Step 2 Open the configuration file in a text editor, such as vi or emacs on UNIX or Notepad on
a PC.
Step 3 Extract the portion of the configuration file with the desired commands, and save it in a
new file.
Step 4 Copy the configuration file to the appropriate server location. For example, copy the file
to the TFTP directory on the workstation (usually /tftpboot on a UNIX workstation).
Step 5 Make sure the permissions on the file are set to world-read.
Note You must restart the inetd daemon after modifying the /etc/inetd.conf and /etc/services
files. To restart the daemon, either stop the inetd process and restart it, or enter a fastboot
command (on the SunOS 4.x) or a reboot command (on Solaris 2.x or SunOS 5.x). For
more information on the TFTP daemon, see the documentation for your workstation.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
13
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using TFTP
• Ensure that the switch has a route to the TFTP server. The switch and the TFTP server must be in the
same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the
TFTP server by using the ping command.
• Ensure that the configuration file 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 permissionon the
file should be world-read.
• Before uploading the configuration file, you might need to create an empty file on the TFTP server. To
create an empty file, enter the touch filename command, where filename is the name of the file you will
use when uploading it to the server.
• During upload operations, if you are overwriting an existing file (including 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 should be world-write.
SUMMARY STEPS
1.
2.
3.
4.
DETAILED STEPS
Command or Purpose
Action
Step 1 Copy the configuration file to the appropriate TFTP directory on the workstation.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
14
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using TFTP
This example shows how to configure the software from the file tokyo-confg at IP address 172.16.2.155:
Switch# copy tftp://172.16.2.155/tokyo-confg system:running-config
Configure using tokyo-confg from 172.16.2.155? [confirm] y
Booting tokyo-confg from 172.16.2.155:!!! [OK - 874/16000 bytes]
SUMMARY STEPS
1.
2.
3.
DETAILED STEPS
Command or Purpose
Action
Step 1 Verify that the TFTP server is properly configured.
Step 2 Log into the switch through the console port, the Ethernet management port, or a Telnet session
.
Step 3 Upload the switch configuration to the TFTP server. Specify the IP address or hostname of the
TFTP server and the destination filename.
Use one of these privileged EXEC commands:
• copy system:running-config tftp:[[[//location]/directory]/filename]
• copy nvram:startup-config tftp:[[[//location]/directory]/filename]
• copy flash[n]:/directory/startup-config tftp:[[[//location]/directory]/filename]
Note You can only enter the flashn parameter (for example, flash3) on Catalyst 3750-E
switches.
The file is uploaded to the TFTP server.
This example shows how to upload a configuration file from a switch to a TFTP server:
Switch# copy system:running-config tftp://172.16.2.155/tokyo-confg
Write file tokyo-confg on host 172.16.2.155? [confirm] y
#
Writing tokyo-confg!!! [OK]
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
15
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying a Configuration File from the Switch to an FTP Server
The switch sends the first valid password it encounters in the following sequence:
1 The password specified in the copy command, if a password is specified.
2 The password set by the ip ftp password command, if the command is configured.
3 The switch forms a password username @switchname.domain . The variable username is the username
associated with the current session, switchname is the configured host name, and domain is the domain
of the switch.
The username and password must be associated with an account on the FTP server. If you are writing to the
server, the FTP server must be properly configured to accept the FTP write request from the user on the switch.
If the server has a directory structure, the configuration file or image is written to or copied from the directory
associated with the username on the server. For example, if the system image resides in the home directory
of a user on the server, specify that user name as the remote username.
Refer to the documentation for your FTP server for more information.
Use the ip ftp username and ip ftp password global configuration commands to specify a username and
password for all copies. Include the username in the copy EXEC command if you want to specify a username
for that copy operation only.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
16
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying a Configuration File from the Switch to an FTP Server
you do not need to set the FTP username. Include the username in the copy command if you want to
specify a username for only that copy operation.
• When you upload a configuration 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.
SUMMARY STEPS
1. configure terminal
2. ip ftp username username
3. ip ftp password password
4. end
5. Do one of the following:
• copy system:running-config ftp: [[[//[username [:password ]@]location]/directory ]/filename ]
• copy nvram:startup-config ftp: [[[//[username [:password ]@]location]/directory ]/filename]
DETAILED STEPS
Step 2 ip ftp username username (Optional) Change the default remote username.
Step 3 ip ftp password password (Optional) Change the default password.
Step 4 end Return to privileged EXEC mode.
Step 5 Do one of the following: Using FTP, copy the configuration file from a network server
to the running configuration or to the startup configuration
• copy system:running-config ftp: file.
[[[//[username [:password
]@]location]/directory ]/filename ]
• copy nvram:startup-config ftp: [[[//[username
[:password ]@]location]/directory ]/filename]
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
17
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying a Configuration File from the Switch to an FTP Server
This example shows how to copy a configuration file named host1-confg from the netadmin1 directory on
the remote server with an IP address of 172.16.101.101 and to load and run those commands on the switch:
Switch# copy ftp://netadmin1:[email protected]/host1-confg system:running-config
Configure using host1-confg from 172.16.101.101? [confirm]
Connected to 172.16.101.101
Loading 1112 byte file host1-confg:![OK]
Switch#
%SYS-5-CONFIG: Configured from host1-config by ftp from 172.16.101.101
This example shows how to specify a remote username of netadmin1. The software copies the configuration
file host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101 to
the switch startup configuration.
Switch# configure terminal
Switch(config)# ip ftp username netadmin1
Switch(config)# ip ftp password mypass
Switch(config)# end
Switch# copy ftp: nvram:startup-config
Address of remote host [255.255.255.255]? 172.16.101.101
Name of configuration file[rtr2-confg]? host2-confg
Configure using host2-confg from 172.16.101.101?[confirm]
Connected to 172.16.101.101
Loading 1112 byte file host2-confg:![OK]
[OK]
Switch#
%SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by ftp from 172.16.101.101
SUMMARY STEPS
1. configure terminal
2. ip ftp username username
3. ip ftp password password
4. end
5. Do one of the following:
• copy system:running-config ftp: [[[//[username [:password ]@]location]/directory ]/filename ]
or
• copy nvram:startup-config ftp: [[[//[username [:password ]@]location]/directory ]/filename ]
DETAILED STEPS
Step 2 ip ftp username username (Optional) Change the default remote username.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
18
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using RCP
This example shows how to copy the running configuration file named switch2-confg to the netadmin1
directory on the remote host with an IP address of 172.16.101.101:
Switch# copy system:running-config ftp://netadmin1:[email protected]/switch2-confg
Write file switch2-confg on host 172.16.101.101?[confirm]
Building configuration...[OK]
Connected to 172.16.101.101
Switch#
This example shows how to store a startup configuration file on a server by using FTP to copy the file:
Switch# configure terminal
Switch(config)# ip ftp username netadmin2
Switch(config)# ip ftp password mypass
Switch(config)# end
Switch# copy nvram:startup-config ftp:
Remote host[]? 172.16.101.101
Name of configuration file to write [switch2-confg]?
Write file switch2-confg on host 172.16.101.101?[confirm]
![OK]
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
19
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using RCP
• The username set by the ip rcmd remote-username username global configuration command if the
command is configured.
• The remote username associated with the current TTY (terminal) process. For example, if the user is
connected to the router through Telnet and was authenticated through the username command, the
switch software sends the Telnet username as the remote username.
• The switch hostname.
For a successful RCP copy request, you must define an account on the network server for the remote username.
If the server has a directory structure, the configuration file is written to or copied from the directory associated
with the remote username on the server. For example, if the configuration file is in the home directory of a
user on the server, specify that user's name as the remote username.
If the switch IP address translates to Switch1.company.com, the .rhosts file for User0 on the RCPserver should
contain this line:
Switch1.company.com Switch1
For more information, see the documentation for your RCP server.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
20
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using RCP
SUMMARY STEPS
1. configure terminal
2. ip rcmd remote-username username
3. end
4. Do one of the following:
• copy rcp:[[[//username@]location]/directory]/filename]system:running-config
• copy rcp:[[[//username@]location]/directory]/filename]nvram:startup-config
DETAILED STEPS
This example shows how to copy a configuration file named host1-confg from the netadmin1 directory on
the remote server with an IP address of 172.16.101.101 and load and run those commands on the switch:
Switch# copy rcp://[email protected]/host1-confg system:running-config
Configure using host1-confg from 172.16.101.101? [confirm]
Connected to 172.16.101.101
Loading 1112 byte file host1-confg:![OK]
Switch#
%SYS-5-CONFIG: Configured from host1-config by rcp from 172.16.101.101
This example shows how to specify a remote username of netadmin1. Then it copies the configuration file
host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101to the
startup configuration:
Switch# configure terminal
Switch(config)# ip rcmd remote-username netadmin1
Switch(config)# end
Switch# copy rcp: nvram:startup-config
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
21
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Configuration Files By Using RCP
SUMMARY STEPS
1. configure terminal
2. ip rcmd remote-username username
3. end
4. Do one of the following:
• copy system:running-config rcp:[[[//username@]location]/directory]/filename]
• copy nvram:startup-config rcp:[[[//username@]location]/directory]/filename]
DETAILED STEPS
This example shows how to copy the running configuration file named switch2-confg to the netadmin1
directory on the remote host with an IP address of 172.16.101.101:
Switch# copy system:running-config rcp://[email protected]/switch2-confg
Write file switch-confg on host 172.16.101.101?[confirm]
Building configuration...[OK]
Connected to 172.16.101.101
Switch#
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
22
Working with the Cisco IOS File System, Configuration Files, and Software Images
Clearing Configuration Information
Note You cannot restore the startup configuration file after it has been deleted.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
23
Working with the Cisco IOS File System, Configuration Files, and Software Images
Information on Configuration Replacement and Rollback
Configuration Archive
The Cisco IOS configuration archive is intended to provide a mechanism to store, organize, and manage an
archive of Cisco IOS configuration files to enhance the configuration rollback capability provided by the
configure replace command. Before this feature was introduced, you could save copies of the running
configuration using the copy running-config destination-url command, storing the replacement file either
locally or remotely. However, this method lacked any automated file management. On the other hand, the
Configuration Replace and Configuration Rollback feature provides the capability to automatically save copies
of the running configuration to the Cisco IOS configuration archive. These archived files serve as checkpoint
configuration references and can be used by the configure replace command to revert to previous configuration
states.
The archive config command allows you to save Cisco IOS configurations in the configuration archive using
a standard location and filename prefix that is automatically appended with an incremental version number
(and optional timestamp) as each consecutive file is saved. This functionality provides a means for consistent
identification of saved Cisco IOS configuration files. You can specify how many versions of the running
configuration are kept in the archive. After the maximum number of files are saved in the archive, the oldest
file is automatically deleted when the next, most recent file is saved. The show archive command displays
information for all configuration files saved in the Cisco IOS configuration archive.
The Cisco IOS configuration archive, in which the configuration files are stored and available for use with
the configure replace command, can be located on the following file systems: FTP, HTTP, RCP, TFTP.
Configuration Replace
The configure replace privileged EXEC command replaces the running configuration with any saved
configuration file. When you enter the configure replace command, the running configuration is compared
with the specified replacement configuration, and a set of configuration differences is generated. The resulting
differences are used to replace the configuration. The configuration replacement operation is usually completed
in no more than three passes. To prevent looping behavior no more than five passes are performed.
You can use the copy source-url running-config privileged EXEC command to copy a stored configuration
file to the running configuration. When using this command as an alternative to the configure replace target-url
privileged EXEC command, note these major differences:
• The copysource-urlrunning-config command is a merge operation and preserves all the commands
from both the source file and the running configuration. This command does not remove commands
from the running configuration that are not present in the source file. In contrast, the configure
replacetarget-url command removes commands from the running configuration that are not present in
the replacement file and adds commands to the running configuration that are not present.
• You can use a partial configuration file as the source file for the copysource-urlrunning-config command.
You must use a complete configuration file as the replacement file for the configure replacetarget-url
command.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
24
Working with the Cisco IOS File System, Configuration Files, and Software Images
Information on Configuration Replacement and Rollback
Configuration Rollback
You can also use the configure replace command to roll back changes that were made since the previous
configuration was saved. Instead of basing the rollback operation on a specific set of changes that were applied,
the configuration rollback capability reverts to a specific configuration based on a saved configuration file.
If you want the configuration rollback capability, you must first save the running configuration before making
any configuration changes. Then, after entering configuration changes, you can use that saved configuration
file to roll back the changes by using the configure replacetarget-url command.
You can specify any saved configuration file as the rollback configuration. You are not limited to a fixed
number of rollbacks, as is the case in some rollback models.
Configuration Guidelines
Follow these guidelines when configuring and performing configuration replacement and rollback:
• Make sure that the switch has free memory larger than the combined size of the two configuration files
(the running configuration and the saved replacement configuration). Otherwise, the configuration
replacement operation fails.
• Make sure that the switch also has sufficient free memory to execute the configuration replacement or
rollback configuration commands.
• Certain configuration commands, such as those pertaining to physical components of a networking
device (for example, physical interfaces), cannot be added or removed from the running configuration.
◦A configuration replacement operation cannot remove the interfaceinterface-id command line
from the running configuration if that interface is physically present on the device.
◦The interfaceinterface-id command line cannot be added to the running configuration if no such
interface is physically present on the device.
• When using the configure replace command, you must specify a saved configuration as the replacement
configuration file for the running configuration. The replacement file must be a complete configuration
generated by a Cisco IOS device (for example, a configuration generated by the copy
running-configdestination-url command).
Note If you generate the replacement configuration file externally, it must comply with the format of files
generated by Cisco IOS devices.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
25
Working with the Cisco IOS File System, Configuration Files, and Software Images
Information on Configuration Replacement and Rollback
SUMMARY STEPS
1. configure terminal
2. archive
3. pathurl
4. maximumnumber
5. time-period minutes
6. end
7. show running-config
8. copy running-config startup-config
DETAILED STEPS
Step 4 maximumnumber (Optional) Set the maximum number of archive files of the running configuration
to be saved in the configuration archive .
number-Maximum files of the running configuration file in the configuration
archive. Valid values are from 1 to 14. The default is 10.
Note Before using this command, you must first enter the path archive
configuration command to specify the location and filename prefix for
the files in the configuration archive.
Step 5 time-period minutes (Optional) Set the time increment for automatically saving an archive file of the
running configuration in the configuration archive.
minutes-Specify how often, in minutes, to automatically save an archive file of
the running configuration in the configuration archive
Step 8 copy running-config (Optional) Save your entries in the configuration file.
startup-config
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
26
Working with the Cisco IOS File System, Configuration Files, and Software Images
Information on Configuration Replacement and Rollback
SUMMARY STEPS
1. archive config
2. configure terminal
3.
4. exit
5. configure replace target-url [list] [force] [time seconds] [nolock]
6. configure confirm
7. copy running-config startup-config
DETAILED STEPS
Step 5 configure replace Replace the running configuration file with a saved configuration file.
target-url [list] [force] target-url—URL (accessible by the file system) of the saved configuration file that is to
[time seconds] [nolock] replace the running configuration, such as the configuration file created in Step 2 by using
the archive config privileged EXEC command
list —Display a list of the command entries applied by the software parser during each
pass of the configuration replacement operation. The total number of passes also appears.
force —Replace the running configuration file with the specified saved configuration file
without prompting you for confirmation.
timeseconds—Specify the time (in seconds) within which you must enter the configure
confirm command to confirm replacement of the running configuration file. If you do not
enter the configure confirm command within the specified time limit, the configuration
replacement operation is automatically stopped. (In other words, the running configuration
file is restored to the configuration that existed before you entered the configure replace
command).
Note You must first enable the configuration archive before you can use the time
seconds command line option.
nolock— Disable the locking of the running configuration file that prevents other
users from changing the running configuration during a configuration replacement
operation.
Step 6 configure confirm (Optional) Confirm replacement of the running configuration with a saved configuration
file.
Note Use this command only if the time seconds keyword and argument of the
configure replace command are specified.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
27
Working with the Cisco IOS File System, Configuration Files, and Software Images
Working with Software Images
Note Instead of using the copy privileged EXEC command or the archive tar privileged EXEC command, we
recommend using 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 master. Software images
downloaded to the stack master are automatically downloaded to the rest of the stack members.
To upgrade a switch in the stack that has an incompatible software image, use the archive copy-sw
privileged EXEC command to copy the software image from an existing stack member to the incompatible
switch. That switch automatically reloads and joins the stack as a fully functioning member.
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 by using a web browser (HTTP) and then by using the device manager or Cisco Network Assistant
to upgrade your switch. For information about upgrading your switch by using a TFTP server or a web browser
(HTTP), see the release notes.
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 are using. The FTP and RCP transport
mechanisms 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.
Note For a list of software images and the supported upgrade paths, see the release notes.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
28
Working with the Cisco IOS File System, Configuration Files, and Software Images
Image Location on the Switch
This example shows some of the information contained in the info file. The table provides additional details
about this information:
system_type:0x00000000:image-name
image_family:xxxx
stacking_number:x
info_end:
version_suffix:xxxx
version_directory:image-name
image_system_type_id:0x00000000
image_name:image-nameB.bin
ios_image_file_size:6398464
total_image_file_size:8133632
image_feature:IP|LAYER_3|PLUS|MIN_DRAM_MEG=128
image_family:xxxx
stacking_number:x
board_ids:0x401100c4 0x00000000 0x00000001 0x00000003 0x00000002 0x00008000 0x00008002
0x40110000
info_end
Field Description
version_suffix Specifies the Cisco IOS image version string suffix
image_name Specifies the name of the Cisco IOS image within the
tar file
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
29
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Image Files Using TFTP
Field Description
ios_image_file_size Specifies the Cisco IOS image size in the tar file,
which is an approximate measure of how much flash
memory is required to hold just the Cisco IOS image
total_image_file_size Specifies the size of all the images (the Cisco IOS
image and the web management files) in the tar file,
which is an approximate measure of how much flash
memory is required to hold them
Note Instead of using the copy privileged EXEC command or the archive tar privileged EXEC command, we
recommend using 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 master. Software images
downloaded to the stack master are automatically downloaded to the rest of the stack members.
To upgrade a switch with an incompatible software image, use the archive copy-sw privileged EXEC
command to copy the software image from an existing stack member to the incompatible switch. That
switch automatically reloads and joins the stack as a fully functioning member.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
30
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File By Using TFTP
Note You must restart the inetd daemon after modifying the /etc/inetd.conf and /etc/services
files. To restart the daemon, either stop the inetd process and restart it, or enter a fastboot
command (on the SunOS 4.x) or a reboot command (on Solaris 2.x or SunOS 5.x). For
more information on the TFTP daemon, see the documentation for your workstation.
• Ensure that the switch has a route to the TFTP server. The switch and the TFTP server must be in the
same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the
TFTP server by using 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 should be world-read.
• Before uploading the image file, you might need to create an empty file on the TFTP server. To create
an empty file, enter the touch filename command, where filename is the name of the file you will use
when uploading the image to the server.
• During upload operations, if you are overwriting an existing file (including 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 should be world-write.
SUMMARY STEPS
1.
2.
3. archive download-sw/overwrite/reload tftp:[[//location]/directory]/image-name.tar
4. archive download-sw/leave-old-sw/reload tftp:[[//location]/directory]/image-name.tar
DETAILED STEPS
Step 2 Log into the switch through the console port or a Telnet session.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
31
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File By Using TFTP
Step 4 archive download-sw/leave-old-sw/reload Download the image file from the TFTP server to the switch, and keep the
tftp:[[//location]/directory]/image-name.tar current image.
• The /leave-old-sw option keeps the old software version after a download.
• The /reload option reloads the system after downloading the image unless
the configuration has been changed and not been saved.
• For //location, specify the IP address of the TFTP server.
• For /directory/image-name.tar specify the directory (optional) and the
image to download. Directory and image names are case sensitive.
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 existing 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, the existing files are not removed. If there is
not enough space to install the new image and keep the running 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 keep the old image during the download process (you specified the
/leave-old-sw keyword), you can remove it by entering 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.
Note For the download and upload algorithms to operate properly, do not
rename image names
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
32
Working with the Cisco IOS File System, Configuration Files, and Software Images
Uploading an Image File Using TFTP
SUMMARY STEPS
1.
2.
3. archive upload-sw tftp:[[// location ]/directory ]/image-name .tar
DETAILED STEPS
Step 2 Log into the switch through the console port or a Telnet session.
Step 3 archive upload-sw tftp:[[// Upload the currently running switch image to the TFTP server.
location ]/directory
]/image-name .tar • For // location , specify the IP address of the TFTP server.
• For /directory/image-name.tar specify the directory (optional) and the name of the
software image to be uploaded. Directory and image names are case sensitive. The
image-name.tar is the name of the software image to be stored on the server.
The archive upload-sw privileged EXEC command builds an image file on the
server by uploading these files in order: info, the Cisco IOS image, and the web
management files. After these files are uploaded, the upload algorithm creates the
tar file format.
Note For the download and upload algorithms to operate properly, do not rename image
names.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
33
Working with the Cisco IOS File System, Configuration Files, and Software Images
Preparing to Download or Upload an Image File By Using FTP
Note Instead of using the copy privileged EXEC command or the archive tar privileged EXEC command, we
recommend using 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 master. Software images
downloaded to the stack master are automatically downloaded to the rest of the stack members.
To upgrade a switch with an incompatible software image, use the archive copy-sw privileged EXEC command
to copy the software image from an existing stack member to the incompatible switch. That switch automatically
reloads and joins the stack as a fully functioning member.
The username and password must be associated with an account on the FTP server. If you are writing 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's name as the remote username.
Before you begin downloading or uploading an image file by using FTP, do these tasks:
• Ensure that the switch has a route to the FTP server. The switch and the FTP server must be in the same
subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the FTP
server by using the ping command.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
34
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File By Using FTP
• If you are accessing the switch through the console or a Telnet session and you do not have a valid
username, make sure 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 by using the ip ftp username username global
configuration command. This new name will be used during all archive operations. The new username
is stored in NVRAM. If you are accessing 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.
SUMMARY STEPS
1.
2.
3. configure terminal
4. ip ftp username username
5. ip ftp passwordpassword
6. end
7. archive download-sw /overwrite/reload
ftp:[[//username[:password]@location]/directory]/image-name.tar
8. archive download-sw /leave-old-sw/reload
ftp:[[//username[:password]@location]/directory]/image-name.tar
DETAILED STEPS
Step 2 Log into the switch through the console port or a Telnet
session.
Step 3 configure terminal Enter global configuration mode.
This step is required only if you override the default
remote username or password (see Steps 4, 5, and 6).
Step 4 ip ftp username username (Optional) Change the default remote username.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
35
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File By Using FTP
Step 7 archive download-sw /overwrite/reload Download the image file from the FTP server to the
ftp:[[//username[:password]@location]/directory]/image-name.tar switch, and overwrite the current image.
• The /overwrite option overwrites the software
image in flash memory with the downloaded image.
• The /reload option reloads the system after
downloading the image unless the configuration
has been changed and not been saved.
• For //username [:password]specify the username
and password; these must be associated with an
account on the FTP server.
• For @ location, specify the IP address of the FTP
server.
• For directory/image-name.tar, specify the directory
(optional) and the image to download. Directory
and image names are case sensitive.
Step 8 archive download-sw /leave-old-sw/reload Download the image file from the FTP server to the
ftp:[[//username[:password]@location]/directory]/image-name.tar switch, and keep the current image.
• The /leave-old-sw option keeps the old software
version after a download.
• The /reload option reloads the system after
downloading the image unless the configuration
has been changed and not been saved.
• For //username [:password]specify the username
and password; these must be associated with an
account on the FTP server.
• For @ location, specify the IP address of the FTP
server.
• For directory/image-name.tar, specify the directory
(optional) and the image to download. Directory
and image names are case sensitive.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
36
Working with the Cisco IOS File System, Configuration Files, and Software Images
Uploading an Image File By Using FTP
SUMMARY STEPS
1. configure terminal
2. ip ftp usernameusername
3. ip ftp passwordpassword
4. end
5. archive upload-sw ftp:[[//[username[:password]@]location]/directory]/image-name.tar
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
37
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying Image Files Using RCP
DETAILED STEPS
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
38
Working with the Cisco IOS File System, Configuration Files, and Software Images
Preparing to Download or Upload an Image File Using RCP
Note Instead of using the copy privileged EXEC command or the archive tar privileged EXEC command, we
recommend using 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 master. Software images
downloaded to the stack master are automatically downloaded to the rest of the stack members. To upgrade
a switch with an incompatible software image, use the archive copy-sw privileged EXEC command to
copy the software image from an existing stack member to the incompatible switch. That switch
automatically reloads and joins the stack as a fully functioning member.
For the RCP copy request to execute successfully, an account must be defined on the network server for the
remote username. If the server has a directory structure, the image file is written to or copied from the directory
associated with the remote username on the server. For example, if the image file resides in the home directory
of a user on the server, specify that user's name as the remote username.
Before you begin downloading or uploading an image file by using RCP, do these tasks:
• Ensure that the workstation acting as the RCP server supports the remote shell (rsh).
• Ensure that the switch has a route to the RCP server. The switch and the server must be in the same
subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the RCP
server by using the ping command.
• If you are accessing the switch through the console or a Telnet session and you do not have a valid
username, make sure that the current RCP username is the one that you want to use for the RCP download.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
39
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File using RCP
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 RCP username by using the ip rcmd remote-usernameusername
global configuration command to be used during all archive operations. The new username is stored in
NVRAM. If you are accessing the switch through a Telnet session and you have a valid username, this
username is used, and there is no need to set the RCP username. 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.
• When you upload an image to the RCP to the server, it must be properly configured to accept the RCP
write request from the user on the switch. For UNIX systems, you must add an entry to the .rhosts file
for the remote user on the RCP server.
SUMMARY STEPS
1.
2.
3. configure terminal
4. ip rcmd remote-username username
5. end
6. archive download-sw /overwrite/reload rcp:[[[//username@]/location]/directory]/image-name.tar
7. archive download-sw /leave-old-sw/reload rcp:[[[//[username@]location]/directory]/image-name.tar
DETAILED STEPS
Step 2 Log into the switch through the console port or a Telnet session.
Step 3 configure terminal Enter global configuration mode.
This step is required only if you override the default remote
username or password (see Steps 4, 5, and 6).
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
40
Working with the Cisco IOS File System, Configuration Files, and Software Images
Downloading an Image File using RCP
Step 6 archive download-sw /overwrite/reload Download the image file from the RCP server to the switch, and
rcp:[[[//username@]/location]/directory]/image-name.tar overwrite the current image.
• The /overwrite option overwrites the software image in
flash memory with the downloaded image.
• The /reload option reloads the system after downloading
the image unless the configuration has been changed and
not been saved.
• For //username specify the username. For the RCP copy
request to execute successfully, an account must be defined
on the network server for the remote username.
• For @ location, specify the IP address of theRCP server.
• For /directory/image-name.tar, specify the directory
(optional) and the image to download. Directory and image
names are case sensitive.
Step 7 archive download-sw /leave-old-sw/reload Download the image file from the FTP server to the switch, and
rcp:[[[//[username@]location]/directory]/image-name.tar keep the current image.
• The /leave-old-sw option keeps the old software version
after a download.
• The /reload option reloads the system after downloading
the image unless the configuration has been changed and
not been saved.
• For //usernamespecify the username. For the RCP copy
request to execute, an account must be defined on the
network server for the remote username.
• For @ location, specify the IP address of the RCP server.
• For /directory]/image-name.tar, specify the directory
(optional) and the image to download. Directory and image
names are case sensitive.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
41
Working with the Cisco IOS File System, Configuration Files, and Software Images
Uploading an Image File using RCP
SUMMARY STEPS
1. configure terminal
2. ip rcmd remote-usernameusername
3. end
4. archive upload-sw rcp:[[[//[username@]location]/directory]/image-name.tar
DETAILED STEPS
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
42
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying an Image File from One Stack Member to Another
Note To successfully use the archive copy-sw privileged EXEC command, you must have downloaded from
a TFTP server the images for both the stack member switch being added and the stack master. You use
the archive download-sw privileged EXEC command to perform the download.
Beginning in privileged EXEC mode from the stack member that you want to upgrade, follow these steps to
copy the running image file from the flash memory of a different stack member:
SUMMARY STEPS
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
43
Working with the Cisco IOS File System, Configuration Files, and Software Images
Copying an Image File from One Stack Member to Another
DETAILED STEPS
Step 2 reload slotstack-member-number Reset the updated stack member, and put this configuration change into effect.
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
44
INDEX
F T
file system 2, 4, 7 tar files 9
displaying available file systems 2 creating 9
displaying file information 4 displaying the contents of 9
local file system names 2 extracting 9
network file system names 7
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst 2960-X
Switch)
IN-1
Index
Cisco IOS File System and Image Management Configuration Guide, Cisco IOS Release 15.2(2)SE (Catalyst
2960-X Switch)
IN-2