LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [newbie] Experimenting with LVS

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [newbie] Experimenting with LVS
From: Sébastien Bonnet <Sebastien.Bonnet@xxxxxxxxxxx>
Date: Tue, 25 Feb 2003 17:37:05 +0100
> It now ALWAYS serves from machine 1.

>From what I can read below, I understand that piranha sees both
realservers as up and running, which is confirmed by the fact that your
client get served by machine1 and that you can telnet to machine2 port
80.

BUT, requests never go to machine2. Are you really sure of that ? Don't
you sometimes get blocked by requests going to machine2 for which
responses don't go back to the client ? Did you run a few tcpdumps from
the director ?

Did you switched off KeepAlive in apache's conf ? If not, this might be
part of the problem since the TCP connection is not closed and thus not
re-open for each request.

> Reading the HOWTO, and I find that the realservers should be able to
> ping my client:

If you've set appropriate masquerading rules, which is not mandatory as
long as I remember (I'm using DR, so the network conf is quite
different).

> Machine2 :
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
> 10.122.0.0      *               255.255.0.0     U     0      0        0 eth0
> 127.0.0.0       *               255.0.0.0       U     0      0        0 lo
> default         192.168.0.41    0.0.0.0         UG    0      0        0 eth1

Definitely better ! But the DGW should, in your case, be 192.168.0.254
(actually what you've set nat_router to in lvs.cf).

> Machine 1:
> [snip ifconfig]

Perfect, assuming .42 is the VIP

> Kernel IP routing table

Still fine

> And my director is configured with:

Perfect

> I ran:
> iptables -t nat -A POSTROUTING -s 192.168.0.41 -j MASQUERADE

Why did you do that ? You should not need that, at least for the first
shot.

> I think so far it's a problem with routing the response from
> Machine 2 back to Client, but I'm totaly at sea now with this
> networking.

That's what I think too. Did you check /proc/sys/net/ipv4/ip_forward
which should (check the howto) be set to 1.


Run a few tcpdumps on all concerned hosts and you'll certainly find some
interesting infos to give us :)

-- 
Sébastien Bonnet
  Centre de contacts - Experian France
<Prev in Thread] Current Thread [Next in Thread>