In a Nutshell

A single point of failure at the default gateway can isolate entire subnets. First Hop Redundancy Protocols (FHRP) provide a mechanism for multiple physical routers to present themselves as a single virtual gateway. This article deconstructs the mechanics of Virtual IPs (VIP), Virtual MACs (VMAC), and the election logic behind HSRP and VRRP.

The Virtualization of the Gatway

In a standard TCP/IP configuration, a host is assigned a static Default Gateway IP. If that router hardware fails, the host loses all off-link connectivity. FHRP solves this by creating a Virtual IP (VIP) that is shared between a group of routers.

R1 Status
R2 Status
VIP: 192.168.1.1 (ACTIVE: R1)
INTERNETR1Priority: 110R2Priority: 100L2 FABRICUSER GATEWAY: .1

Master Election

R1 (Pri 110) is the Master. If R1 fails, R2 (Pri 100) waits for the "Hold Timer" to expire before declaring itself Master.

Gratuitous ARP

Upon failover, R2 sends a GARP. Watch the pulse! This updates the L2 Fabric so frames are steered to the new physical port.

Click the router icons to simulate granular failures.

HSRP vs. VRRP: A Comparative Analysis

While both protocols achieve the same goal, their implementation and terminology differ:

  • HSRP (Hot Standby Router Protocol): Cisco-proprietary (standardized in RFC 2281). Uses 'Active' and 'Standby' roles.
  • VRRP (Virtual Router Redundancy Protocol): Open standard (RFC 5798). Uses 'Master' and 'Backup' roles.
Priority Range=0255\text{Priority Range} = 0 - 255

The router with the highest priority becomes the Active/Master. In the event of a tie, the router with the highest physical IP address wins the election.

Virtual MAC Mechanics

To prevent hosts from needing to clear their ARP caches during a failover, FHRP uses a Virtual MAC address.

  • HSRP VMAC: 0000.0c07.acXX0000.0c07.acXX (where XX is the group ID).
  • VRRP VMAC: 0000.5e00.01XX0000.5e00.01XX (where XX is the VRID).

Object Tracking and WAN-Awareness

A router can be 'healthy' internally but have a failed upstream WAN link. Advanced FHRP implementations use Object Tracking. If the upstream link goes down, the router automatically decrements its priority, triggering a graceful failover to a redundant peer that still has internet access.

New Priority=Primary PriorityDecrement Value\text{New Priority} = \text{Primary Priority} - \text{Decrement Value}

By combining sub-second timers with BFD (Bidirectional Forwarding Detection), modern FHRP deployments can achieve gateway failover in under 200 milliseconds, providing an uninterrupted experience for voice and real-time data services.

Share Article

Technical Standards & References

REF [1]
S. Knight, et al. (2010)
Virtual Router Redundancy Protocol (VRRP) Version 3 for IPv4 and IPv6
Published: RFC 5798
VIEW OFFICIAL SOURCE
REF [2]
T. Li, et al. (1998)
Cisco Hot Standby Router Protocol (HSRP)
Published: RFC 2281
VIEW OFFICIAL SOURCE
Mathematical models derived from standard engineering protocols. Not for human safety critical systems without redundant validation.

Related Engineering Resources