The IOS can also be restored from a TFTP session. Downloading the image using TFTP from ROMmon is the fastest way to restore an IOS image to the router. This is done by setting environmental variables and then using the tftpdnld command.
Since the ROMmon has very limited functions, no configuration file is loaded during boot. The router therefore has no IP or interface configuration. The environmental variables provide a minimal configuration to allow for the TFTP of the IOS. The ROMmon TFTP transfer works only on the first LAN port so a simple set of IP parameters are set for this interface. To set a ROMmon environment variable, the variable name is typed, then the equal sign (=), and the value for the variable (VARIABLE_NAME=value). For example, to set the IP address to 10.0.0.1, type IP_ADDRESS=10.0.0.1 at the ROMmon prompt.
Note: All variable names are case sensitive.
The minimum variables required to use tftpdnld are:
- IP_ADDRESS – The IP address on the LAN interface
- IP_SUBNET_MASK – The subnet mask for the LAN interface
- DEFAULT_GATEWAY – The default gateway for the LAN interface
- TFTP_SERVER – The IP address of the TFTP server
- TFTP_FILE – The IOS filename on the server
To check the ROMmon environment variables, the set command can be used.
Once the variables are set for the IOS download, the tftpdnld command is entered with no arguments. The ROMmon will echo the variables and then a confirmation prompt will appear with a warning that this will erase the flash.
As each datagram of the IOS file is received, a “!” will be displayed. When the complete IOS file has been received, the flash will be erased and the new IOS image file written. Appropriate messages will be displayed as the process is completed.
When the new image is written into flash and the ROMmon prompt is displayed, the router can be restarted by typing i. The router should now boot from the new IOS image in flash.
No comments:
Post a Comment