How to recover a Cisco router
if the flash and internal memory is erased.
NOTE : All the commands are written in UPPERCASE case, but you SHOULD type them in lower cases when working with the router. UPPERCASE is only to show you that it's a command that you need to type in.
1. Connect the router using a Console cable and connect to it using Hyper-terminal or your favorite application
2. Once In the router, You would end up with rommon 1>, If you get this, you're good.
3. Now type CONFREG 0x2142 to get the router in recovery mode, and then type RESET to reset the router and settings to take effect.
4. Once the router is reset, type CONFREG and hit enter, You will be prompted with many options,
match as below :
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
enable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
disable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
enable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
disable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
(select 115200bps, else your upload will be really slow)
change the boot characteristics? y/n [n]:
change the boot characteristics? y/n [n]:
5. Type RESET to reset the router, NOTE : you will not be able to connect to the console after reboot, as you were already connect earlier with a baud rate of 9600.
SO now disconnect,and select 115200 as the baud rate on your console connection and connect again.
6. Now you need to get the complete file name of the IOS that you need to upload to the router.
Ex : c870-advipservicesk9-mz.124-15.T3.bin
7. Copy the complete filename.
8. Now go back to the router console, and type :
XMODEM -c c870-advipservicesk9-mz.124-15.T3.bin and hit enter
9. You will be presented with as below :
All existing data in bootflash will be lost!
Invoke this application only for disaster recovery. Do you wish to continue?
y/n [n]: y
Ready to receive file c870-advipservicesk9-mz.124-15.T3.bin ...
10. Now go back in HyperTerminal and click on Transfer and Send File, in the next window, select the IOS file that you need to upload to the router and under protocol, select Xmodem and click
Send
11. Wait till the transfer is finished, and Download Complete appears on your console window
12. The router will take some time to flash the IOS, once done type CONFREG 0x2102 and hit Enter
13. Then type RESET to reset the router and the settings to take effect.
14. You again will not be able to connect to the router as you were connected with a baud rate of 115200. Disconnect and reconnect with a baud rate of 9200 as the new flash will reset the previous setting.
If you did everything right, you should see the normal boot up of the router. If you are really lucky, then you might right away boot into the router with all your configuration intact, so the next thing to do would be just to deploy the router back to it's original location.
If you did not get your configuration, then simply do the configuration again and you're done.
No comments:
Post a Comment