Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

HSRP (Hot Standby Router Protocol)

Direct 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.

When to use this

Use it for a redundant default gateway on Cisco routers or Layer 3 switches.

First 30 seconds

1. show standby brief on both — one Active, one Standby?

2. Both Active → hellos not received: VLAN, group, version, authentication.

3. Wrong Active → priority, and preempt on the intended one.

4. Failover on uplink loss missing → standby <group> track and show track.

5. show logging | include HSRP — how often does the state change?

Operational verification

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

Failure signatureBoth routers claim to be HSRP active, or the gateway does not fail over

Duplicate address messages appear, both routers show Active, or hosts lose the gateway when the active router fails.

Possible stored cause: Group number, virtual IP, version or authentication differs between routers, or hellos are not exchanged on the segment.
Evidence · next step

Compare the peer's view and perform a controlled failover test with traffic.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Expecting the highest-priority router to become Active without preemption

- Using tracking with a decrement too small to change preference

- Treating a healthy Active state as evidence that the upstream path works

- Mismatching HSRP version/group/VIP between peers

- Forgetting that STP and FHRP placement interact in a switched campus

- Changing timers before proving timers are the actual failure point.

Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Key commandstandby version 2
Scope / prerequisiteUse it for a redundant default gateway on Cisco routers or Layer 3 switches.
Show · 2Reference · 6
What next?3 suggested next steps
Child topics (this level)7
Catalog command links8
Evidence2
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

How to read the output

show standby brief

Look first: interface/group, state, active/standby peers, virtual IP, priority

Healthy: Exactly the intended Active/Standby roles and VIP are present.

Warning: Both active, unknown peer, unexpected role/priority or missing VIP.

Does not prove: FHRP state does not prove upstream routing or host ARP behavior.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Duplicate address messages appear, both routers show Active, or hosts lose the gateway when the active router fails.

Step 1 First 30 seconds Verify boundary

Immediate answer: Confirm group, active/standby roles, virtual IP/MAC, tracking and interface/L2 reachability before forcing failover.

Verification chain: Peer reachability → HSRP state machine → active role → virtual MAC/IP ownership → host ARP → gateway forwarding

Stop condition: Active state does not show hosts learned the virtual MAC or that upstream/downstream forwarding is healthy.

Step 2 Verification and output interpretation Verify boundary

Use show standby brief as the compact reference for group, local state, Active/Standby peer, virtual IP and priority. Confirm exactly one intended Active and one intended Standby for the group and that both agree on the virtual IP. Verify the virtual MAC/IP is reachable from the client VLAN and then verify routed forwarding separately. For tracking behavior, perform a controlled tracked-state change and observe the expected priority/role transition, followed by restoration if preemption is part of the design.

Step 3 Verification from the endpoint Verify boundary

Verify group state, Active/Standby identity, virtual IP/MAC, priorities, timers and tracked objects. Confirm the endpoint ARP entry resolves the virtual IP to the HSRP virtual MAC and that the active device installs/forwards routes as expected. An Active state shows gateway ownership, not that upstream routing or applications are healthy. During failover, correlate role transition with ARP/MAC convergence and return-path state.

Step 4 Troubleshooting order Narrow the fault

Start with the interface/VLAN itself, then confirm version/group/VIP consistency, verify both peers and current roles, inspect priority/preempt/tracking, and only then move outward to STP, upstream routing and user traffic. If both routers think they are Active, prioritize Layer 2/control-message reachability before changing election values.

Evidence references

Evidence · 2 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 1packet · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Troubleshooting trees

Start from the symptom

Prove the nearest boundary, branch on the observation, and repeat the original test after the minimum controlled change.

Symptom-first flow HSRP has the wrong Active router or unstable gateway role 7 decision steps

First proof

Prove group/VIP, peer visibility, priority/preemption and tracking before changing timers.

Useful read-only checks: show standby brief · show ip route · show interfaces

Step 1 Group/VIP identity Observe → decide

Confirm both routers use the intended group and virtual IP.

If healthy: Group and VIP agree.

If broken: Correct identity mismatch first.

Step 2 Peer visibility Observe → decide

Confirm each router sees the other HSRP peer.

If healthy: Active/Standby peers are visible.

If broken: Investigate VLAN/L2/control-path failure.

Step 3 Priority/preemption Observe → decide

Compare configured/effective priority and preemption behavior.

If healthy: The design-intended router should win.

If broken: Correct explicit policy rather than forcing state manually.

Step 4 Tracking effect Observe → decide

Check whether tracked objects changed effective priority.

If healthy: Tracking state matches actual upstream health.

If broken: Fix the tracked dependency or policy if it drives role changes.

Step 5 Upstream reachability Observe → decide

Verify the Active router can actually reach required upstream paths.

If healthy: Active role aligns with usable forwarding.

If broken: HSRP state alone is not upstream-route proof.

Step 6 Host gateway resolution Observe → decide

Check that endpoints resolve/use the expected virtual gateway.

If healthy: Hosts use the VIP/virtual MAC as intended.

If broken: Investigate ARP/MAC or stale host state.

Step 7 Failover/recovery test Observe → decide

Perform only a controlled validation of the original HA condition.

If healthy: Role transition and original traffic behave as designed.

If broken: Do not infer HA from a static standby snapshot.

Proof limit

A passing step proves only that boundary; continue until the original symptom is explained and retested.

Failure signatures

Recognize the symptom, then prove the boundary

Observed symptom → candidate boundary → discriminating check → original-test closure. A signature narrows the search; it never proves root cause by itself.

HSRP role is unstable or both sides appear Active
1 · Observe

Active/Standby ownership changes unexpectedly or peer visibility is inconsistent.

2 · Candidate boundaries

peer L2 reachability · group/VIP/auth mismatch · tracking/preemption event · control-plane filtering

3 · Discriminate

compare group/VIP/priority → verify peer hellos/reachability → correlate tracking/interface events

4 · Proof limit

A role change does not prove HSRP itself is the root cause.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
Key points

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>.

Key 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.
ReferenceWhat it is1 section · depth on demand

What it is

Hot Standby Router Protocol (HSRP) is Cisco's first-hop redundancy protocol. Routers in an HSRP group present a shared virtual IP and virtual MAC to hosts, elect an Active router to forward traffic and keep a Standby router ready to take over.

ReferenceHow it works1 section · depth on demand

How HSRP works

HSRP peers exchange control messages on the local segment. They agree on a group and virtual gateway identity, elect Active and Standby roles, and monitor liveness with hello/hold timers. Priority selects the preferred router; preemption controls whether a better router may displace the current Active; tracking can lower priority when an external dependency fails.

ReferenceImportant terms & boundaries5 sections · depth on demand

In depth

HSRP: Cisco's first-hop redundancy protocol

Cisco's IOS XE HSRP guide documents the essentials:

ItemHSRP v1HSRP v2
Groups0–2550–4095
Hello destination224.0.0.2, UDP 1985224.0.0.102
Virtual MAC0000.0C07.ACxy (xy = group in hex)0000.0C9F.F000–0000.0C9F.FFFF
Packet formatFixedTLV, millisecond timers

Version 1 is the default. The guide notes that changing the version reinitialises each group because the virtual MAC changes. Default priority is 100, higher wins, and preemption is off by default.

C9300-A(config)# track 1 interface TenGigabitEthernet1/1/1 line-protocol
C9300-A(config)# interface Vlan20
C9300-A(config-if)# standby version 2
C9300-A(config-if)# standby 20 ip 10.20.0.1
C9300-A(config-if)# standby 20 priority 110
C9300-A(config-if)# standby 20 preempt delay minimum 30 reload 60
C9300-A(config-if)# standby 20 track 1 decrement 20
C9300-A(config-if)# standby 20 authentication md5 key-chain HSRP-KEYS
C9300-A# show standby Vlan20 20
Vlan20 - Group 20 (version 2)
  State is Active
  Virtual IP address is 10.20.0.1
  Active virtual MAC address is 0000.0c9f.f014 (MAC In Use)
  Preemption enabled, delay min 30 secs, reload 60 secs
  Active router is local
  Standby router is 10.20.0.3, priority 100
  Priority 110 (configured 110)
    Track object 1 state Up decrement 20

Group 20 is 0x014, so the v2 virtual MAC ends in F014.

States and messages (from the guide)

StatesInit, Learn, Listen, Speak, Standby, Active
MessagesHello (priority and state), Coup (take over), Resign (step down)

Documented behaviour

TopicDetail
TiesHigher primary IP wins, but only at initial election
TrackingDefault decrement 10; decrements are cumulative; shutdown disables the group instead
Preemption delayThe guide recommends minimum 30 and reload 60
AuthenticationPlain text by default; MD5 by key string or key chain; text and MD5 can't be mixed

Troubleshooting

SymptomCause
Both routers ActiveHellos not reaching each other: VLAN, ACL or authentication mismatch
Higher-priority router stays Standbystandby preempt missing
Failover doesn't happen on uplink lossNo tracking, or the decrement doesn't bring priority below the peer

debug standby errors reports authentication failures; the guide advises using it sparingly.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Concept and state model

HSRP separates the endpoint-visible gateway identity from the physical routers that provide it. Hosts use a virtual IP address and corresponding virtual MAC; the Active router answers and forwards for that identity while the Standby monitors the group and can take over. Group state is decided by HSRP messages, priority and tie-break behavior, with preemption controlling whether a higher-priority router reclaims Active after returning. Tracking can lower priority when an important local condition changes so gateway ownership follows useful connectivity rather than simply local interface state. The virtual IP must belong to the same subnet as the participating interfaces, and group/version parameters must agree between peers.

Operational boundaries and common misconceptions

An HSRP Active state shows gateway-role ownership, not that the router has working upstream reachability. Without effective tracking, a router can remain Active while a remote path is broken. Successful failover also does not show all sessions/applications survive unchanged; ARP timing, convergence and stateful services may have separate behavior. Do not infer the HSRP role from STP root status or vice versa—alignment is a design choice, not a protocol dependency.

State model and protocol mechanics

HSRP provides a stable virtual IPv4 gateway identity shared by multiple routers or multilayer switches. One device is Active for a group, another may be Standby, and hosts use the virtual IP and virtual MAC rather than depending on a specific physical gateway address. Priority, preemption and tracking influence which device owns the active role.

Limits and common misconceptions

HSRP is first-hop redundancy, not dynamic routing and not load balancing for a single group. Preemption can restore a preferred primary but can also trigger another transition after recovery. Tracking a physical interface does not automatically represent full upstream reachability. A virtual IP responding to ping shows some gateway path is alive, not that every remote service is reachable.

ReferenceConfiguration & state2 sections · depth on demand

Configuration model and design choices

Configure the virtual IP, group and priority according to the intended primary/secondary role. Enable preemption only when automatic role restoration is desired and its convergence behavior is understood. Track an upstream object or interface when the router should relinquish Active because its forwarding usefulness has degraded; choose decrement values that actually change the election result. Align HSRP placement with STP/root and Layer 3 topology where practical so the active gateway is reached efficiently rather than across an avoidable Layer 2 detour. Keep multiple groups explicit if load sharing is intentional.

Design and configuration model

Configure a consistent group, virtual IP and subnet on both peers, then set priority and preemption according to the intended primary/secondary design. Use object or interface tracking only for failures that should genuinely move the gateway role; over-broad tracking can cause unnecessary state changes. Align the HSRP design with routing symmetry and upstream reachability so the Active device is also capable of forwarding beyond the VLAN.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Routing → First Hop Redundancy → HSRP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
2026-09-13 · vendor docCisco IOS XE current

Official Cisco vendor documentation reviewed for bounded reference claims: HSRP roles, virtual IP/MAC and tracking/preemption. This is documentation-based technical verification, not lab or production-runtime proof. Deployment-specific applicability and runtime outcome remain separate evidence.

Basis: https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/network-services/network-services/m_fhp-hsrp-0.html · confidence 94%
Embedded reference data

Quick lookup tables

HSRP operational state map

Interpret the important HSRP states during convergence

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

HSRP election and takeover

Priority, tie-break, preemption and tracking in one view

ConditionExpected decisionImportant caveat
Different prioritiesHigher priority preferredCurrent Active may remain without preempt
Equal prioritiesHigher HSRP interface IP wins tieVerify which address participates
Preferred router recoversIt can retake Active with preemptStable-path design matters
Active tracking decrements below peerPeer becomes preferablePeer needs suitable preemption behavior for takeover
HSRP peers cannot hear each otherBoth may claim ActiveTreat as L2/control-plane reachability issue

HSRP v1 vs v2 quick reference

Classic IPv4 values useful for configuration and capture interpretation

PropertyHSRPv1HSRPv2
UDP port19851985
IPv4 multicast224.0.0.2224.0.0.102
Group range0-2550-4095
Virtual MAC pattern0000.0c07.acXX0000.0c9f.fXXX
Cisco commanddefault/legacy behaviorstandby version 2

HSRP troubleshooting flow

Fast order for wrong Active, missing Standby or failed gateway failover

StepCheckHealthySuspicious
1VLAN/SVI/interfaceUp/up and same segmentInterface/VLAN failure
2Version/group/VIPPeers agreeMismatch
3RolesOne Active, expected StandbyBoth Active / Standby unknown
4Priority/preemptMatches intended ownerPreferred router cannot take over
5TrackingDependency changes priorityNo change / decrement too small
6STP/upstreamActive has efficient working pathHairpin or dead upstream
7TrafficClient survives failureGateway role changes but service fails

HSRP · reference boundaries

Compact technical reference for the most important state and interpretation boundaries.

HSRP propertyHealthy reference
Virtual identityPeers agree on group and virtual IP
RolesExactly one intended Active and one Standby
Priority/preemptElection behavior matches design
TrackingRelevant loss changes priority/role when intended

HSRP · operational reference

Compact state and interpretation boundaries for fast lookup.

State / evidenceInterpretation
ActiveOwns virtual forwarding role
StandbyReady backup state
Virtual IP/MACHost-facing identity
TrackingCan alter effective priority
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

HSRP Fast Check

Virtual gateway, active/standby, priority, preempt og tracking.

Quick checks

  • show standby brief
  • show standby
  • Verify virtual IP and group
  • Compare priority/preempt
  • Check tracked objects
  • Compare STP root/path alignment

Husk

HSRP active proves gateway ownership, not that Layer-2 and upstream paths are optimal.

Depth when you need it

Deep reference

Additional depth

HSRP version 1 vs version 2

For classic IPv4 HSRP, both versions use UDP port 1985. HSRPv1 commonly uses multicast 224.0.0.2, groups 0-255 and virtual MAC 0000.0c07.acXX. HSRPv2 commonly uses multicast 224.0.0.102, groups 0-4095 and virtual MAC 0000.0c9f.fXXX. Confirm exact platform behavior before using these values as capture/configuration assumptions.

Confirmation

Confirm action

Continue?