From: "Cao Van Khanh" Date: Sat, 02 Jul 2005 15:40:05 +0000 Subject: [LARTC] Loadbalancing how to ? ? ? ? Message-Id: <42c6b55a.2b2713fa.0308.ffffb3a1@mx.gmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1005417623==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============1005417623== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C57F57.01328EA0" This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C57F57.01328EA0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have 2 ADSL ad1 and ad2 , one PC for my firewall and some deamon on it with 3 ethernet : eth0 connect to my LAN ( 192.168.60.0/24 ) and 2 other connect to ad1 and ad2 |eth1 (10.0.1.2)--------------------ad1 ( ADSL 1 ) | My LAN(192.168.60.0/24) |---------eth0( 192.168.60.2)--> PC | |eth2 (10.0.2.2)---------------------ad2 (ADSL 2 ) All computer in LAN has default router = 191.168.60.2 ( eth0 of PC ) In the /etc/network/option I enable the forwardable = 1 I use iptable to NAT the outgoing of eth1 and eth2 Iptables -t nat -A POSTROUTING -s 192.168.60.0/24 -o eth1 -j SNAT -to 10.0.1.2 Iptables -t nat -A POSTROUTING -s 192.168.60.0/24 -o eth2 -j SNAT -to 10.0.2.2 Ofcause by default the eth1 will always be forwarded from LAN and nerver the ADSL 2 was use The ideal of mine is writing a programe loadbalancing for n line ADSL contact to one PC as gateway ,But when the packet reach the eth0 , how to control it forwarld to eth1 or eth2 is my problem . If I could do that , maybe I could find the way to loadbalacing n line ADSL as one biger . If someone know how to or have some idea , give me some information :-) Thank for reading ------=_NextPart_000_0000_01C57F57.01328EA0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have 2 ADSL ad1 and ad2 , one PC for my firewall = and some deamon on it with 3 ethernet : eth0 connect to my LAN ( 192.168.60.0/24 = ) and 2 other connect to ad1 and ad2

 

         =             &= nbsp;                   &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;   |eth1 (10.0.1.2)--------------------ad1 ( ADSL 1 = )

         =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;           |

My LAN(192.168.60.0/24) |---------eth0( = 192.168.60.2)à = PC

         =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;           |

         =             &= nbsp;                        &= nbsp;           &n= bsp;           &nb= sp;          |eth2 (10.0.2.2)---------------------ad2 (ADSL 2 = )

 

All computer   in LAN has default router = =3D 191.168.60.2 ( eth0 of PC )

 

In the /etc/network/option I enable the forwardable = =3D 1

 

I use iptable to NAT the outgoing of eth1 and eth2 =

 

Iptables –t nat –A POSTROUTING –s 192.168.60.0/24 –o eth1 –j SNAT –to = 10.0.1.2

 

Iptables –t nat –A POSTROUTING –s 192.168.60.0/24 –o eth2 –j SNAT –to = 10.0.2.2

 

Ofcause by default the eth1 will always be forwarded = from LAN and nerver the ADSL 2 was use

 

The ideal of mine is  writing a programe = loadbalancing for n line ADSL contact to one PC as gateway  ,But when the packet = reach the eth0 , how to control it forwarld to eth1 or eth2 is my problem . =

 

If I could do that , maybe I could find the way to loadbalacing n line ADSL as one biger . If someone know how to or have = some idea , give me some information J

 

Thank for reading

 

 

------=_NextPart_000_0000_01C57F57.01328EA0-- --===============1005417623== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1005417623==--