How does VRRP failover actually work, and what do hosts see?
Two routers share a virtual gateway with VRRP. When the master dies, PCs keep working without touching their config. What is happening underneath?
1 Answer
VRRP (the IETF open standard, RFC 5798) invents a virtual router: a virtual IP (the one hosts use as gateway) and a virtual MAC (0000.5e00.01XX, XX = the VRID/group). The master answers ARP for the vIP and forwards traffic sent to the vMAC; the backup just listens to advertisements (default: every 1s, master-down interval ~3s). On failure, the backup stops hearing advertisements, promotes itself to master, sends a gratuitous ARP so switches relearn which port owns the vMAC — and hosts notice nothing, because their gateway IP and its MAC never changed. Election: highest priority (default 100), tie → highest interface IP. Key detail that trips people up: preemption is ON by default in VRRP — when a higher-priority router recovers it takes the master role right back (the opposite of HSRP, where preemption is off unless you configure it). Disable it with vrrp 1 preempt toggled off if you want the current master to stay put.