What is VRRP ?

What is VRRP ?

VRRP (Virtual Router Redundancy Protocol) is a standardized protocol comparable to HSRP (Hot Standby Routing Protocol) that enables the establishment of a virtual gateway. It permits LAN hosts to utilize local redundant routing frameworks by configuring a single static default route on the hosts. This approach is commonly implemented across various Ethernet types, such as fast, gigabit, and 10-gigabit, as well as logical interfaces set up in active/passive or primary/backup configurations.

How VRRP Works ? 

Due to its simplicity and support for high availability, a VRRP group can accommodate up to 255 devices. While VRRP automatically assigns priority among compatible devices, administrators have the option to manually set priority levels ranging from 1 (lowest) to 255 (highest) for each device.

This setup leads to several outcomes. Primarily, if the current primary router fails, the system selects a new primary based on priority. Additionally, if a VRRP router with a higher priority than the existing primary joins the network, it can take over as the primary router. However, this is not always guaranteed, as it is also possible to disregard a higher-priority router and maintain the original primary as the preferred backup.

What is VRRP ?

Lets go through the Process 

  • The system allocates a virtual IP address from the local subnet, which serves as the default gateway for all local hosts.
  • The virtual MAC address is automatically generated using the last eight bytes of the VRRP hexadecimal group number. By default, VRRP employs the 0000.5e00.01xx MAC address format, where the final two digits are replaced with the group’s hex number.
  • Within a VRRP group, the member with the highest priority becomes the primary device and starts forwarding traffic. If two members share the same priority, the device with the higher IP address is given precedence.
  • All other VRRP devices function as backups.
  • The primary router sends multicast keep-alive messages to backup devices every second.
  • If a backup router does not receive the master advertisement within a specified timeframe, it assumes the role of primary router through the preempt function.
  • The VRRP group continuously monitors object status changes, enabling dynamic priority adjustments and primary device selection.
  • Authentication options supported by VRRP include plain-text, MD5, or no authentication.

Benefits Of VRRP 

VRRP focuses on providing redundancy and intelligent dynamic traffic routing. It eliminates the necessity for manual configuration of backup devices unless specifically required, while still allowing for detailed administrative control. This approach ensures that network performance is not reliant on a single point of failure.
Because VRRP manages traffic routing, it is commonly used in load balancing setups. Combined with simplified host configuration, this leads to enhanced network efficiency. Additionally, in IPv6 environments, VRRP failover occurs significantly faster than the IPv6 neighbor discovery process.

Configurations 

VRRP Configurations on Router R1 

R1# configure t
R1(config)# interface Gi0/0/10
R1(config-if)# no shutdown
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# vrrp 192.168.10.254
R1(config-if)# vrrp priority 200
R1(config-if)# vrrp 1 md5 key-string NDNA123
R1(config-if)# exit
R1(config)#end
R1#

VRRP Configurations on Router R2

R2# configure t
R2(config)# interface Gi0/0/46
R2(config-if)# no shutdown
R2(config-if)# ip address 192.168.10.2 255.255.255.0
R2(config-if)# vrrp 192.168.10.254
R2(config-if)# vrrp priority 100
R2(config-if)# vrrp 1 md5 key-string NDNA123
R2(config-if)# exit
R2(config)#end
R2#

VRRP Preemption


Preemption is enabled by default in VRRP. This is very different from HSRP, which by default disables preemption.

During the configuration and reconfiguration of VRRP routers, if multiple routers are not explicitly assigned different priorities, the one with the highest IP address will immediately preempt the master role. This may be undesirable. Configuring each one with a different priority value is a recommended practice. For example, one with priority 130, another with 120, another with 110, and so on. This approach helps achieve faster convergence.

Also, recall that the "IP address owner" has a priority value of 255. During the configuration process, the router with a priority of 255 will immediately preempt any lower-priority routers upon startup. Only one router on the link should be assigned this priority.