One of the more difficult tasks in configuring Cisco routers is when you have to copy the IOS image to Cisco Router from the ROMmon Mode. ROMmon mode is a very basic mode where most of the IOS commands will not work.
If you want to see which commands work in ROMmon mode, you can see them using the ? or help commands while inside ROMmon mode.
Most of the times ROMmon mode is activated if the configuration register of the Cisco router is not set. You only need to set that register value in order to boot properly through the Flash image file. Confreg is the command for setting the correct register value.
But if you want to load a new IOS image in the router Flash, you will need the tftpdnld command for this purpose. Tftpdnld command runs in ROMmon mode and has some requirements before it can be executed. Before going to the requirements, let’s go through the Router connections.
- You will need have a valid Cisco IOS image which is to be loaded in the Flash of the router. The image should be placed inside the TFTP working directory.
- A TFTP server needs to be running on the network from where the router can get the IOS image.
- The PC on which you are operating and the router should be connected to the same network.
- You will need to connect to the router using the console port.
- The first FastEthernet interface of router is used to copy the image from the TFTP server by default.
At ROMmon mode, issue the following commands with variables according to your own environment.
rommon 1> IP_ADDRESS=172.16.17.230
rommon 2> IP_SUBNET_MASK=255.255.255.0
rommon 3> DEFAULT_GATEWAY=172.16.17.254
rommon 4> TFTP_SERVER=172.16.17.235
rommon 5> TFTP_FILE=c2800nm-ipbase-mz.124-3h.bin
There are two things that should be noted. These commands are case sensitive. That means IP_ADDRESS should not be typed as ip_address. It didn’t work for me. And the second thing is that the subnet mask that is accepted is 255.255.255.0. I work with the general subnet mask of 255.255.0.0 which didn’t work and the router gave Illegal IP Address error upon execution of tftpdnld command.
After setting the above variable, you will need to run the tftpdnld -r command. The -r switch will automatically load the IOS image that will be uploaded through tftpdnld command. Before running the tftpdnld command, you may use the set command to see that all the variables are set correctly.
After the copying of the new IOS image is complete, the router will automatically load it into the memory. You may be prompted for the initial configuration if there is no startup-config available to the router.
You may reboot the router by using the reload command and confirm to see if the router boots to the newly installed IOS image by default. Otherwise you will need to configure the configuration register by using the confreg command.
In my case, although the router booted successfully using the new IOS image, but the image was not present in the router flash memory. To see your flash contents, issue the following command:
In ROMmon mode this command will not work. You will need to use the following command instead:
rommon 1>dir flash:
You can use the copy command to copy the new IOS image to the flash once the IOS loaded from ROMmon is running.
router>copy tftp flash
I hope this will be helpful for network administrators working with Cisco equipment. I had hard time finding out all this information that why decided to document it here so that everyone else can find and implement it easily. Your comments will be highly appreciated.
- How to set static IP address and DNS Server using Command Line in Windows 10
- Check VPN Connection Status From Command Line In Windows
- User vs. System Environment Variables: Do User Variables Override System Variables
- Check If a Remote Network Port Is Open Using Command Line
- 5 Ways To Find All Saved Wifi Passwords In Windows 10