Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Virtual IP · HSRP

Direct answer

The HSRP virtual IP is the default gateway address hosts use. It must be in the same subnet on all group members and configured with the same group number; hosts keep using it while routers fail over behind it.

When to use this

Use it when the design or fault is specifically about the shared Layer-3 gateway address presented to hosts independently of which HSRP peer is currently Active. Stay on that boundary until configuration intent, live control/security state and the adjacent dependency agree.

First 30 seconds

1. The virtual IP is the hosts' default gateway and must be in the interface subnet.

2. Same virtual IP and group on all peers.

3. Virtual IP must not equal any real interface address.

4. Hosts should ARP it to the virtual MAC.

5. Mismatched virtual IPs give duplicate-address or split behaviour.

Operational verification

host ARPs virtual IP → Active replies with virtual MAC → host forwards to Active

Evidence · next step

Correct the group/VIP consistently, then verify client gateway/ARP and failover.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
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 commandshow arp
Scope / prerequisiteUse it when the design or fault is specifically about the shared Layer-3 gateway address presented to hosts independent…
Show · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Verification

Show Commands

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

Operational workflow

Verification & Troubleshooting

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

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

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification and known-good state Verify boundary
show standby brief
show standby vlan 10 | include Virtual IP

The Virtual IP column must show the same address on every router in the group. On a host, the default gateway should be that address, and its ARP table should show the HSRP virtual MAC for it — not a router's own MAC.

Known-good: one virtual IP per group, identical on all routers, inside the interface subnet, used by the hosts as default gateway and answering ping.

Step 2 Verification and output interpretation Verify boundary

Verify the HSRP group’s virtual IP and current Active owner, then confirm a client ARP entry resolves the VIP to the expected virtual MAC. Inspect the switch MAC table to see where the virtual MAC is currently learned. During failover, observe that the IP stays constant while the MAC location/owner moves. Then verify upstream RIB/CEF and actual traffic on the new Active router. A successful ping to the VIP shows local first-hop reachability only; test representative remote service separately.

Step 3 Verification & troubleshooting Narrow the fault

1. Compare the configured and displayed VIP on both peers.

2. Verify clients use that VIP as their default gateway.

3. Ping/test the VIP from the local subnet where policy permits.

4. Check ARP/CAM ownership if gateway traffic is not reaching the Active router.

5. Confirm the VIP remains stable across an HSRP failover.

Step 4 Failure signatures and troubleshooting branches Narrow the fault
  • %HSRP-4-DIFFVIP1. The routers have different virtual IPs configured for the same group.
  • The virtual IP is rejected at configuration. It is outside the interface's subnet, or equal to an interface address — HSRP needs a separate address.
  • Some hosts lose connectivity when a router fails, others do not. The affected hosts use a router's real address as gateway.
  • Duplicate address messages for the virtual IP. Another device is configured with it.
  • The virtual IP does not answer ping although a router is Active. An ACL on the interface, or the test comes from outside the VLAN without a return route.
Step 5 When the problem is really fixed Narrow the fault
  • The same virtual IP is shown on all routers of the group.
  • Hosts use it as default gateway (DHCP scope and static hosts checked).
  • A host's ARP entry for the gateway is the virtual MAC.
  • No address-conflict messages appear in the log.
Evidence references

Evidence · 1 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 · 1
Command lookup Jump straight to Cisco syntax
Key points

Do not infer service health from one command. For Virtual IP, distinguish configured intent, protocol/security state, installed forwarding state and the original workload result.

Key checks
  • show standby brief — Virtual IP column
  • show ip arp <virtual-ip> — resolves to virtual MAC
  • Hosts use the virtual IP as default gateway — client side
ReferenceWhat it is1 section · depth on demand

What it is

The HSRP virtual IP (VIP) is the stable default-gateway address configured on hosts. The Active router currently services that address, and another HSRP peer can take ownership without hosts changing their gateway configuration.

ReferenceWhy it matters1 section · depth on demand

Why it matters

Use the VIP as the durable gateway identity for a subnet while keeping individual router/SVI interface addresses separate for management, routing and HSRP peer operation.

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • Both peers in the same HSRP group must agree on the intended virtual IP

- Hosts should use the VIP as their default gateway

- The VIP belongs to the local IP subnet served by the HSRP interfaces

- A reachable physical SVI/router address does not show the virtual gateway is healthy

- Verify ARP for the VIP resolves to the HSRP virtual MAC during operation.

In depth

The virtual IP is the default gateway the hosts use

Hosts are configured with the HSRP virtual IP as their default gateway, never with the real interface address of either router. Whichever router is active answers for it.

C9300-A(config)# interface Vlan20
C9300-A(config-if)# ip address 10.20.0.2 255.255.255.0
C9300-A(config-if)# standby 20 ip 10.20.0.1
C9300-B(config)# interface Vlan20
C9300-B(config-if)# ip address 10.20.0.3 255.255.255.0
C9300-B(config-if)# standby 20 ip 10.20.0.1
C9300-A# show standby brief
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl20        20   110 P Active  local           10.20.0.3       10.20.0.1
host$ ip route | grep default
default via 10.20.0.1 dev eth0

Rules for the virtual IP

RuleReason
In the same subnet as both interface addressesHosts and routers share the segment
Different from both interface addressesHSRP needs a separate address; this differs from VRRP, where the VIP can be a real address
The same on every router in the groupOtherwise each router advertises a different gateway
Used as DHCP option 3 (default router)Hosts learn the virtual gateway automatically

Secondary virtual IPs

standby 20 ip 10.21.0.1 secondary adds a virtual IP for a secondary subnet on the same SVI. The secondary interface addresses must exist on both routers.

Common problems

SymptomCause
%HSRP-4-DIFFVIP1Routers in the group configured with different virtual IPs
Hosts lose connectivity during failoverHosts use a real interface IP as gateway
Duplicate IP warningsThe virtual IP is also configured on a host or another device

The FAQ lists Ethernet groups per router (256) and HSRP v2 group numbers up to 4095. Use the VLAN ID as the group number where possible, so groups are easy to match to VLANs.

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.

Quick reference

The HSRP virtual IP is the default gateway address configured on hosts. It belongs to the group rather than to one router, so hosts do not notice which router is Active.

interface Vlan20
 standby 20 ip 10.20.0.1
 standby 20 ip 10.20.1.1 secondary

Documented example, not captured output.

The virtual IP must be in the interface's subnet and different from both routers' real interface addresses.

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

Mechanics and state ownership

The HSRP virtual IP is the default-gateway identity configured for a group and used by attached hosts. It must belong to the correct subnet/VLAN context and be consistent between participating peers. Hosts should keep using this address through an Active/Standby transition; HSRP changes the device that answers for the associated virtual MAC rather than requiring endpoint gateway reconfiguration. The VIP is therefore distinct from each router's physical interface IP, which remains necessary for peer communication and management. Duplicate use, subnet mismatch or group inconsistency can produce confusing ARP behavior even when each router interface itself is reachable.

State model and technical mechanics

HSRP separates the client-facing gateway identity from any one router’s physical interface address. Hosts use the virtual IP as their default gateway, while the current Active router answers on behalf of that address using the group’s virtual MAC behavior. The Standby router participates in HSRP but does not normally own the virtual forwarding role until takeover. Because the virtual IP belongs to the subnet’s first-hop redundancy design, it must be reachable at Layer 2 by the clients that use it and must coexist correctly with the routers’ real interface addresses. Role movement should not require clients to change their configured gateway.

Limits and common misconceptions

The virtual IP is not a shared configuration address for managing both routers and should not be confused with either router’s real interface IP. Reachability to the VIP does not show the upstream network or application is healthy. HSRP also does not make the VIP active on two routers simultaneously in normal operation. Treat the VIP as a stable first-hop service identity whose forwarding owner changes underneath it.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Choose a virtual IP inside the client subnet and keep it unique from physical interface addresses and other gateway groups. Configure the same group and virtual IP on all intended HSRP peers for that segment. Align DHCP/default-gateway configuration with the virtual IP rather than a physical router address. If multiple HSRP groups are used, keep group/VIP/VLAN mappings documented. Upstream routing and policy on every potential Active router must support the same client source networks so moving the virtual IP does not change reachability semantics unexpectedly. For Virtual IP, document the intended Active/Standby ownership, priority/preemption policy, tracked dependencies and client-facing VIP before tuning behavior.

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 → Virtual IP. 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%
Embedded reference data

Quick lookup tables

Virtual IP · technical reference

Compact OSPF/FHRP mechanics, design and evidence boundaries for fast lookup.

ItemMeaning
Virtual IPStable host default-gateway address
OwnerCurrent HSRP Active router
Client configShould point to VIP, not physical peer IP
FailoverVIP stays; forwarding ownership moves

Virtual IP operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for Virtual IPSuspicious signatureNext proof
IntentMatches the shared Layer-3 gateway address presented to hosts independently of which HSRP peer is currently Active designConfiguration differs from design/peerCompare effective configuration
Control/security stateStable expected neighbor/database/binding/election statepeers configured with different virtual IPs, VIP outside the attached subnet, another device using the same address, clients pointing to a physical router address instead of the VIP, or ARP not updating coherently after failoverInspect protocol/security detail and adjacent state
ForwardingExpected Layer-2 or RIB/FIB/gateway pathControl state exists but traffic path disagreesMAC/ARP/RIB/FIB/CEF proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Depth when you need it

Deep reference

Additional depth

ARP and the virtual IP

A client ARPs for the virtual IP and learns the HSRP virtual MAC. That mapping should remain a stable default-gateway identity as the Active role moves. During troubleshooting, compare the client ARP entry and switch CAM path with the router that HSRP reports as Active.

Confirmation

Confirm action

Continue?