Re: [lvs-users] Trouble getting first LVS setup working

To: " users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Trouble getting first LVS setup working
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Sat, 21 Mar 2009 09:21:07 +0000
Hi Chris

On Fri, 2009-03-20 at 20:33 -0500, Chris St. Pierre wrote:
> I won't lie and say it's particularly thorough documentation -- most
> of it covers using the configuration web GUI -- but it's readable, and
> I figured it'd be a good place to start as I'm running RHEL.

It's as good a place as any, but it doesn't really explain the basics
very well - it's a sort of "click here, do this, all will be well"
approach which doesn't give you the full grounding about the "why" (or
even the "how" in some cases!).

> I have now, and none of them seem to be my problem.  Many are little
> bugs or resource allocation issues, but they all appeared to be
> problems that exhibited themselves once things were at least
> marginally working.  In my case, I can't even get the dang thing
> working at all.

I would normally ask for all sort of debug info here, but as you already
stated this is a test platform I'm going to ask you to completely clear
the RH-driven configs and start from a clean slate. BTW, I feel it's
your VIP netmask causing the problem, but we'll come to that later...

What you'll need to do is as follows:

# /sbin/ip address add dev eth0
# /sbin/ipvsadm -A -t -s rr
# /sbin/ipvsadm -a -t -r -w 100 -m
# /sbin/ipvsadm -a -t -r -w 100 -m

That then gets you a very basic virtual server on which
has realservers on port 80/tcp on addresses and, using
the "masquerade" method (LVS-NAT). The prerequisite for this is that the
realservers have a default gateway address pointing to the director, ie.

Once you have this set up, you can try to access the VIP from a client
which is *not on the same LAN as the VIP or the realservers*. This is a
key point - the return traffic MUST go back via the director in LVS-NAT
or the SYN/AYN-ACK/ACK handshake will fail.

Please try this and let us know how you get on.

By the way, if your VIP netmask is too wide on the director then the
director will believe that a Very Large Network is local to it or
immediately adjacent. That can stop normal traffic flow dead, right


Please read the documentation before posting - it's available at: mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to

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