LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS-NAT simple (?) setup not working in mysterious way?

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS-NAT simple (?) setup not working in mysterious way?
From: lists <lists@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Sep 2007 09:50:00 +0100
Steve,

The joy of banging ones head against a wall :-).

You don't have an internal VIP or floating IP. (you need one)

Add an internal VIP to your haresources file (this must be the default 
gateway for the clients.)

Test traffic can ONLY come from the outside to the outside VIP it is 
then NAT'd to the real server that responds to the internal VIP.

ip_forwarding must be enabled

No iptables rule what soever.

Do a test from outside check the ipvsadm -Lnc output (should see 
established connections.)


Oh and change check type to 'on' in ldirectord for testing purposes i.e. 
always on no health checks.






Steve Wray wrote:
> Look at this and tell me if this isn't a nice, simple case of LVS-NAT. 
> Please. Is there something that I am not seeing? I've stared at this and 
> at the documentation and howtos for so long now I can't see straight. 
> The traffic *appears* to come into the client from the VIP but the 
> client does not display anything.
>
> If you just want to say "RTFM" please refrain, I am banging my head on 
> the desk at this very moment from RTFM-ing all week. I am sick of the 
> howto and sick of staring at this trying combinations and permutations 
> of configuration.
>
> I would really appreciate a reality check beyond "RTFM", Thanks.
>
>
> web-lb1:/etc/ha.d# cat ldirectord.cf
> checktimeout=10
> checkinterval=2
> autoreload=no
> logfile="local0"
> quiescent=yes
>
> virtual=10.10.0.15:80
>         fallback=127.0.0.1:80 masq
>         real=192.168.0.4:80 masq
>         real=192.168.0.3:80 masq
>         service=http
>         request="ldirector.html"
>         receive="Test Page"
>         scheduler=rr
>         protocol=tcp
>         checktype=negotiate
>         persistent=300
>
>
> web-lb1:/etc/ha.d# cat ha.cf
> logfacility        local0
> bcast        eth0                # Linux
> mcast eth0 225.0.0.1 694 1 0
> auto_failback off
> node        web-lb1
> node        web-lb2
> respawn hacluster /usr/lib/heartbeat/ipfail
> apiauth ipfail gid=haclient uid=hacluster
>
> web-lb1:/etc/ha.d# cat haresources
> web-lb1        \
>         ldirectord::ldirectord.cf \
>         LVSSyncDaemonSwap::master \
>         IPaddr2::10.10.0.15/16/eth0/10.10.255.255
>
>
> The director has network interfaces as so:
> web-lb1:/etc/network# cat interfaces
> auto lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet static
>   address 10.10.0.13
>   netmask 255.255.0.0
>   broadcast 10.10.255.255
>   gateway 10.10.10.1
>
> auto eth1
> iface eth1 inet static
>   address 192.168.0.1
>   netmask 255.255.255.0
>
>
> The realserver has interfaces as so:
> web1:~# cat /etc/network/interfaces
> auto lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet static
>   address 192.168.0.3
>   netmask 255.255.255.0
>   gateway 192.168.0.1
>
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>   



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