Router:
1. Console port connect to PC COM port.
2. Open the ScecureCTR or other software , e.g. Putty.
3. When loading IOS image ,use Ctrl+C to interrupt the progress to got ROMMON model
(this model is like the grub prompt interface of linux)
rommon>
4. confreg 0x2142, This command tell router don’t load startup-config next time
restart 。
5.Restart the router manually,or use reload to restart.
6 Execute the following command when the router on(after IOS image loaded and the
setup process show.enter no to terminate the process.)
enable enter the privileged EXEC mode
copy start run copy the startup-config to running-config
conf t enter the configuration mode
ena sec **** enable secret set as ****,change the password.
config-register 0x2102 restore the register value,the value maybe
different,so you better got the value before change to 0x2142 use show version
end or Ctrl+C exit from the configuration mode
copy run start or wr save all the config to NVRAM.
Boot or Reload boot the IOS or reboot the router.it seems that we
don’t need to restart the router.
Switch:
1. Connect the switch RJ-45 console port and the PC’s COM port.
2. launch the remote connect software, e.g. SecureCRT,Putty.
3.Power on the switch device,and press the mode button until the port status LEDs are down.enter the ROMMON model.
flash_init init the flash file system.
load _helper
dir flash: change the work directory to flash: and display the files.
rename flash:config.txt flash:config.back rename the configure file name to let the switch can’t find
the file”config.txt”.
boot boot the IOS image and the operation system will can’t
find the configure file. the setup dialog will process.
NO enter NO to ignore the dialog
enable enter the privileged EXEC mode
rename flash:config.back flash:config.text restore the file name of the config.txt
copy flash:config.text system:running-config copy the startup-config to running-config,
conf t enter the configuration mode
ena sec **** reset enable password
end exit from the configuration mode
copy run start save the running-config to flash.(not
NVRAM,it’s different from router)
reload reboot the system,but maybe this step is
not necessary
In ALL.the purpose of all the methods used is to ignore/skip the configuration file.because the password is stored in the configuration file.
本文出自 “奋斗的菜鸟” 博客,谢绝转载!