0

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?

jrg
  • 60,101
  • 54
  • 172
  • 246
Nathan Osman
  • 31,915
  • 40
  • 179
  • 259
  • possible duplicate of [Use two networks at the same time?](http://askubuntu.com/questions/19900/use-two-networks-at-the-same-time) – belacqua Mar 28 '11 at 22:53
  • Also see [two ethernet ports ... can I get double the bandwidth?](http://askubuntu.com/questions/32179/two-ethernet-ports-on-motherboard-how-can-i-get-double-the-bandwidth) – belacqua Mar 28 '11 at 22:54
  • @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
  • @george So, are you talking about both attempting to be the primary outgoing port, or setting one or the other as default for a particular network? You want them to round-robin packets to same or different destinations? I guess I'm still a little foggy on your desire. – belacqua Mar 28 '11 at 22:58
  • 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
  • If I remember right Vuze and another bittorrent program supports multiple network interfaces – Seth Hikari Mar 29 '11 at 01:01

3 Answers3

0

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.

Scaine
  • 11,023
  • 5
  • 45
  • 58
  • 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
0

Yes you can. See UbuntuBonding.

xyz
  • 1,766
  • 1
  • 12
  • 22
0

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?

jpl888
  • 31
  • 2
  • This might be a way to do it, but the answer should contain at least the essential steps. A link may die. – Nephente Oct 01 '15 at 07:05
  • It doesn't work very well with vtun anyway, as TCP within TCP tunnels get into "ack wars". You're better off doing it with OpenL2TP, but even then you'll be stuck if one link is faster than the other, as the kernel PPP code simply balances packets across links by default i.e. you'll only get a multiple of the slowest link's speed. – jpl888 Nov 05 '15 at 10:24