Part 2: Active-Failover

In Part 1 I gave an overview of how to build a multi-homed home network. The first step in implementing it is to build an Active-Failover network using the following scheme:

Note that the IP addresses for the Internet connections are not the actual IPs. Any IP can be substituted as long as they are not in the LAN subnet. Port 1 of the MikroTik is given the IP for the first connection, and port 2 is given the IP for the second connection. Port 3 is setup as the master for the LAN, and ports 4 and 5 are setup as slaves of port 3.

Something to keep in mind when setting up multiple WAN interfaces, is to make sure the NAT masquerading is setup on both interfaces. Setting up an Active-Failover is actually a simple matter. I added two default routes with the primary having a distance of 1 and the secondary with a distance of 2. MikroTik routers with two static routes to the same location will use the route that has the shortest distance. MikroTiks also have a "Check Gateway" feature that allows the MikroTik to detect a link failure and remove the route from the routing table. An example of this is shown below:In this case, the router has detected that the secondary gateway is unreachable (cable unplugged), and has removed it from the active routing table.

Now I have a working Active-Failover home network setup. Not everything is perfect with this setup however:

  • No load-balancing
  • When the primary connection fails, any active connections may break and need to be restarted.

The second is due to the IP address that the Internet sees for the network changes. The other end of the connection is expecting traffic from one IP, and suddenly is changes to another IP. You can force the IP address to remain the same regardless of the connection it uses, but this can lead to routing reachability issues if your ISP is not setup to handle it, or if you are using two different ISPs.

Next I will setup load-balancing between the two connections and try to address both the problems with the current setup outlined above.