Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two network interfaces (one wired & one wireless). I have two internet accounts too (each 256 kBps; one from a modem that I use as wired connection & the other from a wireless network).

Is it possible to connect to both networks and merge them and get twice the speed (512 kBps)?
How?
I'm using Ubuntu 10.04 (Lucid Lynx).

Thanks

share|improve this question
    
askubuntu.com/questions/53499/… –  pl1nk Nov 26 '12 at 12:52
add comment

2 Answers

This is definitely feasible. Many of us were running mixed, load-balanced broadband configs for corporate years ago and they worked really well. Many probably still do!

You can do it in a number of ways, including using iptables rules and/or iproute2 (ip(8) command) to setup policy routing.

The load balancing is not done at the packet level, but at the connection level. That is, all packets of a connection go out of one interface. Which interface this is depends on the routing policy. Without the co-operation of your the first routers just beyond your own infrastructure, this is the only way you can do it. Remote computers have no way to tell that your two IP addresses actually belong to the same computer. In TCP, a connection is uniquely identified by a 4-tuple (Remote-IP, Remote-Port, Local-IP, Local-Port). If you send packets from different IPs, the remote server thinks they belong to two different connections and gets hopelessly confused.

Obviously, this sort of thing makes more sense in a corporate environment, or one with lots of users sharing a single connection. At work, we were combining a 256 kbps ADSL line with a 512 kbps cable line (yes, back then) and the whole thing worked remarkably well, with the added benefit of high availability.

For some actual practical help, here's one way of doing it with iproute2. It's meant for Debian, but it works on Ubuntu too, of course.

share|improve this answer
    
And, as @Nils said, if you're worried about bandwidth, you should definitely have an instance of Squid running somewhere in your infrastructure. It does depend on your use patterns, of course. If you visit the same sites a lot, a local cache is a great boon. –  Alexios Jan 17 '12 at 22:47
add comment

Propably yes. My rough idea is to implement an outgoing load-balancer (via LVS) using a virtual IP that you could use as default-gateway.

It is propably much more complicated than that and might involve putting up squid or something alike.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.