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.
| Parameter | Default value | Effect |
|---|---|---|
| Priority | 100 (255 for address owner) | Decides which router becomes master |
| Advertisement interval | 1 s | Shorter values speed up failure detection |
| Master down interval | About 3 s with defaults | Time before a backup assumes the master role |
| Preemption | Enabled | Lets a higher-priority router reclaim the master role |
| Virtual router ID | Chosen per subnet, 1 to 255 | Must match on all members of the group |
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.
| Feature | VRRP | HSRP | GLBP |
|---|---|---|---|
| Standard | Open IETF standard | Cisco proprietary | Cisco proprietary |
| Active role name | Master | Active | Active virtual gateway |
| Default hello interval | 1 s | 3 s | 3 s |
| Virtual IP may equal a real IP | Yes | No | No |
| Load sharing in one group | No | No | Yes, several forwarders |
| Preemption by default | Yes | No | No |
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.
| Version | Address families | Timer resolution | Authentication |
|---|---|---|---|
| VRRPv2 (RFC 3768) | IPv4 only | Whole seconds | Simple text or none |
| VRRPv3 (RFC 5798) | IPv4 and IPv6 | Centiseconds | None in the protocol |
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.
| Symptom | Likely cause | Fix |
|---|---|---|
| Both routers act as master | Advertisements blocked by a VLAN, ACL or link failure | Restore Layer 2 path and permit protocol 112 |
| Traffic lost after WAN failure | No uplink or route tracking | Track uplinks and decrement priority |
| Repeated master changes | Timers too aggressive or CPU overload | Lengthen interval or use BFD |
| Group never forms | Mismatched VRID, version or authentication | Align configuration on all members |
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.