cc/td/doc/product/software/ios121/121cgcr/fun_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuration File Commands

Configuration File Commands

This chapter provides detailed descriptions of the commands used to load and copy configuration files. Configuration files contain commands entered to customize the function of the Cisco IOS software.

For configuration information and examples, refer to the "Modifying, Downloading, and Maintaining Configuration Files" chapter in the Cisco IOS Configuration Fundamentals Configuration Guide.

Flash Memory File System Types

Cisco platforms use one of three different Flash memory file system types. Some commands are supported on only one or two file system types. This chapter notes commands that are not supported on all file system types.

See Table 23 to determine which Flash memory file system type your platform uses.


Table 23: Flash Memory File System Types
Type Platforms

Class A

Cisco 7000 family, C12000, LightStream1010

Class B

Cisco 1003, Cisco 1004, Cisco 1005, Cisco 2500 series, Cisco 3600 series, Cisco 4000 series, Cisco AS5200

Class C

Cisco MC3810, disk0 of SC3640

Replaced Commands

Some commands in this chapter have been replaced by new commands. Older commands continue to provide the same functionality in the current release, but are no longer documented. Support for these commands will cease in a future release.

Table 24 maps the old commands to their replacements.


Table 24: Mapping Old Commands to New Commands
Old Command New Command

configure network

copy ftp:[[[//[username[:password]@]location]/directory]
/filename] system:running-config

configure overwrite-network

copy ftp:[[[//[username[:password]@]location]/directory]
/filename] nvram:startup-config

copy rcp running-config

copy rcp:[[[//[username@]location]/directory]/filename] system:running-config

copy running-config rcp

copy system:running-config rcp:[[[//[username@]location]/directory]/filename]

copy running-config startup-config

copy system:running-config nvram:startup-config

copy running-config tftp

copy system:running-config tftp:[[[//location]/directory]/filename]

copy tftp running-config

copy tftp:[[[//location]/directory]/filename] system:running-config

copy tftp startup-config

copy tftp:[[[//location]/directory]/filename] nvram:startup-config

erase startup-config

erase nvram:

show configuration

more nvram:startup-config

show file

more

show running-config

more system:running-config

write erase

erase nvram:

write memory

copy system:running-config nvram:startup-config

write network

copy system:running-config ftp:[[[//[username
[:password]@]location]/directory]/filename]

write terminal

more system:running-config

boot buffersize

To modify the buffer size used to load configuration files, use the boot buffersize global configuration command. Use the no form of this command to return to the default setting.

boot buffersize bytes

no boot buffersize

Syntax Description

bytes

Specifies the size of the buffer to be used. There is no minimum or maximum size that can be specified.

Defaults

Buffer size of the NVRAM

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Normally, the Cisco IOS software uses a buffer the size of the system NVRAM to hold configuration commands read from the network. You can increase this size if you have a very complex configuration.

Examples

The following example sets the buffer size to 64000 bytes:

boot buffersize 64000

boot config

To specify the device and filename of the configuration file from which the router configures itself during initialization (startup), use the boot config global configuration command. This command is only available on Class A file system platforms. Use the no form of this command to remove the specification.

boot config file-url

no boot config

Syntax Description

file-url

URL of the configuration file. The configuration file must be an ASCII file located in either NVRAM or a Flash file system.

Defaults

NVRAM (nvram:)

Command Modes

Global configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

This command is only available on Class A file system platforms.

You set the CONFIG_FILE environment variable in the current running memory when you use the boot config command. This variable specifies the configuration file used for initialization (startup).


Note When you use this global configuration command, you affect only the running configuration. You must save the environment variable setting to your startup configuration to place the information under ROM monitor control and to have the environment variable function as expected. Use the copy system:running-config nvram:startup-config command to save the environment variable from your running configuration to your startup configuration.

The software displays an error message and does not update the CONFIG_FILE environment variable in the following situations:

The router uses the NVRAM configuration during initialization when the CONFIG_FILE environment variable does not exist or when it is null (such as at first-time startup). If the software detects a problem with NVRAM or the configuration it contains, the device enters setup mode. See the "Setup Command" chapter in this publication for more information on the setup command facility.

When you use the no form of this command, the router returns to using the NVRAM configuration as the startup configuration.

Examples

In the following example, the first line specifies that the router should use the configuration file named router-config located in internal Flash memory to configure itself during initialization. The second line copies the specification to the startup configuration, ensuring that this specification will take effect upon the next reload.

Router (config)# boot config flash:router-config
Router (config)# end
Router# copy system:running-config nvram:startup-config
 

The following example instructs a Cisco 7500 series router to use the configuration file named router-config located on the Flash memory card inserted in the second PCMCIA slot of the RSP card during initialization. The second line copies the specification to the startup configuration, ensuring that this specification will take effect upon the next reload.

Router (config)# boot config slot1:router-config
Router (config)# end
Router# copy system:running-config nvram:startup-config

Related Commands
Command Description

show bootvar

Displays the contents of the BOOT environment variable, the name of the configuration file pointed to by the CONFIG_FILE environment variable, the contents of the BOOTLDR environment variable, and the configuration register setting.

boot host

To change the default name of the host configuration filename from which to load configuration commands, use the boot host global configuration command. Use the no form of this command to restore the host configuration filename to the default.

boot host remote-url

no boot host remote-url

Syntax Description

remote-url

Configures the router to boot the configuration file specified by the FTP, rcp, or TFTP URL:

  • ftp:[[[//[username[:password]@]location]/directory]/filename]

  • rcp:[[[//[username@]location]/directory]/filename]

  • tftp:[[[//location]/directory]/filename]

Defaults

The router uses its host name to form a host configuration filename. To form this name, the router converts its name to all lowercase letters, removes all domain information, and appends -confg.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Use the service config command to enable the loading of the specified configuration file at reboot time. Without this command, the router ignores the boot host command and uses the configuration information in NVRAM. If the configuration information in NVRAM is invalid or missing, the service config command is enabled automatically.

The network server will attempt to load two configuration files from remote hosts. The first is the network configuration file containing commands that apply to all network servers on a network. Use the boot network command to identify the network configuration file. The second is the host configuration file containing commands that apply to one network server in particular. Use the boot host command to identify the host configuration file.

Loading a Configuration File Using rcp

The rcp software requires that a client send the remote username on each rcp request to the network server. If the server has a directory structure (such as UNIX systems), the rcp implementation searches for the configuration files starting in the directory associated with the remote username.

When you load a configuration file from a server using rcp, the Cisco IOS software sends the first valid username in the following list:

    1. The username specified in the file-URL, if a username is specified.

    2. The username set by the ip rcmd remote-username command, if the command is configured.

    3. The router host name.


Note An account for the username must be defined on the destination server. If the network administrator of the destination server did not establish an account for the username, this command will not execute successfully.

Load a Configuration File Using FTP

The FTP protocol requires a client to send a remote username and password on each FTP request to a server. The username and password must be associated with an account on the FTP server. If the server has a directory structure, the configuration file or image copied from the directory associated with the username on the server. Refer to the documentation for your FTP server for more details.

When you load a configuration file from a server using FTP, the Cisco IOS software sends the first valid username in the following list:

    1. The username specified in the boot host command, if a username is specified.

    2. The username set by the ip ftp username command, if the command is configured.

    3. Anonymous.

The router send the first valid password in the following list:

    1. The password specified in the boot host command, if a password is specified.

    2. The password set by the ip ftp password command, if the command is configured.

    3. 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.

Examples

The following example sets the host filename to wilma-confg at address 192.168.7.19:

boot host tftp://192.168.7.19/usr/local/tftpdir/wilma-confg
service config

Related Commands
Command Description

boot network

Changes the default name of the network configuration file from which to load configuration commands.

service config

Enables autoloading of configuration files from a network server, use the service config global configuration command.

boot network

To change the default name of the network configuration file from which to load configuration commands, use the boot network global configuration command. Use the no form of this command to restore the network configuration filename to the default.

boot network remote-url

no boot network remote-url

Syntax Description

remote-url

Configures the router to boot the configuration file specified by the FTP, rcp, or TFTP URL:

  • ftp:[[[//[username[:password]@]location]/directory]/filename]

  • rcp:[[[//[username@]location]/directory]/filename]

  • tftp:[[[//location]/directory]/filename]

Defaults

The default filename is network-config.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

When booting from a network server, routers ignore routing information, static IP routes, and bridging information. As a result, intermediate routers are responsible for handling FTP, rcp, or TFTP requests. Before booting from a network server, verify that a server is available by using the ping command.

Use the service config command to enable the loading of the specified configuration file at reboot time. Without this command, the router ignores the boot network command and uses the configuration information in NVRAM. If the configuration information in NVRAM is invalid or missing, the service config command is enabled automatically.

The network server will attempt to load two configuration files from remote hosts. The first is the network configuration file containing commands that apply to all network servers on a network. Use the boot network command to identify the network configuration file. The second is the host configuration file containing commands that apply to one network server in particular. Use the boot host command to identify the host configuration file.

Loading a Configuration File Using rcp

The rcp software requires that a client send the remote username on each rcp request to the network server. If the server has a directory structure (such as UNIX systems), the rcp implementation searches for the configuration files starting in the directory associated with the remote username.

When you load a configuration file from a server using rcp, the Cisco IOS software sends the first valid username in the following list:

    1. The username specified in the file-URL, if a username is specified.

    2. The username set by the ip rcmd remote-username command, if the command is configured.

    3. The router host name.


Note An account for the username must be defined on the destination server. If the network administrator of the destination server did not establish an account for the username, this command will not execute successfully.

Load a Configuration File Using FTP

The FTP protocol requires a client to send a remote username and password on each FTP request to a server. The username and password must be associated with an account on the FTP server. If the server has a directory structure, the configuration file or image copied from the directory associated with the username on the server. Refer to the documentation for your FTP server for more details.

When you load a configuration file from a server using FTP, the Cisco IOS software sends the first valid username in the following list:

    1. The username specified in the boot network command, if a username is specified.

    2. The username set by the ip ftp username command, if the command is configured.

    3. Anonymous.

The router send the first valid password in the following list:

    1. The password specified in the boot network command, if a password is specified.

    2. The password set by the ip ftp password command, if the command is configured.

    3. 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.

Examples

The following example changes the network configuration filename to bridge_9.1 and uses the default broadcast address:

boot network tftp:bridge_9.1
service config 
 

The following example changes the network configuration filename to bridge_9.1, specifies that rcp is to be used as the transport mechanism, and gives 172.16.1.111 as the IP address of the server on which the network configuration file resides:

boot network rcp://172.16.1.111/bridge_9.1
service config 

Related Commands
Command Description

boot host

Changes the default name of the host configuration filename from which to load configuration commands.

service config

Enables autoloading of configuration files from a network server, use the service config global configuration command.

configure

To enter global configuration mode, use the configure privileged EXEC command. You must be in global configuration mode to enter global configuration commands.

configure {terminal | memory}

Syntax Description

terminal

Executes configuration commands from the terminal.

memory

For all platforms except Class A Flash file system platforms, executes the commands stored in NVRAM.

For the Class A Flash file system platforms, executes the configuration specified by the CONFIG_FILE environment variable.

Command Modes

Privileged EXEC

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

If you do not specify the terminal or memory keyword, the Cisco IOS software prompts you for the source of configuration commands. If you specify the terminal keyword, the software executes the commands you enter at the system prompts.

On all platforms except Class A Flash file system platforms, if you specify the memory keyword, the software executes the commands located in NVRAM.

On Class A Flash file system platforms, if you specify the memory keyword, the router executes the commands pointed to by the CONFIG_FILE environment variable. The CONFIG_FILE environment variable specifies the location of the configuration file that the router uses to configure itself during initialization. The file can be located in NVRAM or any of the Flash file systems supported by the platform.

When the CONFIG_FILE environment variable specifies NVRAM, the router executes the NVRAM configuration only if it is an entire configuration, not a distilled version. A distilled configuration is one that does not contain access lists.

To view the contents of the CONFIG_FILE environment variable, use the show bootvar command. To modify the CONFIG_FILE environment variable, use the boot config command and then save your changes by issuing the copy system:running-config nvram:startup-config command.

After you enter the configure command, the system prompt changes from <router-name># to <router-name>(config)#, indicating that the router is in global configuration mode. To leave global configuration mode and return to the privileged EXEC prompt, type end or press Ctrl-Z.

Examples

In the following example, a router is configured from the terminal:

Router# configure
 
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# 
 

In the following example, Class A Flash file system router executes the commands pointed to by the CONFIG_FILE environment variable:

configure memory

Related Commands
Command Description

boot config

Specifies the device and filename of the configuration file from which the router configures itself during initialization (startup). This command is only available on Class A file system platforms.

copy system:running-config nvram:startup-config

Replaces the write memory command.

partition system:running-config

Separates Flash memory into partitions on Class B file system platforms.

partition nvram:startup-config

show bootvar

Displays the contents of the BOOT environment variable, the name of the configuration file pointed to by the CONFIG_FILE environment variable, the contents of the BOOTLDR environment variable, and the configuration register setting.

configure overwrite-network

The copy {ftp-url | rcp-url | tftp-url} nvram:startup-config command replaces the configure overwrite-network command. See the copy command in the "Router Memory Commands" chapter for more information.

service compress-config

To compress startup configuration files, use the service compress-config global configuration command. To disable compression, use the no form of this command.

service compress-config

no service compress-config


Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

After you configure the service compress-config command, the router will compress configuration files every time you save a configuration to the startup configuration. For example, when you enter the copy system:running-config nvram:startup-config command, the running configuration will be compressed before storage in NVRAM.

If the file compression completes successfully, the following message is displayed:

Compressing configuration from configuration-size to compressed-size
[OK]
 

If the boot ROMs do not recognize a compressed configuration, the following message is displayed:

Boot ROMs do not support NVRAM compression Config NOT written to NVRAM
 

If the file compression fails, the following message is displayed:

Error trying to compress nvram
 

One way to determine whether a configuration file will compress enough to fit into NVRAM is to use a text editor to enter the configuration, then use the UNIX compress command to check the compressed size. To get a closer approximation of the compression ratio, use the UNIX compress -b12 command.

Once the configuration file has been compressed, the router functions normally. At boot time, the system recognizes that the configuration file is compressed, uncompresses it, and proceeds normally. A partition nvram:startup-config command uncompresses the configuration before displaying it.

To disable compression of the configuration file, enter configuration mode and specify the no service compress-config command. Then, exit global configuration mode and enter the copy system:running-config nvram:startup-config command. The router displays an OK message if it is able to successfully write the uncompressed configuration to NVRAM. Otherwise, the router displays an error message indicating that the configuration is too large to store. If the configuration file is larger than the physical NVRAM, the following message is displayed:

##Configuration too large to fit uncompressed in NVRAM Truncate configuration? [confirm]
 

When the file is truncated, commands at the end of the file are erased. Therefore, you will lose part of your configuration. To truncate and save the configuration, type Y. To not truncate and not save the configuration, type N.

Examples

In the following example, the configuration file is compressed:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# service compress-config
Router(config)# end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router# copy system:running-config nvram:startup-config
Building configuration...
Compressing configuration from 1179 bytes to 674 bytes
[OK]

Related Commands
Command Description

partition nvram:startup-config

Separates Flash memory into partitions on Class B file system platforms.

service config

To enable autoloading of configuration files from a network server, use the service config global configuration command. Use the no form of this command to restore the default.

service config

no service co
nfig

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled, except on systems without NVRAM or with invalid or incomplete information in NVRAM. In these cases, autoloading of configuration files from a network server is enabled automatically.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Usually, the service config command is used in conjunction with the boot host or boot network command. You must enter the service config command to enable the router to automatically configure the system from the file specified by the boot host or boot network command.

The service config command can also be used without the boot host or boot network command. If you do not specify host or network configuration filenames, the router uses the default configuration files. The default network configuration file is network-confg. The default host configuration file is host-confg, where host is the host name of the router. If the Cisco IOS software cannot resolve its host name, the default host configuration file is router-confg.

Examples

In the following example, a router is configured to autoload the default network and host configuration files. Because no boot host or boot network commands are specified, the router uses the broadcast address to request the files from a TFTP server.

service config
 

The following example changes the network configuration filename to bridge_9.1, specifies that rcp is to be used as the transport mechanism, and gives 172.16.1.111 as the IP address of the server on which the network configuration file resides:

boot network rcp://172.16.1.111/bridge_9.1
service config 

Related Commands
Command Description

boot host

Changes the default name of the host configuration filename from which to load configuration commands.

boot network

Changes the default name of the network configuration file from which to load configuration commands.

show file

The more command replaces the show file command. See the description of the more command for more information.

show running-config

The more system:running-config command replaces the show running-config command. See the description of the more command for more information.

show startup-config

The more nvram:startup-config command replaces the show startup-config command. See the description of the more command for more information.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Mar 30 15:24:31 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.