Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If I have two connections to the Internet (one via eth0 and the other via wlan0), will both be utilized by default?

...or do I have to make some adjustments in order to have applications take advantage of both connections?

share|improve this question
    
possible duplicate of Use two networks at the same time? –  belacqua Mar 28 '11 at 22:53
    
    
@jgb: No, that question is different - it's asking about being connected to two different networks and doesn't really have anything to do with Internet usage. –  Nathan Osman Mar 28 '11 at 22:55
    
@jgbelacqua - They're subtly different. –  Oli Mar 28 '11 at 22:56
1  
@jgb: I'm wondering if Ubuntu (I guess the Linux kernel itself) is smart enough to do something like use alternate networks for each (HTTP) request. –  Nathan Osman Mar 28 '11 at 23:02
show 2 more comments

3 Answers 3

up vote 0 down vote accepted

The short answer is no. A PC has only one given default gateway and that's used for all traffic. You might still see some packets in/out of the secondary interface, but it'll be layer 2 stuff, not IP based.

Do a netstat -r to see what direction your traffic is taking.

The longer answer is "no, but you can bond your interfaces together, creating a "virutal interface" which is capable of using both cards". Basically, follow one of the links mentioned in your comments. You'll need the ifenslave package and a guide on how to configure, such as the ones I mention in this answer.

share|improve this answer
    
I imagine it's also possible to (manually) set up multiple equal-cost paths to a destination on Linux, and have it load-balance that way, but I've not seen it done. –  belacqua Mar 28 '11 at 23:12
    
No, not really. It depends. Equal cost paths are only relevant if you're (as you say) manually entering destinations. The default route is always a single route, chosen by metric from the available interfaces. Bonding is the only way to achieve load balancing, or bandwidth enhancement. –  Scaine Mar 28 '11 at 23:16
    
OK, I don't understand your reply. Perhaps my comment wasn't clear. (It's not very relevant to the question in any case, since it is not default behavior.) But I'm guessing that if Cisco or Juniper have kernels that can load balance or round-robin via EIGRP, CEF, OSPF, etc., then probably you can get similar behavior under Linux somehow. –  belacqua Mar 28 '11 at 23:21
add comment

Actually you can combine 2 or more disparate internet links using Vtun and multi-link PPP see http://johnlewis.ie/bonding-teaming-internet-connections/

Any questions?

share|improve this answer
add comment

Yes you can. See UbuntuBonding.

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.