[lvs-users] Windows Server configuration example for one arm NAT (single network) works.
malcolm at loadbalancer.org
Fri Aug 1 12:29:40 BST 2008
Forgot to add that this method works for Linux as well avoiding the
need to add a route for each host i.e. as follows:
Route configuration for Linux with one arm NAT mode:
When a client on the same subnet as the real server tries to access
the virtual server on the load balancer the request will fail. The
real server will try to use the local network to get back to the
client rather than going through the load balancer and getting the
correct network translation for the connection.
To rectify this issue we need to modify the local network route to a
route del -net 192.168.1.0 netmask 255.255.255.0 dev eth0
route add -net 192.168.1.0 netmask 255.255.255.0 metric 2000 dev eth0
NB. Replace 192.168.1.0 with your local subnet address.
Then we need to make sure that local network access uses the load
balancer as its default route:
route add -net 192.168.1.0 netmask 255.255.255.0 gateway 192.168.1.21
metric 0 dev eth0
NB. Replace 192.168.1.21 with your load balancer gateway
Any local traffic (same subnet) is handled by this manual route and
any external traffic is handled by the default route (which also
points at the load balancer).
Phone: +44 (0)870 443 8779
More information about the lvs-users