VRRP

Also known as: Virtual Router Redundancy Protocol

On this page 7

VRRP (Virtual Router Redundancy Protocol) is a standard first-hop redundancy protocol that lets a group of routers present a single virtual IP address as the default gateway for hosts on a subnet. In routing, it removes the default gateway as a single point of failure: if the active router fails, a backup router takes over the same address within seconds, and hosts continue sending traffic without any reconfiguration.

VRRP is an open IETF standard, defined for IPv4 and IPv6 in RFC 5798 (VRRPv3), and is supported by most enterprise routers, Layer 3 switches and firewalls, which makes it the vendor-neutral alternative to proprietary protocols such as HSRP and GLBP.

How VRRP elects and maintains a master router

Routers that share a gateway form a virtual router, identified by a virtual router ID (VRID) from 1 to 255. One member becomes the master and forwards traffic for the virtual IP address, while the others remain backup routers that listen and wait.

  • The router with the highest priority (1 to 254, default 100) becomes master; ties are broken by the highest primary IP address.
  • A router that owns the virtual IP address on a real interface is the address owner and uses priority 255.
  • The master sends advertisements to multicast address 224.0.0.18 (IPv4) or FF02::12 (IPv6), using IP protocol number 112.
  • If backups miss advertisements for the master down interval, the highest-priority backup takes over.

The virtual router answers ARP requests with a virtual MAC address of the form 00-00-5E-00-01-XX, where XX is the VRID. Because the MAC address moves with the master role, hosts do not need to refresh their ARP caches; the new master sends a gratuitous ARP so that switches update their MAC address tables immediately.

Timers, priority and preemption

Failover speed is governed by the advertisement interval and the resulting master down interval, which is roughly three intervals plus a short skew time that favors higher-priority backups. The table lists the parameters engineers tune most often.

ParameterDefault valueEffect
Priority100 (255 for address owner)Decides which router becomes master
Advertisement interval1 sShorter values speed up failure detection
Master down intervalAbout 3 s with defaultsTime before a backup assumes the master role
PreemptionEnabledLets a higher-priority router reclaim the master role
Virtual router IDChosen per subnet, 1 to 255Must match on all members of the group
Key VRRP parameters

VRRPv3 supports centisecond timers, so intervals well below one second are possible. Very aggressive timers, however, can cause false failovers when a busy control plane delays advertisements. Many designs combine moderate VRRP timers with BFD or interface tracking for faster, more reliable detection.

Object tracking lowers a router’s priority when an uplink or a route disappears. Without it, a master whose WAN link has failed still answers for the gateway and silently drops traffic, because VRRP by itself only verifies that the master is alive on the LAN side.

VRRP compared with other first-hop redundancy protocols

Three protocols dominate first-hop redundancy, and they differ in standardization, load sharing and terminology. The comparison below highlights the practical differences.

FeatureVRRPHSRPGLBP
StandardOpen IETF standardCisco proprietaryCisco proprietary
Active role nameMasterActiveActive virtual gateway
Default hello interval1 s3 s3 s
Virtual IP may equal a real IPYesNoNo
Load sharing in one groupNoNoYes, several forwarders
Preemption by defaultYesNoNo
VRRP, HSRP and GLBP compared

VRRP does not balance traffic within a single group. To use both routers, engineers create two VRRP groups with different virtual addresses and masters, then point half of the hosts or VLANs to each gateway. In data center fabrics, anycast gateway designs often replace VRRP entirely.

VRRP versions and IPv6 support

Three protocol versions exist, and only the latest is in broad new deployment. VRRPv2 handles IPv4 only, while VRRPv3 extends the same election logic to IPv6 and refines the timer model. The table summarizes the differences that affect configuration.

VersionAddress familiesTimer resolutionAuthentication
VRRPv2 (RFC 3768)IPv4 onlyWhole secondsSimple text or none
VRRPv3 (RFC 5798)IPv4 and IPv6CentisecondsNone in the protocol
VRRP protocol versions

In IPv6 networks, hosts often learn their gateway through Router Advertisements rather than static configuration. With VRRPv3, the master sends Router Advertisements using the link-local virtual address, so hosts install the virtual router as their default route. Mixing VRRPv2 and VRRPv3 in one group is not supported, so migration requires care: most platforms allow a temporary compatibility mode, but all members should run the same version once the change is complete.

VRRP also coexists with dynamic routing. The routers in a group usually run OSPF or another interior gateway protocol upstream, and the master role should align with the preferred upstream path to avoid asymmetric routing through stateful firewalls.

Design guidelines and common mistakes

Correct VRRP behavior depends as much on the Layer 2 design as on the protocol settings, because advertisements travel through the switched network between the routers. The table pairs frequent symptoms with their causes.

SymptomLikely causeFix
Both routers act as masterAdvertisements blocked by a VLAN, ACL or link failureRestore Layer 2 path and permit protocol 112
Traffic lost after WAN failureNo uplink or route trackingTrack uplinks and decrement priority
Repeated master changesTimers too aggressive or CPU overloadLengthen interval or use BFD
Group never formsMismatched VRID, version or authenticationAlign configuration on all members
Typical VRRP problems and fixes

A dual-master condition, often called split brain, is the most serious failure: two routers answer for the same virtual MAC address, causing MAC flapping and intermittent loss. Operators should also note that VRRPv3 removed authentication, so the protocol must be protected by limiting it to trusted segments and filtering protocol 112 at the edge.

In everyday language

Every device on a network needs a door to the outside world, called the default gateway. If that single door is blocked, nothing gets out. VRRP puts two or more doors behind one sign: devices always walk toward the same sign, and if the door behind it jams, another door opens in its place.

The devices never notice the switch. The main benefit is continuity: a broken router no longer means an office without internet access.

Seen in the real world

A regional hospital connects its clinical VLAN, with about 400 workstations, through two core switches. Both run VRRP for the gateway address 10.20.0.1: the first switch has priority 120 and tracks its uplink, while the second keeps the default priority of 100. All workstations use 10.20.0.1 as their default gateway.

During a planned firmware upgrade, engineers reload the first switch. The second switch stops receiving advertisements, becomes master after about three seconds, and sends a gratuitous ARP. Electronic records sessions continue with only a brief pause, and when the first switch returns, preemption restores the original master without manual intervention.