Part 1: Choosing an Implementation Method
I have two Internet connections to my house. This is due to the fact that the Internet is my business and I cannot afford to be without Internet. The reality is that things fail. The likelihood that two things will fail simultaneously is much smaller than just one failure. My original setup was one network per Internet connection, and if one failed, I could just switch my laptop to the other network. It also allowed for setups such that I use one network, and my wife uses the other and we essentially have double the bandwidth. This setup worked for years, but suffers from two major drawbacks:
- It is harder to share content with my wife, or play multiplayer LAN games with her (we both have to choose a network and then switch to it).
- If one connection fails, it is a manual process to switch to the failover network.
These drawbacks were not big enough to warrant my attention until lately. The change is that I got a Network Attached Storage (NAS) and am in the process of copying my DVD collection to it. This allows us to watch any of our movies on any device (my wife primarily uses an iPad) from anywhere in the house. I also copied all my games to the NAS (because games just take up too much space on my computer). Now my wife and I have to be on the same network (wasted bandwidth) and if that network fails, I have to choose between access to the NAS or access to the Internet (which breaks about half the games as they are online games).
I started to look into what it would take to merge the two networks into one network.
- Option 1: Just have one network using one Internet connection and in a failure, switch the WAN of the router to the other Internet connection.
- Option 2: Buy a dual-WAN router and have it setup for both Internet connections.
- Option 3: Buy a highly configurable router and program it myself.
Option 1 suffers from the problem that reconfiguring the WAN interface of the router is much more work than just switching my laptop to another network. Option 2 is easy to setup and easy to use, but suffers from the problem that they come in Active-Failover mode. If the active connection fails, it automatically switches over to the failover, but if both are up, it only uses the primary connection. Being a tinkerer, having to figure out how to configure and program a router actually has some appeal to me, so I ended up going with Option 3. An additional benefit, is when I figure out how to do it, I can make it ISP agnostic for those people that actually want ISP failover in addition to simple connection failover (read emergency service, i.e. hospital, 911, etc). I settled on a MikroTik RB750GL since I am familiar both with Linux networking, as well as scripting for Linux. The gigabit model is marginally more expensive (extra $10), but since I have a NAS on the network, I want the wired LAN to be as fast as possible. I am using a Ubiquiti UniFi AP for the wireless network since I have access to a UniFi server, but getting a router with built-in WiFi should work just as well.
In Part 2 I will discuss how these were linked together to form an Active-Failover and in the third part, I will discuss how to implement load-balancing among the connections.