LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: LVS-NAT and multiple gateways on real servers

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: LVS-NAT and multiple gateways on real servers
From: Ryan Leathers <ryan.leathers@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Jul 2004 16:53:38 -0400
I don't think you'll be able to get what you are after by assigning
10.60.25.x addresses to your real server ETH1 adapters.  The trouble is
that a simple routing table (which is all you have on the real servers)
can only reply to a network over a single adapter.  How will it know to
use ETH1 vs ETH0 when the destination is in your 10 network?  The answer
is it will use the most specific route so your LVS will cease to
function for your 10 network since the default route is less specific.

One possible solution is to use NAT.  By using NAT you could reach an
address in the 10 network which is translated to the 192.168.1 network. 
This would allow you to reach each real server via a unique address in
the 10 network, by translating its address and then arriving at the real
server's Eth0 interface completly bypassing the LVS.  The real server
would respond the the NAT'ed address rather than the actual source
address from the 10 network.  I believe this is what you are after.  

No changes need be made on the real servers or lvs directors.  Instead,
you just need to build a simple NAT device.  It could be a hardware
router or a PC running Linux or some other NAT capable OS of your
liking.  You might even decide to have one of your real servers or
directors do this chore, but for simplicity sake I would suggest you use
another device.  I use an old cisco router (the ebay $50 type) for this
very purpose. 

Does this help?
 

On Thu, 2004-07-08 at 16:27, Farrell, Doug wrote:
> Jack,
> 
> Thanks for the reply. I probably didn't make my setup very clear as I
> think you
> misundertood what I've got going. The IP 10.60.25.131 is the VIP where
> users
> go to access the load balanced services. I think this is referred to as
> the DIP 
> (Director IP) in the LVS HowTo. The VIP 192.168.1.103 is the virtual IP
> the
> load balancer uses the access the private 192 network where the real
> servers
> live. I think this is called the RIP in the LVS HowTo doc.
> 
> What I'd like to do is this, put an IP like 10.60.25.127 on eth1 on Real
> Server 1
> and give that IP a gateway of 10.60.24.1. In this way I could connect
> directly to
> the Real Server for maintenence/updates rather than having to go through
> the 
> load balancer.
> 
> Hope I've made things clearer rather than murkier. :)
> Thanks,
> Doug Farrell
> Scholastic, Inc.
> 
> -----Original Message-----
> From: Joseph Mack [mailto:mack.joseph@xxxxxxx]
> Sent: Thursday, July 08, 2004 3:52 PM
> To: LinuxVirtualServer.org users mailing list.
> Subject: Re: LVS-NAT and multiple gateways on real servers
> 
> 
> "Farrell, Doug" wrote:
> > 
> > Hi all,
> > 
> > I'm using the RedHat Piranha version of LVS and have successfully
> configured an LVS-NAT
> 
> can you turn line wrap on please, your paragraphs are all one line and
> hard to read
> 
> 
> > Director
> > eth0    IP : 10.60.25.125       gateway=10.60.24.1
> > eth0:1 VIP : 10.60.25.131
> > eth1    IP : 192.168.1.101
> > eth1:1 VIP : 192.168.1.103
> > 
> > Real Server 1
> > eth0    IP : 192.168.1.104      gateway=192.168.1.103
> > eth1    IP : 10.60.25.127
> 
> having IPs in different networks is going to be interesting from the
> networking
> point of view. Do you have to have both IPs in different networks?
> 
> have you got the LVS to work for each VIP separately?
> 
> You appear to have two one-net LVS-NAT setups in parallel (see HOWTO).
> If so, make sure you understand this setup.
> 
> Joe
-- 
Ryan Leathers <ryan.leathers@xxxxxxxxxxxxxxxxxxx>
Global Knowledge

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