Table Of Contents
Configuration File Commands
Flash Memory File System Types
Replaced Commands
boot buffersize
boot config
boot host
boot network
configure
configure overwrite-network
service compress-config
service config
show derived-config
show file
show running-config
show startup-config
Configuration File Commands
This chapter provides detailed descriptions of the commands used to load and copy configuration files in Cisco IOS Release 12.1. 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 Release 12.1 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
The boot buffersize global configuration command no longer works.
Executing this command has no effect on the system. Using this command will not generate CLI errors; the boot buffersize command syntax is still allowed to be entered at the CLI and in configuration files in order to accommodate existing configuration scripts.
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:
•
You specify nvram: as the file system, and it contains only a distilled version of the configuration. (A distilled configuration is one that does not contain access lists.)
•
You specify a configuration file in the filename argument that does not exist or is not valid.
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#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#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:
Router(config)#boot host tftp://192.168.7.19/usr/local/tftpdir/wilma-confg
Router(config)#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
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
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:
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
In the following example, Class A Flash file system router executes the commands pointed to by the CONFIG_FILE environment variable:
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
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
%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
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 config
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.
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
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 derived-config
To display the composite results of all the configuration commands that apply to an interface, including commands that come from sources such as static templates, dynamic templates, dialer interfaces, and authentication, authorization, and accounting (AAA) per-user attributes, use the show derived-config command in privileged EXEC mode.
show derived-config [interface type number]
Syntax Description
interface type number
|
(Optional) Displays the derived configuration for a specific interface. If you use the interface keyword, you must specify the interface type and the interface number (for example, interface ethernet 0).
|
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.1
|
This command was introduced.
|
Usage Guidelines
Configuration commands can be applied to an interface from sources such as static templates, dynamic templates bound by resource pooling, dialer interfaces, AAA per-user attributes and the configuration of the physical interface. The show derived-config command displays all the commands that apply to an interface.
The output for the show derived-config command is nearly identical to that of the show running-config command. It differs when the configuration for an interface is derived from a template, a dialer interface, or some per-user configuration. In those cases, the commands derived from the template, dialer interface, and so on, will be displayed for the affected interface.
If the same command is configured differently in two different sources that apply to the same interface, the command coming from the source that has the highest precedence will appear in the display.
Examples
The following examples show sample output for the show running-config and show derived-config commands for serial interface 0:23 and dialer interface 0. The output of the show running-config and show derived-config commands is the same for dialer interface 0 because none of the commands that apply to that interface are derived from any sources other than the configuration of the dialer interface. The output for the show running-config and show derived-config commands for serial interface 0:23 differs because some of the commands that apply to serial interface 0:23 come from dialer interface 0.
Router# show running-config interface Serial0:23
Building configuration...
Current configuration :296 bytes
description PRI to ADTRAN (#4444150)
isdn switch-type primary-dms100
isdn incoming-voice modem
isdn calling-number 4444150
peer default ip address pool old_pool
Router# show running-config interface Dialer0
Building configuration...
Current configuration :257 bytes
peer default ip address pool new_pool
ppp authentication pap chap callin
Router# show derived-config interface Serial0:23
Building configuration...
Derived configuration :332 bytes
description PRI to ADTRAN (#4444150)
isdn switch-type primary-dms100
isdn incoming-voice modem
isdn calling-number 4444150
peer default ip address pool new_pool
ppp authentication pap chap callin
Router# show derived-config interface Dialer0
Building configuration...
Derived configuration :257 bytes
peer default ip address pool new_pool
ppp authentication pap chap callin
Related Commands
Command
|
Description
|
show running-config
|
Displays the contents of the currently running configuration file or the configuration for a specific interface.
|
show file
The more command replaces the show file command. See the description of the more command for more information.
show running-config
To display the configuration information currently running on the router, the configuration for a specific interface, or map class information, use the show running-config EXEC command.
show running-config [interface | map-class]
Syntax Description
interface
|
Displays interface specific configuration information.
|
map-class
|
Displays dialer or Frame Relay map class information.
|
Defaults
The show running-config command without any arguments or keywords displays all of the configuration information for the terminal.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
The show running-config interface command is useful when there are multiple interfaces and you want to look at the configuration of a specific interface. The show running-config map-class command is useful to display dialer or Frame Relay map class information.
Examples
The following example shows the configuration for serial interface 1:
router#show running-config interface serial 1
Building configuration...
end
Related Commands
Command
|
Description
|
boot config
|
Specifies the device and filename of the configuration file from which the router configures itself during initialization (startup).
|
configure
|
Enters global configuration mode.
|
copy running-config
|
Copies the running configuration to the startup configuration.
|
copy startup-config
|
Copies the startup configuration file (specified by the CONFIG_FILE environment variable) to a Flash memory card.
|
show startup-config
|
Displays the contents of NVRAM (if present and valid) or shows the configuration file pointed to by the CONFIG_FILE environment variable.
|
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.