Backing up and restoring configurations on Cisco devices is essential for maintaining a reliable network. Using TFTP (Trivial File Transfer Protocol) is one of the easiest methods for transferring configuration files between your devices and a server. This guide will show you how to back up and restore configurations on Cisco devices using SolarWinds TFTP Server, with detailed examples.
What is TFTP?
TFTP is a simple protocol that allows devices to transfer files over a network using UDP (User Datagram Protocol). It is commonly used for transferring configuration files and firmware updates between network devices.
Prerequisites
- A TFTP server installed on your network (we'll use SolarWinds TFTP Server for this guide).
- Cisco devices with TFTP support.
- Administrative access to your Cisco devices.
- Network connectivity between your Cisco device and the TFTP server.
Step 1: Set Up SolarWinds TFTP Server
-
Download and Install SolarWinds TFTP Server:
- Download SolarWinds TFTP Server from here.
- Install the TFTP Server by following the on-screen instructions.
- Open the SolarWinds TFTP Server application.
-
Configure the TFTP Server:
- Make sure the TFTP Server is set to run as a service or is currently running.
- Set the TFTP root directory where files will be stored (e.g.,
C:\TFTP-Root
). - Ensure the TFTP server is listening on the correct network interface (you may need to adjust the IP settings if your server has multiple network adapters).
-
Allow TFTP Traffic Through Firewall:
- Ensure that UDP port 69 is open on the firewall of the TFTP server to allow TFTP traffic.
- Verify connectivity by pinging the TFTP server from your Cisco device.
Step 2: Verify Connectivity Between Cisco Device and TFTP Server
Before proceeding with the backup or restore, ensure the Cisco device can reach the TFTP server:
ping 192.168.1.10
Replace 192.168.1.10
with the IP address of your TFTP server. Successful replies indicate proper connectivity.
Step 3: Backup Configuration from Cisco Device to TFTP Server
-
Connect to Your Cisco Device:
- Access the Cisco device using SSH or Console.
- Enter privileged EXEC mode:
enable
-
Copy Running Configuration to TFTP Server:
- Use the following command to back up the running configuration:
copy running-config tftp
- Enter the IP address of the TFTP server when prompted:
Address or name of remote host []? 192.168.1.10
- Specify the filename for the backup:
Destination filename [running-config]? backup-config.txt
- The output will confirm the success of the operation:
!![OK]
Example:
Router#copy running-config tftp Address or name of remote host []? 192.168.1.10 Destination filename [running-config]? backup-config.txt !! 1045 bytes copied in 2.540 secs (412 bytes/sec) Router#
Step 4: Restore Configuration from TFTP Server to Cisco Device
To restore a saved configuration from your TFTP server to the Cisco device:
-
Ensure the Configuration File is Available on the TFTP Server:
- Verify that the backup file (e.g.,
backup-config.txt
) is in the TFTP server’s root directory.
- Verify that the backup file (e.g.,
-
Copy Configuration from TFTP Server to Cisco Device:
- Use the following command to restore the configuration:
copy tftp running-config
- Enter the IP address of your TFTP server:
Address or name of remote host []? 192.168.1.10
- Specify the filename of the configuration file:
Source filename []? backup-config.txt
- Confirm the destination filename:
Destination filename [running-config]? running-config
- The process completes with:
!![OK]
Example:
Router#copy tftp running-config Address or name of remote host []? 192.168.1.10 Source filename []? backup-config.txt Destination filename [running-config]? running-config Accessing tftp://192.168.1.10/backup-config.txt... Loading backup-config.txt from 192.168.1.10 (via FastEthernet0/0): ! [OK - 1045 bytes] 1045 bytes copied in 2.324 secs (449 bytes/sec) Router#
Important Considerations
- File Naming: Be cautious with filenames to avoid overwriting existing configurations.
- Impact of Restore: Restoring a configuration applies changes immediately, which could affect connectivity or current operations.
- Security: Secure your TFTP server and restrict access to prevent unauthorized file transfers.
Conclusion
Backing up and restoring configurations on Cisco devices using TFTP is a straightforward process that ensures your network configurations are safely stored and easily recoverable. By following this guide, you can efficiently manage your Cisco device configurations using SolarWinds TFTP Server. Regular backups are a best practice for maintaining the stability of your network infrastructure.
For further details, refer to Cisco’s official documentation on TFTP file transfers.