Use TFTP to Backup your Cisco Router Configurations

Just like any important server on your network, Cisco routers and switches need to be periodically backed up. You don’t want your router to crash one day, get a replacement, and spend days trying to recreate the configuration file. To prevent this, make sure you backup your configurations with TFTP. Let’s find out how to do this.

What is TFTP?

TFTP stands for Trivial File Transfer Protocol. TFTP uses UDP, not TCP for transferring of files (like FTP does). Because it uses UDP and UDP is connectionless, TFTP file transfers are not meant for networks with a lot of latency, like the Internet. However, because UDP doesn’t use any kind of acknowledgements, it is also faster than TCP.

Obtaining a TFTP server

You can make a Cisco router a TFTP server and copy files from other routers to that router.  However, storing your backups on a router isn’t the best idea.  You really want your Cisco device backups on a PC or server that can be backed up to tape.  So, let’s find out how to obtain a Windows TFTP server.

You can download a Windows TFTP server for free, from a variety of sources. Here are a couple of my favorites:

In fact, Windows XP has a built in command-line TFTP program but I wouldn’t recommend it if you can obtain a free graphical program instead.

Running a TFTP server

Because I like the Tftpd32 program so much, let me show you how to use it.

Step 1

Download the latest version from this link-

http://perso.wanadoo.fr/philippe.jounin/tftpd32.html#Versionslink out ico

Step 2

Open the downloaded ZIP file. It should look like this:

tftp 1 small

This is a small program and there is no installation. All you really need is the tftpd32.exe program.  Right-click on that program and Copy it.  Move to a folder or to your desktop and Paste the program there.

Step 3

Run the program by double-clicking it. It looks like this:

tftp 2 small

Notice that it defaults to the directory that it was run in.  If you want to create a new directory to store configuration in, you can do that. You would then change the current directory to that directory.  That is the directory that all received configurations and IOS copies would be backed up into.

Backing up your Router Configuration with TFTP

Now that the TFTP server is running, go to the router that you want to backup the configuration from.

Step 1

Make sure that you can ping the IP address shown on the TFTP server application from the router.  If you cannot, you have a networking issue and you need to resolve that before you continue.

Step 2

On the router’s console, type this:

​Router# copy running-config tftp

Step 3

When asked for the name of the TFTP server, type the IP address shown on the TFTP server console application, like this:

​Address or name of remote host []? 10.253.15.72

 

Step 4

When asked for the name of the destination file, you can take the default by pressing enter, like this:

​Destination filename [router-confg]? [press enter]

You should see exclamation points scroll across the screen and a message that the file was copied, like this:

​!!!!!!!!!!
44647 bytes copied in 1.692 secs (26387 bytes/sec)
Router#

 

You can also back up your router’s IOS file by using a command like this:

​copy flash:c3845-ipbase-mz.123-11.T7.bin tftp

On the TFTP server console, you should see a record that the transfer completed, like this:

tftp 3 small

Article Summary

Here is what we have learned:

  • A TFTP server is a necessary tool that every administrator should use to periodically back up their Cisco router and switch configuration files and IOS files.
  • TFTP servers can be obtained for free
  • The copy command is used on the Cisco device to copy configuration and IOS files to the TFTP server