LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: VIP on real interface.

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: VIP on real interface.
From: Horms <horms@xxxxxxxxxxxx>
Date: Mon, 15 Mar 2004 11:47:20 +0900
On Fri, Mar 12, 2004 at 07:27:57AM -0800, Dan wrote:
> Thank you for your response.  Still having some issues though.
> 
> > > 1) First, is this possible?
> >
> > I don't see why not. Its just LVS-DR with packets being forwarded to
> > the real servers on the 192.168.0.0 network, right?
> 
> That's correct.
> 
> > > 2) What should the netmask of x.y.z.2 be on the realserver?
> >
> > x.y.z.2 should probably be on lo:0, in which case its netmask should
> > be 255.255.255.255.
> >
> > If you really do want it on eth0 (I strongly doubt you do) then the
> > netmask would be whatever the netmask for the x.y.z network is,
> > presumably 255.255.255.0
> 
> Okay, I had that set correctly to 255.255.255.0.  I have no other use
> for eth0 so I don't mind putting the VIP on it.
> 
> > > 3) What should the default gateway be for the realserver?
> >
> > x.y.z.1
> 
> Okay...I had this set correctly.
> 
> > > 4) Do I need a routable ip on eth0 other than the VIP?  I'd rather
> > > it not
> have
> > > one.
> >
> > I can't see why you would need a routable IP on eth0, as long as you
> > are routing replies out the interface.
> >
> > Unfortunately I don't think linux supports IP unnumbered, so you
> > probably need some address on eth0.  Logically something from the
> > x.y.z network otehr than .1 or .2. But really there is nothing to
> > stop you putting any address you like there.
> 
> As I said above, hopefully I can get this to work with just the VIP
> set to eth0.
> 
> > > 5) What should /sbin/route output look like on the realserver once
> > > this is configured correctly?
> >
> > I guess something like this.
> >
> > 192.128.0.0     0.0.0.0         255.255.255.0   U     0      0
> > 0 eth1 x.y.z.0         0.0.0.0         255.255.255.0   U     0
> > 0        0 eth0 0.0.0.0         x.y.x.1         0.0.0.0         UG
> > 0      0        0 eth0
> 
> Well...that's exactly what it looks like alright.  I think the only
> problem I have left is that eth0 is still answering arps.
> 
> # for i in /proc/sys/net/ipv4/conf/*/hidden; do echo $i; cat $i; done
> /proc/sys/net/ipv4/conf/all/hidden 1
> /proc/sys/net/ipv4/conf/default/hidden 0
> /proc/sys/net/ipv4/conf/eth0/hidden 1
> /proc/sys/net/ipv4/conf/eth1/hidden 0
> /proc/sys/net/ipv4/conf/lo/hidden 0 #
> 
> This looks right to me...why is this interface still answering arps?

Hi Dan,

I will stand corrected on this, but it is my understanding from reading
the code[1] that the hidden flag does not effect requests sent to eth0
for an interface that is attached to eth0.  I would suggest putting some
other address on eth0 and moving the VIP to lo:0.

[1] http://www.ssi.bg/~ja/hidden-2.4.20pre10-1.diff
    (Yes, I know there is a much newer version of this,
     but this is probably a lot like the code you are using)

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