The configuration register is a special 16 bits value and can be used to change router behavior in several ways, such as:
▸How the router boots (into ROMmon, NetBoot);
▸Options while booting (ignore configuration, disable boot messages);
▸Console speed (baud rate for a terminal emulation session).
During the boot, router checks its software and the configuration files. To determine these files, router firstly check Configuration Register. According to its value, router determines what to do.
➠ Configuration Register 0x2102:
The default value of Config Register is 0x2102. With Configuration Register 0x2102 value, the router boots from NVRAM and the normal router procedures works. The configuration stored in NVRAM is the startup configuration. So, if we need to bypass this configuration, we can change the default value. Especially during Router Password Recovery, this simple configuration is done.
We can check this value on Cisco routers with “show version” command.
router#show version Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-I-M), Version 12.3(26), RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by cisco Systems, Inc. Compiled Mon 17-Mar-08 15:23 by DRM ROM: ROMMON Emulation Microcode ROM: C2600 Software (C2600-I-M), Version 12.3(26), RELEASE SOFTWARE (fc2) router uptime is 3 minutes System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19 cisco 2621 (MPC860) processor (revision 0x202) with 56320K/9216K bytes of memory. Processor board ID 00000000000 (1880125456) M860 processor: part number 0, mask 0 Bridging software. X.25 software, Version 3.0.0. 2 FastEthernet/IEEE 802.3 interface(s) 128K bytes of non-volatile configuration memory. 8192K bytes of processor board System flash (Read/Write) Configuration register is 0x2102 router#
The factory-default setting for the configuration register is 0x2102. This indicates that the router should attempt to load a Cisco IOS software image from Flash memory and load the startup configuration with a console speed of 9600 baud.
The configuration register can be set from configuration mode using the config-register command. From ROMmon, use the confreg command. To apply the new setting, you must reload the router.
The default value is 0x2102, what does this mean? Let’s break it down:
The 0x part means that we are looking at hexadecimal characters. 2102 is the default setting that tells the router to use a console speed of 9600 baud and to load the Cisco IOS image from flash memory.
How do we know this? You will have to check the Cisco documentation. There you can find the most common settings but also an explanation of what each bit does. We can see that:
bit 13 tells the router to boot the default ROM software if network boot fails.
bit 8 disables break.
bit 1 tells the router to boot the first system image in onboard flash memory.
Bit 5, 11 and 12 are used to change the baud rate. If you don’t touch these settings then the default will be 9600 baud.
➠ Configuration Register 0x2142:
To bypass NVRAM configuration, in other words, to bypass start-up configurataion, we can change Config Register value. Here, the new value that we will set will be Configuration Register 0x2142.
There are two way to change Config Register on a router. This can be done both in Rommon mode and in configuration mode. In Rommon mode, it can be change with “confreg” command. Below, we are changing Configuration Register as 0x2142.
rommon > confreg 0x2142
After this configurationi we should reset the router to use this new value, or to force the router boot through this config register.
The other way is configuring on configuration mode with “config- register” command.
Router# configure terminal
Router(config)# config-register 0x2142
Again, we should reload the router for the new config register to take effect!