LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Load balanced routing multiple nics (https://www.linuxquestions.org/questions/linux-networking-3/load-balanced-routing-multiple-nics-932639/)

swissmac 03-04-2012 05:06 AM

Load balanced routing multiple nics
 
Hi everone,

I have a question about routing and loadbalancing on Redhat/Centos. I've the following Interfaces

eth0 -> SDSL1 62.65.1.122
eth1 -> SDSL1 62.65.1.122
eth2 -> SDSL2 81.122.221.10
eth3 -> SDSL2 81.122.221.10
eth4 -> MOBILE1 135.34.120.10
eth5 -> MOBILE2 128.35.110.20

Now if I would like to route traffic based on the URL oder IP-Address that I call how would you implement this? Additionally I would be necessary to do loadbalancing on these interfaces.

Any help would be greatly appreciated.

Kind regards, Mac

prowla 03-04-2012 11:59 PM

Looks like you need to bond the respective pairs of interfaces, so:

bond0 = eth0 + eth1
bond1 = eth2 + eth3
bond2 = eth4 + eth5

There are lots of references on setting up bonding, and you'll need to specify to use load balancing (there are a couple of options, eg. round-robin) rather than active-backup.

If you are goign to use the server to route, then you'll need to enable the ip_forward parameter (again, google is your friend!).

swissmac 03-29-2012 05:53 PM

Thanks prowla,

I've now tried bonding like you said but it doesn't work on ESXi 4.1

The links are up but the connection is either slow or dosen't work at all.
eth0 + eth1 are connected to 2 physical ports on the ESXi Server and each NIC has his own vSwitch. I'm using Centos 5.8.

Is there any issue in ESXi?

regards,
mac

nikmit 03-30-2012 06:29 AM

How many physical RJ45 ports do you have on the box?

swissmac 03-30-2012 08:35 AM

I've got all together 4 interfaces on the box but I use only 2 interfaces (eth0 + eth1) right now. These two intefaces do have a WAN each of them a different WAN-IP one of them is ADSL (10Mbit) and the other is SDSL (20Mbit). I would like to use round-robin.

nikmit 03-30-2012 09:39 AM

It might help if you edit the initial post then... prowla's reply could very well be helpful in the setup you described initially but your actual setup isn't even close to that. If you have two interfaces clonnected to separate providers then bonding them doesn't make sence.

This might help http://lartc.org/howto/lartc.rpdb.multiple-links.html

swissmac 03-30-2012 09:46 AM

you're right it's not what i orginally worte my current setup ist like this

eth0 -> SDSL 62.65.1.122
eth1 -> VDSL 81.122.221.10
eth2 -> MOBILE 135.34.120.10

but I don't want to use routing and be able to use later more interface that's why his initial idea would be really great. Please give me advice how to solve my issuie. I've tried with centos5 and centos6 already.


All times are GMT -5. The time now is 09:55 PM.