LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

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

To: "LinuxVirtualServer.org 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 10.9.3.6/32 dev eth0
# /sbin/ipvsadm -A -t 10.9.3.6:80 -s rr
# /sbin/ipvsadm -a -t 10.9.3.6:80 -r 10.9.3.1:80 -w 100 -g
# /sbin/ipvsadm -a -t 10.9.3.6:80 -r 10.9.3.2:80 -w 100 -g

On the realserver(s):
# /sbin/ip address add 10.9.3.6/32 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.

Graeme


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

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>