[Linux-cluster] would this configuration work for lvs-dr?
Lon Hohberger
lhh at redhat.com
Mon Jan 7 23:06:10 UTC 2008
With direct routing, all the nodes must be visible to the outside world
using the same route as the director(s). If you're trying to route
*through* your director, you need to use NAT (or tun, which I've never
used). Direct routing means that you are not using the director as a
router, just a load balancer.
That is, assuming you have a gateway for all 3 hosts that's @
192.168.2.254...
Director:
eth0 192.168.2.1
eth0:0 192.168.2.100 (vip)
gateway / default route 192.168.2.254
Real server #1:
eth0 192.168.2.2
gateway / default route 192.168.2.254
Real server #2:
eth0 192.168.2.3
gateway / gateway route 192.168.2.254
Once that's done, you need to get the real servers to process requests
for 192.168.1.100.
I wrote this some years ago, but here are two ways of getting it
working:
http://people.redhat.com/lhh/piranha-direct-routing-howto.txt
Depending on how you do it, you will either place 192.168.1.100 as
eth0:0 and do an arptables_jf setup, or you will not put 192.168.1.100
on *any* of the real servers and instead use an iptables hack to use a
transparent proxy to rewrite outbound packets to be sourced from
192.168.1.100.
Some people put the VIP on lo:0 - I have never done that nor could I
tell you the advantages or disadvantages. I've also never played with
sysctl.conf settings.
-- Lon
More information about the Linux-cluster
mailing list