Configuration files

A networking device has to be customized for use though the definition of specific parameters that define how the device should function. These parameters include the name of the router (hostname), interface IP addresses, the routing protocols and their parameters such as area IDs or autonomous system numbers. These parameters are configured by the network administrators and are stored in the form of configuration files on these devices.

Configuration files contain the Cisco IOS software commands used to customize the functionality of the Cisco device running an IOS image. The commands are translated and executed by the IOS when the system is booted, and parameters from these commands are used to customize the router functionality.

An IOS device on initial boot starts up without any specific parameters. These parameters are configured by the network administrators by entering into the configuration mode of the IOS CLI as described in the preceding section. These changes are generally executed either immediately when they are entered, or when the user exits the configuration mode. Newer platforms and IOS releases also have the feature of a configuration commit, where the configurations are executed only when the commit command is executed. The changes made to the router configuration are stored in the RAM of the device. The configuration being used by the IOS at a given point in time, is called the running configuration.

Since the running configuration is stored in the RAM, the configuration gets deleted when the device is powered off. Hence, a copy of the configuration needs to be stored in a Non-volatile memory such as NVRAM, PCMCIA cards, or the bootflash memory. This copy of the stored configuration is known as the startup configuration. The startup configuration file is copied into the RAM during the router boot process, and becomes the running configuration. During the operation of the network, it is possible that the configuration needs some changes. These configuration changes are done through the configuration mode on the router and are made directly to the running configuration. These changes can be lost if the device undergoes a power cycle for any reason. Hence, it is important to save the changes and copy the running configuration file into the startup configuration file. This will ensure that any changes made after the last power on of the device are persistent across power cycles. The command used to copy the running configuration to the startup configuration is copy running-config startup-config, which is a Privileged EXEC mode command.