Managing Configuration Files

Your configuration commands, as well as some default configuration commands are stored in the configuration file. No hard disk or diskette storage exists on Cisco routers therefore; the configuration file is stored in memory. The configuration files can also be stored as ASCII text files anywhere exterior to the router using TFTP or FTP. Cisco routers support a number of types of memory. This includes:

• RAM, which is sometimes called DRAM for dynamic random-access memory, is used by the router in the same way it is used by any other computer: for storing data being used by the processor. The active configuration file, running-config, which is the configuration file that the router uses during operation, is stored in RAM.

• ROM, or read-only memory, stores a bootable IOS image, which is not typically used for normal operation. It contains the code that is used to boot the router and allows the router to access the IOS image.

• Flash memory, which can be either an EEPROM or a PCMCIA card, stores fully functional IOS images and is the default location where the router accesses its IOS at boot time. Flash memory also can be used to store configuration files on some Cisco routers.

• NVRAM, which is nonvolatile RAM, stores the initial or startup configuration file, startup-config. All these types of memory, except RAM, are permanent memory.

When the router first comes up, the router copies the stored configuration file from NVRAM into RAM, so the active and startup configuration files are identical at that point. The show running-config and show startup-config commands are used to verify the active and startup configuration files respectively. You can use the copy running-config startup-config command to overwrite the current startup configuration file with the current active configuration file. The copy command can be used to copy files in a router, most typically a configuration file, or a new version of the IOS Software. The most basic method for moving configuration files in and out of a router is by using a TFTP server. The copy command is used to copy configuration files among RAM, NVRAM, and a TFTP server. The syntax for copy command used to copy configuration files among RAM, NVRAM, and a TFTP server specifies the source location and the destination of the configuration file as in:

copy source destination

The source and the destination parameters can be running-config, startup-config, or tftp for RAM, NVRAM, and a TFTP server respectively. However, the source and the destination parameters cannot be the same. Thus, the following syntax copies the configuration from RAM to NVRAM, overwriting the current startup configuration file with the active configuration file:

copy running-config startup-config

The copy command does not always replace the existing file that it is copying. Any copy command option moving a file into NVRAM or a TFTP server replaces the existing file, however, any copy into RAM works by adding the commands to the active configuration file. Thus, if you change the active configuration file and then want to revert to the startup configuration file, you must use the reload command, which reboots the router.

Two commands can be used to erase the contents of NVRAM. These are the write erase command, which is the older command, and the erase startup-config command, which is the newer command.

Bookmark this page | Make this your Homepage