Skip to content

Holo Guide ‐ VRRP overview

Paul-weqe edited this page Aug 8, 2024 · 3 revisions

Understanding VRRP (Virtual Router Redundancy Protocol)

Virtual Router Redundancy Protocol (VRRP) is a networking protocol designed to ensure redundancy by using virtual routers. This might sound a bit confusing at first, so let's break it down step by step.

Imagine a typical PC in a network. This PC has two gateways to the internet: Gateway 1 and Gateway 2, as shown in the diagram below.

diag-1

Usually, you would configure one of these gateways as the default gateway for the network, say Gateway 1. But what happens if Gateway 1 fails? The network traffic would need to be manually reconfigured to use Gateway 2, which can take some time. While a few minutes might not seem like much, in critical applications, even this short downtime can be significant.

Wouldn't it be better if Gateway 2 could automatically take over as the default gateway the moment Gateway 1 goes down? Even better, what if this switch could happen in seconds or even microseconds? This is exactly what VRRP achieves.

Introducing the Virtual Router

With VRRP, we create a virtual router, which we'll call Gateway 3.

diag-2

What is Gateway 3? Unlike physical routers, Gateway 3 is a virtual router that doesn't physically exist. Instead, it is configured within both Gateway 1 and Gateway 2 (and can be configured on up to 20 devices as per VRRP version 2). This virtual router acts as a single default gateway for the PC.

The beauty of VRRP is that the PC only needs to be configured with Gateway 3 as its default gateway. The virtual router is active on one of the physical devices (say, Gateway 1) as the MASTER. This MASTER device handles all the network traffic directed towards the virtual router's IP address (e.g., 192.168.0.20). How Does VRRP Work?

  • Initial Configuration: The virtual router (Gateway 3) is configured on both Gateway 1 and Gateway 2.
  • MASTER and BACKUP: One of the physical gateways (e.g., Gateway 1) is designated as the MASTER. The other gateway (e.g., Gateway 2) acts as the BACKUP.
  • Traffic Handling: All network traffic directed to Gateway 3's IP address (192.168.0.20) is handled by the MASTER (Gateway 1).
  • Failover: If Gateway 1 (MASTER) goes down, the BACKUP (Gateway 2) automatically takes over as the MASTER. This switch happens seamlessly, with no need for manual reconfiguration.

This redundancy ensures that network traffic continues to flow smoothly, even if one of the physical gateways fails. The end user won't notice any disruption in service.

For a more in-depth understanding of how VRRP works, I recommend watching this introduction video. Additionally, for detailed technical specifications, refer to RFC 3768.

Over the course of this guide, this is the protocol we will be programming into Holo. It is not too complicated of a protocol like our regular routing protocols but it is a decent enough, simple enough and commonly used protocol that we can use as an example.

Next up, let us set up our yang files and basic configurations.