Two ethernet ports on motherboard. How can I get double the bandwidth?

Solution 1:

It's very unlikely that bonding your interfaces will result in a speed increase. Typically, even if you bond the interfaces successfully AND configure the switch to support the etherchannel), then you will still find that only one interface in the bond is used for each pair of source/destination TCP/UDP session.

So if you copy a 10Gb file from one server, then kick off another 10Gb copy to that server, assuming that you also have session based bonding, you'll see both cards maxed out. But crucially, the first copy will only consume ONE network card, not both.

This is certainly the case with Cisco's etherchannel. In fact, Cisco's etherchannel isn't even session based, it's source/destination based, so in my example above, you wouldn't even get a speed increase - your second copy would have to be to a completely different server before you saw both cards used. Perhaps you have a better switch that allows for the port channel to utilise both cards simultaneously in one TCP/UDP session but it would require some pretty funky arp/MAC manipulation and I have no idea if the bonding module in linux supports that.

As for you, you're using a bog-standard home router, so switch-side support is out of the question here, meaning that your options are further limited (see the first article lined to below, where you will note that you now cannot use the best mode for link aggregation, mode 4).

If you're determined to go ahead with this, I found this five year old article which still seems relevant. Additionally, this three year old article covers the same ground.

Hope it helps.

Solution 2:

Its important to note that in order to utilize NIC teaming functionality the switch you're connected through must support teaming aka LACP. You can find a switch like that through a search on NewEgg.com etc.

Once you have that here is a simple guide from the wiki: https://help.ubuntu.com/community/UbuntuBonding

Good luck!

Solution 3:

I would think going through a switch would limit any benefit you would get from using 2 Ethernet cables in parallel. Unless the switch is faster than your two NICs combined, in which case then you might see a speed increase.

Load Balancing program is what you are looking for. You don't have to "load balance" if you don't want to, but it is the easiest way to merge the connections I know of. The Idea is not too complicated

Virtual NIC - > Load Balancing Program -> NIC 1 + 2

This answer has what you are looking for I believe: Network load-balancing with Network Manager

I'm not sure on the specifics but I'm sure that is the general idea.

Unless the NIC cards are substantially less powerful than your router/switch the only benefit you will probably get is with a direct connection between the two computers, Or a parallel connection the whole way. But theory and practice don't always work out.

The only way I can think of to test if the NIC is the bottleneck in your system is to do a speed test between each computer using all 4 NICs. I can give you the general Idea on how to do this but the Ubuntu specific stuff I'll need a hand with.

  1. Set each NIC to have its own IP address like 192.168.0.1 + 192.168.0.2 for computer 1 and *.3 + *.4 for computer 2
  2. The only speed test for local networks I've seen is just transfer time on a bit file. I'm not sure if there is a better method, I've never seen one.

    3 Set routes manually so *.1 is the interface to get to *.3 and *.2 get to *.4.
    PC1 192.168.0.1 <--> 192.168.0.3 PC2 192.168.0.2 <--> 192.168.0.4

I've never used ip tables so here is something I found as an example.

[root]# ip route add xx.xxx.239.120 via xx.xxx.239.120 dev eth0 table 4
[root]# ip route add table 4 default via xx.xxx.239.120 
[root]# iptables -t mangle -A PREROUTING -p tcp --dport 80 -s xx.xxx.239.120 -j MARK --set-mark 4 
[root]# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source xx.xxx.239.120 [root]# ip rule add fwmark 4 table 4
  1. another option is to find a way for ssh (or terminal) client to connect via certain interfaces. I'm not sure how thats done yet for the client side.

If IP tables is set up correctly you should be able to send 2 files from PC 1 to both interfaces on PC 2 and each file will take a different route. If the transfer with the two connections is faster than just one.. (hopefully twice as fast) then you might have something.

Solution 4:

I don't think you said whether or not you were using a Gigabit NIC, I am guessing you are since you have 2 NICs and therefore probably a gaming motherboard.

Since that is the case, if you are trying to get 2x100 base then you are better off buying a cheap 4-8 port Gigabit switch and plugging it into your Internet router. Then you can plug all the computers that run Ethernet into that switch and still have working wifi and Internet on all your computers.

I do that now because I bought a Netgear WNDR3400 and put DD-WRT on it so that I could have a few nice options including a very up to date NAS server built in.

The only problem was that the router was 100 base on the Ethernet ports. So for $40 I bought a 5 port Gigabit switch plugged it into my router then plugged all my computers into the Gigabit switch and plugged my gaming consoles into the router.

Everything works great and I can transfer files between the computers at lightning speeds.

Well good luck!