Hey there, wrangling those configuration files on Cisco routers and switches is key to keeping your network as steady as a trusty steed! This guide's got the lowdown on the essential steps and best practices for handling these files. It'll help you make sure your network configurations are always backed up and ready to be restored quicker than a lasso twirl!

Understanding Running and Startup Configurations

When you configure a Cisco router or switch, the changes you make are initially stored in the device’s RAM. This in-memory configuration is known as the running configuration (running-config). However, this configuration is volatile, meaning it will be lost if the device is powered off or restarted.

To ensure that your configuration changes persist after a reboot, you must save them to non-volatile RAM (NVRAM). The saved configuration in NVRAM is referred to as the startup configuration (startup-config).

Saving the Running Configuration

After making changes to your router or switch, it is essential to save the running configuration to the startup configuration to avoid losing those changes.

  1. Copy Running Config to Startup Config:

    Router# copy running-config startup-config

    This command copies the current running configuration to the startup configuration, ensuring that your changes are saved and will persist after a reboot.

  2. Using Shortened Command:

    Router# copy run start

    Cisco IOS allows you to use abbreviations as long as they are unambiguous. The command above is a shortened version that achieves the same result. You can use the Tab key for auto-completion.

Verifying Configurations

You can verify the contents of both the running and startup configurations to confirm what is currently active and what will be used after the next reboot.
  1. View Running Configuration:

    Router# show running-config

    This command displays the current configuration running on the device.

  2. View Startup Configuration:

    Router# show startup-config

    This command shows the configuration that will be used when the device next starts up.

Backing Up Configuration Files

Backing up your configuration files to a remote server is a good practice to safeguard against hardware failure or other disasters that could destroy your device. You can back up configurations to various types of servers, including FTP, Secure Copy (SCP), and TFTP servers.

Example: Backing Up to a TFTP Server
  1. Backup Running Config to TFTP Server:

    Router# copy running-config tftp
    • You will be prompted for:
      • IP address of the TFTP server:
      Address or name of remote host []? 172.16.100.16
      • Destination filename:
      Destination filename [Router1-confg]?
    • Successful copy is indicated by exclamation points:
    !!!!!!!!!!!!!!!!! 2012 bytes copied in 0.123 secs (16.35 Kbytes/sec)
  2. Backup Startup Config to TFTP Server:

    Router# copy startup-config tftp
    • Similar prompts and process as above.

Verifying Backup on TFTP Server

  1. Check the File on TFTP Server:
    • Open the TFTP server application (e.g., SolarWinds TFTP Server) on your external server.
    • Verify that the file (e.g., Router1-confg) exists and contains the correct configuration.

Restoring Configuration from TFTP Server

If you need to restore a configuration from a TFTP server, you can copy the configuration file from the TFTP server to your router’s startup configuration.

  1. Restore Startup Config from TFTP Server:
    Router# copy tftp startup-config
    • You will be prompted for:
      • IP address of the TFTP server:
      Address or name of remote host []? 172.16.100.16
      • Source filename:
      Source filename []? Router1-confg
      • Destination filename:
      Destination filename [startup-config]?
I also covered Cisco ACL in here, you can checkout to learn more.

Liked so far then checkout previous parts: 

Conclusion

That’s it! You now have the know-how to manage configuration files on Cisco devices like a pro. Understanding the difference between running and startup configurations, knowing how to save and back up configurations, and verifying your device settings are essential skills for any network admin. Plus, with the ability to back up and restore configurations using a TFTP server and specifying a source interface, you’re all set to keep your network running smoothly. Keep these tips handy, and you’ll be ready to tackle any configuration challenges that come your way. Happy networking!