How to Recover a Forgotten Huawei Router Password
After setting up a router, you might not touch its configuration again for a long time. What should you do if you forget the password? This article uses Huawei routers as an example to explain the process.
1. Huawei routers store several different configuration parameters in different memory modules. The internal memory types are as follows: ROM, Flash, Non-Volatile RAM (NVRAM), RAM, and Packet Shared Memory.
2. Operating environment and corresponding configuration register codes. A normal router startup should boot the following programs in sequence. The key to password recovery lies in modifying the configuration register code, which forces the router to call different parameter tables from different memory types for startup.
The valid password is stored in NVRAM. Therefore, the essence of password recovery is to modify the register code so that the router skips the configuration table in NVRAM and boots directly into ROM mode. You can then modify or reset the enable password and terminal password. Since the enable secret password is an encrypted, garbled string, it cannot be recovered鈥攊t can only be overwritten. Once this is done, you restore the configuration register to its original value.
3. Customizing the router startup process. All Huawei routers have a 16-bit software register stored in NVRAM. The router decides where to load the IOS from based on the setting in this register. This register is not saved in the startup-config file, so you cannot see this value using the show startup command. You can see this value using the show version command. Its default value is 0x2102, which indicates that the IOS should be loaded from FLASH.
4. Running the boot routine from ROM. The IOS is loaded based on the register value. By default, it loads from FLASH. The loading priority is: FLASH, TFTP, ROM. It then reads the configuration file in NVRAM. If there is no valid configuration file in NVRAM, it prompts whether to enter SETUP mode.
5. To ensure network security, setting router passwords is necessary. However, if a router password is forgotten, it is a significant loss for the administrator. Through research and practice, a method for recovering Huawei router passwords has been found. This method is applicable to the 1500, 1600, and other series of Huawei routers. Inside a Huawei router, there is a Configuration register value. You can see it in the last line after using the show version command. It consists of 4 hexadecimal digits, such as 0x2102. In binary, this is represented as 0010,0001,0000,0010. The last four bits are called the Boot field, and the router decides from where to activate the IOS system based on the value of the Boot field.
6. The 6th bit is generally 鈥?鈥? If it is 鈥?鈥?(0x2142), it means that when the router boots, it bypasses the startup configuration file and enters Startup mode. At this point, you can directly enter privileged EXEC mode without a password prompt. Therefore, by modifying the value of the 6th bit, you can achieve the goal of password recovery. Use the console cable that came with the router to connect the PC’s COM port to the router’s console port. On the PC, go to 鈥淪tart 鈫?Programs 鈫?Accessories 鈫?Communications 鈫?HyperTerminal鈥?and create a new connection using the COM serial port. Set the port parameters to: Bits per second: 9600bps, Data bits: 8, Parity: None, Stop bits: 1, Flow control: None. Power on the router and press the Enter key to display the router