On The Insider: More "Hairspray"?

Roll back changes on your Cisco router with this command

Tags: Routers & switches, Network technology, NETWORKING, David Davis, David Davis CCIE, MCSE+I, SCSA, router, running-config, Cisco Systems Inc., Cisco Router, downtime, Cisco Routers and Management Newsletter

  • Save
  • Print
  • Recommend
  • 13

Takeaway: What happens if you've made changes to your router's configuration and something goes wrong? How can you get back to where you started? David Davis tells you about a command that helps you roll back changes while minimizing downtime.

Have you ever made changes to your Cisco router or switch and then needed to remove them? There are several ways to do this, but which is the safest and easiest method? Rebooting the router or switch isn't the answer. In fact, a simple command is a much better bet.

Let's say you're implementing some changes on a router that has a large configuration file. Maybe something distracted you when you were making the change, but the new feature doesn't work when you go to test it.

You just want to back everything out and start from scratch. How can you do that? You have a couple of options.

If you haven't saved the configuration yet, you can just reload the router. This will work, but you don't want to have to reload a production router. In addition, why should you wait for a router to reload if you don't have to?

You can also use the copy startup-config running-config command. However, this command doesn't do what you might think it does. It simply merges the commands from the startup-config with the running-config.

If there's a conflict, it leaves the commands in the running-config in place. What you then end up with is a mix of these configurations. In addition, it could also cause some downtime due to unpredictable results caused by mixing modifications with the old config.

How do you restore that startup-config without causing downtime? The configure replace command is the answer to this dilemma. This command takes the running-config and compares it to the replacement configuration. It finds the distinctions between the two configurations and applies only the differences. This command doesn't affect unchanged configurations, and it doesn't cause any downtime.

Typically, you replace the running-config with the startup-config located in the router's NVRAM. To do so, you would use the following command:

configure replace nvram:startup-config

However, the last parameter could be any valid config file in the accepted Cisco IOS URL format. For example, the config you're using could actually be on a TFTP, FTP, HTTP, RCP, or SCP server. In that case, the command would look something like the following:

configure replace tftp://192.168.1.107/config-bu

Listing A offers a basic example of using the configure replace command. First, I shut down my FastEthernet4 interface, and then I used the configure replace nvram:startup-config command to replace my running-configuration with the startup-configuration. While this is an oversimplified example, it shows how the command works.

The configure replace command is a very useful command -- it gets you back to where you started while minimizing downtime. For more information, check out Cisco's Configuration Replace and Configuration Rollback documentation.

Miss a column?

Check out the Cisco Routers and Switches Archive, and catch up on David Davis' most recent columns.

Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!

David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.

  • Save
  • Print
  • Recommend
  • 13

Print/View all Posts Comments on this article

Thankspsionic11@...  | 05/18/07
Very Nice!khansen@...  | 05/18/07
FUBAR????bilal32@...  | 06/04/07
Junipermatthewrlovell@...  | 05/18/07
I agree!khansen@...  | 05/18/07
It's actually thereDXW  | 05/18/07
Timematthewrlovell@...  | 05/18/07
here is a useful parameterDXW  | 05/18/07
what rev of IOS does the config replace command show up in?khansen@...  | 05/18/07
12.3IT cowgirl  | 05/21/07
switchijameel@...  | 05/18/07
Warm Reloadmurilo.coutinho@...  | 05/20/07
RE: Roll back changes on your Cisco router with this commandadmin@...  | 01/17/08

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET

CIO Sessions

advertisement
Click Here