I got myself a second hand Cisco 2811 router. When it arrived, I need to gain access so I have to recover or reset the password to something I know. What best way than to reset it via ROMMON?
I used my laptop and a terminal software. For me, I used my favorite free software putty.exe you can download from this link. I then connect the console of the Router to my laptop via a USB-to-Serial adaptor from Prolific as my laptop do not have a serial port. Once the serial port assigned to the USB-to-Serial adaptor is identied, I set the Putty to connect in serial mode at 9600 baud and 8 bit no parity and 1 stop bit. In my case, my USB-to-Serial adapter was added at com6.
Once I got the laptop to connect to my router, here’s what I did, step-by-step:
- Step 1.
- I Power-cycle the router and press
Ctrl-Breakwithin 60 seconds of the booting the router and put it into ROMMON.
- Step 2.
- I then type
confreg 0x2142at the
rommon 1>prompt to boot from flash without loading the configuration. Then typed
rommon 2>prompt to reboot the router without loading the saved configuration file.
- Step 3.
- I pressed
Ctrl-Cto skip the initial setup procedure.
- Step 4.
Router>prompt. This bring me in enable mode with the
- Step 5.
- If I need the current config file, I would now have typed
copy startup-config running-configto copy non-volatile RAM (NVRAM) into memory and change the password so I can keep the config and change only the password. However, as I only need to reset the password to something I know so I can play around this is router, I skipped this step.
- Step 6.
- I changed to configuration mode by typing
config terminalat the
- Step 7.
- On the
Router(config)#prompt, I entered
enable secretand changed my secret password to a my new password.
- Step 8.
- To make sure the new password will be loaded the next time I boot the router, I need to change the config register so the router will load the configuration with my new password on next reboot. In the
Router(config)#prompt, I typed
confreg 0x2102to tell the router to boot from the saved config.
- Step 9.
- At this stage, I need to save the config, so I pressed
Ctrl-Zand left config mode.
- Step 10.
- Finally, I am ready to save my config and issue a
copy running-config startup-config.
I rebooted the router and was able to login with my new password!