A properly configured VRRP setup does not only track device uptime but also tracks connection uptime. VRRP allows multiple routers to work together in a group, providing high availability by ensuring that if one router or any of its tracked connections fails, another router in the group takes over seamlessly. It’s a networking protocol used to provide automatic backup for a primary router or link in a network.
The primary router is referred to as the master, and the backup routers are called the backup routers. To configure VRRP (Virtual Router Redundancy Protocol) on MikroTik routers, you’ll need to set up both the master and backup routers. VRRP provides redundancy and high availability in network configurations, ensuring minimal disruption in the event of a router or link failure. It is commonly used in enterprise networks, data centers, and wherever continuous network availability is critical.
You may also like: Have you been configuring NAT the right way on Mikrotik?
Before we go into the configuration of VRRP on Mikrotik routers, here is a summary of how VRRP works.
- Master Election: In a VRRP group, one router is elected as the master, and the others are designated as backups. The master router handles all traffic forwarding for the virtual IP address associated with the VRRP group.
- Health Checking: Each router in the VRRP group periodically sends out advertisements to announce its status. If the master router fails to send these advertisements within a specified interval, the backup routers initiate an election process to select a new master.
- Virtual IP Address: VRRP uses a virtual IP address that floats between the routers in the group. Clients in the network use this virtual IP address as their default gateway. When the master router fails, one of the backup routers assumes the responsibility for this virtual IP address, ensuring seamless network connectivity.
- Priority Configuration: Routers in the VRRP group are assigned priorities, and the router with the highest priority becomes the master. If priorities are tied, the router with the highest IP address becomes the master.
- Preemption: Preemption is the ability of a higher-priority router to take over the role of the master if it becomes available again after recovering from a failure. Preemption can be configured to be either enabled or disabled, depending on network requirements.
Configuring VRRP on Mikrotik Routers
To configure VRRP on a Mikrotik router is quite straight forward. Firstly, you need to identify which of your routers is preferred as the primary VRRP gateway and which should be secondary. Then you enable VRRP interfaces on the routers and assign an IP address to the interfaces. The priority feature allows you to set a higher priority value on your chosen primary VRRP gateway. The video below, posted to my YouTube channel, will guide you to fully configure VRRP on your Mikrotik routers.
Here is a link to Mikrotik official documentation on VRRP should you desire to read further on the topic: VRRP – RouterOS – MikroTik Documentation