cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4133
Views
20
Helpful
5
Replies

Configuration Register codes queries

AdamBudzinski
Level 1
Level 1

hi guys,

i would like to clarify some of the Configuration Register codes please. 

 

 

Router bootup process, as far I understand consists of 3 stages :

 

1. POST is performed first, next the bootstrap program is loaded from ROM in to RAM for CPU execution. Main tasks of bootstrap are locating the IOS and Startup Configuration. 

2. The bootstrap program searches for the IOS file (peer default on Flash). If it fails it will load a limited IOS.

3. Next the bootstrap program searches for the Startup Config file ( default location NVRAM) . If it fails to locate it, it will enter Setup Mode. 

 

This happens (if got it right ,if not please free to correct me if wrong) when the Configuration Register value is set to 0x2101. 

Now when I look at the following document http://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/50421-config-register-use.html

I don't understand for example the code 0x2101 and it's meaing :

 

 

  • Boots into bootstrap
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rate

 

what does it mean "Boots into bootstrap" ? Next they say "Boots into ROM if initial boot fails" so if the router won;t be able to boot into bootstrap it will boot into ROM (do they mean the limited IOS) ? 

 

please assist

 

 

Thank you and best regards

 

Adam 

 

 

1 Accepted Solution

Accepted Solutions

Hi Adam,

1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ? 

Correct. ROMMON is not an IOS and in general, it does not understand the configuration commands in the startup-config.

2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load  the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this. 

I believe that this depends both on the configuration register whose boot field must be from 2 to F inclusive, and on the configuration of the boot system commands in the configuration file. Some ROMMONs perhaps have access to the startup-config to at least interpret these commands, some other ROMMONs I am sure of store this setting in a separate environment variable that is set whenever you do copy running-config startup-config and which is accessible to ROMMON. I believe that the docs I've referenced in my previous post are mentioning a possibility of defining a list of IOSes that are to be attempted to be loaded, and if one fails, perhaps the ROMMON will try to load the next one including TFTP if the boot system says so.

But I do not remember seeing real routers set to their default configuration attempting to contact TFTP when the IOS load has failed. My personal experience (which is not to be taken as a rule!) is that these routers simply give up trying to load the IOS from FLASH and fall back to ROMMON.

3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ? 

Commands boot and reset can be used for that.

Best regards,
Peter

View solution in original post

5 Replies 5

Peter Paluch
Cisco Employee
Cisco Employee

Hi Adam,

1. POST is performed first, next the bootstrap program is loaded from ROM in to RAM for CPU execution. Main tasks of bootstrap are locating the IOS and Startup Configuration. 

Instead of calling it a "bootstrap" even though that might be an official Cisco name, I would rather call it simply ROM Monitor, or ROMMON. The "bootstrap" has a rather specific meaning which, however, is not clearly used even in Cisco documentation itself - they use it to describe different and differing pieces of software related to booting a device. It's a mess.

This is probably the best explanation of the different boot <something> names I've found;

https://supportforums.cisco.com/discussion/9709036/boot-bootldr-boot-bootstrap-and-boot-system-command#comment-1688901

2. The bootstrap program searches for the IOS file (peer default on Flash). If it fails it will load a limited IOS.

Yes, however, on many recent platforms, there is no limited IOS present on a device. If loading IOS from FLASH fails, the router will drop back into ROMMON mode (this is the basic environment stored in ROM but it is not IOS - you could compare it to BIOS in a certain way).

3. Next the bootstrap program searches for the Startup Config file ( default location NVRAM) . If it fails to locate it, it will enter Setup Mode. 

Usually, this is not done by bootstrap (or whatever that is) but rather by the IOS that has booted. I'd describe the sequence for recent platforms as follows:

  • POST checks the hardware and starts the ROMMON.
  • Depending on the value of config register and other variables, ROMMON tries to load the IOS from FLASH. If the IOS cannot be loaded, the device returns back to ROMMON.
  • After the IOS has been loaded and run, it looks for configuration file in NVRAM and tries to parse it. If it does not find it, it starts the initial configuration dialog.

what does it mean "Boots into bootstrap" ? Next they say "Boots into ROM if initial boot fails" so if the router won;t be able to boot into bootstrap it will boot into ROM (do they mean the limited IOS) ? 

That text is outdated. It was valid for very old platforms such as Cisco 2500 series routers that ran IOS directly from their FLASH instead of copying it into RAM and unpacking it, and that had a special limited IOS (called RxBoot) stored directly in their ROM. During normal operation, the IOS in the FLASH could not be upgraded because its code was constantly accessed. To upgrade the IOS on these platforms, you had to reboot using the configuration register value of 0x2101 where the RxBoot IOS was loaded, leaving the FLASH unused. You could then upgrade the IOS in the FLASH, put the register back to 0x2102, reload, and start the new IOS from the FLASH.

See here:

http://www.cisco.com/c/en/us/support/docs/routers/2500-series-routers/10252-13.html

On newer platforms, there is no RxBoot nor any other IOS stored in the ROM. Setting the configuration register to 0x2101 usually tells these routers to boot the first IOS in the FLASH they can find, and values from 0x2102 up to 0x210F direct the routers to observe the boot system commands in the configuration file.

If you want your head to start spinning, read this:

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/sys-image-mgmt/configuration/15-mt/sysimgmgmt-15-mt-book/sysimgmgmt-rebooting.html

Best regards,
Peter

Hi Peter,

 

Thank you taking time to answer my question and yes in fact, it's a mess (in netacad they call it bootstrap) but I got the understanding for it now. 

 

Just let me ask you this.

1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ? 

 

2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load  the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this. 

3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ? 

 

ok, your link provide the answer already :) 

Best regards and have a great day Peter ! 

 

Adam 

Hi Adam,

1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ? 

Correct. ROMMON is not an IOS and in general, it does not understand the configuration commands in the startup-config.

2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load  the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this. 

I believe that this depends both on the configuration register whose boot field must be from 2 to F inclusive, and on the configuration of the boot system commands in the configuration file. Some ROMMONs perhaps have access to the startup-config to at least interpret these commands, some other ROMMONs I am sure of store this setting in a separate environment variable that is set whenever you do copy running-config startup-config and which is accessible to ROMMON. I believe that the docs I've referenced in my previous post are mentioning a possibility of defining a list of IOSes that are to be attempted to be loaded, and if one fails, perhaps the ROMMON will try to load the next one including TFTP if the boot system says so.

But I do not remember seeing real routers set to their default configuration attempting to contact TFTP when the IOS load has failed. My personal experience (which is not to be taken as a rule!) is that these routers simply give up trying to load the IOS from FLASH and fall back to ROMMON.

3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ? 

Commands boot and reset can be used for that.

Best regards,
Peter

Thank you Peter ! 

 

Your answers helped me a lot ! 

 

Best Regards

 

Adam 

Adam,

Always a pleasure!

Best regards,
Peter

Review Cisco Networking for a $25 gift card