Wednesday, June 10, 2009

Mutihoming with one Ethernet interface

Like many small businesses we have taken advantage of the 'free' DSL services offered as part of an existing mobile phone contract. In this case we use Orange for mobile service (we're based in the UK) and they offer 2 Mbit internet with a wireless router for no extra if you have at least one pay monthly account. I thought that it would be a useful addition to our network for testing and backup, especially as it is from a different ISP and delivered over a physically separate landline from our business internet.

The wireless router arrived yesterday and the DSL activation happened on time so that the line came up first time when I plugged the line into the router. I'd heard a few horror stories about Orange's support for Macs so I was pleasantly surprised when I popped the install CD into my MacBook and it came with full OSX installation instructions. 5 minutes later I was surfing on the internet via my shiny new Orange broadband.

Now that we had two internet accesses functioning, how to use them both?

I originally thought that I would keep our 8 Mbit business broadband link and the new line on separate networks so that I would not have to change any server or client configurations, just point my test machines at the new default gateway.

However, with a little thinking about how much work it would be to switch all clients over in the event of a line failure (it does happen), especially if no IT savvy people were available at the time of failure, I started Googling for suggestions on how to link all computers to both gateway routers.

I investigated using a spare Linksys router with new firmware to act as a load balancer, but that would introduce a new single point of failure. After thinking a bit more about OSX's multihoming feature I decided to do the following:
  • At each Mac, clients and servers, add a new interface (System Preferences » Network » Show Network Port Configurations » New.) I called ours orange internet, using port 'Built-in ethernet.'
  • Set up the new port with 'Configure IPv4: Manually,' giving it a 192.168.1.x address. (The original LAN address range is 192.168.0.1, mask 255.255.255.0, and default gateway is 192.168.0.1.)
  • On each machine, arrange the order of ports so that the default ethernet for each is first in the list.
  • On the server, setup a new DNS zone on 192.168.1.x with the same config as the original.
  • Optional: Use dyDNS or similar to assign a domain to the new external IP
Now, if the first interface is not available then it will fail-over to the other one and I can chose which gateway to use at each machine by re-arranging the port order.

No comments:

Post a Comment