Router Password recovery:
Preparation: A PC is connected to a router with a console line
How it works: Fix the Register value if the forgotten password is locked outside the router
The default register value is 0x2102 (off), and to restore the password you need to turn this value on to tell the router to ignore the contents of the NVRAM. The value for opening the configuration register is 0x2142
Steps:
The router uses HyperTerminal for the first time (Hyper terminal or SECURECRT)
1 Press the Ctrl+break key at the same time (perform an interrupt to interrupt the boot order)
2 Modifying register values (modified to 0x2142)
Rommon 1>confreg 0x2142
Rommon 2>reset (isp/2600 series router, input I or reset heavy-duty router)
View modified configuration: Show Sartup-config Running-config
3 Change Password:
ROUTER#CONFG T
Router (config) #enable secret Cisco
4 Resetting the Register value and overloading the router
Router#config T
Router (config) #config-register 0x2102
Router (config) #exit
Router#copy running-config Startup-config (or write)
Router#reload
Switch password recovery:
Preparation: a PC and a switch are connected with the console line
How it works: Switch password recovery fundamentals: Change the Config.text file name in the switch to a different file name, and then enter the configuration mode to change the password, and finally restore the Config.text file name
Steps:
1. Power off first
2. Power off while holding down the mode key on the switch until the display light on the switch is no longer flashing (5~10s), then release
3. At this point, enter
Switch:flash_init (Initialize Flash)
Switch:load_helper
Switch:dir Flash (view flash)
Switch:rename Flash: (/) Config.text Flash: (/) Config.old (modified name)
Switch:dir Flash (again to see if the file name in the Flash is modified)
Switch:reset (restart switch)
4. Then go to:
Switch>
Switch>enable
Switch#config T
Switch (config) #enable password cisco (change password)
Switch (config) #exit
Switch#rename Flash: (/) Config.old Flash: (/) Config.text
Switch#copy Config.text Running-config
cisco-Router switch password recovery