← Interview Prep

VRRP & FHRP — Gateway Redundancy

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.

VRRP (RFC 5798)

FHRP comparison

VRRPHSRP (Cisco)GLBP (Cisco)
StandardOpen (RFC 5798)Cisco proprietaryCisco proprietary
RolesMaster / BackupActive / StandbyAVG + multiple AVFs
Virtual MAC0000.5E00.01xx0000.0C07.ACxx0007.B400.xxyy
TransportIP proto 112, 224.0.0.18UDP 1985, 224.0.0.2 (v1)UDP 3222, 224.0.0.102
Load sharingMultiple groups (MHSRP-style)Multiple groupsBuilt-in — one VIP, several forwarders
Owner priority255 = address ownerNo owner conceptNo 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.

Design notes

Likely interview questions

Related: MC-LAG · VLAN & VXLAN (anycast GW) · Office Network.