Specifying a Router Reload Time

Problem

You want to set the router to automatically reload at a specified time.

Solution

You can set the router to reload after waiting a particular length of time with the reload in command:

Router1#reload in 20
Reload scheduled for 11:33:53 EST Sat Feb 1 2003 (in 20 minutes)
Proceed with reload? [confirm] 
Router1#

The reload at command lets you specify a particular time and date when you want the router to reload:

Router1#reload at 14:00 Feb 2 
Reload scheduled for 14:00:00 EST Sun Feb 2 2003 (in 26 hours and 44 minutes)
Proceed with reload? [confirm] 
Router1#

If you set the router to reload at a specific time and date, then we highly recommend using an accurate time source to ensure that the router reloads when you think it will. For more information on time and time sources, please see Chapter 14.

Discussion

Usually, when you reload a router, you want it to do so immediately. However, it can also be quite useful to specify a particular time to reload. For instance, reloading is the only way to fix badly fragmented memory on a router. But you almost certainly don't want to reload during production hours. This feature thus allows you to instruct the router to reload at a safe low-traffic time, such as the middle of the night.

Another excellent reason for using this delayed reload feature is to avoid locking yourself out of a router while making possibly dangerous configuration changes. There are many types of configurations changes, such as changes to access lists or routing configuration in particular, that can isolate a router and prevent you from getting back in to fix the problem. But before you make the changes, you can instruct the router to reload itself in, say, 15 minutes. If you lock yourself out of the router, you won't be able to save the running configuration to NVRAM. So when the router reloads, it will come up with the previous configuration. The bad configuration change will be miraculously undone.

And if it turns out that the new configuration is good, you can simply save it to NVRAM and cancel the reload. We show how to cancel a scheduled reload in a moment.

The reload in command also allows you to specify a reason for the reload:

Router1#reload in 1:20 IOS Upgrade
Reload scheduled for 12:37:45 EST Sat Feb 1 2003 (in 1 hour and 20 minutes)
Reload reason: IOS Upgrade
Proceed with reload? [confirm] 
Router1#

The command interprets any text that you enter after the reload time as the reason for reloading. Starting in IOS Version 12.2, the router records a log message whenever you issue the reload command. Included in this message are the time that the reload was requested, the reload time, the username of the person who requested it, and the reload reason:

Feb 1 11:17:47: %SYS-5-SCHEDULED_RELOAD: Reload requested for 12:37:45 EST Sat Feb 1 2003 at 11:17:45 EST Sat Feb 1 2003 by ijbrown on vty0 (172.25.1.1). Reload Reason: IOS Upgrade.

You can also include a reason with the reload at command:

Router1#reload at 23:20 Feb 15 IOS Upgrade
Reload scheduled for 23:20:00 EST Sat Feb 15 2003 (in 124 hours and 48 minutes)
Reload reason: IOS Upgrade
Proceed with reload? [confirm] 
Router1# 

The show reload command displays information on any impending reloads:

Router1#show reload
Reload scheduled for 12:37:45 EST Sat Feb 1 2003 (in 1 hour and 19 minutes) by ijbrown on vty0 (172.25.1.1)
Reload reason: IOS Upgrade
Router1#

You can cancel a scheduled reload with the reload cancel command:

Router1#reload cancel
Router1#

***
*** --- SHUTDOWN ABORTED ---
***

When you cancel a reload like this, the router will send a system broadcast message notifying any active users that the reload has been canceled. Starting with IOS Version 12.2, the router also creates a logging message indicating that someone has canceled a scheduled reload:

Feb 1 11:19:10: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at 11:19:10 EST Sat Feb 1 2003 
Router1#

If you have scheduled a reload, the router will periodically send broadcast notices to all active users as a reminder. By default, the router will send these messages 1 hour before reload, 30 minutes before, 5 minutes before, and 1 minute before reload. You can cancel the reload at any time, up until the router actually shuts itself down:

Router1#


***
*** --- SHUTDOWN in 1:00:00 ---
***


***
*** --- SHUTDOWN in 0:30:00 ---
***


***
*** --- SHUTDOWN in 0:05:00 ---
***


***
*** --- SHUTDOWN in 0:01:00 ---
***
Connection closed by foreign host.

 

See Also

Chapter 14

Router Configuration and File Management

Router Management

User Access and Privilege Levels

TACACS+

IP Routing

RIP

EIGRP

OSPF

BGP

Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time

DLSw

Router Interfaces and Media

Simple Network Management Protocol

Logging

Access-Lists

DHCP

NAT

First Hop Redundancy Protocols

IP Multicast

IP Mobility

IPv6

MPLS

Security

Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications

Index



Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net