how-to block ads
1. If your equipment is Cisco 801-805 Router that uses Tiny ROM, then please use the following guide instead.
Cisco IOS Software Upgrade Procedure for Cisco 801, 802, 803, 804, and 805 Series Routers
2. This FAQ assumes that your router is able to boot up normally. When your router is unable to boot up normally, please scroll down to the bottom of the page for suggestions.
* Under any circumstances, DO NOT delete working IOS image off the router flash memory unless the image has been backed up to server (TFTP or FTP server) or you have working IOS image stored in the server. Later description will show you how to back up the image
* There is a chance that the router loses power or loses connection during the IOS image transfer (copy from or to server) which may cause the router to have no working IOS image to boot up from. When such incident happens, you will be glad that you first back up the IOS image to server before deleting working IOS image off the router flash memory.
Need to make backup image? Or need to download image? Try the following
* Backup image to TFTP server
* Download image from TFTP server
For those routers or switches that have USB port, you can use USB Flash drive to backup or to download IOS images as follows
* Backup image to USB Flash drive
* Download image from USB Flash drive
Once you have both old and new IOS images in USB Flash drive, you can either save copies to your computer or to some storage such as DVD, tape backups, or some FTP servers.
Upgrade or Download Router IOS image to Flash Memory
To transfer an IOS from PC to ROUTER, the following conditions must meet
* IOS image the router to have is in working condition since corrupted IOS image won't do any good
* IOS image the router to have meets the router DRAM and flash memory size. Keep in mind that maximize router DRAM and flash memory size before IOS image upgrade is always a good idea to make sure the router can fit the IOS image file and can run any IOS image version. Check out the following FAQ to find memory specification
»Cisco Forum FAQ »Cisco equipment memory chip specification
* When the router is still running the older IOS image version, backup the older IOS image to TFTP or FTP server (the next steps explain this further). This backup should perform before any IOS image upgrade. In case of unsuccessful IOS image upgrade (due to too-small DRAM size, corrupted IOS image, etc.) it is always a good to know that you are able to reverse the change by putting back the older IOS image (the one that you backup earlier) to the router
In order to transfer an IOS image typically you need to run a TFTP program on your computer. Your computer will then become TFTP server during the IOS image transfer. A simple FREE one can be found here
»Cisco Forum FAQ »How to prepare TFTP server
Note that when the router is running newer IOS image, IOS image transfer using FTP server is also supported. Using TFTP server instead of using FTP server is more common however for image transfer. The rest of this FAQ shows the use of TFTP transfer however.
It is recommended that the PC (the TFTP server) is on the same subnet as your router. Easiest way is to assign a static IP to your machine [x.x.x.100 255.255.255.0]. If there is a switch between the PC (the TFTP server) and the router, then also make sure both PC and router are within the same VLAN or the same broadcast domain.
When your network is using hub instead of switch, then there might be some collision that severely degrade the TFTP traffic flow; hence screwing up the download or upload process. In this case, it is highly suggested to use either a switch or simply back-to-back connection using crossover cable between the router and the PC.
Next go to the privilege exec prompt and type
r1#copy tftp flash
The command will ask you of four things.
1. The IP address of your server. Enter whatever PC IP address is.
2. The name of the IOS source file. Enter the exact name of the IOS file you are trying to install (including the sub-directory name and path if the file is not in the root or current directory). If you enter incorrect name or if the file is not in the right directory, the transfer will fail.
3. It may ask you for the destination filename as well. This indicates where you like the new IOS file stored and whether you like to keep the same IOS filename. Typically you choose to keep the same IOS filename and store the IOS file in current router's flash directory. Should you decide to store the file in different directory, you need to specify the exact directory path and name. You also need to specify the new IOS filename should you decide to have different filename.
4. It will also ask you if you wish you to erase your flash before copy.
Read This Before Proceeding:
This erase means that you will erase the entire contents of memory flash by formatting the flash. Keep in mind that you cannot recover any of those contents (including the current IOS image) once the flash is erased or formatted.
You may want to erase the flash when at least one of following meets.
* Memory flash size is too small to hold both the current and the new IOS images
* You need to use the entire flash memory space that is currently partitioned to fit the new IOS image (note: to remove the partition, check out this FAQ »Cisco Forum FAQ »How do I remove a flash partition?)
* There was partition in the flash that was just been removed, and you need to start fresh by reformat the flash
* There was bad sector in the flash that you want to remove by reformat the flash
* The flash memory is brand new and/or has never been used/formatted
When none of the above fits your situation, then you might not need to format the flash. Holding both current and new IOS images in the same flash is recommended whenever possible. By having both images, it would be easier to flip back to the old image when there is boot problem with the new image since by default, the router boots up using the first valid IOS image the router can find.
If you must erase the flash, then make sure that you already backup all flash contents to server; especially the current IOS image.
When everything works and you say yes when you are asked to erase the flash, then the display will look something like this.
r1#copy tftp flash
After the IOS transfers you will need to reboot the router to active the new IOS image. The router then may ask if you want to save the router configuration. Depending on whether you changed your IP address to a new scheme or just used the same address you may or may not want to save your config.
Backup Router IOS image to TFTP Server
In order to backup an IOS from ROUTER to PC, use the similar steps. However on Step 4, you need to enter a different command. This is where you want to make sure the TFTP server can send and receive.
r1#copy flash tftp
The rest of steps are applicable still.
With anything, sometimes things don't work as expected. In a case of the copy command does not work, one of following could be the culprit.
* Incorrect IOS image file name to use
* Incorrect TFTP software installation
* Incorrect TFTP software setting
* IOS image file is stored in different directory or folder of the TFTP server
* Cable or routing issue between router and TFTP server
* If the router and the TFTP server is not connected directly (i.e. there is a patch panel, switch or router in between), verify the intermediate device/connection
* Incorrect IP address or subnet mask of either router or TFTP server
* Buggy TFTP software
Assuming no firewall or nothing blocks ICMP echo, you could try to ping both ways from router to TFTP server and from TFTP server to router. If you could ping both ways, then at least routing between router and TFTP server is good. Should it be the case; then the problem could not be either cable or routing (not TCP/IP Layer-1, 2, or 3 issues), hence you should consider something higher up in the TCP/IP Layer such as file- or directory- related issue.
There is also a possibility of a firewall issue that disallow TFTP traffic flow. First thing to confirm is to make sure you know where the active firewall is. This firewall can be a dedicated appliance (such as Cisco ASA firewall) or simply some software firewall installed on your TFTP server. If your TFTP server is some Windows machine, make sure all Windows Firewall is turned off. Note that some antivirus software may also block TFTP traffic, hence turning off the software at least temporarily is suggested.
If for some reason you cannot deactivate the firewall, then make sure the firewall allow TFTP traffic flow between the router and the TFTP server. When there is NAT/PAT in place on the firewall, make sure you use proper IP address that the firewall understand.
1. Should there be two IOS images on the router's flash where one is new and another is old image, you need to specify which IOS image the router should use as primary boot file. The command is following.
boot system flash:[ENTER NEW IOS IMAGE FILENAME HERE]
boot system flash:c2600-i-mz.121-14.bin
where the c2600-i-mz.121-14.bin is the new IOS image full filename
You also have to make sure that there is only one boot command in the router configuration, which is the one you just put in. When there are other boot command in place, you need to remove them.
Please save the router configuration afterwards before proceeding to router reload to commit the configuration change.
2. Should you decide to use FTP instead of TFTP to transfer IOS image, the copy command is similar which is the following.
copy ftp flash
copy flash ftp
You may need to specify or configure the FTP username and password on your router, in addition to FTP server IP address and necessary sub directories.
3. In some older router with older ROMMON firmware or older IOS image, transferring IOS image across multiple routing hops is not behaving as expected. The routing path may be correct, however for some reason the IOS image transfer is unsuccessful. Using a hub instead of switch to put between router and server may also create unsuccessful IOS image file transfer. Therefore it is preferable to have the TFTP server directly connects to the router or at least you use a reliable switch to connect the TFTP server and the router in addition to have the TFTP server and the router to be in the same broadcast domain.
»Backing Up Cisco 2800 What would I be doing wrong
»Loading New IOS image to c1841
When The Router Does Not Boot
Note that this tip is applicable when the router is currently able to bootup normally. When the router does not boot normally or does not boot at all, then check out the next tip.
»Cisco Forum FAQ »Deleted/Corrupted/Wrong Type/No IOS image and router won't boot
Feedback received on this FAQ entry: