I have a Mac, which runs Mac OS X 10.6 or Ubuntu 9.10 or Windows XP (Multiboot). Solution can be for any of the systems, whatever works better.

I have two ISPs, one can be accessed via Wi-Fi, one can be accessed via LAN. In Mac OS X I can define the priority, which network to choose first. But what I wish to do is to load-balance with both networks.

I don't want to buy extra hardware. I have some unused Wi-Fi routers if this would help.

Compiling and configuring programs in Linux is no problem for me.

Similar question: Load balancing with multiple gateways


Solution 1:

A close-ish topic, for linux, would be the 'metric' setting for routes. Lower numbers are preferred over higher numbers. If you give both routes the same metric, then I would think they'd be chosen with equal probability.

I think the technique you're trying to achieve is called multihoming. I don't have any direct experience with it. However, a few things you'd probably need to keep in mind.

  • By default, I think you'll end up with only one default route. This means that all outgoing traffic will prefer one interface by default. You'd need to look into having multiple default routes, or into changing that route dynamically over time.
  • For the life of an individual incoming (TCP) connection, it should stay on the same interface which it came in on. I think.

Anywho, those are all the pointers I can think of at the moment.

Solution 2:

You could use a routing metric system where you install both internet connections in your routing table with an equal metric. The operating system should then use both of these routes equally, effectively splitting your outbound traffic across both links.

Incoming traffic in reply to your requests should also be balanced as it will return to the interface (Public IP) that the request came out of.

The problem with this would be session persistence, for example you view a website via one of your links, but the next page view is load balanced out of your other interface, this would confuse some applications as your source IP address would be constantly changing.

Therefore I would probably only split some of your traffic onto the other interface using none equal cost routes, may be by application, destination or protocol. Just something that will keep your traffic paths consistent.

Solution 3:

Connectify Dispatch has a solution that will do just what you need. Currently for Windows only, but people have had success virtualizing and using their software on OS X.

Since you already run (were running) Windows XP I figured you'd be able to figure that part out on your own.


The biggest problem with this is that Windows easily offers support for multiple NICs, while on OS X it isn't nearly as easy to implement.