LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Problem with connections from real servers to virtual IP

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Problem with connections from real servers to virtual IP
From: Mehrdad Ziaei <mehrdad.ziaei@xxxxxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:24:37 -0500
Hello,

I have a cluster with heartbeat+ldirectord configured as VS/NAT.

I want to be able to access services listening on VIP (Virtual-IP) from both live internet and internal private network of the cluster. For example from any real server running: wget http://VIP:80/something

Here is simple diagram of what we have (actual cluster has 2 LVS, 20+ real servers with 10 different services)

        [Internet]
            |
           eth1: VIP
           [LVS box]
           eth0: 192.168.0.1
            |
+-----------+------------+
|                        |
eth0: 192.168.0.10       eth0:192.168.0.11
[Real server1]               [Real server2]


The following config in ldirectord.cf works only if connections come from live internet (same interface as VIP) but it doesn't
work for connections from internal private network of the cluster.
virtual=VIP:80
       real=192.168.0.10:80  masq
       real=192.168.0.11:80  masq
       checktype=connect
       service=http
       scheduler=wlc
       protocol=tcp


But if I use iptables instead of ipvsadm the configuration works fine for inside and outside connections, but there is no load balancing: iptables -A PREROUTING -t nat -p tcp -d VIP --dport 80 -j DNAT --to 192.168.0.10

btw, I have tried VS/DR and still the same problem.

Any help would be appreciated.

Thanks
Mehrdad


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