One way to ensure that you are not caught out by this problem is to use the ‘RELOAD’ command, and specify a number of minutes after which the router will reboot. Therefore, if you do make a mistake that results in your connection being lost, you just need to wait for the time to expire and the router will reboot for you.
The following command sequence will set the reload interval to 5
minutes:router#reload in 5
Reload scheduled in 5 minutes
Proceed with reload? [confirm] y
This will give you 5 minutes to complete your configuration changes and save them before the router will reboot.
In this instance we have configured IP Addresses on two serial interfaces.
Enter configuration commands, one per line. End with CNTL/Z.
router(config-if)#ip address 10.5.5.254 255.255.255.0
router(config-if)#interface serial 0/1
router(config-if)#ip address 10.7.7.254 255.255.255.0
We still have our connection to the router, and the reload timer still has some time to run down. We have saved the config to Non-Volatile RAM, so the new config will take effect anytime the router is power cycled.
If you want to remove the reload command before the timer expires then follow the example below:
If the configuration changes had caused any problems then the Cisco Router timer would have ensured a reboot automatically and all our configuration changes would not have had any effect, and would have been removed.