cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
38260
Views
0
Helpful
0
Comments

 

Introduction

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.

Downloading the Configuration File by Using TFTP

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

Downloading a Configuration File by Using FTP

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

 

Copying a Configuration File from an rcp Server to the Router

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:

  1. The username specified in the copy EXEC command, if a username is specified.
  2. The username set by the ip rcmd remote-username global configuration command, if the command is configured.
  3. The remote username associated with the current tty (terminal) process. For example, if the user is connected to the router through Telnet and was authenticated through the username command, the router software sends the Telnet username as the remote username.
  4. The router host name.

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.

Copying a Configuration File from the rcp Server to the Router

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.

Copy rcp Running-Config Example

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

Copy rcp Startup-Config Example

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

Reference

Managing Configuration Files

Getting Started

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: