THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED "AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

© 2012 Cisco Systems, Inc. All rights reserved.

Loading and Managing System Images Configuration Guide Cisco IOS XE Release 3S (Cisco ASR 903)

- Finding Feature Information

- Image Copying from Flash Memory to an FTP Server

- Image Copy from an FTP Server to a Flash Memory File System

- FTP Username and Password

- Copying an Image from Flash Memory to an FTP Server

- Examples

- Copying from an FTP Server to Flash Memory

- Examples

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Image Copying from Flash Memory to 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 a configuration file from the router to a server using FTP, the Cisco IOS software sends the first valid username it encounters in the following list:

1. The username specified in the copy privileged EXEC command, if a username is specified.

2. The username set by the ipftpusername global configuration command, if the command is configured.

3. Anonymous.

The router sends the first valid password it encounters in the following list:

1. The password specified in the copy privileged EXEC command, if a password is specified.

2. The password set by the ipftppassword global configuration command, if the command is configured.

The router forms a password username @routername .domain . The variable username is the username associated with the current session, routername is the configured hostname, and domain is the domain of the router.

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 router.

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's name as the remote username.

Refer to the documentation for your FTP server for more information.

Use the ipftpusername and ipftppassword commands to specify a username and password for all copies. Include the username in the copy command if you want to specify a username for that copy operation only.

Image Copy from an FTP Server to a Flash Memory File System

You can copy a system image from an FTP server to a flash memory file system.

FTP Username and Password

The FTP protocol requires a client to send a remote username and password on each FTP request to a server. When you copy a configuration file from the router to a server using FTP, the Cisco IOS software sends the first valid username it encounters in the following list:

1. The username specified in the copy privileged EXEC command, if a username is specified.

2. The username set by the ipftpusername global configuration command, if the command is configured.

3. Anonymous.

The router sends the first valid password it encounters in the following list:

1. The password specified in the copy privileged EXEC command, if a password is specified.

2. The password set by the ipftppassword command, if the command is configured.

The router forms a password username @routername .domain . The variable username is the username associated with the current session, routername is the configured host name, and domain is the domain of the router.

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 router.

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's name as the remote username.

Refer to the documentation for your FTP server for more information.

Use the ipftpusername and ipftppassword commands to specify a username and password for all copies. Include the username in the copy command if you want to specify a username for that copy operation only.

Copying an Image from Flash Memory to an FTP Server

To copy a system image to an FTP network server, complete the tasks in this section:

SUMMARY STEPS

1.   enable

2.   configure terminal

3.   ip ftp username username

4.   ip ftp password password

5.   end

6.   show flash-filesystem :

7.   copy flash-filesystem : filename ftp: [[[//[username [:password ]@]location ]/directory ]/filename ]

DETAILED STEPS

Step 1 enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Example:

Router> enable

Step 2 configure terminal

(Optional) Enters global configuration mode. This step is required only if you override the default remote username or password (see Steps 2 and 3).

Example:

Router# configure terminal

Step 3 ip ftp username username

(Optional) Changes the default remote username.

Example:

Router(config)# ip ftp username user1

Step 4 ip ftp password password

(Optional) Changes the default password.

Example:

Router(config)# ip ftp password guessme

Step 5 end

(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 2 and 3).

Example:

Router(config)# end

Step 6 show flash-filesystem :

(Optional) Displays the system image file in the specified flash directory. If you do not already know it, note the exact spelling of the system image filename in flash memory.

Example:

Router# show flash:

Step 7 copy flash-filesystem : filename ftp: [[[//[username [:password ]@]location ]/directory ]/filename ]

Copies the image to the FTP server.

Note

After you have issued the copy privileged EXEC command, you may be prompted for additional information or for confirmation of the action. The prompting will depend on how much information you provide in the copy command and the current setting of the fileprompt global configuration command.

Example:

Router# copy slot0:1:your-ios ftp://myuser:mypass@172.23.1.129/dirt/sysadmin/your-ios

Examples

The following example uses the showslot1:privilegedEXEC command to display the name of the system image file in the second PCMCIA slot, and copies the file (test) to an FTP server:

Router# show slot1:

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

1   .. 1        46A11866 2036C   4    746      May 16 1995 16:24:37 test

Router# copy slot1:test ftp://thisuser:thatpass@172.16.13.110/test

writing test!!!!...

successful ftp write.

In this example, the file named your-ios is copied from partition 1 of the flash memory PC card in slot 0 to the TFTP server at 172.23.1.129. The file will be saved with the name your-ios in the dirt/sysadmin directory relative to the directory of the remote username.

Router# show slot0: partition 1

PCMCIA Slot0 flash directory, partition 1:

File  Length   Name/status

1   1711088 your-ios

[1711152 bytes used, 2483152 available, 4194304 total]

Router# copy slot0:1:your-ios ftp://myuser:mypass@172.23.1.129/dirt/sysadmin/your-ios

Verifying checksum for 'your-ios' (file # 1)...  OK

Copy 'your-ios' from Flash to server

as 'dirt/sysadmin/ios-2'? [yes/no] yes

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

Upload to server done

Flash device copy took 00:00:23 [hh:mm:ss]

Copying from an FTP Server to Flash Memory

To copy a system image from an FTP server to a flash memory file system, complete the tasks in this section:

SUMMARY STEPS

1.   enable

2.   show flash-filesystem :

3.   copy flash-url tftp :[[[//location ]/directory ]/filename ]

4.   configure terminal

5.   ip ftp username username

6.   ip ftp password password

7.   end

8.   copy ftp: [[[//[username [:password ]@]location ] /directory ]/filename ]flash-filesystem:[filename ]

DETAILED STEPS

Step 1 enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Example:

Router> enable

Step 2 show flash-filesystem :

(Optional) Displays the system image filename in Flash memory. Use this command to verify the url-path of the file and the exact spelling of the system image filename for use in the next command.

Example:

Router# show flash:

Step 3 copy flash-url tftp :[[[//location ]/directory ]/filename ]

Copies the system image from Flash memory to a TFTP server. Specify the file location and filename as the flash-url argument.

Note

After you have issued the copy privileged EXEC command, you may be prompted for additional information or for confirmation of the action. The prompting will depend on how much information you provide in the copy command and the current setting of the fileprompt global configuration command.

Example:

Router# copy slot0:1:your-ios tftp://172.23.1.129/dirt/sysadmin/your-ios

Step 4 configure terminal

(Optional) Enters global configuration mode from the terminal. This step is required only if you want to override the default remote username or password (see Steps 3 and 4).

Example:

Router# configure terminal

Step 5 ip ftp username username

(Optional) Changes the default remote username.

Example:

Router(config)# ip ftp username netuser1

Step 6 ip ftp password password

(Optional) Changes the default password.

Example:

Router(config)# ip ftp password guessme

Step 7 end

(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 3 and 4).

Example:

Router(config)# end

Step 8 copy ftp: [[[//[username [:password ]@]location ] /directory ]/filename ]flash-filesystem:[filename ]

Copies the configuration file from a network server to running memory or the startup configuration using rcp.

Note

After you have issued the copy privileged EXEC command, you may be prompted for additional information or for confirmation of the action. The prompting will depend on how much information you provide in the copy command and the current setting of the fileprompt global configuration command.

Example:

Router# copy ftp://myuser:mypass@theserver/tftpboot/sub3/c7200-js-mz slot1:c7200-js-mz

Examples

The following example copies a the file named c7200-js-mz from the FTP server the server using a username of myuser and a password of mypass:

Router# copy ftp://myuser:mypass@theserver/tftpboot/sub3/c7200-js-mz slot1:c7200-js-mz

Accessing ftp://theserver/tftpboot/sub3/c7200-js-mz...Translating "theserver"...domain server (192.168.2.132) [OK]

Loading c7200-js-mz from 192.168.2.132 (via Ethernet3/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[OK - 4823492 bytes]

4823492 bytes copied in 264.312 secs (18270 bytes/sec)