Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Configure replace setup

Hi,

I'm testing the configure replace option   but I'm not really getting what I want:

The idea is to use configure replace command with a specific timer  when you do a configuration change. If you would loose your connection you will not be able to confirm the configuration change and the switch will revert back to his original configuration and your connection will be restored.

On our switches we already have the archiving setup towards a TFTP server in our mgmt subnet, and this is the subnet also where we work from .  So we will need to put the configuration on  the nvram, flash,...  because if we loose our connection we will not be able to get the config from the tftp server.

I have a config on my disk 0: and I typed the following command

configure replace disk0:test.txt-Dec-24-09-12-08-0 revert trigger  timer 1

After a minute it starts the replacement  but  it takes the config from the tftp server although I specified the disk0:  in the configure replace command.

In the config guides you can see that configure replace works together with the archive so I presume the software will take the latest file from the archiving.

PS: I tested it with the  configure replace disk0:test.txt-Dec-24-09-12-08-0 force  command  and than it works fine. It seems that as soon as you use the time command it goes "wrong".

Example:

Router#$eplace disk0:test.txt-Dec-24-09-12-08-0 revert trigger  timer 1
!Rollback Confirmed Change: Backing up current running config to tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0

This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]:
%ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_BACKUP: Backing up current running config to tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0yes

Rollback:Acquired Configuration lock.
Total number of passes: 2
Rollback Done

Router#Rollback Confirmed Change: Rollback will begin in one minute. Enter "configure confirm" if you wish to keep what you've configured

%PARSER-6-EXPOSEDLOCKRELEASED: Exclusive configuration lock released from terminal '0' -Process= "Exec", ipl= 0, pid= 304
%ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_START_ABSTIMER: User: console: Scheduled to rollback to config tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0 in 1 minutes
%ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_WARNING_ABSTIMER: System will rollback to config tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0 in one minute. Enter "configure confirm" if you wish to keep what you've configuredRollback Confirmed Change: rolling to:tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0

Loading test.txt-Dec-24-09-17-06-0 from 192.168.1.2 (via Vlan10): !
Loading test.txt-Dec-24-09-17-06-0 from 192.168.1.2 (via Vlan10): !
[OK - 7864 bytes]

%ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_ROLLBACK_START: Start rolling to: tftp://192.168.1.2/test.txt-Dec-24-09-17-06-0
Rollback:Acquired Configuration lock.

3 REPLIES
VIP Super Bronze

Re: Configure replace setup

Hello Wim,

Have you tried this command in conjunction with rollback?

configure replace nvram:startup-config time 120

I tried it with 10, and it worked fine. After 10 Minutes the config was reverted back to my last saveed config.

Also, here is the command reference guide:

http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_c1.html#wp1066332

    

HTH

Reza

New Member

Re: Configure replace setup

Have you tried the following command?

configure replace disk0:test.txt-Dec-24-09-12-08-0 force revert trigger timer 1

Another option that might be useful is the command (although reload would take longer than configure replace):

reload in xx

New Member

Re: Configure replace setup

Hi,

Thx for all the answers but for me it is not working as I want it to be

Hereby the partial config:

My laptop is connected to port fa1/0/1  and is vlan 1 (vlan 1 IP address : 192.168.1.1 ) , my laptop is configured with 192.168.1.2.

I 'm doing an archive to my laptop for each saved config.

archive
path tftp://192.168.1.2/switch.txt
write-memory

I issue the command :

conf replace nvram:startup-config time 3

Rollback Confirmed Change: Backing up current running config to tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7

This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]:
*Mar  1 00:23:34.134: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_BACKUP: Backing up current running config to tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7yes
Total number of passes: 0
Rollback Done

Switch#
*Mar  1 00:23:36.282: Rollback:Acquired Configuration lock.
*Mar  1 00:23:37.540: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_START_ABSTIMER: User: console: Scheduled to rollback to config tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7 in 3 minutes

and start working on the config of the switch,

I placed the port fa1/0/1  in vlan 102 ( simulating a wrong command ) , which means that I cut off the connection with my tftp server.

I would think that in 3 minutes he will replace the running config with the startup-config  but the switch gives the following output

*Mar  1 00:25:37.547: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_WARNING_ABSTIMER: System will rollback to config tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7 in one minute. Enter "configure confirm" if you wish to keep what you've configured
Switch#
Switch#
Switch#Rollback Confirmed Change: rolling to:tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7

*Mar  1 00:26:37.543: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_ROLLBACK_START: Start rolling to: tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7
Switch#
Switch#Error: Could not open file tftp://192.168.1.2/switch.txt-Mar--1-00-23-32.842-7 for reading

This means that he trying to get the config from the tftp server which is not reachable anymore  and the rollback fails.

gr

PS: I also use the reload in command but  this method , if I get it to work, will be much quicker

958
Views
0
Helpful
3
Replies
CreatePlease to create content