40. VRRP
ROX™ v2.2 User Guide
476
RuggedBackbone™ RX1500
40. VRRP
40.1. VRRP Fundamentals
The Virtual Router Redundancy Protocol (VRRP) eliminates a single point of failure associated
with statically routed networks by providing automatic failover using alternate routers. The
RuggedBackbone™ VRRP daemon (keepalived) is an RFC 2338 version 2 compliant implementation
of VRRP.
40.1.1. The Problem With Static Routing
Many network designs employ a statically configured default route in the network hosts. A static default
route is simple to configure, requires little if any overhead to run and is supported by virtually every
IP implementation. When dynamic host configuration protocol (DHCP) is employed, hosts may accept
configuration for only a single default gateway.
Unfortunately, this approach creates a single point of failure. Loss of the router supplying the default
route or the router’s WAN connection results in isolating the hosts relying upon the default route.
There are a number of ways that may be used to provide redundant connections to the host. Some hosts
can configure alternate gateways while others are intelligent enough to participate in dynamic routing
protocols such as Routing Information Protocol (RIP) or Open Shortest Path First routing protocol
(OSPF). Even when available, these approaches are not always practical due to administrative and
operation overhead.
40.1.2. The VRRP Solution
VRRP solves the problem by allowing the establishment of a “virtual router group”, composed of a
number of routers that provide a specific default route. VRRP uses an election protocol to dynamically
assign responsibility for the “virtual” router to one of the routers in the group. This router is called the
VRRP Master. If the Master (or optionally its WAN connection) fails, the alternate (i.e. backup) routers
in the group elect a new Master. The new master provides the virtual IP address and issues a gratuitous
ARP to inform the network of where the gateway can be reached.
Because the host’s default route does not change and MAC address is updated, packet loss at the
hosts is limited to the amount of time required to elect a new router.
40.1.3. VRRP Terminology
Each physical router running VRRP is known as a VRRP Router. Two or more VRRP Routers can be
configured to form a “Virtual Router”. Each VRRP Router may participate in one or more Virtual Routers.
Each Virtual Router has a user-configured Virtual Router Identifier (VRID) and an Virtual IP address or
set of IP addresses on the shared LAN. Hosts on the shared LAN are configured to use these addresses
as the default gateway.
One router in the Virtual Router Group will be elected as the Master, all other routers in the group will
be Backups.
Each router in the group will run at a specific Priority. The router with the highest priority is elected
Master. The value of Priority varies from 1 to 255.
VRRP can also monitor a specified interface and give up control of a VRIP if that interface goes down.
In the following network, host 1 uses a gateway of 1.1.1.253 and host 2 uses a gateway of 1.1.1.252.
The 1.1.1.253 gateway is provided by VRID 10. In normal practice router 1 will provide this virtual IP
as its priority for VRID 10 is higher than that of router 2. If router 1 becomes inoperative or if its w1ppp
link fails, it will relinquish control of VRIP 1.1.1.253 to router 2.