LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Question about LVS NAT

To: Kim Le <kiml@xxxxxxxxx>
Subject: Re: Question about LVS NAT
Cc: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Sat, 11 Aug 2001 10:29:00 +0000 (GMT)
        Hello,

On Fri, 10 Aug 2001, Kim Le wrote:

> Hi all,
>
> I am trying to configure LVS on a single network single NIC using ipvsadm.
>
> ipvsadm -A -t 192.168.0.207:80
> ipvsadm -a -t 192.168.0.207:80 -r 192.168.0.200:80 -m
>
> My Client is 192.168.0.18
>       LVS 192.168.0.207
>       Server 192.168.0.200
>
> When i tried http://192.168.0.207
> I saw the LVS change the destination address to 192.168.0.200 and forward
> the packet but not changing the source IP.  Because of this the server
> response directly to my client and the connection drop.
>
> Is there a way to ask LVS to change the source addr also.  I look into the
> source code and LVS not seem to do that.
> Am I missing anything ?  I appreciate any help.

        If the source is changed the service will handle small number
of connections (they will come from one IP). If you want the client and
the server to be on same subnet you can try with LVS/DR method. For
LVS-NAT (and the Linux masquerading) the demasq is DNAT only (Destination
NAT).

        It is still possible to use NAT on same subnet, it is explained
in the HOWTO. In short, in your current setup the problem is that the
real server directly sends the replies to the client and they don't
pass the director. Joe created setup where you don't have link route
from the real server to the client and by this way NAT on same subnet
can work. The director is default gateway for the real servers.

> Kim


Regards

--
Julian Anastasov <ja@xxxxxx>



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