CCIE Pursuit Blog

July 14, 2007

My Last Warm-Reboot Post – I Promise!

Filed under: Cool Commands,IOS,Tech Tips — cciepursuit @ 7:58 am

I didn’t know that my investigating the warm-reboot command would spawn a trilogy of posts, but I ran across something interesting in my second post and wanted to investigate it further here.  I changed the warm-reboot count from 5 (default) to 1 and was surprised to see that I had to perform a standard reboot to enable the warm-reboot functionality (this is the default behavior when you first initialize warm-reboot) even though warm-reboot was already enabled on the router.  I posted my (poorly formulated) hypothesis:

Let’s change strategies and repeat the above, but this time let’s set the warm-reboot count to 1 and then reload twice:

r2(config)#warm-reboot count 1
Warm reboot will be possible after the next power cycle or reload.

Interesting.  Although warm-reboot was already configured, changing the count value requires that you do a standard reload first (this was not the case when we changed the uptime value).  [NOTE: I actually changed the count and the uptime because I let the uptime be set to the default of 5 minutes (from the previous setting of 120 minutes).  The reason for the standard reload could be due to the change in the count OR because I changed both the count and the uptime.]  It does not clear the historical warm-reboot statistics though.

Since the router told me that I needed to do a standard reload to (re)enable warm-reboot, I did just that.  BUT if I had tried to do a “reload warm” I would have uncovered the “secret” of why the router was trying to reset warm-reboot:

r2#reload warm
Not possible to warm reload.
Reason: Too Many warm reboots have taken place

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 1
Uptime after which warm reboot is safe in case of a crash is 120 (min)

Statistics:

0 warm reboots due to crashes and 1 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

Mystery solved!  Since I had already done 1 warm reboot and then set the maximum warm reboot to 1, I had effectively disabled warm-reboot!  I did not notice this before, because I did a conventional reload instead of requesting a warm reboot.  As you can see, my hypothesis about simply changing the count or changing the count and the uptime at the same time was completely wrong.  The warm-reboot function was “reset” only when I configured the count to be equal to the currently recorded number of warm-reboots (1):

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#warm count 1 up 120
Warm reboot will be possible after the next power cycle or reload.
r2(config)#warm count 5 up 120
r2(config)#warm count 1
Warm reboot will be possible after the next power cycle or reload.
r2(config)#warm count 5
r2(config)#warm count 6
r2(config)#warm count 4
r2(config)#warm count 3
r2(config)#warm count 2
r2(config)#warm count 1
Warm reboot will be possible after the next power cycle or reload.

One last bit of of warm-reboot information.  If you do a conventional reboot, you will lose your historical warm-reboot statistics:

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 50
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 2 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

“Conventional” reload instead of warm-reboot:
r2#reload
Proceed with reload? [confirm]

*Jul 14 16:12:37: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 50
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 0 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage 


Okay.  That’s all for the warm-reboot command.  I think that I’ve mined that sucker for all it’s worth.  :-)Here are links to the other two posts as well as the Cisco documentation link and the Cisco IOS Hints and Tips entry where I initially learned about this feature:

Happiness Is A Warm Reload

Warm-Reboot Count and Uptime Values

Warm reload

warm-reboot (12.4 documentation)

Warm-Reboot Count and Uptime Values

Filed under: Cool Commands,IOS,Tech Tips — cciepursuit @ 7:35 am

I just recently discovered the “warm-reboot” function.  Upon discovering something new I like to try to “break” it.  In this case I wanted to try to disable the warm-reboot function by exceeding the count and/or uptime values.  Here’s a quick recap of why those values are important (courtesy of Cisco IOS Hints and Tips):

“Of course, the IOS code (depending on platform’s memory management capabilities) or saved data could get corrupted, therefore the warm reload cannot be used continuously (and the router falls back to traditional reload if the router crashes before a specified time interval).”

Let’s test that and see if we can cause the router to bypass the warm-boot.  We should be able to do that by setting the warm-reboot uptime option to a large value and then requesting two consecutive reloads.

Step 1: Maximize the uptime value:
r2(config)#warm-reboot count 5 uptime ?
  <0-120>  Time in minutes, default 5

r2(config)#warm-reboot count 5 uptime 120

Step 2: Reload.  This should be a warm-reboot:
r2#reload warm
Proceed with reload? [confirm]

*Jul 14 12:07:41: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 14 12:08:18: %SYS-6-BOOTTIME: Time taken to reboot after reload =   35 seconds

Step 3: Reload again.  This should NOT be a warm-reboot as the router has not been up for the required 120 minutes:
r2#reload warm
Proceed with reload? [confirm]

*Jul 14 12:09:32: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 14 12:10:08: %SYS-6-BOOTTIME: Time taken to reboot after reload =   35 seconds

Hmmmm….that’s odd.  This was a warm-reboot.

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 5
Uptime after which warm reboot is safe in case of a crash is 120 (min)

Statistics:

0 warm reboots due to crashes and 2 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

Actually it’s NOT odd.  I didn’t understand the uptime parameter properly.  The uptime only comes into play with CRASHES and not warm reboot requests.

Let’s change strategies and repeat the above, but this time let’s set the warm-reboot count to 1 and then reload twice:

r2(config)#warm-reboot count 1
Warm reboot will be possible after the next power cycle or reload.

Interesting.  Although warm-reboot was already configured, changing the count value requires that you do a standard reload first (this was not the case when we changed the uptime value).  [NOTE: I actually changed the count and the uptime because I let the uptime be set to the default of 5 minutes (from the previous setting of 120 minutes).  The reason for the standard reload could be due to the change in the count OR because I changed both the count and the uptime.]  It does not clear the historical warm-reboot statistics though:

***Update – Wrong! Wrong! Wrong!  This behavior is explained here. ***

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 1
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 2 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

Reload 1 (standard):
r2#reload
Proceed with reload? [confirm]

*Jul 14 12:16:35: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

r2#sh log | i %SYS-6-BOOTTIME
*Jul 14 12:18:09: %SYS-6-BOOTTIME: Time taken to reboot after reload =   94 seconds

Interesting.  The warm-reboot statistics are reset now:

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 1
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 0 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

Reload 2 (warm):
r2#reload warm
Proceed with reload? [confirm]

*Jul 14 12:54:24: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 14 12:55:00: %SYS-6-BOOTTIME: Time taken to reboot after reload =   35 seconds

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 1
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 1 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

Reload 3 (should not allow warm-reboot):
r2#reload warm
Not possible to warm reload.
Reason: Too Many warm reboots have taken place

Mission accomplished.  :-)

It looks like the downside to the warm-reboot command is that you can only use the “reload warm” command as many times as is configured with the warm-reboot count variable.  This is so you don’t corrupt your data.  If you find that you’ve used your allotment of warm-reboots, just increase the count:

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 1
Uptime after which warm reboot is safe in case of a crash is 5 (min)

Statistics:

0 warm reboots due to crashes and 1 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

r2#reload warm
Not possible to warm reload.
Reason: Too Many warm reboots have taken place

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#warm count ?
  <1-50>  Default 5

r2(config)#warm count 50
r2(config)#^Z
r2#wr
Building configuration…

*Jul 14 13:23:42: %SYS-5-CONFIG_I: Configured from console by console[OK]

r2#sh warm | i reboot count
Maximum warm reboot count is 50
r2#reload warm
Proceed with reload? [confirm]
*Jul 14 13:13:08: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

Happiness Is A Warm Reload

Filed under: Cool Commands,IOS,Tech Tips — cciepursuit @ 6:03 am

I was checking out the Cisco IOS Hints and Tricks  (an outstanding blog) and ran across a posting about the “warm-reboot” feature.  As always, go and read the entire entry as it is very well written.  Here’s the skinny on the warm-reboot:

“The theory behind warm reload is simple: the router saves initial data (as stored in IOS image) in a separate memory region and reuses saved data together with IOS code already residing in RAM to restart IOS. Of course, the IOS code (depending on platform’s memory management capabilities) or saved data could get corrupted, therefore the warm reload cannot be used continuously (and the router falls back to traditional reload if the router crashes before a specified time interval).

Warm reload is configured with the warm-reboot count number uptime minutes configuration commands. After it has been configured, a router reload (or power-up) is needed to initialize the saved data region. When the warm reboot is operational (as verified with the show warm-reboot command), you can use reload warm command to start it.”

I jumped on my rack to test this out.  The first router that I tried it on was a 2651XM running 12.4(10) code.  It seems that this command is not available for this router model:

r1#sh ver
Cisco IOS Software, C2600 Software (C2600-ADVENTERPRISEK9-M), Version 12.4(10), RELEASE SOFTWARE (fc1)

System image file is “flash:c2600-adventerprisek9-mz.124-10.bin”

Cisco 2651XM (MPC860P) processor (revision 3.1) with 253952K/8192K bytes of memory.

r1#show w?
whoami  wlccp  wrr-queue

Since this command has been around since 12.3(2), this could just be a case of the model not supporting the command or the memory not being sufficient/capable of supporting the feature. 

I decided to try my 2821 and found that it did support the feature:

r2#sh ver
Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(11)T

System image file is “flash:c2800nm-adventerprisek9-mz.124-11.T2.bin”

Cisco 2821 (revision 53.51) with 249856K/12288K bytes of memory.

r2#sh warm-reboot
Warm Reboot is not enabled

First, let’s reload the router and see how long it takes to recover:

r2#reload
Proceed with reload? [confirm]
*Jul 13 22:28:41: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 13 22:30:10: %SYS-6-BOOTTIME: Time taken to reboot after reload =   90 seconds

It takes 90 seconds for the router to recover from a conventional reload.  Okay, let’s config this pig:

By default, the warm-reboot option is not enabled:
r2#sh warm-reboot
Warm Reboot is not enabled

Here are the options for the command:
r2(config)#warm-reboot ?
  count   Set max number of continuous warm reboots
  uptime  Set the uptime after which warm reboot is safe in case of a crash
  <cr>

r2(config)#warm-reboot count ?
  <1-50>  Default 5

r2(config)#warm-reboot count 5 uptime ?
  <0-120>  Time in minutes, default 5

Let’s keep the default count, but make the uptime 1 minute:
r2(config)#warm-reboot count 5 uptime 1
Warm reboot will be possible after the next power cycle or reload.

r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 5
Uptime after which warm reboot is safe in case of a crash is 1 (min)

Warm reboot can take place only after the next power cycle or reload.

The router warns you that you’re going to need to reload once before the warm-reload feature is implemented.  This is good to know.  You could push this config out to a bunch of routers only to be disappointed when they don’t recover quickly on their first reload after the configuration is written.  You’ll either need to reload the router after the configuration is written to ensure that the warm-reboot feature is in effect, or just allow the router one mulligan.

Let’s reload the router (this should be a “cold” reload and should take about 90 sec to restore):
r2#reload
Proceed with reload? [confirm]

*Jul 13 22:39:34: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 13 22:41:09: %SYS-6-BOOTTIME: Time taken to reboot after reload =   94 seconds
Okay, let’s verify that the warm-reboot is configured and then go ahead and do a warm-reload:
r2#show warm
Warm Reboot is enabled
Maximum warm reboot count is 5
Uptime after which warm reboot is safe in case of a crash is 1 (min)

Statistics:

0 warm reboots due to crashes and 0 warm reboots due to requests have taken
place since the last cold reboot
3149 KB taken up by warm reboot storage

Notice the “warm” option for reloads now:
r2#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
  warm       Reload should be warm
  <cr>

r2#reload warm ?
  LINE  Reason for reload
  at    Reload at a specific time/date
  file  Image file to load
  in    Reload after a time interval
  <cr>
r2#reload warm
Proceed with reload? [confirm]

After reload:
r2#sh log | i %SYS-6-BOOTTIME
*Jul 13 23:08:33: %SYS-6-BOOTTIME: Time taken to reboot after reload =   35 seconds

NICE!!!  This shaved nearly a minute off of the reload time.

I like the statistics as well:
r2#sh warm
Warm Reboot is enabled
Maximum warm reboot count is 5
Uptime after which warm reboot is safe in case of a crash is 1 (min)

Statistics:

0 warm reboots due to crashes and 1 warm reboots due to requests have taken place since the last cold reboot
3149 KB taken up by warm reboot storage

While the statistics are nice, they do get blown away if the router is power-cycled. 

This is a feature that is pretty useful for production networks.  Every engineer knows that waiting 60 seconds for a router to restore after a reload can feel like an eternity.  This command should be able to shave some significant time as well as give you some additional information concerning reloads and crashes.


Cisco Documentation:warm-reboot

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 109 other followers