cisco config delayed apply?

Solution 1:

I'm not aware of a buffer as such that can store commands.

What you can do is edit the config as a flat file (swapping the addresses as you wish) then upload it to the Cisco 800.

So....

  1. copy running config to ftp or tftp server

    $ copy flash: tftp:

  2. edit file / change ip addresses

  3. ftp/tftp it back $ copy flash: tftp:

  4. copy it to the start-up/running config using

    $copy flash:config.text run

Be aware if you dont copy it to the startup-config too you will lose changes on reload.

Solution 2:

Ok, found it..

No silly blue serial cables or TFTP servers required.

The secret sauce here is the built-in tcl scripting language in Cisco IOS. This allows you to stuff all the commands in one go and configure the interfaces as you please.

enable

reload in 10

tclsh

ios_config "int vlan1" "ip address 10.1.1.1 255.255.255.0" "int fa4" "ip address 192.168.20.72 255.255.255.0" "end"

This will indeed cut off your live connection to the router, but the new interface changes are all in effect and there's no need to reboot the router even. I simply walked over to the router, swapped the ethernet cable from the LAN port to the WAN port and voila, this time I was able to connect to the Cisco over the WAN port.

After confirming that everything was looking good, I did a final

wr mem

..and the new configuration is permanently stored as the new startup-config.

Solution 3:

If you're on a recent IOS (so, honestly, probably not on an 871), you can use IOS.sh. Once you do term shell, you can separate commands by semicolons on one line, and they'll be run sequentially, just like in bash or similar.

Here's an example one-liner, where I changed out a route:

LAB-6807#show run | incl 111.111
ip route 172.31.111.111 255.255.255.255 Loopback0
LAB-6807#term shell
LAB-6807#conf t; no ip route 172.31.111.111 255.255.255.255 Loopback0; ip route 172.31.111.111 255.255.255.255 Null0; end
Enter configuration commands, one per line.  End with CNTL/Z.
LAB-6807#
*May 18 22:33:27.772: %SYS-5-CONFIG_I: Configured from console by hunter on vty1 (x.x.x.x)
LAB-6807#show run | incl 111.111
ip route 172.31.111.111 255.255.255.255 Null0
LAB-6807#