LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] LVS LocalNode + Port Redirection

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] LVS LocalNode + Port Redirection
From: David L <dave@xxxxxxxxx>
Date: Wed, 11 Jun 2008 08:32:25 -0700
Hello all, I'm hoping to get some help with a LocalNode issues that I am 
having.  I hope this is not a run-of-the-mill issue that has a FAQ 
answer that I missed....here goes..

Single Interface LVS running 2.6.24 and ipvsadm 1.2.1 and keepalived 1.1.15

Director IP: 10.100.100.144
VIP: 10.100.100.150

Listening Daemons: *:25 *:2525


Director Routing Table:
Destination     Gateway         Genmask         Flags   MSS Window  irtt 
Iface
10.100.100.0    0.0.0.0         255.255.254.0   U         0 0          0 
eth0
10.0.0.0        0.0.0.0         255.0.0.0       U         0 0          0 
eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         10.100.100.1    0.0.0.0         UG        0 0          0 
eth0

Client: 10.100.1.50

Iptables rules:  -t mangle -A PREROUTING -d 10.100.100.150  -p tcp -m 
tcp --dport 25 -j MARK --set-mark 0x2

Network and routing between client and director is properly configured 
and functional.

What I would like to do is allow traffic from the client to 
10.100.100.150:25 to be load balanced to *both* listening daemons on 
10.100.100.150:25 and 10.100.100.150:2525 (or other local interface, lo?). 

Now I have read 
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.localnode.html 
which stated that port mapping (or re-direction) is not possible with 
"LocalNode" however I was hopeful after seeing this:

http://archive.linuxvirtualserver.org/html/lvs-users/2005-06/msg00113.html


This seems to indicate that this was worked on and functional back in 
Jun of '05. Did this make it into ip_vs?

Is there any way to get what I am looking for done?




If the above is not possible, is it possible to setup a group in 
keepalived.conf to LB traffic to a handful of listening daemons on lo:1, 
lo2:, lo:3 even if it has to be on the same port the client originally 
connected to? If this is the case would I number the lo:2 with the same 
IP as the VIP?  (I know that for LocalMode to work, based on the docs, 
the daemon must be listening on the VIP)


Basically the over-all idea that I am testing is for DR (Disaster 
Recovery) purposes.  The idea is to have a traditional LVS-NAT setup for 
a mail cluster where the real servers are in fact real servers getting 
traffic via LVS wlc. However, if we experienced a loss of 60% or more of 
our backend real-servers I would like to flip the firewall mark and have 
the traffic sent to a handful of local services that are essentially 
proxy servers to another physical location. (I cannot add the DR real 
servers to my keepalived.conf due to the fact that they are in another 
physical location thus LVS cannot be their DFG.)

Appreciate any comments or suggestions anyone may have!


Dave


<Prev in Thread] Current Thread [Next in Thread>
  • [lvs-users] LVS LocalNode + Port Redirection, David L <=