LVS Director as default gw?

Julian Anastasov ja at ssi.bg
Thu May 22 09:56:55 BST 2003


	Hello,

On Thu, 22 May 2003, Aihua Liu wrote:

>     I wonder if the Director can rewrites both the source IP address and
> destination IP address for all packets. For example, Director replaces
> the destination IP address with real servers' IP address and replaces
> the source IP address with Director private IP address for incoming
> packets. Then real servers don't have to set the Director as default
> gateway. LVS can do it? Thank you

	That will need allocating unique TCP/UDP port in the
director for each conn to the real servers.

	It is not a big pain to use the LVS box as default router
for the real servers in LVS-DR mode. We already do it for LVS-NAT.
You can always patch your routing in the LVS box in a safe manner
with forward_shared flag:

http://www.ssi.bg/~ja/#lvsgw

	The LVS HOWTO contains examples how to do it exactly.

	Anyone who worry about bandwidth problems can give it a try.
In IPVS for 2.4 the difference in forwarding NAT and DR is small.
So, choosing NAT or DR depends only on the ability to
route properly the packets and on the real server setups: for
some admins it is preferred the servers to listen on VIPs, etc. For
others it is difficult to solve the ARP problem with DR (eg. patches not
present in real server's kernels or difficult to do it in other OSes).
So, there are different but _possible_ alternatives.

Regards

--
Julian Anastasov <ja at ssi.bg>



More information about the lvs-users mailing list