LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS/Nat and source natting

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS/Nat and source natting
From: "luca boncompagni" <lbonco@xxxxxxxxx>
Date: Fri, 28 Nov 2008 19:28:02 +0100
Hi,


On Fri, Nov 28, 2008 at 3:22 AM, Jose Ildefonso Camargo Tolosa
<ildefonso.camargo@xxxxxxxxx> wrote:
>
> Hi!
>
> On Fri, Nov 28, 2008 at 6:18 PM, luca boncompagni <lbonco@xxxxxxxxx> wrote:
> > Hi,
> >
> > I need to map different ports on the real server:
> >
> >  VIP:80
> >       R1:9080
> >       R1:9081
> >       R1:9082
> >       R2:9080
> >       R2:9081
> >       R2:9082
>
> Ok. Np.
>
> >
> > Do you suggest to do something like:
> >
> > _______________________________________________________________
> >      |               |              |               |
> > C=10.3.136.23   VS=10.3.136.24  R1=192.168.10.1  R2=192.168.10.2
> >  _____________   _____________   _____________   _____________
> > |             | |             | |             | |             |
> > |   client    | |  director   | | realserver1 | | realserver2 |
> > |_____________| |_____________| |_____________| |_____________|
> >
> >
>
> mmmm..... Yes.
>
> > By the way, is there any way to do SNAT with LVS?
>
> dunno, I have always used iptables for that purpose.

My problem is that I can't assign a range of ip
(10.3.136.20-10.3.136.30) to the real server, but I have 10.3.136.21
and 10.3.136.25. I know that iptables can do this only with kernel
2.6.10, but this is too old.

Thanks,
Luca

>
> >
> > Thanks,
> > Luca
> >
> >
> >
> > On Thu, Nov 27, 2008 at 9:27 PM, Jose Ildefonso Camargo Tolosa
> > <ildefonso.camargo@xxxxxxxxx> wrote:
> >> Hi!
> >>
> >> 1. Any particular reason why you need to use NAT for load-balancing on
> >> the same network segment? why not try DR instead?
> >> 2. If you really need NAT, you could create a "servers network" (it
> >> doesn't matter if they are on the same network segment, you just need
> >> them to be on different networks, ej. 192.168.1.0/24).
> >>
> >> On Fri, Nov 28, 2008 at 2:16 PM, luca boncompagni <lbonco@xxxxxxxxx> wrote:
> >>> Hi all,
> >>>
> >>> I need to balance a cluster of servers inside the same subnet as below:
> >>>
> >>> _______________________________________________________________
> >>>       |               |              |               |
> >>> C=10.3.136.23   VS=10.3.136.24  R1=10.3.136.25   R2=10.3.136.26
> >>>  _____________   _____________   _____________   _____________
> >>> |             | |             | |             | |             |
> >>> |   client    | |  director   | | realserver1 | | realserver2 |
> >>> |_____________| |_____________| |_____________| |_____________|
> >>>
> >>> The director is a debian/testing with
> >>>   - kernel 2.6.26-1-686
> >>>   - ipvsadm v1.24 2005/12/10 (compiled with popt and IPVS v1.2.0)
> >>>
> >>> I use:
> >>>
> >>> ipvsadm -A -t 10.3.136.24:80 -s rr
> >>> ipvsadm -a -t 10.3.136.24:80 -r 10.3.136.25:80 -m
> >>> ipvsadm -a -t 10.3.136.24:80 -r 10.3.136.26:80 -m
> >>>
> >>> and i try with:
> >>>
> >>> iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 10.3.136.24
> >>>
> >>> but SNAT is not working.
> >>>
> >>> How can I do?
> >>>
> >>> Thanks,
> >>> Luca
> >>>
>


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