Cisco Routers - Saving Configuration
Restore the factory defaults. Do a minimalistic setup. Store the configuration so that it is preserved between power cycles. Upload the Cisco router configuration to an external file server and restore it from a backup file.
Restoring Factory Defaults
- Issue "show version" command, the configuration register should be 0x2102. You could get something similar to this:
Cisco IOS Software, C181X Software (C181X-ADVIPSERVICESK9-M), Version 12.4(6)T10, RELEASE SOFTWARE (fc4)
. . .
Configuration register is 0x2142
- Pay attention to the "Configuration register". It should be 0x2102. If the configuration register is different (e.g. it is 0x2142 or anything else), then your box will not restore its configuration upon restart. This can be fixed - see Subsection Setting the Correct Configuration Register below.
- Execute these commands:
configure terminal
config-register 0x2102
end
- Erase the existing configuration:
- Issue "reload" command, do not save the configuration, confirm (i.e. press Enter key next to the "[confirm]" message without typing anything).
Simple initial configuration
- Execute the following dialog, by answering questions as shown below:
Would you like to enter the initial configuration dialog? [yes/no] yes
Would you like to enter basic management setup? [yes/no] yes
Enter host name [Router] R1
Enter enable secret: (something)
Enter enable password: (something-else)
Enter virtual terminal password: (something-else)
Configure SNMP Network Management? no
Enter interface name used to connect to the
management network from the above interface summary: FastEthernet0
Use the 100 Base-TX (RJ-45) connector?: yes
Operate in full-duplex mode: yes
Configure IP on this interface? yes
IP address for this interface: 172.17.120.21
Subnet mask for this interface: 255.255.255.0
[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
[press "2"]
Press RETURN to get started!
[press "Enter"]
Saving configuration
- To save configuration locally (to NVRAM), type this command:
copy running-config startup-config
- To upload configuration to an TFTP server, enter: For this command to work, feel free to install "3CDaemon" Windows software (or any Linux TFTP server), and disable firewall.
- If you have changed configuration and issue "reload" command, they may ask, if you want to save the configuration (this would change the starting configuration). If you do not wish to save anything (and want to return properly to the initial setup), say "no".
Setting the Correct Configuration Register
One of the reasons why the router can bypass the startup configuration stored in NVRAM is that the configuration register has not been set properly.
- Display the startup configuration: It should display the configuration you saved before the power-off. If you recognize this configuration as the correct one, but it still is not loaded upon startup, the fouled-up configuration register settings are the likely cause.
- Set configuration register to 0x2102:
Router#configure terminal
Router(config)#config-register 0x2102
Router(config)#end
Router#show version
Configuration register is 0x2142 (will be 0x2102 at next reload)
- Type command "reload". If you do not want to replace your existing "startup-config" (configuration file) with something else, do NOT save config.
Links
- http://www.cisco.com/en/US/products/hw/routers/ps233/products_tech_note09186a00800a65a5.shtml - Router losing its configuration during reboot.
- http://pages.swcp.com/~jgentry/topo/cisco.htm - Cisco Router Configuration Tutorial.
Tags: