NextGen Sarkari

Study material for government exam preparation across Punjab and India.

Home/Study Material/Networking & Technical/HSRP and VRRP Gateway Redundancy
High Availability study guide

HSRP and VRRP Gateway Redundancy

First Hop Redundancy Protocols (FHRPs) protect a LAN from losing its default gateway when one router or Layer 3 switch fails. Hosts use a shared virtual IP address while a group of gateway devices coordinate which member forwards traffic.

High AvailabilityIntermediate30 min readUpdated 2026-08-06

Why gateway redundancy is needed

A host normally has one configured default-gateway address. Even when two physical routers exist, the host will not automatically switch to a different gateway unless a redundancy protocol or another host-side mechanism is used. HSRP and VRRP solve this by presenting one virtual router to the LAN.

Client VLAN
Gateway 10.10.10.1
Virtual router
Gateway A
Gateway B

The active/master device owns the forwarding responsibility and virtual MAC behaviour. Backup members monitor protocol messages and take over when the current forwarder is no longer eligible.

HSRP and VRRP comparison

AreaHSRPVRRP
StandardisationCisco-developed first-hop redundancy protocol.IETF standard; VRRPv3 supports IPv4 and IPv6.
Primary rolesActive and standby.Master and backup.
Election inputConfigured priority, then tie-break rules.Priority; the owner of the protected IPvX address has special priority behaviour.
Virtual identityVirtual IP and protocol-defined virtual MAC.Virtual router identified by VRID with virtual addresses.
PreemptionOften explicitly enabled, depending on platform/defaults.Higher-priority backup normally preempts unless configured otherwise, subject to owner rules.
Do not memorise only defaults: HSRP version, multicast address, timer support and default preemption behaviour can vary by platform. Verify the target software documentation.

Priority, preemption and object tracking

Priority controls which healthy member should forward. Preemption allows a newly available higher-priority member to reclaim the active/master role. A delay is often configured so routing adjacencies and uplinks have time to stabilise before the device takes over.

Interface or object tracking reduces priority when an upstream path fails. Without tracking, a gateway can remain active on the client VLAN even though its WAN, core or routing path is broken—creating a black hole.

  • Track the actual service dependency, not merely the local access interface.
  • Choose a decrement large enough to make the peer win.
  • Use multiple tracking objects carefully to avoid unexpected cumulative reductions.
  • Align Layer 2 root placement, gateway role and upstream routing where practical.

Failover sequence

Hello messages exchanged
Forwarder fails or loses priority
Peer assumes virtual identity
Traffic resumes

During takeover, gratuitous ARP or neighbour-advertisement behaviour helps switches and hosts associate the virtual address with the new forwarder. Convergence time includes protocol detection, election, Layer 2 relearning and any routing recovery upstream.

Configuration examples

HSRP-style example
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 standby version 2
 standby 10 ip 10.10.10.1
 standby 10 priority 110
 standby 10 preempt delay minimum 30
 standby 10 track GigabitEthernet1/0 20
Operational checks
show standby brief
show vrrp brief
show track
show arp
show mac address-table
show logging

Troubleshooting checklist

  1. Verify both devices use the same group/VRID, virtual IP, VLAN and protocol version.
  2. Check priority, preemption and tracked-object state.
  3. Confirm hello packets are not blocked and the peers share Layer 2 connectivity.
  4. Look for duplicate physical or virtual addresses.
  5. Check whether the active gateway has a valid upstream route and return path.
  6. Inspect MAC and ARP/ND tables after failover.
  7. Measure actual outage time rather than assuming protocol timer values equal end-to-end recovery.

Interview focus

Use these points to practise concise, operations-focused answers. Explain the concept first, then give a verification or troubleshooting example.

  • Why do hosts use a virtual gateway address? It remains stable while different physical gateway devices take responsibility for forwarding.
  • What is preemption? It allows a more-preferred device to take back the active/master role when it becomes eligible.
  • Why is uplink tracking important? It prevents a gateway with a failed upstream path from continuing to attract client traffic.
  • Does an FHRP replace dynamic routing? No. It protects the host's first hop; routing is still needed beyond the gateway.
  • What should be checked after failover? Virtual role, tracked objects, ARP/ND, MAC learning, upstream routing and return-path reachability.

Quick self-check

1. Why do hosts use a virtual gateway address?
Answer: It remains stable while different physical gateway devices take responsibility for forwarding.
2. What is preemption?
Answer: It allows a more-preferred device to take back the active/master role when it becomes eligible.
3. Why is uplink tracking important?
Answer: It prevents a gateway with a failed upstream path from continuing to attract client traffic.
4. Does an FHRP replace dynamic routing?
Answer: No. It protects the host's first hop; routing is still needed beyond the gateway.
5. What should be checked after failover?
Answer: Virtual role, tracked objects, ARP/ND, MAC learning, upstream routing and return-path reachability.

Frequently asked questions

1. Can HSRP and VRRP be mixed in one group?
Answer: No. Members of a redundancy group must participate in the same protocol and compatible version.
2. Does gateway redundancy provide load balancing?
Answer: A single group normally has one forwarder. Load sharing can be designed with multiple groups or other mechanisms, but it must be planned carefully.
3. Will failover always be lossless?
Answer: No. Some packets or sessions can be interrupted during detection and convergence.

Standards and further reading

Editorial note: Standards explain protocol behaviour, while commands and defaults can differ by vendor, platform and software release. Verify production changes against current vendor documentation.

Continue learning