|
|
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.
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.
| 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 |
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.
| Old Command | New Command |
|---|---|
configure network | copy ftp:[[[//[username[:password]@]location]/directory] |
configure overwrite-network | copy ftp:[[[//[username[:password]@]location]/directory] |
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 |
write terminal | more system:running-config |
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
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
10.0 This command was introduced.
Release
Modification
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
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
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
11.0 This command was introduced.
Release
Modification
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
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.
Command
Description
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
Syntax Description
remote-url Configures the router to boot the configuration file specified by the FTP, rcp, or TFTP URL:
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
10.0 This command was introduced.
Release
Modification
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
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
Changes the default name of the network configuration file from which to load configuration commands. Enables autoloading of configuration files from a network server, use the service config global configuration command.
Command
Description
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
Syntax Description
remote-url Configures the router to boot the configuration file specified by the FTP, rcp, or TFTP URL:
Defaults
The default filename is network-config.
Command Modes
Global configuration
Command History
10.0 This command was introduced.
Release
Modification
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
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
Changes the default name of the host configuration filename from which to load configuration commands. Enables autoloading of configuration files from a network server, use the service config global configuration command.
Command
Description
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
10.0 This command was introduced.
Release
Modification
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
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.
Command
Description
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.
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-configSyntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Command History
10.0 This command was introduced.
Release
Modification
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
partition nvram:startup-config Separates Flash memory into partitions on Class B file system platforms.
Command
Description
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 configSyntax 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
10.0 This command was introduced.
Release
Modification
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
Changes the default name of the host configuration filename from which to load configuration commands. Changes the default name of the network configuration file from which to load configuration commands.
Command
Description
The more command replaces the show file command. See the description of the more command for more information.
The more system:running-config command replaces the show running-config command. See the description of the more command for more information.
The more nvram:startup-config command replaces the show startup-config command. See the description of the more command for more information.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Thu Mar 30 15:24:31 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.