In daily network management or maintenance, you may encounter two situations:
The Administrator forgets the password of the device and cannot debug the settings.
When I first arrived at a company responsible for the network, the former Administrator did not leave the company's device password and could not know anything.
In the above cases, the password of the device must be restored. The steps for restoring the vro and vswitch passwords are different.
Vro password recovery principle:
If you forget the vro password, you cannot configure the vro. In this case, you need to restore the vro password.
The vro password is saved in startup-config. You only need to reconfigure the vro password after it is bypassed at startup.
If you want the vro to bypass the startup-config configuration at startup, you only need to modify the value of the Register.
Under normal circumstances, the value of the vro register is 0x2102, and 2102 is converted into a hexadecimal number of 0010.0001.0000.0010. The sixth bit (number from the right) you can control the startup sequence of the vro. If this value is 0, it indicates that startup-config is run. If it is 1, it indicates that the configuration of startup-config is ignored and the vro enters the setup mode. When this parameter is set to 1, the value of the configured register is 0x2142.
Vro password recovery process
Restart the router and press Ctrl + breack to interrupt IOS loading. The router enters Rom monitor mode.
Change the value of the Register to 0x2142, indicating that the startup-config configuration is ignored at startup.
Command: confreg 0x2142
The vro restarts again. Because the register value is changed, the vro cannot load the configuration file, so there will be no logon password.
Restart command: reset
Enter the configuration mode to manually load the configuration file back.
Command: Copy startup-config running-config
Use show run to view the passwords set and change them one by one.
Modify the configuration register value and save the configuration
Command: config-register 0x2102
Password restored.
Vswitch password recovery principle:
The vswitch password is saved in the configuration file config. Text in flash. You can run the Dir command to view the password. You can configure the switch as long as the config. Text File is bypassed during startup. The principle is very simple. As long as you set config-text to the name of the switch, the configuration file will not be loaded, which is equivalent to the switch back to the appearance settings. However, it should be noted that after entering IOS. You need to restore the original configuration and change the password to your own.
Vswitch password recovery procedure
Restart the vswitch. Some vswitches do not have a restart button. You can unplug the vswitch.
When the vswitch is started, press and hold the mode key above the vswitch. When the switch command prompt is displayed on the configuration page, the mode key can be released.
This is an iOS dedicated for fault recovery. Initialize flash in this mode.
Command: flash_init
Change the config. text file name to config. Old.
Command: Rename FLASH: config. Text FLASH: config. Old
Restart vswitch
Command: boot
Now you can go to iOS, but the password has not been restored yet, because the configuration file does not know the password, there are many other parameter settings, you must restore these passwords.
Change the configuration file name back
Command: Rename FLASH: config. Old FLASH: config. Text
Manually load the configuration file
Command: Rename FLASH: config. Text system: Running-config
After the configuration file is loaded, you need to change the password in configuration mode, and then save the configuration to restore the password.
This article is from the "flying Ice" blog, please be sure to keep this source http://wangjunkang.blog.51cto.com/8809812/1440060
Route switch password recovery