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: Mon, 23 Mar 2009 17:34:01 +0000
On Mon, 2009-03-23 at 08:50 -0500, Chris St. Pierre wrote:
> Okay, I did that, and the result is -- improved?  I think?

Righto, so you're seeing something good(ish). Although you then go on to
say in response to Joe's message that you're not intending to use NAT in
production, so it would be productive now to switch to the method you
are intending to use which I assume will be -DR.

In that case, please clear the director's config (ipvsadm -C) and switch
it to -DR mode instead:

On the director:
# /sbin/ip address add dev eth0
# /sbin/ipvsadm -A -t -s rr
# /sbin/ipvsadm -a -t -r -w 100 -g
# /sbin/ipvsadm -a -t -r -w 100 -g

On the realserver(s):
# /sbin/ip address add dev lo

Add the following to /etc/sysctl.conf:
# LVS switches
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

Then do
# sysctl -p

Then see what you get from your clients. Note that you should remove the
route you put in for NAT usage from the realservers.

What that lot does is puts the VIP on the director's live interface and
sets up the ipvs table, then you put the VIP on the realservers'
loopback adapters and ensure that the realservers don't send ARP
responses for that address.

Hopefully you'll then see a fully-working LVS.


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>