Course contents

Chapter 1: Cisco IOSLesson 6 of 10

The configuration register

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
Values you will seeValue; Effect. 0x2102: Normal: load IOS using boot system commands or the first image in flash, then the startup configuration 0x2142: Boot IOS normally but ignore the startup configuration in NVRAM (used for password recovery) 0x2100: Boot field 0: stop at the ROMMON prompt 0x2101: Boot field 1: boot the image stored in ROM, on models that have oneValueEffect0x2102Normal: load IOS using boot system commands or the first image in flash,then the startup configuration0x2142Boot IOS normally but ignore the startup configuration in NVRAM (used forpassword recovery)0x2100Boot field 0: stop at the ROMMON prompt0x2101Boot field 1: boot the image stored in ROM, on models that have one

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
0x2102 broken into its partsBits; Hex; Meaning in 0x2102. Boot field (bits 3 to 0): 0x2 Use boot system commands, otherwise the first image in flash Bit 6: 0x0040 is 0 Read the startup configuration from NVRAM Bit 8: 0x0100 is 1 Ignore the Break key after the boot has started Bits 11 and 10: 0x0000 Console speed 9600 baud Bit 13: 0x2000 is 1 Boot ROM software if a network boot failsBitsHexMeaning in 0x2102Boot field (bits 3 to0)0x2Use boot system commands, otherwisethe first image in flashBit 60x0040 is 0Read the startup configuration fromNVRAMBit 80x0100 is 1Ignore the Break key after the boothas startedBits 11 and 100x0000Console speed 9600 baudBit 130x2000 is 1Boot ROM software if a network bootfails

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.