You can copy configuration file to or form 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 switch to a server by using FTP, the Cisco
IOS software sends the first vaild username in the list:
 
The username specified in the copy command if a username is specified.
 
The username set by the ip ftp nameuser username global configuration command if the command is configuration.
 
Anonymous
 
The switch sends the first vaild password in the list:
 
The password specified in the copy command if a password is specified.
 
The passowrd set by the ip ftp password password global configuration command if the command is configuration.
 
The switch forms a password name [email]username@switchname.doma[/email]in .The variable username is the
username associated with the current session, switchname is the configuration hostname ,and domain is the domain fo 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 your FTP write request.
 
Use the ip ftp username and  ip ftp password commands to specify a username and password for all copies.Include the username in the copy command if you want to specify only a username for
that copy operation.
 
If the server has a directory structure,the configuration file is written to or copied from the directory associated with the username on the server.For example , if the configuration file reside
int the home directory fo a user on the server, specify that user's name as the remote username.
 
For more information , see the documentation for you FTP server.
 
Preparing to download or update a configuration file by using ftp
 
Before you begin downloading or uploading a configuration 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 subnetwrok if you do not have a router to route traffic between subnet.Check connectivity to the FTP 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 vaild
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 vaild 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 during  all copy operations. The new username is stored in NVRAM. If you are accessing the switch through a Telnet session and you have a vaild username,
this username is used, and you do not need to set the FTP username,Inculed the username in the
copy command if you want to specify a username for only that copy operation.
 
When you upload a configuraiton 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 documention for you FTP server.
 
Downloaing a Configuration File By Using FTP
 
 
thsi example shows how to copy a configuraion file named host-config from the netadmin 1 directory on the remote server with an IP address of 172.16.101.101 and to load and run those
commands on the switch:
 
Configure using host1-config from 172.16.101.101?[confirm]
Connected to 172.16.101.101
Loading 1112 byte file host-config:[OK]
switch#
%sys-5-config:configuration form host1-config by tftp form 172.16.101.101
 
This example show how to specify a remote username of netadmin1.The software copies the
configuration file host2-config from the netadmin1 direcotory on the remote server with an IP
address fo 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)#exit
switch#copy ftp: nvram:startup-config
Address of remote host [255.255.255.255]?172.16.101.101
Name of configuration file[rtr2-config]?host2-config
Configure using host2-config from 172.16.101.101 ?[confirm]
Connected to 172.16.101.101
Loading 1112 byte file host2-config:[OK]
[ok]
switch#
%SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by ftp from 172.16.101.101
 
Uploading a Configuration File By Using FTP
Write file switch2-config 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 be 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#
switch#coyp nvram:startup-config ftp:
Remote host[]?172.16.101.101
Name fo configuraion file to write [switch2-config]?
Write file switch3-config on host 172.16..101.101?[confirm]
![OK]