First-hop redundancy: how a shared virtual IP/MAC keeps hosts online when a gateway fails. VRRP master election, priority & the address owner, advertisements, preemption, object tracking, VRRPv3; and a VRRP vs HSRP vs GLBP comparison plus the EVPN anycast-gateway alternative.
A host knows exactly one default gateway. If that router dies, every host on the subnet is stranded — even if a second router sits right there. First-Hop Redundancy Protocols (FHRP) fix this: two or more routers share a virtual IP (the gateway hosts point at) and a virtual MAC, and one of them answers for it at any moment. VRRP is the standards-based one.
The trick: the gateway the hosts use is virtual. Routers elect a master that owns the virtual IP/MAC and forwards; if it fails, a backup takes over the same IP and MAC — hosts never notice, no ARP change needed.
0000.5E00.01xx (xx = VRID). Backups answer ARP
for the VIP with this MAC, so failover needs no gratuitous re-learn on hosts.224.0.0.18, IP protocol
112, every ~1s (v3 supports sub-second). Miss 3× → a backup promotes itself.| VRRP | HSRP (Cisco) | GLBP (Cisco) | |
|---|---|---|---|
| Standard | Open (RFC 5798) | Cisco proprietary | Cisco proprietary |
| Roles | Master / Backup | Active / Standby | AVG + multiple AVFs |
| Virtual MAC | 0000.5E00.01xx | 0000.0C07.ACxx | 0007.B400.xxyy |
| Transport | IP proto 112, 224.0.0.18 | UDP 1985, 224.0.0.2 (v1) | UDP 3222, 224.0.0.102 |
| Load sharing | Multiple groups (MHSRP-style) | Multiple groups | Built-in — one VIP, several forwarders |
| Owner priority | 255 = address owner | No owner concept | No owner concept |
Load sharing: VRRP/HSRP balance by running two groups on the same VLAN and making each router master for one (half the hosts point at each VIP). GLBP does it natively: one virtual IP, the AVG hands out different virtual MACs to ARP requests so traffic spreads across all forwarders.