07-02-2009 05:05 AM - edited 11-18-2020 02:48 AM
Configuration files contain commands entered to customize the function of the Cisco IOS software. To better benefit from these instructions, your access point contains a minimal default running configuration for interacting with the system software.
You can download configuration files from a TFTP, FTP, or RCP server to the running configuration of the access point for various reasons:
•To restore a backed-up configuration file.
•To use the configuration file for another access point. For example, you might add another access point to your network and want it to have a configuration similar to the original access point. By copying the file to the new access point, you can change the relevant parts rather than recreating the whole file.
•To load the same configuration commands on all the access points in your network so that all the access points have similar configurations.
To configure the access point by using a configuration file downloaded from a TFTP server, follow these steps:
Step 1: Copy the configuration file to the appropriate TFTP directory on the workstation.
Step 2: Verify that the TFTP server is properly.
Step 3: Log into the access point through a Telnet session.
Step 4: Download the configuration file from the TFTP server to configure the access point.
Specify the IP address or host name of the TFTP server and the name of the file to download.
Use one of these privileged EXEC commands:
•copy tftp:[[[//location]/directory]/filename] system:running-config
•copy tftp:[[[//location]/directory]/filename] nvram:startup-config
The configuration file downloads, and the commands are executed as the file is parsed line-by-line.
This example shows how to configure the software from the file tokyo-confg at IP address 172.16.2.155:
ap# 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]
For information on uploading a configuration file using TFTP read Uploading the Configuration File by Using TFTP
Beginning in privileged EXEC mode, follow these steps to download a configuration file by using FTP:
Step 1: Verify that the FTP server is properly.
Step 2: Log into the access point through a Telnet session.
Step 3: Enter global configuration mode on the access point. This step is required only if you override the default remote username or password (see Steps 4, 5, and 6).
configure terminal
Step 4: (Optional) Change the default remote username
ip ftp username username
Step 5: (Optional) Change the default password
ip ftp password password
Step 6: Using FTP, copy the configuration file from a network server to the running configuration or to the startup configuration file.
copy ftp:[[[//[username[:password]@]location]/directory]/filename] system:running-config or
copy ftp:[[[//[username[:password]@]location]/directory]/filename] nvram:startup-config
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 access point:
ap# 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]
%SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by ftp from 172.16.101.101
%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 access point startup configuration.
ap# configure terminal
ap(config)# ip ftp username netadmin1
ap(config)# ip ftp password mypass
ap(config)# end
ap# 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]
ap#
For information on uploading a configuration file using FTP read Uploading an Image File by Using FTP
You can copy configuration files from an rcp server to the router.
Understanding the rcp Username
The rcp protocol requires a client to send a remote username on each rcp request to a server. When you copy a configuration file from the router to a server using rcp, the Cisco IOS software sends the first valid username it encounters in the following sequence:
For the rcp copy request to execute, an account must be defined on the network server for the remote username. If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote 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.
To copy a configuration file from an rcp server to the running configuration or startup configuration, use the following commands beginning in privileged EXEC mode:
Command
Purpose
Step 1 | Router# configure terminal | (Optional) Enters configuration mode from the terminal. This step is required only if you override the default remote username (see Step 2). |
Step 2 | Router(config)# ip rcmd remote-username username | (Optional) Specifies the remote username. |
Step 3 | Router(config)# end | (Optional) Exits global configuration mode. This step is required only if you override the default remote username (see Step 2). |
Step 4 | Router# copy rcp:[[[//[username@]location]/directory]/filename]system:running-config or Router# copy rcp:[[[//[username@]location]/directory]/filename]nvram:startup-config | Copies the configuration file from a rcp server to the running configuration or startup configuration. |
After you have issued the copy 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 file prompt global configuration command.
The following example copies a configuration file named host1-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101, and loads and runs those commands on the router:
Router# copy rcp://netadmin1@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]
Router#
%SYS-5-CONFIG: Configured from host1-config by rcp from 172.16.101.101
The following example specifies a remote username of netadmin1. Then it copies the configuration file named host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101 to the startup configuration.
Rtr2# configure terminal
Rtr2(config)# ip rcmd remote-username netadmin1
Rtr2(config)# end
Rtr2# copy rcp: 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]
Rtr2#
%SYS-5-CONFIG_NV:Non-volatile store configured from host2-config by rcp from 172.16.101.101
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: