HSRP (Hot Standby Router Protocol)
Cheat sheet · https://pcornel.dk/topic.php?topic=642
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
| State | Meaning | Operational interpretation |
|---|---|---|
| Initial | HSRP not yet operational | Start with interface/configuration |
| Learn | Router has not learned the virtual IP | Check peer/config consistency |
| Listen | Knows VIP but is neither Active nor Standby | Peer election is established but this router is not primary backup |
| Speak | Sends hellos and participates in election | Converging/electing |
| Standby | Primary backup | Redundancy ready if upstream path is healthy |
| Active | Current virtual-gateway forwarder | Verify 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