/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting!
/* ALSO: Don't quote this header. It makes you look lame :-) */
[EMAIL PROTECTED] wrote:
> Hey all,
> I want to set up a four computers load balancing system using ip masquerading
>technique.
> The test configuration is as follow:
> client: 192.168.1.12(any OS)
> director:turbolinux 4.0(kenel:2.2.10)
> 192.168.1.110(eth0:0)
> 10.1.1.1(eth0)
> real server 1:10.1.1.2(eth0)
> real server 2:10.1.1.3(eth0)
> The director is the center to connect the internal and the external network.
> The purpose of my load balancing system is to forward the request from the
>client to the real servers in the internal network.
> test:on the client computer:#ftp 192.168.1.110, this request should be
>forwarded to the real servers 10.1.1.2 or 10.1.1.3(this is decided by the scheduling
>algorithm).
> I'm not very clear if the test can be realized using the Ip masquerade?
> If can,should I only need to configure the masquerading function?What extra work
>should I do?I'm stuck now,any help would be appreciated.
> Thanks a lot.Please send your email to :[EMAIL PROTECTED]
> Shirley
you need to set up masquerading and then use ipmasqadm to port forward
incoming packets. when you do this, just use multiple ipmasqadm commands
directing packets to different hosts and use the -p argument to specify
the weights given to each destination server.
e.g.
# set up masquerading
ipchains -P forward DENY
ipchains -A forward -s $intnet -j MASQ
# set up load sharing
ipmasqadm portfw -f
ipmasqadm portfw -a -P tcp -L $extip $port -R $server1 $port -p $pref1
ipmasqadm portfw -a -P tcp -L $extip $port -R $server2 $port -p $pref2
ipmasqadm portfw -a -P tcp -L $extip $port -R $server3 $port -p $pref3
where:
$intnet = the address mask of the internal network to be masqueraded
$extip = the ip address of the external network interface
$server# = the ip address of each internal load sharing server
$port = the port number for the server being shared
$pref# = a number indicating the weight given to each internal server
raf
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ --
THIS INCLUDES UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.