Note: It has been known that the SolarWinds TFTP daemon can't handle any IOS files that are above 32MB in size. You may want to use other TFTP daemon instead.
Make sure that your computer specification (the would-be-TFTP-server) meets the TFTP software requirements. Don't worry, usually TFTP software does not require high-end or specialized computer or server. Even Pentium Pro running Windows 95 can be a rock-solid TFTP server. Thanks to aryoba and Phraxos for submitting the links above.
2) You need to make sure you PC 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.
3) Now you need to set the Interface of your router to match the subnet of your machine.
r1(config)#int e0 r1(config)#ip address x.x.x.1 255.255.255.0 r1(config)# no shut r1#
From this point make sure your PC can ping the router interface.
4) Next go to the privilege exec prompt and type
r1#copy tftp flash
It will ask you for 3 things. 1. The IP address of your server. Enter whatever you set your PC IP address to. 2. The name of the IOS source file. Enter the exact name of the IOS file you are trying to install. If its not named the same the transfer will fail. It may ask you for the destination filename as well. 3. It will also ask you if you wish you to erase your flash before copy, say yes
If everything works it will look something like close to this.
r1#copy tftp flash Address or name of remote host []? 10.50.50.100 Source filename []? c2600-i-mz.121-14.bin Destination filename [c2600-i-mz.121-14.bin]?y Accessing t»»ftp://10.50.50.100/c2600-i-mz.121-14.bin... Erase flash: before copying? [confirm]y Erasing the flash filesystem will remove all files! Continue? [confirm]y Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeee ...erased Erase of flash: complete Loading c2600-i-mz.121-14.bin from 10.10.10.2 (via Ethernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 4501480/9001984 bytes]
Verifying checksum... OK (0xAC8A) 4501480 bytes copied in 56.88 secs (80383 bytes/sec)
5) After the IOS transfers you will need to reboot. It will ask if you want to save your config. Depending on if you changed your IP address to a new scheme or just used the same address you may/may not want to save your config.
That was to transfer a IOS from PC --> ROUTER. In order to backup an IOS from ROUTER --> PC Use the same steps only type a different command.This is where you want to make sure the TFTP server can send and receive.
When you have to troubleshoot a router that has no working IOS image on its flash, then you have several choices to revive. They are the following
* Use tftpdnld command on the ROMMON mode * Use dnld command on the ROMMON mode when tftpdnld command is not available due to old version of ROMMON chip * Borrow other router flash memory chip * Borrow other router platform functionality
Follwing is the discussion.
Use tftpdnld command on the ROMMON mode
If you have deleted or installed the wrong IOS (or one that is too big for the memory fitted on your router) then the router may crash or boot to the ROMMON (ROM Monitor) prompt. If the router crashes, restart it and enter the break sequence when it restarts to get to the ROMMON prompt. Once you are inside the ROMMON mode, you can download a new IOS from a TFTP server.
Note that break sequence to enter ROMMON mode varies, which depends on your Terminal Emulator software and Operating System PC you are running. Check out the following link to find out proper break sequence.
As a note that when you don't have yet TFTP server, you can prepare one for free. Free TFTP software can be found here »Cisco Forum FAQ »How to prepare TFTP server with freeware. From protocol perspective, please note that TFTP is completely different to FTP and the two are not interchangeable.
The variables you need to enter directly at the ROMMON prompt are:
Keep in mind that the router and the TFTP server needs to be in the same subnet and have the same default gateway.
Following is an illustration. Let us say that the TFTP server setting are the following. IP address: 10.0.0.25 Subnet Mask: 255.255.255.0 Default Gateway: 10.0.0.1
There is a c1700-k9o3sy7-mz.124-5a.bin file at the TFTP server default directory to copy to the router.
To match the above setting, here are ROMMON setting.
You can check that everything is set up correctly by entering set on its own.
Once you are happy then enter tftpdnld at the ROMMON prompt and your IOS image will be installed from your TFTP server.
N.B. This will erase the flash so any other files stored there will be lost. If you want to boot from the image on the TFTP server without writing it to flash then use the command tftpdnld -r. This will load the IOS on the TFTP server into router memory and boot the router from it but the flash will remain unchanged.
With ROMMON mode case is important so make sure you enter commands and variables in upper or lower case as detailed here.
Some routers that have older version of ROMMON chip don't have tftpdlnd command available. When this is your case, then you could use the dnld command which is serving similar functionality as the tftpdnld command. Using dnld command, you will be downloading working IOS image through RS-232 serial port (i.e CONSOLE or AUX ports). The largest issue to use those serial ports is that the transfer rate is slow compared to the Ethernet-based tftpdnld command transfer rate even though you set the rate to 115200 bps (the "fastest possible" RS-232 serial port transfer rate). Therefore you might want to use the next alternatives to revive routers.
Borrow other router flash memory chip
The key is to keep various router platforms that share the same flash memory chip hardware specification. You can take this advantage to revive routers that has no tftpdnld command on their ROMMON mode. Following is illustration.
You may note that 2500, 2600, 3600, and 4000/4500/4700 series routers share the same flash memory chip hardware specification. The 4000/4500/4700 series routers run older ROMMON chips that has no tftpdnld command available on their ROMMON mode. Fortunately for 2500 series router, Cisco offers newer version ROMMON chips that has tftpdnld command available on their ROMMON mode. With 2600 and 3600 series routers, they come from factory carrying the newer version ROMMON mode already.
Let's say you have to revive a 4500 router. You can pick up a working 2600 router to revive. Download the proper 4500 IOS image into the 2600 router flash memory chip. Note that the 2600 router might complain that IOS image you download is unsuitable for the 2600 router. You can safely ignore the message since you then will move the flash memory chip into the 4500 router to revive the router.
Borrow other router platform functionality
Let's consider similar illustration. You still need to use the 2600 series router to revive the 4500 series router. This time you temporarily remove the 2600 series router flash memory chip and place the 4500 series router flash memory chip into the 2600 series router. Using tftpdlnd command available on the 2600 series router ROMMON mode, download proper 4500 series router IOS image into the flash memory chip. You then move back the 4500 series router flash memory chip to the 4500 series router. You now should be able to boot up the 4500 series router without problem. Don't forget to place back the original 2600 series router flash memory chip to the 2600 series router.
The previous illustration shows that you need to utilize the tftpdnld command available on the 2600 ROMMON mode. This means that the 2600 series router has to boot up or enter into ROMMON mode which is in generally unwanted. The preferable is to revive via CLI mode instead.
When you use a router that has PCMCIA memory slot like 3600 series router, you can revive via CLI mode. Here is how to do it. Verify that the PCMCIA memory card has a working 3600 series router IOS image. Also verify that the 3600 series router is configured to boot up from PCMCIA memory card in case no valid IOS image is found on the flash memory chip.
As previous illustration, you temporarily remove the 3600 series router flash memory chip and place the 4500 series router flash memory chip into the 3600 series router. Note that the 3600 series router will boot up using IOS image found on the PCMCIA memory card. In other words, the 3600 series router boots up into CLI mode as normal. You then download proper 4500 series router IOS image into the flash memory chip from CLI mode using copy tftp flash command. You then move back the 4500 series router flash memory chip to the 4500 series router. You now should be able to boot up the 4500 series router without problem. Don't forget to place back the original 3600 series router flash memory chip to the 3600 series router.
You should have a way to keep working IOS image accessible at all times. From the above illustrations, here are some suggestions.
* Keep identical routers (i.e. the same router model, the same DRAM and flash memory size, the same ROMMON chip, the same IOS image) around to backup each other * Keep several flash memory chips that contain working IOS image for each router platform you have * Keep various router platform that share the same flash memory chip hardware specification * Prefer to use routers that has PCMCIA memory slot to revive routers * Store backup IOS images safely on other media such as CD-ROM, DVD, USB keys, or tape backup
And of course, keep having TFTP server available and maintain your Smartnet contract so you can keep downloading IOS image from Cisco website.
Please note that after performing the squeeze operation, when you copy the image to flash, you will be asked if you want to erase the flash - make sure you answer "no" or you will wipe out the effects of what you have already done.