If you have ever experienced the ROMmon mode problem, you probably came across one of the following:
- configuration register forced the router to go to ROMmon mode during the boot process
- corrupt image (IOS) on Flash (indicated by bad_checksum message)
- router was unable to find the IOS (either on Flash or TFTP server)
- an IOS on a router has been (accidentally) deleted from flash
- you did not upgrade the amount of DRAM before upgrading the IOS
- you ”accidentally” entered a break key sequence to the console of your router, found yourself in ROMmon mode and do not know how to get out of it
- or you experienced a physical layer problem, like I did
In this article, I will describe the problem of a router stuck in ROMmon mode, together with my recent experience.
For those of you that are not familiar with the term ROMmon (ROM monitor) mode, it is a bootstrap program that initializes the hardware and boots the Cisco IOS software when you power on or reload a router or switch.
Also, Cisco Internetwork Operating System (IOS) is the system software in Cisco devices, and is usually (and by default) stored in a memory area called flash as a .bin file (it can also be stored on a TFTP server). Flash memory provides non-volatile storage, which means that the content of the memory is not lost when the device loses power or reloads. When you power up a Cisco router or switch, it first begins the power-on self-test (POST) to ensure that the device functions properly, and then it looks for the IOS from flash memory. The IOS image is decompressed, which can be seen as a string of hashtags (#), and loaded into DRAM.
NOTE: Older Cisco routers ran the IOS directly from flash, but current models copy the IOS into DRAM for execution.
If you ever face the situation in which your router (or switch) goes to ROMmon mode during the boot process, you should first check the value of the configuration register.
The value indicates the behaviour of the router and is set to 0x2102 by default, which means that the router will attempt to load a Cisco IOS image from flash memory and load the startup configuration file from NVRAM. This value can be changed from the console of the router. If you are a novice, exploring the capabilities of your new device, you could accidentaly change this value by entering confreg 0x2120 instead of 0x2102, which will result in the router stuck in ROMmon mode when reloaded or powered on.
There are few commands available in ROMmon mode and you can view them by typing ? at the rommon> command prompt.
To check the value of your configuration register from the ROMmon prompt, enter the confreg command:
As you can see from the output above, the configuration register is set to a value that forces the router to go into the ROMmon mode each time it is reloaded. To solve this problem, you should change the value of the configuration register as shown below:
So, if your router is stuck in ROMmon mode, you should know the value of your configuration register, based on which you can determine the router behavior and eventually solve the problem.
The problem in my case was that the router (Cisco 2650) could not boot – it went into ROMmon mode immediately upon starting it. So my first, but wrong assumption was that there was something wrong with the IOS, so I decided to change it. Long story short, after spending few hours trying to get an IOS without bad checksum message on flash, the router AGAIN could not boot. Then I assumed that something could be wrong with DRAM – as previously said, the router should decompress the image to DRAM. Eventually I realized that I did not consider the possibility something could be wrong with DRAM physically, which can also be the case. The DRAM card was physically detached from the slot (which was the result of my clumsy handling the device) and I had to put it so it fits. Next time I face some networking issue, I will probably start troubleshooting the physical layer first!
If you would like to know more about the IOS of the router, maybe how to recover a router from corrupt or missing software image, download it from a TFTP server or via Xmodem, or something else, feel free to leave your suggestions and comments.
NOTE: If you are preparing for the CCNA Routing and Switching exam, you should know what the ROMmon mode is, where can the IOS be stored, what are the features of the IOS and understand the boot sequence. You also need to know about the physical layer components of a router or switch.
Until next time!