Mikrotik Failover VRRP with Hotspot

    756
    • Basic Setup

    This is the basic VRRP configuration example.

    vrrp_diagram

    According to this configuration, as long as the master, R1, is functional, all traffic destined to the external network gets directed to R1. But as soon as R1 fails, R2 takes over as the master and starts handling packets forwarded to the interface associated with IP(R1). In this setup Router R2 is completely idle during Backup period.

     

    • Configuration

    In this tutorial, I am using 2 Mikrotik RouterBOARD RB750 for R1 and R2. Both routers are using eth1 as WAN and eth3 as HOTSPOT.

    R1 configuration:

    Assuming you already have your WAN and HOTSPOT configured, go to Interfaces>VRRP and add new to add a new VRRP.

    Name your VRRP under General tab.

    Set your VRRP interface under VRRP tab. Set your VRRP id=49 and Priority=254.

    Click Apply and OK to save your configuration.

    Add a new IP address for your VRRP under IP>Addresses.

    vrrp_1

    /ip address add address=192.168.0.10/24 interface=ether1

    /interface vrrp add interface=ether1 vrid=49 priority=254

    /ip address add address=192.168.0.12/32 interface=vrrp1

     

    R2 configuration:

    For R2, configure your WAN IP and configure your HOTSPOT same as R1.

    Go to Interfaces>VRRP and add a new VRRP.

    Set VRRP id=49.

    Apply and OK.

    Add an IP address for VRRP under IP>Addresses and make sure it is the same with R1.

    vrrp_2

    /ip address add address=192.168.0.11/24 interface=ether1

    /interface vrrp add interface=ether1 vrid=49

    /ip address add address=192.168.0.12/32 interface=vrrp1

    • Testing

    First of all, check if both routers have correct flags at VRRP interfaces. On router R1 it should look like this

    /interface vrrp print detail 0   RM name=”vrrp1″ mtu=1500 mac-address=00:00:5E:00:01:31 arp=enabled interface=ether1 vrid=49         priority=254 interval=1 preemption-mode=yes authentication=none password=”” on-backup=””         on-master=”” version=3 v3-protocol=ipv4

    and on router R2:

    /interface vrrp print detail 0    B name=”vrrp1″ mtu=1500 mac-address=00:00:5E:00:01:31 arp=enabled interface=ether1 vrid=49         priority=100 interval=1 preemption-mode=yes authentication=none password=””        on-backup=”” on-master=” version=3 v3-protocol=ipv4

    As you can see VRRP interface mac addresses are identical on both routers. However, note that hotspot users will have to get re-authenticated with backup hotspot if main one goes offline as the sessions cannot be carried over between hotpots.