ENGINEERING GUIDE · HIGH AVAILABILITY

HSRP Engineering Guide

Understand first-hop redundancy, HSRP elections, Active and Standby roles, preemption, tracking, timers and practical troubleshooting.

FHRPHigh availabilityCisco HSRP
The important bit: hosts use the HSRP virtual IP as their default gateway. HSRP selects an Active device to forward traffic and a Standby device ready to take over.

How HSRP works

Hot Standby Router Protocol is a first-hop redundancy protocol. A group of Layer 3 devices shares a virtual IP address and virtual MAC address. Hosts use the virtual IP as their default gateway, while HSRP selects an Active device and a Standby device.

When the Active device fails or otherwise relinquishes the role, the Standby device can take over the virtual gateway function. The virtual address allows hosts to retain the same default gateway.

Priority and election

HSRP priority is normally 100 by default and can be configured from 1 to 255. A higher priority is preferred during election processing. If priorities are equal, the interface IP address is used as a tie-break in supported implementations.

The effective priority can be reduced by object tracking. This lets a router remain operational for the LAN while lowering its HSRP preference when another tracked resource fails.

Preemption

Preemption allows a higher-priority HSRP device to take the Active role when it becomes eligible. Without preemption, a device with a higher configured priority does not necessarily take over from an already-active lower-priority device simply because it has returned to service.

A preemption delay can be used to give a recovering router time to establish its routing information before taking the Active role.

Object tracking

HSRP tracking can reduce the effective priority when a tracked interface or object changes state. This is useful when the LAN-facing interface remains up but an important upstream path has failed. The exact tracking commands and capabilities vary by platform.

Timers

Common Cisco HSRP defaults are a 3-second hello timer and 10-second hold timer. These values are configurable. The hold timer controls how long an HSRP device waits without receiving a valid hello before considering the peer unavailable.

Changing timers affects convergence and control traffic. Very aggressive values should be tested against the platform and network conditions rather than selected solely because they look faster.

Virtual MAC

VersionCommon virtual MAC formatGroup range
HSRPv10000.0C07.ACxx0–255
HSRPv20000.0C9F.Fxxx0–4095

Use the HSRP Calculator to generate the virtual MAC for a group and work through a two-router priority election.

Troubleshooting

  1. Verify both devices are on the same Layer 2 segment for the HSRP group.
  2. Check the HSRP group number and virtual IP address.
  3. Compare configured and effective priorities, including tracking reductions.
  4. Check whether preemption is enabled and whether a preemption delay is configured.
  5. Compare hello and hold timers.
  6. Check authentication configuration where used.
  7. Use platform commands such as show standby to inspect Active/Standby state, timers, virtual IP, virtual MAC and tracking.
  8. Check the underlying VLAN, interface and routing state separately from HSRP.
Common trap: HSRP can be healthy while the upstream routing path is broken. First-hop redundancy does not replace routing convergence or end-to-end path redundancy.

References

  • Cisco First Hop Redundancy Protocols Configuration Guide — HSRP.
  • RFC 2281 — Cisco Hot Standby Router Protocol (HSRP).