Like a system, a router also requires an operating system called Internetworking Operating System (IOS) to function. If the operating system of a system can be corrupted due to a number of reasons, then why not an IOS be corrupted. Yes, it might be. So, how will you restore Cisco IOS?
You can recover Cisco IOS using the TFTP server. Since the IOS resides in the flash memory of the router, so first, you need to take the backup of IOS flash file on TFTP server and then you can restore the IOS from the flash file you have stored on TFTP server. In this post, we will explain, how to restore Cisco IOS from ROMMON mode using the TFTP server.
In order to restore Cisco IOS from ROMMON mode using TFTP server, we will use the Cisco Packet Tracer simulator. The same steps can be used to restore Cisco IOS for a physical router. First, create the following topology in Cisco Packet Tracer and configure the TCP/IP settings as mentioned in the topology.
Steps to Restore Cisco IOS from ROMMON Mode
- First, execute the show flash command to verify the name of the flash file and copy the file name.
- Next, execute the following commands to take the backup of the flash file on TFTP server.
Router#copy flash tftp Address or name of remote host ? < type tftp server IP address > Source filename ? < paste the flash file name > Destination filename [c2600-i-mz.122-28.bin]? < press enter to accept the default file name > Do you want to overwrite? [confirm] < press enter to overwrite the file >
- The following figure shows how to take backup of the flash file on TFTP server.
- Now, we have taken the backup of flash file, next, execute the following command to delete the flash file:
- Next, execute the following command to verify that flash file is deleted.
- The following figure shows that the flash file has been deleted.
- Now, execute the reload command. The router will be entered in the ROMMON mode automatically as there is no flash memory.
- In the ROMMON mode, execute the following commands to recover Cisco IOS from ROMMON mode:
rommon 1 > IP_ADDRESS=192.168.1.1 rommon 2 > IP_SUBNET_MASK=255.255.255.0 rommon 3 > DEFAULT_GATEWAY=192.168.1.100 rommon 4 > TFTP_SERVER=192.168.1.100 rommon 5 > TFTP_FILE=c2600-i-mz.122-28.bin rommon 6 > TFTP_CHACKSUM=0 rommon 7 > tftpdnld
- The following figure shows how to recover Cisco IOS from ROMMON mode. Refer the topology to understand the addresses used in this step.
- The flash file will be loaded on the router from TFTP server. Once the flash file is restored, execute the following command to reset the router.
- The router will be rebooted and the User EXEC mode will be displayed as shown in the following figure.
In this post, we have explained how to restore Cisco IOS from ROMMON mode using TFTP server. We would love to hear your feedback. You may also subscribe us to get notified of the upcoming posts.