12
Cool Cisco IOS Commands: reload Options

Cool Cisco IOS Commands: reload Options - Packet Lab … · Cool Cisco IOS Commands: reload Options. You [re probably aware of the reload command. It does exactly what it says: reloads

  • Upload
    lynga

  • View
    228

  • Download
    3

Embed Size (px)

Citation preview

Cool Cisco IOS Commands:

reload Options

You’re probably aware of the reload command. It does exactly what it says: reloads the Cisco device immediately after you confirm the command. But did you know that there are a number of reload command options? You can instruct the router to reload in a specific time period (‘in”) or at a specific date and time (‘at’), you can also cancel a scheduled reload (‘cancel’) or even give a reason for reloading the router.

r1#reload ?

/noverify Don't verify file signature before reload.

/verify Verify file signature before reload.

LINE Reason for reload

at Reload at a specific time/date

cancel Cancel pending reload

in Reload after a time interval

<cr>

reload

reload To reload the operating system, use the reload command in privileged EXEC or diagnostic mode.

reload [/verify | /noverify] [line | in [hhh:mm | mmm [text]] | at hh:mm [text] | reason [reason string] | cancel]

at hh:mm(Optional) Schedules a reload of the software to take place at the specified time (using a 24-hour clock). If you specify the month and day, the reload is scheduled to take place at the specified time and date. If you do not specify the month and day, the reload takes place at the specified time on the current day (if the specified time is later than the current time) or on the next day (if the specified time is earlier than the current time). Specifying 00:00 schedules the reload for midnight. The reload must take place within 24 days.

in hhh:mm | mmm(Optional) Schedules a reload of the software to take effect in the specified minutes or hours and minutes. The reload must take place within approximately 24 days.

line(Optional) Reason for reloading; the string can be from 1 to 255 characters long.

cancel(Optional) Cancels a scheduled reload.

reload – Command Reference

If you do not specify a time for the device to be reloaded (with either the ‘at’ or ‘in’ options) then the device will reload immediately after you verify the command.

Note: By default, you need privilege level 15 to issue the reload command. Be careful as simply hitting the enter key when asked for verification will result in a reload. To cancel, type any character other than ‘y’.

r1#reload

Proceed with reload? [confirm]y

Jun 10 13:56:55.479: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)

Copyright (c) 2002 by cisco Systems, Inc.

C2600 platform with 131072 Kbytes of main memory

program load complete, entry point: 0x80008000, size: 0x1c93b18

Self decompressing the image : ##########

After reload:

r1#show version | begin uptime

r1 uptime is 10 minutes

System returned to ROM by reload at 13:56:55 UTC Thu Jun 10 2010

System image file is "flash:c2600-adventerprisek9-mz.124-25c.bin"

reload – No Options

The in option allows you to specify a time period in which to reload the device. If you want to reload your device in 30 minutes, then issue the reload in 30 command. This is an excellent command to issue before you make configuration commands remotely. If during the course of your configuration, you lock yourself out of the device, you will reload into the startup configuration after the reload in period elapses. If you use this command in this fashion, you need to remember to cancel (reload cancel) the reload after you successfully complete your changes.

r1#show clock

*16:08:21.179 UTC Thu Jun 10 2010

r1#reload in 15

Reload scheduled in 15 minutes by console

Reload reason: Reload Command

Proceed with reload? [confirm]y

*Jun 10 16:08:28.579: %SYS-5-SCHEDULED_RELOAD: Reload requested for 16:23:27 UTC Thu

Jun 10 2010 at 16:08:27 UTC Thu Jun 10 2010 by console. Reload Reason: Reload

Command.

reload in

One other thing to note: the period can be specified in minutes or hours and minutes. You can’t specify fractions of a minute (seconds) with the in option. So if you want to reload in 7 minutes and 30 seconds, you cannot use reload in 7:30 as that would mean reload in 7 hours and 30 minutes. You would have to round to the nearest minute and use reload in 8 or reload in 7.

r1#reload in ?

Delay before reload (mmm or hhh:mm)

r1#reload in 7:30

Reload scheduled in 7 hours and 30 minutes by console

Reload reason: Reload Command

Proceed with reload? [confirm]

reload in

The at option is my favorite reload option. This allows you to specify a date and time for a reload. This option is perfect for after hours reloads. You can schedule a device to be reloaded at any time (to the nearest minute, seconds not supported) anytime in the next 24 days.

r1#reload at ?

hh:mm Time to reload (hh:mm)

r1#reload at 17:00 ?

<1-31> Day of the month

LINE Reason for reload

MONTH Month of the year

<cr>

r1#reload at 17:00 04 July

Reload scheduled for 17:00:00 UTC Sun Jul 4 2010 (in 576 hours and 26 minutes) by packetlab

on console

Reload reason: Reload Command

Proceed with reload? [confirm]y

Jun 10 16:33:20.735: %SYS-5-SCHEDULED_RELOAD: Reload requested for 17:00:00 UTC Sun Jul 4

2010 at 16:33:17 UTC Thu Jun 10 2010 by packetlab on console. Reload Reason: Reload Command.

reload at

If you do not specify a date, then IOS uses today’s date:

r1#reload at 17:00

Reload scheduled for 17:00:00 UTC Thu Jun 10 2010 (in 26 minutes) by console

Reload reason: Reload Command

Proceed with reload? [confirm]n

I’ve seen an issue with the reload at command when NTP has not synced, and also (for no reason) with clock set. If you issue a show clock and the date time is preceded by an * then NTP needs to sync, or you need to reissue the clock set command.

r1#reload at 17:00 4 July

%The date and time must be set first.

r1#show clock

*16:23:33.727 UTC Thu Jun 10 2010

r1#clock set 16:32:00 10 June 2010

r1#show clock

16:32:18.871 UTC Thu Jun 10 2010

r1#reload at 17:00 4 July

Reload scheduled for 17:00:00 UTC Sun Jul 4 2010 (in 576 hours and 27 minutes) by console

reload at

You can add a reason (IOS version 15.0(1)M allows you to use the reason option) for the reload. Unfortunately, this does not survive the reload (show up in the show version output) on the devices I tested this on, but it does show in the log as well as in the show reload output.

r1#reload at 17:00 04 July Change Control #123456

System configuration has been modified. Save? [yes/no]: n

Reload scheduled for 17:00:00 UTC Sun Jul 4 2010 (in 576 hours and 14 minutes) by

packetlab on console

Reload reason: Change Control #123456

Proceed with reload? [confirm]y

Jun 10 16:45:39.567: %SYS-5-SCHEDULED_RELOAD: Reload requested for 17:00:00 UTC Sun

Jul 4 2010 at 16:45:36 UTC Thu Jun 10 2010 by packetlab on console. Reload Reason:

Change Control #123456.

r1#show reload

Reload scheduled for 17:00:00 UTC Sun Jul 4 2010 (in 576 hours and 14 minutes) by

packetlab on console

Reload reason: Change Control #123456

reload reason/LINE

The show reload command will show any pending reloads on the device.

r1#show reload

Reload scheduled for 16:54:56 UTC Thu Jun 10 2010 (in 9 minutes) by packetlab on

console

Reload reason: Reload Command

r1#show reload

Reload scheduled for 17:00:00 UTC Sun Jul 4 2010 (in 576 hours and 14 minutes) by

packetlab on console

Reload reason: Change Control #123456

show reload

I saved the most important option for last: cancel. While reversing most Cisco IOS commands simply requires prepending no to the command, this will not work with a scheduled reload command. In order to stop a scheduled reload command you need to issue the reload cancel command.

r1#show reload

Reload scheduled for 17:08:52 UTC Thu Jun 10 2010 (in 2 minutes and 55 seconds) by

packetlab on console

Reload reason: Reload Command

r1#no reload

^

% Invalid input detected at '^' marker.

r1#reload cancel

***

*** --- SHUTDOWN ABORTED ---

***

Jun 10 17:06:10.287: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at

17:06:10 UTC Thu Jun 10 2010

reload cancel

The reload command is one of the most powerful and – by extension – dangerous commands available in Cisco IOS. This command will reboot your Cisco device. It should be used with caution (and a change control).

While most of us have reloaded Cisco devices with this command, you may not be aware of some of the optional reload command arguments. Options such as reload in, reload at, and reload reason can extend the power of the reload command and come in handy.

Even if you choose not to use the reload options, you should be aware of one very important reload command: reload cancel. This command allows you to cancel a scheduled reload…and could be the difference between saving the day or looking for a new job.

Summary