Combine two ethernets?

Matthew Palmer mpalmer at hezmatt.org
Sun Aug 27 11:28:34 BST 2006


On Sun, Aug 27, 2006 at 11:23:43AM +0200, Xan wrote:
> I have two network interfaces: eth0 and eth1.
> I just want to know if it's possible to combine two interfaces for 
> downloading (and uploading) at the same time in the two interfaces. That 
> is, can ubuntu use the two interfaces at the same time?

Kinda.

If you have control of both ends of the connection, you can use
channel-bonding to produce a greater bandwidth for transfer, but it does
require both ends to be bonded, or else the unbonded end to have a larger
bandwidth (eg 2x100Mb bonded links, talking to a single Gb interface).  You
also have to have enough extra capacity in your switch to make this work.

Channel bonding works nicely because it's below IP, so you don't have to
worry about routing issues.  If you've got to work at the IP layer, it's a
bit trickier -- for a single IP address, you need to either have your
packets inverse-multiplexed (again, both ends need support) or you have to
have dynamic routing policies in place to ensure that the packets get flung
down different pipes.

The final, bodgiest option is to have two links, each with different IP
addresses, but with different connections sent out different interfaces. 
This absolutely requires some form of NAT, and isn't resilient against
congestion or failure in one link (all TCP connections bound to that link
will suffer) but you can, overall, get roughly the aggregate bandwidth
across both links.

You'll find much enlightenment in the Linux Advanced Routing and Traffic
Control (LARTC) HOWTO, specifically
http://lartc.org/howto/lartc.loadshare.html (inverse multiplexing)
and http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN298 (load
sharing across differently addressed links).

> And the question is: if it's possible, is it _easy_ (for desktop users)?

Not easy, but quite doable.

- Matt



More information about the ubuntu-devel mailing list