LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   LVS-DR is not working (https://www.linuxquestions.org/questions/linux-server-73/lvs-dr-is-not-working-826653/)

chobong 08-16-2010 10:27 PM

LVS-DR is not working
 
Hi all,

Im building a LVS system with 3 server, 1 for Load Balance Server and the others for Real Web server.
LB Server: 192.168.1.111
eal Server1: 192.168.1.112
Real Server2: 192.168.1.113

# echo "1" > /proc/sys/net/ipv4/ip_forward

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.1.111:80 rr
-> 192.168.1.112:80 Masq 1 0 0
-> 192.168.1.113:80 Masq 1 0 0

At Real Server1:
iptables –t nat –A PREROUTING –d 192.168.1.111 –p tcp –dport 80 –j REDIRECT –to-ports 80
At Real Server2
iptables –t nat –A PREROUTING –d 192.168.1.111 –p tcp –dport 80 –j REDIRECT –to-ports 80

But I can't connect to http://192.168.1.111.
Could you please let me know what i should do now? :(
Thank you so much!

mahao 02-21-2011 02:39 AM

Any solution about this?

I'm stuck here too.

[root@localhost ~]# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.121.122.63:80 wlc persistent 30
-> 10.121.122.56:80 Route 1 0 0
-> 10.121.122.55:80 Route 1 0 0

I have stopped iptables.
But http://10.121.122.63 return can not connect.

mahao 02-21-2011 09:02 PM

Quote:

Originally Posted by mahao (Post 4265621)
Any solution about this?

I'm stuck here too.

[root@localhost ~]# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.121.122.63:80 wlc persistent 30
-> 10.121.122.56:80 Route 1 0 0
-> 10.121.122.55:80 Route 1 0 0

I have stopped iptables.
But http://10.121.122.63 return can not connect.

This is my lvs.cf:

serial_no = 20
primary = 10.121.122.83
service = lvs
backup = 192.168.0.4
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = direct
debug_level = NONE
virtual mysql {
active = 1
address = 10.121.122.63 eth0:2
vip_nmask = 255.255.255.255
port = 80
persistent = 30
pmask = 255.255.255.255
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 6
reentry = 15
quiesce_server = 0
server real1 {
address = 10.121.122.55
active = 1
weight = 1
}
server real2 {
address = 10.121.122.56
active = 1
weight = 1
}
}


All times are GMT -5. The time now is 12:32 AM.