In Cisco networking, the ROMMON (ROM Monitor) mode is a low-level operating mode that provides limited functionality, allowing administrators to troubleshoot or recover the device in case of issues such as a missing or corrupt IOS image. One of the most common tasks performed in ROMMON mode is retrieving an IOS image from a TFTP server to restore or upgrade a Cisco device’s operating system.
In this blog post, we’ll walk through the process of connecting a Cisco device to a TFTP server in ROMMON mode and loading a new IOS image onto the device.
Before you begin, ensure that you have the following:
c2800nm-advipservicesk9-mz.124-12.bin.Make sure the Cisco device and your PC/TFTP server are in the same subnet for the TFTP transfer to succeed.
If your Cisco device is stuck in a boot loop or you want to manually load a new IOS image, you first need to access ROMMON mode. Here's how you can get to ROMMON mode:
rommon 1 >.To connect to the TFTP server, you need to configure the network settings, such as the device’s IP address, subnet mask, default gateway, and the TFTP server’s address.
rommon 1 > IP_ADDRESS=192.168.1.1 rommon 2 > IP_SUBNET_MASK=255.255.255.0 rommon 3 > DEFAULT_GATEWAY=192.168.1.254 rommon 4 > TFTP_SERVER=192.168.1.10 rommon 5 > TFTP_FILE=c2800nm-advipservicesk9-mz.124-12.bin
Let’s break down what each of these commands does:
IP_ADDRESS=192.168.1.1: Assigns an IP address to the Cisco device. This should be in the same subnet as your TFTP server.IP_SUBNET_MASK=255.255.255.0: Configures the subnet mask.DEFAULT_GATEWAY=192.168.1.254: Sets the default gateway. Optional if both devices are in the same subnet.TFTP_SERVER=192.168.1.10: IP address of the TFTP server.TFTP_FILE=c2800nm-advipservicesk9-mz.124-12.bin: Name of the IOS image file.Once the settings are configured, start the transfer with:
rommon 6 > tftpdnld
You will be prompted with a confirmation message. Type yes or y to proceed.
The Cisco device will contact the TFTP server, retrieve the image file, and load it into memory.
Monitor the console output. If the download is successful, the screen will show a message confirming that the transfer is complete and the image is loaded.
To boot the device using the downloaded IOS image, use the following command:
rommon 7 > boot flash:c2800nm-advipservicesk9-mz.124-12.bin
After successfully booting into the IOS, configure the device to boot from this image automatically in future reloads:
Router# configure terminal Router(config)# boot system flash:c2800nm-advipservicesk9-mz.124-12.bin Router(config)# exit Router# write memory
This ensures that the router will consistently boot using the correct IOS image on future restarts, as we have configured the boot image and saved the configurations.
Recovering or upgrading your Cisco device’s IOS image using a TFTP server in ROMMON mode is a practical and essential skill for network administrators. By carefully configuring the network parameters, initiating the image transfer, and setting the correct boot variable, you can restore a non-booting device and ensure proper functionality.