Cisco router auto restart in x seconds
Solution 1
You can use a reload command, e.g.:
reload in 1:00
- restart the router in one hour.
reload in 10
- restart the router in 10 minutes
Or you can use reload at
to restart at a specified time. E.g.:
reload at 13:00
- restart the router at 1:00 PM
reload at 9:00 May 25
- restart the router at 9:00 AM on May 25
You can use reload cancel
to cancel a scheduled restart.
Solution 2
You can also use the archive feature and rollback changes: http://www.ciscozine.com/reload-in-x-why-dont-you-rollback-or-replace-the-configuration/
But relo in x is the easiest and fastest way to do it. It has saved me several times.
This is a much better way of controlling versions then just copying running config to Flash. You can have the router automatically back itself up.
R5(config)#archive ! you need to set the archive up first
R5(config-archive)#path ! you have to set the path where the files will go
R5(config-archive)#path ?
ftp: Write archive on ftp: file system
http: Write archive on http: file system
https: Write archive on https: file system
pram: Write archive on pram: file system
rcp: Write archive on rcp: file system
scp: Write archive on scp: file system
tftp: Write archive on tftp: file system
R5(config-archive)#path tftp://10.30.0.62/R5 R5(config-archive)#time-period ? !the router can automatically back itself up <1-525600> Number of minutes to wait between archive creation
R5(config-archive)#time-period 10080! one a week
archive path tftp://10.30.0.62/R5 time-period 10080
archive config ! forced the archive. This should be done before anyone makes any changes to the router, especially clients that are far from us.
!!
R5#c
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#host not-R5! made some changes
not-R5(config)#^Z
not-R5#b tftp://10.30.0.62/R5-1 list time 10! restoring the old config, and list the changes
!!Timed Rollback: Backing up to tftp://10.30.0.62/R5-4
This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: y Loading R5-1 from 10.30.0.62 (via FastEthernet0/1): ! [OK - 3135 bytes] !Pass 1
!List of Commands:! what it changed back
no hostname not-R5
hostname R5
end
Total number of passes: 1 Rollback Done
R5#! back to original config
R5#show archive config differences ! this will show you what is different in the running config vs. what is in the archived config. Answers the question “what has changed on the router”.
Contextual Config Diffs:
-username remove-me password 0 askdjhfr80
Related videos on Youtube
davejal
Data analysis and business intelligence is what I offer as an implementation consultant at Blu Dots. At home I spend time with my wife and kids and at night I start with my hobby. Coding and db design.
Updated on September 18, 2022Comments
-
davejal almost 2 years
Once I used a command to have the router restart in * seconds (or minutes), but now I forgot the command.
How can I have the router restart in * amount of time, so if I make configuration changes that are not correct, they are undone after the auto restart?
-
Burgi over 7 yearsCould you quote the relevant parts from your link in case it is removed in the future? Please see How to Answer for more details.