What 0x2102 and 0x2142 mean, the boot field, how to read it with show version and how to change it.
Intermediate · 8 min read
Technical definition
Configuration register is a 16-bit value stored on a Cisco router that controls how it boots: which image to load, whether to read the startup configuration, and how the console behaves. The usual value is 0x2102.
What the register controls
On a Cisco router the register is held in non-volatile memory and read by ROMMON during boot. You usually write it in hexadecimal, such as 0x2102. The lowest hex digit is the boot field; the other bits are individual switches.
Values you will see
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Only the boot field (the last hex digit) and bit 6 (0x0040) matter for most work. Other bits adjust the console speed and the Break key.
Reading the bits in 0x2102
0x2102 broken into its parts
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Setting bit 6 turns 0x2102 into 0x2142. That one bit is the whole password-recovery trick.
Viewing and changing it
Example commands and output on this page were written from Cisco IOS documentation and generally described behaviour. They were not captured from a live device, so prompts and details can differ on your platform and version.
Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show version
...
Configuration register is 0x2102
Example output, shortened. After a change, the last line reads: Configuration register is 0x2102 (will be 0x2142 at next reload).
configure terminal
config-register 0x2142
end
reload
Sets the register to ignore NVRAM at the next boot. Restore 0x2102 afterwards, or the router will ignore its configuration at every reload.
ROMMON
ROMMON is the small bootstrap program that runs before IOS. From its prompt (rommon 1 >) you can set the register with confreg 0x2142, then reset. The exact commands vary by platform, so check the model's documentation.
Test yourself
Predict · scenario 1
A router shows Configuration register is 0x2102. What does it do at boot?
Predict · scenario 2
Which register value ignores the startup configuration for password recovery?
Predict · scenario 3
You changed the register to 0x2142 and saved nothing else. After the next reload, what do you do to get back to normal?
FAQ
What is the default value?
0x2102. The 2 in the lowest hex digit tells the router to use boot system commands, then the first IOS image it finds in flash. The 0x0100 and 0x2000 bits and 9600 baud console are also part of that value.
Why 0x2142 for password recovery?
The 0x2142 value sets bit 6 (0x0040), which tells the router to ignore the contents of NVRAM at boot. It starts with no configuration, so passwords in the startup configuration are not enforced.
Does the new value take effect immediately?
No. config-register changes the stored value, which is read at the next reload. show version displays both: the current value and the value that will apply.