Virtual Router Redundancy Protocol
In-game article clicks load inline without leaving the challenge.
The Virtual Router Redundancy Protocol (VRRP) is a network redundancy protocol standardized by the Internet Engineering Task Force (IETF). It provides high availability for the default gateway of an IP subnet by grouping multiple physical routers into a single virtual router that shares a common virtual IP address. The protocol is defined in the RFC 9568.
Within a VRRP group, one router is elected to act as the Active router, while one or more additional routers remain in the Backup state. Hosts on the network use the virtual IP address as their default gateway. If the Active router becomes unavailable, one of the Backup routers is automatically elected to assume the role, allowing gateway services to continue without requiring any reconfiguration of the hosts.
Each VRRP instance is limited, to a single IPv4 subnet or IPv6 link and cannot provide gateway redundancy across multiple Layer 3 networks. The protocol supports both IPv4 and IPv6 and can operate over various Layer 2 technologies, including Ethernet, MPLS and Token Ring.
Implementation
A virtual router must use 00-00-5E-00-01-XX as its media access control (MAC) address. The last byte of the address (XX) is the virtual router identifier (VRID), which is different for each virtual router in the network. This address is used by only one physical router at a time, and it will reply with this MAC address when an ARP request is sent for the virtual router's IP address.
Physical routers within the virtual router must communicate within themselves using packets with multicast IP address 224.0.0.18 and IP protocol number 112 for IPv4, or ff02::12 and IP protocol number 112 for IPv6.
Routers backing up a virtual router have a priority between 1 and 254, and the router with the highest priority will become the active. The default priority is 100; for the MAC address owner, the priority is always 255.
Elections of active routers
A failure to receive a multicast packet from the active router for a period longer than three times the advertisement timer causes the backup routers to assume that the active router is dead. The virtual router then transitions into an unsteady state and an election process is initiated to select the next active router from the backup routers. This is fulfilled through the use of multicast packets.
Backup router(s) are only supposed to send multicast packets during an election process. One exception to this rule is when a physical router is configured with a higher priority than the current active, which means that on connection to the network it will pre-empt the active status. This allows a system administrator to force a physical router to the active state immediately after booting, for example when that particular router is more powerful than others within the virtual router. The backup router with the highest priority becomes the active router by raising its priority above that of the current active. It will then take responsibility for routing packets sent to the virtual gateway's MAC address. In cases where backup routers all have the same priority, the backup router with the highest IP address becomes the active router.
All physical routers acting as a virtual router must be in the same local area network (LAN) segment. Communication within the virtual router takes place periodically. This period can be adjusted by changing advertisement interval timers. The shorter the advertisement interval, the shorter the black hole period, though at the expense of more traffic in the network. Security is achieved by responding only to first hop packets, though other mechanisms are provided to reinforce this, particularly against local attacks. The election process is made orderly through the use of skew time, derived from a router's priority, and used to reduce the chance of the thundering herd problem occurring during the election. The skew time is given by the formula (256 − Priority) / 256 (expressed in milliseconds).
Backup router utilization can be improved by load sharing.
History
Work on VRRP started in 1997 with a first draft published by the Internet Engineering Task Force (IETF). In 1998, the protocol was officially defined. VRRP is an open standard, but Cisco claimed that their Hot Standby Router Protocol (HSRP), a similar but proprietary protocol with essentially the same facility, is patented and licensed. However, in 2001, in reply to a direct request, Robert Barr of Cisco replied that they will not assert any patent claims unless someone tried to assert a claim against Cisco. IBM also claims covering patents and their statement is readable on the IETF webpage. All patents in question have expired.
The protocol was refined in 2004 as version 2. VRRP version 3, the current version, was published in 2010.
Derivatives
Mellanox offers MAGP, a proprietary protocol based on VRRP that allows active-active operation.
Foundry Networks developed VRRP-E(Extended), a proprietary version of VRRP that avoids a few limitations of RFC 3768
See also
- Common Address Redundancy Protocol (CARP) – a non-proprietary, patent-free, and unrestricted alternative to HSRP and VRRP
- Gateway Load Balancing Protocol – a Cisco Systems proprietary router redundancy protocol providing load balancing
- Hot Standby Routing Protocol – a Cisco Systems proprietary router redundancy protocol
- First Hop Redundancy Protocols – Lists of default gateway redundancy protocols
- RSMLT
External links
- .