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:
- The username specified in the copy privileged EXEC command, if a username is specified.
- The username set by the ipftpusername global configuration command, if the command is configured.
- Anonymous.
The router sends the first valid password it encounters in the following list:
- The password specified in the copy privileged EXEC command, if a password is specified.
- 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:
- The username specified in the copy privileged EXEC command, if a username is specified.
- The username set by the ipftpusername global configuration command, if the command is configured.
- Anonymous.
The router sends the first valid password it encounters in the following list:
- The password specified in the copy privileged EXEC command, if a password is specified.
- 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:
DETAILED STEPS
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:
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode.
|
||
|
Example: Router# show flash: |
(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# copy slot0:1:your-ios tftp://172.23.1.129/dirt/sysadmin/your-ios |
Copies the system image from Flash memory to a TFTP server. Specify the file location and filename as the flash-url argument.
|
||
|
Example: Router# 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(config)# ip ftp username netuser1 |
(Optional) Changes the default remote username. |
||
|
Example: Router(config)# ip ftp password guessme |
(Optional) Changes the default password. |
||
|
Example: Router(config)# 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# copy ftp://myuser:mypass@theserver/tftpboot/sub3/c7200-js-mz slot1:c7200-js-mz |
Copies the configuration file from a network server to running memory or the startup configuration using rcp.
|
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)