Nov
25

Have you ever been on your GradedLabs rack of equipment and wanted to test a particular feature or set of configurations, but you certainly do not want to keep these changes on the rack? Perhaps this is because you are right in the middle of solving a Volume 2 lab and you certainly cannot have that configuration impacted.

Thanks to the very handy config replace command, you can easily rollback almost instantly to your previous saved configuration after your experimenting. Here is a demonstration of just how simple this is. Enjoy, and let us give thanks for all there is to learn on blog.ine.com! :-) I also want to thank my good friend Keith Barker for first showing me this one.

Rack29R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Rack29R1(config)#hostname TEST
TEST(config)#interface fastethernet0/0
TEST(config-if)#ip address 1.2.3.4 255.0.0.0
TEST(config-if)#no shut
TEST(config-if)#end
TEST#
Nov 25 09:09:58.856: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to
up
Nov 25 09:09:59.173: %SYS-5-CONFIG_I: Configured from console by console
TEST#configure terminal
Nov 25 09:10:01.404: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/0, changed state to up
TEST#config replace nvram:startup-config force
Total number of passes: 1
Rollback Done
Rack29R1#
Nov 25 09:10:08.644: Rollback:Acquired Configuration lock.
Nov 25 09:10:17.827: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state t
o administratively down
Nov 25 09:10:18.829: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/0, changed state to down
Rack29R1#
Nov 25 09:10:22.727: %PARSER-3-CONFIGNOTLOCKED: Unlock requested by process ’3′.
Configuration not locked.
Rack29R1#
Rack29R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Rack29R1(config)#hostname TEST
TEST(config)#interface fastethernet0/0
TEST(config-if)#ip address 1.2.3.4 255.0.0.0
TEST(config-if)#no shut
TEST(config-if)#end
TEST#
TEST#config replace nvram:startup-config force
Total number of passes: 1
Rollback Done
Rack29R1#
Rack29R1#show run interface fa0/0
Building configuration...
Current configuration : 83 bytes
!
interface FastEthernet0/0

 no ip address
 shutdown
 duplex auto
 speed auto
end

Rack29R1#

You can leave a response, or trackback from your own site.

7 Responses to “Rolling Back a Configuration”

 
  1. Chris says:

    Config replace is a fantastic command. I’ve actually used in the past to do large scale configuration updates on ISRs deployed in 1000+ WAN sites

  2. Sokabi Moses says:

    Nice one to have in my tool belt…thanks ine.

  3. mustafa says:

    is not it the same as copy startup config running config

  4. Ibrahim says:

    Really useful command, thanks.

  5. Ray Nuncio says:

    Thanks. I was in the need of this command months ago, but at the time I could not remember the command line but I knew it was possible.. thanks for the example..!

  6. mix12 says:

    and how about rolling back configuration after some time interval?
    can I use “time” parameter like below?

    configure replace nvram:startup-config time 120

 

Leave a Reply

Categories

CCIE Bloggers