Pcornel
Networking · Routing › First Hop Redundancy

HSRP (Hot Standby Router Protocol)

Cheat sheet · https://pcornel.dk/topic.php?topic=642

Back to the Topic

Answer

HSRP is Cisco's first-hop redundancy protocol: routers in a group elect an active router that answers for the virtual IP and virtual MAC, and a standby router that takes over if the active stops sending hellos.

Remember

Default priority 100; pre-emption is off unless standby <group> preempt is configured. Version 1 and 2 do not interoperate; v2 is needed for IPv6 and group numbers above 255. Virtual MAC: 0000.0c07.acXX (v1), 0000.0c9f.fXXX (v2). Track the uplink with standby <group> track <object> decrement <n>.

First checks

  • show standby brief — state, priority, pre-emption flag, active and standby, virtual IP.
  • show standby <interface> <group> — timers, tracking, virtual MAC, version.
  • show track — tracked objects.
  • show logging | include HSRP — state changes.

Commands

show standby brief
HSRP group state, active/standby peers and virtual IP.
standby version 2
Use HSRP version 2 (more groups, IPv6, different multicast and MAC).
standby <group> ip <virtual-ip>
Set the HSRP virtual IP address for a group.
standby <group> priority <value>
Set the HSRP priority (default 100).
standby <group> preempt
Let a higher-priority HSRP router take over the Active role.
standby <group> timers <hello> <hold>
Set HSRP hello and hold timers (default 3 and 10 seconds).
standby <group> track <object> decrement <value>
Lower HSRP priority when a tracked object goes down.
show standby
Display detailed HSRP state, timers, priority and tracking.
debug standby errors

Verify in this order

same group, virtual IP and version on all routers → hellos received → highest priority active → standby ready → tracking lowers priority on uplink failure → pre-emption restores the intended active router

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

HSRP operational state map

StateMeaningOperational interpretation
InitialHSRP not yet operationalStart with interface/configuration
LearnRouter has not learned the virtual IPCheck peer/config consistency
ListenKnows VIP but is neither Active nor StandbyPeer election is established but this router is not primary backup
SpeakSends hellos and participates in electionConverging/electing
StandbyPrimary backupRedundancy ready if upstream path is healthy
ActiveCurrent virtual-gateway forwarderVerify forwarding and upstream health

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=642

Confirmation

Confirm action

Continue?