Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.0.1 for use in HSRP

NOTE

The group number can be from 0 to 255. The default is 0.

Router(config-if)#standby 1 priority 120

Assigns a priority value of 120 to standby group 1

NOTE

The priority value can be from 1 to 255. The default is 100. A higher priority will result in that router being elected the active router. If the priorities of all routers in the group are equal, the router with the highest IP address becomes the active router.

Verifying HSRP

Router#show running-config

Displays what is currently running on the router

Router#show standby

Displays HSRP information

Router#show standby brief

Displays a single-line output summary of each standby group

Router#show standby 1

Displays HSRP group 1 information

Router#show standby fastethernet 0/0

Displays HSRP information for the specified interface

Router#show standby fastethernet 0/0 brief

Displays a summary of HSRP for the specified interface

Router#show standby fastethernet 0/0 1

Displays HSRP group 1 information for the specified interface

HSRP Optimization Options

There are options available that make it possible to optimize HSRP operation in the campus network. The next three sections explain three of these options: standby preempt, message timers, and interface tracking.

Preempt

Router(config)#interface fastethernet 0/0

Moves to interface configuration mode

Router(config-if)#standby 1 preempt

This router will preempt, or take control of, the active router if the local priority is higher than the active router

Router(config-if)#standby 1 preempt delay minimum 180

Causes the local router to postpone taking over as the active router for 180 seconds since that router was last restarted

Router(config-if)#standby 1 preempt delay reload

Allows for preemption to occur only after a router reloads

Router(config-if)#no standby 1 preempt delay reload

Disables the preemption delay, but preemption itself is still enabled. Use the no standbyxpreempt command to eliminate preemption

NOTE

If the preempt argument is not configured, the local router assumes control as the active router only if the local router receives information indicating that there is no router currently in the active state.

HSRP Message Timers

Router(config)#interface fastethernet 0/0

Moves to interface config mode

Router(config-if)#standby 1 timers 5 15

Sets the hello timer to 5 seconds and sets the hold timer to 15 seconds

NOTE

The hold timer is normally set to be greater than or equal to 3 times the hello timer.

NOTE

The hello timer can be from 1 to 254; the default is 3. The hold timer can be from 1 to 255; the default is 10. The default unit of time is seconds.

Router(config-if)#standby 1 timers msec 200 msec 600

Sets the hello timer to 200 milliseconds and sets the hold timer to 600 milliseconds

NOTE

If the msec argument is used, the timers can be an integer from 15 to 999.

Interface Tracking

Router(config)#interface fastethernet 0/0

Moves to interface configuration mode

Router(config-if)#standby 1 track serial 0/0 25

HSRP will track the availability of interface serial 0/0. If serial 0/0 goes down, the priority of the router in group 1 will be decremented by 25.

NOTE

The default value of the track argument is 10.

TIP

The track argument does not assign a new priority if the tracked interface goes down. The track argument assigns a value that the priority will be decreased if the tracked interface goes down. Therefore, if you are tracking serial 0/0 with a track value of 25—standby 1 track serial 0/0 25—and serial 0/0 goes down, the priority will be decreased by 25; assuming a default priority of 100, the new priority will now be 75.

Debugging HSRP

Router#debug standby

Displays all HSRP debugging information, including state changes and transmission/reception of HSRP packets

Router#debug standby errors

Displays HSRP error messages

Router#debug standby events

Displays HSRP event messages

Router#debug standby events terse

Displays all HSRP events except for hellos and advertisements

Router#debug standby events track

Displays all HSRP tracking events

Router#debug standby packets

Displays HSRP packet messages

Router#debug standby terse

Displays all HSRP errors, events, and packets, except for hellos and advertisements