Set config register and backup configs on cisco router

In the previous article I finally connected to the Internet through the new router. After opening a few web pages to confirm that everything is normal, I decided to put the router in a no-obstructive corner and arrange the power and network cables. There was a power outage so the router rebooted after everything is in position. After that, I lost the internet access!

connect to management terminal and use

show running-config

command to view the configuration, I found that the previous configuration has all disappeared. At the end of the configuration, I have written the configuration to startup-config. In theory, since it is called "startup-config", it should be automatically loaded at startup. There must be something wrong with some configs.
Finally, it turns out that there is something called config register in the router. The config register is 16 bits in total, used to control the startup process of the router by setting each bit in it.

Configuration register

Use

show version

command to view the router information, which contains the value of the current config register.
My router shows:

Configuration register is 0x2142

According to some documents, definition of the 6th bit is

If it is 1, ignore the startup-config in NVRAM and do not load the configuration file.

Put it in the hexadecimal value above, that is 4.
So I need to modify it with the following command:

enable
config terminal
config-register 0x2102
exit

Use the show version command again to view the registers, it shows

Configuration register is 0x2142 (will be 0x2102 at next reload)

At this time, reboot it by a hard powercycle, or use the reload command, the config register will be set to new value and configurations in startup-config should be loaded automatically.

Manage configuration files

If there are multiple configurations that need to be backed up and managed, or if you want to edit the configuration file more intuitively in the text editor on a PC, you can upload the configuration to the PC or download a configuration file to the router via tftp (yes, the one used to install IOS).

Assume that the PC address running the tftp service is 192.168.1.1
Upload the current configuration to tftp:

copy running-config tftp:
Address or name of remote host []? 192.168.1.1
Destination filename []? Backup_running_config

After the upload is complete, a file called backup_running_config will be generated in the tftp working directory.

Downloading the configuration to the router is similar:

copy tftp: running-config
Address or name of remote host []? 192.168.1.1
Source filename []? Backup_running_config
Destination filename [running-config]? Startup-config

The brackets are the default parameters given by the system. You can also download the configuration to running-config by simply press the enter key, but if you made some changes to the configuration file, the download may fail due to conflicts with the current working configuration. So it is recommended to download to startup-config first, and then use the reload command to reload.

About TFTP

So far we have used tftp twice. T in tftp is an abbreviation for trivial.

The main differences between trivial-ftp and ftp are:

TFTP uses UDP transmission, while FTP uses TCP.
TFTP could transfer only one file at a time.
TFTP Does not require any security authentication.

Ads