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.
Virtual IP · HSRP
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.
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.
host ARPs virtual IP → Active replies with virtual MAC → host forwards to Active
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
Operational reference
Fast context before you go deeper.
show arpShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
show standby brief— Virtual IP columnshow ip arp <virtual-ip>— resolves to virtual MAC- Hosts use the virtual IP as default gateway — client side
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
| Rule | Reason |
|---|---|
| In the same subnet as both interface addresses | Hosts and routers share the segment |
| Different from both interface addresses | HSRP needs a separate address; this differs from VRRP, where the VIP can be a real address |
| The same on every router in the group | Otherwise 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
| Symptom | Cause |
|---|---|
%HSRP-4-DIFFVIP1 | Routers in the group configured with different virtual IPs |
| Hosts lose connectivity during failover | Hosts use a real interface IP as gateway |
| Duplicate IP warnings | The 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.
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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%Quick lookup tables
Virtual IP · technical reference
Compact OSPF/FHRP mechanics, design and evidence boundaries for fast lookup.
| Item | Meaning |
|---|---|
| Virtual IP | Stable host default-gateway address |
| Owner | Current HSRP Active router |
| Client config | Should point to VIP, not physical peer IP |
| Failover | VIP stays; forwarding ownership moves |
Virtual IP operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Virtual IP | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches the shared Layer-3 gateway address presented to hosts independently of which HSRP peer is currently Active design | Configuration differs from design/peer | Compare effective configuration |
| Control/security state | Stable expected neighbor/database/binding/election state | peers 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 failover | Inspect protocol/security detail and adjacent state |
| Forwarding | Expected Layer-2 or RIB/FIB/gateway path | Control state exists but traffic path disagrees | MAC/ARP/RIB/FIB/CEF proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or protection disabled | Regression test |
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.