Although in practice it’s not actually done very often, you’ll want to know how to back up the Cisco IOS software to a TFTP server. In reality, one often downloads the software from the Cisco web site and places it on a TFTP server instead of copying it from a router or switch to the TFTP server. Regardless, you should be aware of the process before you take the CCNA test.
Unfortunately, we can’t use Cisco IOU to demonstrate this so I’ll be utilizing a Cisco 2610XM router (which I’ve named “LASVEGAS”) from my home Cisco lab. Just like the last couple of articles, you’ll also need a TFTP server if you’re following along.
Luckily, the process of backing up the IOS software is nearly the same as backing up the configuration files. We’ll use the copy command just like we did before and, while the “source” of the copy will be different, the “destination” (TFTP server) will remain the same.
You may recall from Introduction to Cisco Devices and Cisco IOS that the IOS software is stored in “flash” while the configuration files are stored in NVRAM. We can view the contents of the flash memory by issuing the show flash: command:
LASVEGAS# show flash: System flash directory: File Length Name/status 1 13660800 c2600-ipbasek9-mz.124-25b.bin [13660864 bytes used, 36146492 available, 49807356 total] 49152K bytes of processor board System flash (Read/Write) LASVEGAS#
There’s one file, “c2600-ipbasek9-mz.124-25b.bin”, currently stored in flash memory and it is 13,660,800 bytes in size. We can see that a total of 13,660,864 out of 49,807,356 bytes of flash are currently being used, leaving us with 36,146,492 bytes of available space in flash memory.
We’ll back up this Cisco IOS file, commonly called an image, to our TFTP server. I’ve configured the FastEthernet 0/0 interface on LASVEGAS with the IP address 192.0.2.83 and subnet mask 255.255.255.0. It is on the same network as the TFTP server, which has been assigned the IP address 192.0.2.235.
Use ping to verify connectivity between the router and TFTP server and then issue the copy flash: tftp: command in privileged exec mode to begin the backup process. The router will ask us a few questions and then begin copying the software image:
LASVEGAS# copy flash: ftp: Source filename ? c2600-ipbasek9-mz.124-25b.bin Address or name of remote host ? 192.0.2.235 Destination filename [c2600-ipbasek9-mz.124-25b.bin]? .!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 13660800 bytes copied in 105.121 secs (129953 bytes/sec) LASVEGAS#
At this point, the image has been successfully backed up to our TFTP server. If you view the files on your TFTP server, you should see that the image is now there:
Copying an IOS image to a TFTP server isn’t something you’ll do often, but it’s always a good idea to keep a backup copy of any images that you’re using… just in case. If a router fails and you have to replace it, you’ll usually want to install the same version of IOS software on the new one. Having that software image already downloaded and available on a TFTP server can save a lot of time when deploying the replacement hardware.
Next up, we’ll take a look at transferring images the other way — copying them from a TFTP to a device — when we upgrade the IOS software.