LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2010, 09:38 PM   #1
thetzawko
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Rep: Reputation: 0
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.
 
Old 01-23-2010, 10:33 PM   #2
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Take a look:
http://www.inlab.de/balance.html
 
Old 01-23-2010, 10:52 PM   #3
thetzawko
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks.

But I only want to use iproute2 and iptables.
 
Old 01-23-2010, 11:19 PM   #4
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
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...)

Last edited by nimnull22; 01-23-2010 at 11:30 PM.
 
Old 01-24-2010, 12:28 AM   #5
thetzawko
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 01-24-2010, 01:07 PM   #6
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
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.
 
Old 01-24-2010, 08:22 PM   #7
thetzawko
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Original Poster
Rep: Reputation: 0
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.

Last edited by thetzawko; 01-24-2010 at 08:27 PM.
 
Old 01-24-2010, 09:06 PM   #8
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
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
 
Old 01-24-2010, 09:35 PM   #9
thetzawko
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks a lot nimnull22
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure a linux server for networking load balancing and Data Mirroring smoothpeddi Red Hat 3 07-24-2009 12:40 PM
load balancing rehan999 Linux - Software 4 06-22-2009 06:41 PM
Load Balancing jjrowan Linux - Networking 1 03-06-2009 01:02 PM
How to configure Load Balancing with 2 ISPs ThanhDuongCong Linux - Networking 2 12-05-2008 05:20 PM
Load Balancing matux Linux - Networking 0 01-05-2005 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration