16 May, 2008

Instant/Uninterruptible modification of IOS running-config

We have been doing quite a few remote site cuts recently (hence the need to fix the coffee grinder), replacing existing circuits with new circuits and using the same physical interface. If these sites have backup links this is not a problem as the configuration can be changed after the physical circuit is swapped. However this is usually not the case, sites often either have unreliable ISDN backup circuits or no backup circuit. In this case it would be possible to change the startup configuration and reload the router but this has definite risks and could leave you stuck if something goes wrong or your config was incorrect.

The solution we have been using is to create a "paste" config with the changes you would like to make to the router, tftp this "paste" config file up to the router's flash or other directly attached storage. Now copy the text file into the running configuration, rather then overwrite the running config this text file will be merged with the running config in effect executing the configuration changes on the router instantly. If you are concerned about your circuit possibly being bad or having other problems simply schedule a reload before starting this procedure.

Example:
!TFTP up your text file containing the "paste" config
copy tftp: flash:

!Make sure your current working config is saved in nvram
wr

!Schedule a reload for 5 minutes from now in case
!you are unable to get back in
reload in 5

!Copy the paste config into the running config
!This also will ensure all of your config is executed even beyond
!the point that you lose your connection
copy flash:/pasteconfig.txt run

!You should now be able to reconnect to your router via
!the new circuit, be sure to abort the reload if everything worked
reload cancel

No comments: