The IOS implementation of HSRP supports the debug
command. Enabling debug displays HSRP state changes and debug output regarding
the transmission and receipt of HSRP packets. To enable HSRP debugging, enter
this command in privileged EXEC mode: 
Switch#debug standby
 |
CAUTION:
Because debugging output is assigned high priority in the CPU
process, this command can render the system unusable.
|
|
|
Example: HSRP Debugging on Negotiating for Role of Active
Router
This example displays the debug standby
command output as the DSW111 router with the IP address 172.16.1.111
initializes and negotiates for the role of the active router. 
To disable the debugging feature, enter either the no debug
standby command or the no debug all command.
Example: HSRP Debugging on First and Only Router on Subnet
In
this example, because DSW111 (172.16.11.111) is the only router on the subnet
and because it is not configured for preempt, this router will go through all
the HSRP states before becoming the active router. Notice at time stamp Mar 8
20:34:10.221 that the interface comes up and DSW111 enters the listen state.
The router stays in the listen state for the holdtime of 10 seconds. DSW111
then goes into the speak state at time stamp Mar 8 20:34:20.221 for 10 seconds.
When the router is speaking, it sends its state out every 3 seconds according
to its hello interval. After 10 seconds in speak state, the router has
determined that there is no standby router at time-stamp Mar 8 20:34:30.221 and
enters the standby state. The router has also determined that there is not an
active router; therefore, the router immediately enters the active state at
time stamp Mar 8 20:34:30.221. From then on, the active router will send
itsactive state hello message every 3 seconds. Because there are no other
routers on this broadcast domain, there are no hellos being
received. 
Example: HSRP on NonPreempt Configured Router Coming Up
Router
DSW111 (172.16.11.111) is configured with a priority of 100. This priority is
higher than the priority of the current active router DSW112 (172.16.11.112),
which has a priority of 50. Note that router DSW111 is not configured with
preempt. Only when a router is configured with preempt will a router with a
higher priority immediately become the active router. After router DSW111 goes
through the HSRP initialization states, it will come up as the standby
router. 
Example: HSRP on Preempt Configured Router Coming Up
DSW111
(172.16.11.11) is configured with a priority of 100. This priority is higher
than the priority of the active router DSW112 (172.16.11.112). DSW111 is also
configured with preempt. Only when a router is configured with preempt will
that router with a higher priority transition into the active state. At
time-stamp Mar 1 00:16:43.099, the interface VLAN11 on DSW111 comes up and
transitions into the listen state. At time-stamp Mar 1 00:16:43.295, DSW111
receives a hello message from the active router (DSW112). DSW111 determines
that the active router has a lower priority. At time-stamp Mar 1 00:16:43.295,
DSW111 immediately sends out a coup message, indicating that DSW111 is
transitioning into the active router. DSW112 enters the speak state and
eventually becomes the standby router. 