How to configure VRRP on Mikrotik for disaster recovery

The Virtual Routing Redundancy Protocol is an industry standard protocol used to set up redundancy between two routers. It is used for disaster recovery on a network. If router A ever goes down, router B will take up control of network operations in less than two seconds.

Unlike Hot Standby Routing Protocol (HSRP) and Gateway Load Balancing Protocol (GLBP) which are Cisco proprietary protocols, the VRRP can be used between different vendor routers. In this post, I will demonstrate how you can set up between two Mikrotik routers.

From the diagram above, the connection from the ISP is plugged into a switch from where I have dual connections to my two Mikrotik routers. To achieve this, you will need a /29 subnet from your ISP. For this demonstration, I have 192.168.1.0/29 as my ISP assigned subnet. The ISP gateway is 192.168.1.1/29, and my two Mikrotik routers are given 192.168.1.2/29 and 192.168.1.3/29 respectively.
My LAN is configured for 192.168.20.0/24. Router A is 192.168.20.1, router B is 192.168.20.2 while the VRRP address is 192.168.20.3. Whoever becomes the active router, will be live on this the 192.168.20.3 IP and the same IP will be configured as the gateway of hosts on the LAN. Let’s set this up.

On router A

>>Click on interface>>VRRP>>give it a name or better still, leave it at vrrp1 (whatever name you give here must be same on router B. I prefer to leave it as vrrp1)

 

>> Click on VRRP tab>> choose the interface connecting to your LAN switch>> set the priority above 100 for the router you want to be the active VRRP router>>check the box for preemption (this will allow the active router to take back control upon recovery>>click on apply and ok. The default interval to consider the router down and switch control to the backup router is 1 second. You can increase it if you want, but I suggest you leave it at default.

 

Next, assign an IP to the VRRP interface:

>>Click on IP>>assign the VRRP IP to the VRRP interface you just created.

On router B

Do exactly the same except that the priority should not be greater than the one set for A e.g, since the priority for router was set to 120, be should be left at 100 with preemption disabled. This will allow router A to be the active VRRP router while router B becomes the back up.

 

Make sure the two routers are plugged into the same LAN switch as shown in my topology above. Assign IPs from your LAN to your network hosts and make sure the gateway address on your hosts is the IP address of the active VRRP router. With this setup, router A will be the active VRRP router on the network and will hand over control to router B if router A goes down. The duration of downtime before control is handed over to router B is 1 second. Router A will take back control upon its full recovery.
If you have any question regarding this or any other topic, please drop it in the comment section.
Please, like my Facebook page, follow me on Twitter and subscribe to my YouTube channel to see videos on tech topics. Thank you and remain safe.
Spread the love

Leave a Comment