# multiple NIC

## mogosjoh

Trying this out simply because I can.  In my dorm room, I have 2 ethernet ports, which run to a big cisco switch.  My roomate has no computer, and right now I only have one running box in the room, so I put a second NIC in, so, currently, I have one 3com 595 and one intel eepro100.  I have them all set up so that at boot I get 2 IPs (one on each) and my services are starting on both, however, I am wondering how I can have my bandwidth for internet usage split between the two, or is this already being done?  I am considering using one for network monitoring exclusively, but I'm curious as to what other cool tricks I can do with 2 NICs.

thanks,

  -John

----------

## Xinos

I don't think I am going to have any good ideas but I would be very interested also with any ideas anyone has. I do know that on my system when I specified the route add command I had to define an adapter (eth0) which means, what I am thinking anyway, is that all outgoing traffic goes through this adapter only. So essentially all you outbound traffic goes out that nic and since it originates from that ip it will all come back to that ip. If you run ifconfig and look at the counts I bet you have very little traffic on the other nic, what little you do probably comes from broadcasts. I may be very off on this but it is what I have been thinking when setting up systems. If I am wrong someone please correct me. Hopefully we will get some good ideas out of this.

----------

## keschrich

One simple method would be to modify your routing table so that have of the IPs go through one NIC and the other half go through the other NIC, but that doesn't guarantee a balanced load at all... Do a google seach for "linux load balancing" and you should get some useful info..

----------

## StrautC

What about the TEQL queue kernel option?  See Networking Options -> QoS and/or Fair Queueing -> TEQL queue (NEW).

".... Allows the combination of several physical devices into one virtual [network] device."  

Check out the comments in the top of /usr/src/linux/net/sched/sch_teql.c for more info on setup.  I haven't tried this and am not 100% sure if it's applicable to what you want to do, but based on that limited comment in the 'make menuconfig' help it looks somewhat promising.

----------

## carlivar

You can't just load-share across two NICs without doing something special, like "NIC teaming" or clustering or something.  If you can get both NICs to share a MAC Address you might be able to get some load-balancing going... not sure if Linux has a feature like that.  Maybe.

Carl

----------

## btg308

Look at http://lartc.org/ and  http://www.linuxvirtualserver.org/~julian/ for info, docs, patches and howtos on multi-path routing in Linux. There are all sorts of neat tricks you can do with just iptables and iproute2.

----------

## lemming

The e100 driver (latest version 2.1.15?) supports teaming, but you also have to do something at the switch level for that to work.  It should work with a non-intel NIC as long as one of them is e100 supported.  (eepro and e100 support the same NICs.  One's more open source than the other though) It does a fairly decent job.

-Mark

http://www.kittydream.org

----------

