Restoring Cisco Router Configuration
In this section we will look at the three methods to restore a Cisco router configuration.
Method 1: Copy and Paste
One method to restore a Cisco router configuration is to copy and paste the configuration commands directly into the console session.
- Connect to the router via console or telnet/SSH
- Enter global configuration mode:
configure terminal - Copy your saved configuration from a text file
- Paste the configuration commands line by line
- Exit configuration mode:
exit - Save the configuration:
copy running-config startup-config
Advantages: Simple and doesn't require additional protocols or servers.
Disadvantages: Time-consuming for large configurations and prone to errors if lines are dropped.
Method 2: TFTP Server
Using a TFTP (Trivial File Transfer Protocol) server is the most common method for restoring router configurations.
Prerequisites:
- TFTP server software running on a network-connected computer
- Router must have IP connectivity to the TFTP server
- Configuration file saved on the TFTP server
Steps:
- Verify connectivity to TFTP server:
ping [tftp-server-ip] - Save the configuration:
copy running-config startup-config
Copy the configuration from TFTP server to running configuration:
Router# copy tftp running-config
Address or name of remote host []? [tftp-server-ip]
Source filename []? [configuration-filename]
Destination filename [running-config]? [press Enter]You can also copy directly to startup-config:
Router# copy tftp startup-configMethod 3: USB Flash Drive
Modern Cisco routers support USB flash drives, making configuration restoration very convenient.
Steps:
- Insert the USB flash drive containing your configuration file
- Verify the USB drive is recognized:
show file systems - List files on the USB drive:
dir usbflash0: - Save the configuration:
copy running-config startup-config
Copy the configuration file:
Router# copy usbflash0:[filename] running-configImportant Considerations
- Merge vs Replace: When copying to running-config, the new configuration merges with existing settings. To completely replace the configuration, copy to startup-config and reload the router.
- Syntax Errors: If the configuration file contains errors, the router will reject invalid commands and continue with valid ones.
- Memory: Ensure the router has sufficient memory to load the configuration file.
- Access Control: Make sure you have the appropriate privilege level (usually level 15) to perform configuration restoration.
Best Practices
- Always verify the configuration after restoration using
show running-config - Test critical functions like routing, interfaces, and access control
- Keep multiple backup copies in different locations
- Document the date and purpose of each configuration backup
- Use version control for configuration files when possible
Understanding these restoration methods ensures you can quickly recover from configuration loss or corruption, minimizing network downtime and maintaining business continuity.