If you’re configuring an IOS router remotely with a chance of losing the device, most engineers might decide to do a reload in 5 before starting. If you happen to lose connection to the box after a change, the router will reload in 5 minutes erasing any unsaved changes. This works, but is less than ideal. It can take a few minutes for a box to reload. What happens if the box is looking after multiple customers as well?

There is a better way. Just revert the config. Using this is pretty trivial. You do need to turn on the archive command first though. If I try to do it without I get an error:

C1921#conf t revert timer 1
%Turn config archive on before using Rollback Confirmed Change

So let’s configure the archive command:

C1921#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
C1921(config)#archive
C1921(config-archive)#path usbflash0:backup-config
C1921(config-archive)#end
C1921#wr me
Building configuration...

Now let’s give it a try. Let’s create a loopback interface. I’ll not confirm the change which will cause the router to rollback the change after a minute:

C1921#conf t revert time 1
Rollback Confirmed Change: Backing up current running config to 
usbflash0:backup-config-Apr-23-2013-10-57-27.899-BST-0

Enter configuration commands, one per line.  End with CNTL/Z.
C1921(config)#Rollback Confirmed Change: Rollback will begin in one minute.
Enter "configure confirm" if you wish to keep what you've configured

*Apr 23 2013 10:57:29.703 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_BACKUP: 
Backing up current running config to usbflash0:backup-config-Apr-23-2013-10-57-27.899-BST-0
*Apr 23 2013 10:57:29.703 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_START_ABSTIMER: 
User: hsoadmin: Scheduled to rollback to config usbflash0:backup-config-Apr-23-2013-10-57-27.899-BST-0 
in 1 minutes
*Apr 23 2013 10:57:29.707 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_WARNING_ABSTIMER: 
System will rollback to config usbflash0:backup-config-Apr-23-201
C1921(config)#3-10-57-27.899-BST-0 in one minute. Enter "configure confirm" 
if you wish to keep what you've configured
C1921(config)#int lo50
*Apr 23 2013 10:57:41.523 BST: %LINK-3-UPDOWN: Interface Loopback50, changed state to up
*Apr 23 2013 10:57:42.523 BST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback50, changed state to up
C1921(config-if)#ip address 50.50.50.50 255.255.255.255

After one minute:

C1921(config-if)#Rollback Confirmed Change: 
rolling to:usbflash0:backup-config-Apr-23-2013-10-57-27.899-BST-0

*Apr 23 2013 10:58:29.703 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_ROLLBACK_START: 
Start rolling to: usbflash0:backup-config-Apr-23-2013-10-57-27.899-BST-0
C1921(config-if)#
*Apr 23 2013 10:58:29.711 BST: Rollback:Acquired Configuration lock.
C1921(config-if)#
!Pass 1
!List of Rollback Commands:
interface Loopback50
 no ip address 50.50.50.50 255.255.255.255
no interface Loopback50
end


Total number of passes: 1
Rollback Done

C1921(config-if)#command:exit
*Apr 23 2013 10:58:33.139 BST: %LINK-5-CHANGED: Interface Loopback50, changed state to administratively down
*Apr 23 2013 10:58:34.139 BST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback50, changed state to down

If I wanted to save the change, you need to get back to your prompt and confirm the change:

C1921#conf t revert time 1
Rollback Confirmed Change: Backing up current running config to 
usbflash0:backup-config-Apr-23-2013-11-00-09.903-BST-1

Enter configuration commands, one per line.  End with CNTL/Z.
C1921(config)#Rollback Confirmed Change: Rollback will begin in one minute.
Enter "configure confirm" if you wish to keep what you've configured

*Apr 23 2013 11:00:11.015 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_BACKUP: Backing up current running 
config to usbflash0:backup-config-Apr-23-2013-11-00-09.903-BST-1
*Apr 23 2013 11:00:11.015 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_START_ABSTIMER: 
User: hsoadmin: Scheduled to 
rollback to config usbflash0:backup-config-Apr-23-2013-11-00-09.903-BST-1 in 1 minutes
*Apr 23 2013 11:00:11.019 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_WARNING_ABSTIMER: System will 
rollback to config usbflash0:backup-config-Apr-23-201
C1921(config)#3-11-00-09.903-BST-1 in one minute. Enter "configure confirm" 
if you wish to keep what you've configured
C1921(config)#int lo50
C1921(config-if)#ip address 50.50.50.50 255.255.255.255
*Apr 23 2013 11:00:21.239 BST: %LINK-3-UPDOWN: Interface Loopback50, changed state to up
*Apr 23 2013 11:00:22.239 BST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback50, changed state to up
C1921(config-if)#exit
C1921(config)#
*Apr 23 2013 11:00:31.375 BST: %PARSER-5-CFGLOG_LOGGEDCMD: User:hsoadmin  logged command:exit
C1921(config)#exit

C1921#configure confirm
C1921#
*Apr 23 2013 11:00:39.603 BST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_CONFIRM: 
User: hsoadmin: Confirm the configuration change

Once confirmed, your config will stay that way.

Originally publish with link https://mellowd.co.uk/ccie/?p=3928