LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Want to configure load balancing (https://www.linuxquestions.org/questions/linux-networking-3/want-to-configure-load-balancing-784303/)

thetzawko 01-23-2010 09:38 PM

Want to configure load balancing
 
Hi all

I want to configure load balancing on my linux router. I have 2 internet connections. I use RHEL 5 distro.

eth0 - Local network
eth1 - Connect to ISP 1. Use static IP addr.
eth2 - Connect to ISP 2. Use dynamic IP addr using DHCP.

I know iproute2, but not in detail. I don't how to use iproute2 with dynamic addresses. I'm not a linux expert.

I want to use ISP1 for ssh,https connections and some applications like msn messagenger, skype.

ISP2 for web traffic only.

How do I configure my router for this situation.

Help me.

Thanks.

nimnull22 01-23-2010 10:33 PM

Take a look:
http://www.inlab.de/balance.html

thetzawko 01-23-2010 10:52 PM

Thanks.

But I only want to use iproute2 and iptables.

nimnull22 01-23-2010 11:19 PM

iptables can't do outgoing balancing (in your case). It can send specific traffic to interface, but it is far not balancing.
iproute2 - works with routing tables, and can't choose direction based on service (http, ssh...)

thetzawko 01-24-2010 12:28 AM

Hi nimnull22

I mean I wanna send SSH,HTTPS,MSN,SKYPE,GTalk, etc... taffic to ISP1 through eth1.

Only HTTP traffic to ISP2 through eth2.

nimnull22 01-24-2010 01:07 PM

In this case you really can use iptables, but there is some small difficulty.

You need to find a place for your script, which will be executed after port with DHCP IP setup changes its status (from UP to DOWN and back). It needs, because you will need to add a rule to iptables with interface IP address.

For example on my opensuse I have file "config" in /etc/sysconfig/network, there I can state what I want to execute after interface gets "UP". Also there says to start dhsp.

So, please find this on RHEL 5. You will need it.

thetzawko 01-24-2010 08:22 PM

Thanks nimnull22

I'll try. I split SSH, HPPTS traffic to the interface with static IP and all other traffic to the interface with DCHP IP. Is it possible? Bcoz I cann't write a script to monitor IP address changes in dynamic interface. I'm a linux newbie.

I need some help with OpenSuse 11.2. After I installed linux, I cann't start DNS server. I start bind for caching only server but bind didn't start. Do I need some changes in config file? I use default configuration file come with suse. I wanna change my server OS to OpenSuse.

Thanks a lot.

nimnull22 01-24-2010 09:06 PM

I suggest to look at this:
http://www.linuxtopia.org/online_boo...ide/index.html

And about BIND:
http://www.linuxtopia.org/online_boo..._dns_bind.html

thetzawko 01-24-2010 09:35 PM

Thanks a lot nimnull22


All times are GMT -5. The time now is 10:38 PM.