1005
Working with the Cisco IOS File System, Configuration Files, and Software Images
Working with Configuration Files
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:mypass@172.16.101.101/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
Uploading a Configuration File By Using FTP
Beginning in privileged EXEC mode, follow these steps to upload a configuration file by using FTP:
Command Purpose
1. Verify that the FTP server is properly configured by
referring to the Preparing to Download or Upload a
Configuration File By Using FTP, page 1004.
2. Log into the switch through the console port or a
Telnet session.
3. configure terminal Enters global configuration mode on the switch.
This step is required only if you override the default remote
username or password (see Steps 4, 5, and 6).
4. ip ftp username username (Optional) Changes the default remote username.
5. ip ftp password password (Optional) Changes the default password.
6. end Returns to privileged EXEC mode.
7. copy
ftp:[[[//[username[:password]@]location]/directory]/f
ilename] system:running-config
or
copy
ftp:[[[//[username[:password]@]location]/directory]/f
ilename] nvram:startup-config
Using FTP, copies the configuration file from a network
server to the running configuration or to the startup
configuration file.