interface Vlan10
ip address 172.16.10.32
255.255.255.0
no ip redirects
standby 1 priority
150
standby 1 ip 172.16.10.110 The standby router
automatically assumes the active router role when the active
router fails or is removed from service. This new active router
remains the forwarding router, even if a former active router
with a higher priority regains service in the network. A former
active router can be configured to resume the forwarding router
role from a router with a lower priority by using the following
command in interface configuration mode:
Switch(config-if)#standby [group-number]
preempt [{delay} [minimum delay]
[sync delay]] When the standby preempt
command is issued, the interface changes to the appropriate
state. Note: If the routers do not have preempt
configured, a router that boots up significantly faster than
the others in the standby group becomes the active router,
regardless of the configured priority. To remove the interface
from preemptive status, use the no standby group
preempt command. The following example states that
interface VLAN10 is configured to resume its role as the active
router in HSRP group 1, assuming that interface VLAN10 on this
router has the highest priority in that standby group.
Switch#show running-config
Building
configuration...
Current configuration:
!
<output omitted>
interface Vlan10
ip address
172.16.10.82 255.255.255.0
no ip redirects
standby 1
priority 150
standby 1 preempt
standby 1 ip
172.16.10.110 HSRP hello messages are transmitted constantly by
the active and standby HSRP routers and during elections by all
HSRP-enabled routers. The hello message contains the priority
of the router, along with the hello time and hold time values.
The hello time is the interval between the hello messages that
the router sends. The hold time is the amount of time that the
current hello message is considered valid. The default hello
and hold times are 3 and 10 seconds, respectively, which means
failover time could be as much as 10 seconds for clients to
start communicating with the new default gateway. In some
cases, this interval may be excessive for application support.
You can change the default values of the timers to milliseconds
to accommodate subsecond failovers. Lowering the hello timer
results in increased traffic for hello messages and should be
used cautiously. The hold time should be at least three times
the value of the hello time. To change the timers, enter this
command in interface configuration mode:
Switch(config-if)#standby group-number timers
[msec] hellotime holdtime Note:
Hello and dead timers intervals must be identical for all
devices within an HSRP group. Figure describes the command
options. To reinstate the default values, use the no
standby group timers command. In some
situations, the status of an interface directly affects which
router needs to become the active router. This is particularly
true when each of the routers in an HSRP group has a different
path to resources within the campus network. In Figure ,
routers A and B reside in one building, and they each support a
Gigabit Ethernet link to the other building. Router A has the
higher priority and is the active forwarding router for standby
group 1. Router B is the standby router for that group.
Routers A and B are exchanging hello messages through their E0
interfaces.
The Gigabit Ethernet link between the active
forwarding router for the standby group and the other building
experiences a failure. If HSRP is not enabled, router A would
detect the failed link and send an ICMP redirect to router B.
However, when HSRP is enabled, ICMP redirects are disabled.
Therefore, neither router A nor the virtual router sends an
ICMP redirect. In addition, although the G1 interface on router
A is no longer functional, router A still communicates hello
messages out interface E0, indicating that router A is still
the active router. Packets sent to the virtual router for
forwarding to headquarters may not be routed. It is possible
that a dynamic routing protocol (if in use) would detect the
link failure and then update the routing tables of the routers.
However, traffic would then be sent by hosts to the active
HSRP router and forwarded back across the Ethernet segment to
the standby HSRP router where the functional Gigabit link would
be used. Interface tracking enables the priority of a standby
group router to be automatically adjusted based on the
availability of that router’s interfaces. When a tracked
interface becomes unavailable, the HSRP priority of the router
is decreased. When properly configured, the HSRP tracking
feature ensures that a router with an unavailable key interface
relinquishes the active router role. In this example, the E0
interface on router A tracks the G1 interface. If the link
between the G1 interface and the other building fails, the
router automatically decrements the priority on the E0
interface and stops transmitting hello messages out that
interface. Router B assumes the active router role when no
hello messages are detected for the hold time period. The hello
packet has a field that indicates the current priority of the
HSRP-enabled interface. Router A changes this field to indicate
its priority for subsequent hellos. To configure HSRP tracking,
enter the command in Figure in interface configuration mode.
To disable interface tracking, use the no standby
group track command. The command to configure
HSRP tracking on a multilayer switch is the same as on the
external router, except that the interface type can be
identified as a switch virtual interface or as a physical
interface. Multiple tracking statements may be applied to an
interface, which is useful if the intent is for the currently
active HSRP interface to relinquish its status only when two
(or more) tracked interfaces fail.
Content
5.2 Optimizing HSRP 5.2.2
Tuning HSRP Operations You can adjust HSRP timers to
tune the performance of HSRP on distribution devices, thereby
increasing their resilience and reliability in routing packets
off the local VLAN. You can set the HSRP hello and hold times
to millisecond values so that HSRP failover occurs in less than
1 second. For example: Switch(config-if)#standby 1 timers
msec 200 msec 750 Remember that the lower the hello timer
is, the greater the hello traffic. Preemption is an important
feature of HSRP, because it allows the primary router to resume
the active role when the router comes back online after a
failure or maintenance event. Preemption forces a predictable
routing path for the VLAN during normal operations and ensures
that the Layer 3 forwarding path for a VLAN parallels the Layer
2 Spanning Tree Protocol (STP) forwarding path whenever
possible. You should always use preemption when tracking
interfaces. In the previous example, when the Gigabit link came
back up, router A’s priority would increase, but without
preemption, it would not become the HSRP active router until
router B had a state change. When a preempting distribution
switch is rebooted, HSRP preempt communication should not begin
until the distribution switch has established full connectivity
to the rest of the network. This allows routing protocol
convergence to occur more quickly once the preferred router is
in an active state. To accomplish this, measure the system boot
time and set the HSRP preempt delay to a value 50 percent
greater than the boot time. This ensures that the primary
distribution switch establishes full connectivity to the
network before HSRP communication occurs. For example, if the
boot time for the distribution device is 120 seconds, the
preempt configuration would be as follows: standby 1
preempt
standby 1 preempt delay minimum 180
Content
5.2 Optimizing HSRP 5.2.3
Describing Load Sharing With a single HSRP group on a