Table of Contents
VRRP (Virtual Router Redundancy Protocol) is a default gateway redundancy protocol standardized in RFC3768. The concept and mechanism of operation are almost the same as Cisco’s HSRP. Multiple routers are grouped together to form a virtual router. A virtual router has an IP address and a MAC address.
IP address of the virtual router : Specified in the configuration or IP address of the master router
Virtual router MAC address : 00-00-5e-00-01-XX (XX: virtual router ID)
In VRRP, the IP address of the real router can also be specified as the IP address of the virtual router. The real routers then share the roles of master router and backup router. The master router forwards packets destined for the virtual router. The backup router is the router that becomes the new master router when the master router goes down.
The IP address of the virtual router is configured as the default gateway IP address for PCs and servers. Even if the master router goes down, the PCs and servers can continue to communicate to other networks without being aware of it.
For more information about Cisco HSRP, please see the following article.
VRRP IP address and port number
HSRP messages are encapsulated in UDP, but VRRP messages are encapsulated and forwarded directly in IP. Use 220.127.116.11 as the destination IP address. This is a multicast address reserved for VRRP and received only on VRRP-enabled interfaces. Also, the protocol number in the IP header is 112.
How VRRP works
We will look at how it works when a distinct IP address is specified as the virtual router for VRRP, instead of the IP address of the real router.
When VRRP is enabled, VRRP Advertisement is sent; VRRP Advertisement allows multiple routers to recognize virtual router IDs and virtual IP addresses and determine the master router by priority. The master router is determined by priority as in HSRP. The router with the highest priority is the master router. If the priority is the same, the router with the larger IP address is the master router.
Once the master router is determined, VRRP Advertisement will be sent periodically only from the master router. The default VRRP Advertisement sending interval is 1 second. Then, when the periodic VRRP Advertisement from the master router is not received for a certain period of time, the master router is considered to be down. The time that the master router is considered down is called the master down interval and is determined as follows.
Master Down Interval = (VRRP Advertisement transmission interval) × 3 + (256-Priority)/256 (seconds)
If the VRRP Advertisement transmission interval is 1 second and the master router priority is 100, the master down interval is 1 x 3 + (256-100)/256 ≈ 3.61 seconds.
In the following figure, VRRP is enabled on Fa0/0 of R1 and R2; R1 and R2 exchange VRRP Advertisement on Fa0/0 to recognize the IP address 192.168.1.4 of the virtual router. Also, R1 with higher priority becomes the master router; R2 becomes the backup router and will not send VRRP Advertisement.
The VRRP master router, like the HSRP active router, will have the IP/MAC address of the virtual router in addition to the actual IP/MAC address. For example, R1, the master router in the above figure, has a virtual router IP address of 192.168.1.4 and a virtual MAC address of 00-00-5e-00-01-01 in addition to its actual IP/MAC address.
Just as when using HSRP, the PC’s default gateway is configured with the IP address of the virtual router; when the PC attempts to send a packet to other networks, an ARP request is performed to resolve the default gateway’s IP address. The master router responds to the ARP request for the virtual router’s IP address with a virtual MAC address.
When a PC specifies a virtual MAC address in the destination MAC address of the Ethernet header, it is forwarded to the master router, which then routes it.
When the master router goes down, the backup router will not receive periodic VRRP Advertisement. This causes the backup router to recognize that the master router is down and become the new master router. In the figure, when R1 goes down, R2 becomes the new master router and takes over the virtual IP address/MAC address.
As with HSRP, the PC is not aware that the default gateway has switched. Packets destined for other networks are simply encapsulated with an Ethernet header that specifies the virtual MAC address as the destination. It is then forwarded to the new master router, R2, which routes it.
Tracking can be configured in VRRP as in HSRP. Flexibly switch master routers as the network topology changes, except on VRRP-enabled interfaces.
See the following article for more information about how tracking works.
However, Cisco routers do not support VRRP interface tracking configuration, only extended object tracking. If you want the same behavior as interface tracking, you can configure extended object tracking to monitor the state of the local interface.
And in VRRP, preempt is also enabled by default.
For more information about configuring and checking VRRP on Cisco routers, see the following article.
IP Routing Basic
- Router – The central device that performs routing
- Dividing Network with router
- Layer3 Switch Overview
- Measuring the distance to the destination network -Administrative Distance and Metric
- Equal Cost Multi Path Load Balancing
- Cisco Static Route Configuration
- Example of Cisco Static Route Configuration Step by Step
- RIP Split horizon
- RIP Timers
- RIP Route Poisoning – Quickly remove unnecessary route information
- Cisco RIP Basic Configuration and Verification Commands
- Cisco RIP Configuration Example
- Generating a default route in RIP – Redistribution of static route
- Passive-Interface ~Stops Routing Protocols from Sending Packets
- Default Gateway Redundancy Overview
- How the Cisco HSRP works
- Configuring and Verifying Cisco HSRP
- How VRRP works
- Configuring and Verifying commands for VRRP [Cisco]