LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ldirectord with multiple networks

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ldirectord with multiple networks
From: malcolm <lists@xxxxxxxxxxxxxxxx>
Date: Wed, 11 Oct 2006 17:57:30 +0100
That's what F5 call SNAT.
I haven't heard of anyone using LVS this way yet?

You could use TUN instead (but your routers probably won't allow it.)




Hoffman, Jon wrote:
Hi,
I am new to LVS and I am tring to configure a load balancing cluster that
does not match anything discribed in the documentation that I could find.  I
also searched through the archives and could not find anything (maybe I
using the wrong search terms).

I have two networks that are physcally located in different locations (lets
say city X and city Y).  In city X we have our web servers, run by our team
there.  In city Y we have our load balancer that we are tring to set up as a
demo to show how LVS works.  We can not set our default gateway of our web
servers to be the load balancer because we are trying to test LVS and can
not take our web servers out of production to test a new load balancer.  And
we want to see the load balancing working with our present servers.
What is happening is our client makes a request to our load balancer, the
load balancer (ldirectord) sends the request to our web server and the web
server responses directly back to the client, who has no idea why that
server is sending the packet to it.

Below is my ldirectord.cf file:


# Global Directives
checktimeout=3
checkinterval=30
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes

virtual=YYY.YYY.YYY.1:80
        real= XXX.XXX.XXX.1:Port masq
        real= XXX.XXX.XXX.2:Port masq
        service=http
        request="test.html"
        receive="I'm alive"
        scheduler=rr
        protocol=tcp

Basicly the real servers are responding directly back to the client (rather
then the load balancer) but I can not set my default gateway of the real
servers to the load balancer.  Is there anyway to masquarade the request
coming from the load balancer (ldirectord) to the real server to make it
look like the request is coming from the load balancer rather then the
client.

My masquarading rules look like this:

                $IPTABLES -t nat -A POSTROUTING -s YYY.YYY.YYY.0/24 -j
MASQUERADE
                $IPTABLES -t nat -A POSTROUTING -d XXX.XXX.XXX.1          -j
MASQUERADE
                $IPTABLES -t nat -A POSTROUTING -d XXX.XXX.XXX.2  -j
MASQUERADE

Thank you in advance for any help you can provide.

Jon Hoffman
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


--
Regards,

Malcolm Turnbull.

Loadbalancer.org Limited
Office: +44 (0)870 443 8779
Mobile: +44 (0)7917 194577
http://www.loadbalancer.org/


" When a single point of failure is not an option"

Why not try our online demonstration <http://www.loadbalancer.org/lbadmin/> ? Or get answers to common questions <http://www.loadbalancer.org/fud.html> ?

<Prev in Thread] Current Thread [Next in Thread>