Just to recap how other vendors handle this. This discusses Cisco IOS and vyatta/EdgeOS.
Both of these are similar in effect to what was proposed by rextended in "unsafe change" in
post #22(although his method requires more work than in most other networking os's that have a feature built in).
I think it would be nice to have a ROS provided standard mechanism (even a script) that standardized how this is done. Perhaps allowing an optional time till reboot to be specified
Cisco IOS (this is old knowledge, there may be different ways now)
Cisco maintains two "configurations", a running-configuration (what is in RAM and being used) and a startup-configuration (what will be used to reload the running-configuration on startup/boot)
When changes are made in IOS, they only affect the running-configuration, you must do a copy running-configuration startup-configuration to make the changes permanent.
To do something that you are afraid may lock you out, you first schedule a restart, then you make the change, if you are still connected, or can reconnect (in case an ip address was changed), then after reconnecting, you then cancel the scheduled restart, then wr mem (or copy run start) to make the change persistent.
The cisco implementation will warn you that a scheduled restart will happen (periodically), I think the last one is 1 minute prior to reboot.
vyatta/EdgeOS (possibly in Junos, which heavily influenced vyatta)
In vyatta, there are 3 configuration sets, active (similar to Running in Cisco), boot/startup and working (which is where a set of changes can be staged before they are "commited" to the active/running configuration. so the change process is: enter config mode, (this implicitly copies active to working), make changes, then commit the changes (verifies changes are valid, then copies working to active). then save (which copies active to startup/flash). In addition to commit, there is a command
commit-confirm, which essentially starts a scheduled reboot (it is called a rollback but other than doing some extra paperwork, it is essentially a reboot, and that will use the last saved config.boot file). So the procedure in vyatta to do an unsafe change is first to make sure that the active and boot configs are the same (enter config mode, then use the save command), then make changes, then use commit-confirm (default 10 minutes until reboot unless cancelled with the "
confirm“命令,但您可以指定若干分钟other than 5. It has been reported that the number of minutes is truncated, it is really wait until this many minute crossing have occurred, so using commit-confirm 1 can restart 5 seconds or less after the command was entered, depending on how many seconds are left in the current minute; I consider that a bug in implementation). If you can still access the router, then issue "confirm" which confirms that change didn't break things, and cancels rollback, and finally a
save. Note: at least on EdgeOS you don't get any warnings that the system will reboot, and if you forget to enter "confirm", your only indication is that the router will reboot unexpectedly, and you will be back to the last saved config. I can't remember for sure, but I think I tested this where I did do a save after the commit-confirm, but did not use the confirm command, and when it rebooted it did use the "last saved" config, so in that case it still had the changes. In other words, it isn't a rollback to the state just prior to the commit-confirm. Note two: EdgeOS has a webGUI as well, and it does not give you any method of safe changes, the when you give it the "ok" it does a commit and save. And that change can lock you out. It is also the reason any time I make remote changes, I never use the webGUI, and use the command line interface instead.