Backing up Cisco IOS image files using FTP is one of the subjects included in the CCNA syllabus. It is also a skill every network administrator should have. In this guide, you will learn how to back up Cisco switch/router images using an FTP server. The procedure is straightforward and only requires a few easy steps.

What is FTP?

FTP stands for File Transfer Protocol, and FTP is a network protocol intended to share files on a network whether it is a LAN or WAN. FTP uses the client-server model. Basically, FTP servers are dedicated to host files, while FTP clients are used to download/upload files from/to FTP servers.

You can deploy an FTP server on a local area network or the Internet. In addition, FTP provides user authentication, server connection management, file/directory manipulation commands, data transfer commands, and advanced functions such as directory listings with sorting capabilities.

In the next sections, I will be using the following network diagram. The network consists of three devices: a Cisco router, a Cisco Switch, and an FTP server. You can download and install a free FTP server from this link.

How To Backup Cisco Switch Images Using a TFTP Server

To back up a Cisco switch IOS image file using an FTP server, you need to follow these easy steps:

Step 1. Configure an FTP server. You can find lots of FTP apps on the Internet

Step 2. Connect the Cisco switch directly or through another network device to the FTP server.

Step 3. Configure IP addresses on both the Cisco switch and the FTP server.

Switch> enable
Switch# conf t
Switch(config)# hostname MLS1
MLS1(config)# interface vlan 1
MLS1(config-if)# ip address 192.168.1.2 255.255.255.0
MLS1(config-if)# no shutdown

Step 4. Configure the username and password used for FTP file transfers.

MLS1(config)# ip ftp username cisco
MLS1(config)# ip ftp password cisco

Step 5. Ping the FTP server from the Cisco switch to check the connection between these network devices.

MLS1# ping 192.168.1.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

Step 6. Open a CLI connection to the Cisco switch via a console cable, Telnet, or SSH.

Step 7. In privileged EXEC mode, use the show flash: command to get the list of Cisco IOS images stored in the flash memory.

MLS1# show flash:
Directory of flash:/

    1  -rw-     3058048            c2950-i6q4l2-mz.121-22.EA4.bin

64016384 bytes total (60958336 bytes free))

Step 7. In enable mode, issue the copy flash: ftp command to begin backing up the c2950-i6q4l2-mz.121-22.EA4.bin image file. The copy command asks for the name of the Cisco IOS image file to send to the FTP server, the name under which to store the image file on the FTP server, and the IP address of the FTP server.

MLS1# copy flash: ftp
Source filename []? c2950-i6q4l2-mz.121-22.EA4.bin
Address or name of remote host []? 192.168.1.10
Destination filename [c2950-i6q4l2-mz.121-22.EA4.bin]? c2950-i6q4l2-mz.121-22.EA4-copy.bin

Writing c2950-i6q4l2-mz.121-22.EA4.bin...
[OK - 3058048 bytes]

3058048 bytes copied in 16.751 secs (182000 bytes/sec)

Step 8.  Open the folder where the FTP software stores files in order to verify that the switch’s image file is there.

How To Backup Cisco Router Image Files Using an FTP Server

Here are the steps to back up a Cisco router IOS image file using an FTP server:

Step 1. Install and set up an FTP server.

Step 2. Connect the Cisco router directly or through another network device to the FTP server.

Step 3. Configure IP addresses on the router and the FTP server.

Router> enable
Router# conf t
Router(config)# hostname R1
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown

Step 4. Configure the username and password used to connect to the FTP server.

R1(config)# ip ftp username cisco
R1(config)# ip ftp password cisco

Step 5. Ping the FTP server from the router to verify that both devices can communicate.

R1# ping 192.168.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

Step 6. Connect to the Cisco router’s CLI via a console cable, Telnet, or SSH.

Step 7. In enable mode, issue the show flash: command to display the current router image files stored in the flash memory.

R1# show flash:

System flash directory:
File  Length   Name/status
  3   33591768 c2900-universalk9-mz.SPA.151-4.M4.bin
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[33847587 bytes used, 221896413 available, 255744000 total]
249856K bytes of processor board System flash (Read/Write))

Step 7.  In enable mode, issue the copy flash: ftp command to begin backing up image file c2900-universalk9-mz.SPA.151-4.M4.bin. The copy command asks for the name of the Cisco IOS image file to send to the FTP server, the name under which to store the image file on the FTP server, and the IP address of the FTP server.

R1# copy flash: tftp
Source filename []? c2900-universalk9-mz.SPA.151-4.M4.bin
Address or name of remote host []? 192.168.1.10
Destination filename [c2900-universalk9-mz.SPA.151-4.M4.bin]? c2900-universalk9-mz.SPA.151-4.M4-copy.bin

Writing c2900-universalk9-mz.SPA.151-4.M4.bin....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]

33591768 bytes copied in 4.535 secs (777728 bytes/sec)

Step 8.  Access the folder where the FTP app stores files to verify that the router’s image file is there.

How To Backup Cisco Switch/Router Images Using an FTP Server in Packet Tracer

Here is a Packet tracer lab file that you can download in order to practice the Cisco IOS commands used to backup Cisco switch/router images using an FTP server.

Click here to download the lab file.

Troubleshooting Cisco IOS Image Backup Process using an FTP Server

When you try to backup a Cisco IOS image file, whether it is for a switch or router, the procedure may fail because of one of these reasons:

  • The FTP service is not working.
  • The FTP server is unreachable because of bad IP addressing on the client or the server side, or due to routing issues in the network.
  • An ACL denies FTP packets between the FTP client and the FTP server.

151 Labs to Help You Pass the CCNA Exam and Make Yourself More Competitive in The Job Market. Download Now!

Related Lessons to How To Backup Cisco Switch/Router Images Using FTP Server

Conclusion

I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.

Mohamed Ouamer
Mohamed Ouamer is a computer science teacher and a self-published author. He taught networking technologies and programming for more than fifteen years. While he loves to share knowledge and write, Mohamed's best passions include spending time with his family, visiting his parents, and learning new things.