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: Fri, 12 Mar 2004 17:05:19 +0900
On Thu, Mar 11, 2004 at 02:41:32AM -0800, Dan wrote:
> I'm guessing this is possible, but I'm having some trouble configuring the 
> real
> servers:
> 
> ------------
> |  client  |
> ------------
>   |
> --------
> |  GW  |
> --------
>   | x.y.z.1
>   |           ------------ 192.168.0.1
>   |-----------| director |------
>   |    x.y.z.2------------     |
>   |                            |
>   |           --------------   |
>   ------------| realserver |----
>   eth0:x.y.z.2-------------- eth1:192.168.0.2
> 
> 
> The idea is that the director receives the requests on the VIP x.y.z.2 and 
> sends
> them to the realserver over the 192.168.0.0/24 network.  Once the realserver
> processes it, it sends it out on its eth0 interface.  From what I can tell, 
> I've
> got the packet getting all the way to the realserver but it never gets sent 
> back
> to the client.  I've got /proc/sys/net/ipv4/conf/all/hidden and
> /proc/sys/net/ipv4/conf/eth0/hidden set to 1 on the real server but it is 
> still
> seems to be answering arp requests for x.y.z.2.  I have a few questions:
> 
> 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?

> 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

> 3) What should the default gateway be for the realserver?

x.y.z.1

> 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.

> 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

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