LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] LVS-NAT Configuration is not working

To: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] LVS-NAT Configuration is not working
From: G V <gvlinux@xxxxxxxxx>
Date: Fri, 16 Sep 2011 12:55:47 -0700 (PDT)
Hello,
 
I am new to LVS, I am sure same quation might have been asked many times in 
many different forums and I did search google and red many documents on how to 
configure LVS-NAT, still I am not able to make it work.  Any help would be 
greatly appriciated.
 
I followed the link 
http://www.jumpingbean.co.za/linux-cluster-load-balancing-high-availability to 
configure LVS-NAT to load balance multiple web servers, just to test the basic 
things I used one load balancer server and one real server and used ipvsadm to 
configure these servers.  With the below configuration I am not able to access 
the default web page from my real server using http://lb1, when I try to access 
this page it just hangs and comes back with an error "Internet Explorer cannot 
display the webpage".  After trying to access default web page http://lb1 
ipvsadm command showing number of counts under InActConn column eventhough I am 
not able to access the default web page.
 
My LVS-NAT Configuration details:
 
Load Balancer
Hostname: lb1
Public IP: 192.168.1.120
Private IP: 192.168.3.120
 
Real Server1
Hostname: rs1
IP Address: 192.168.3.121
Gateway: 192.168.3.120
 
Real Server2
Hostname: rs2
IP Address: 192.168.3.122
Gateway: 192.168.3.120

[root@lb1 ~]# ipvsadm -A -t 192.168.1.120:80 -s rr
[root@lb1 ~]# ipvsadm -a -t 192.168.1.120:80 -r 192.168.3.121:80 -m -w 1
[root@lb1 ~]# ipvsadm-save > /etc/sysconfig/ipvsadm
 
[root@lb1 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward
[root@lb1 ~]# iptables -F
 
[root@lb1 ~]# /etc/init.d/ipvsadm status
ipvsadm is stopped
 
[root@lb1 ~]# /etc/init.d/ipvsadm start
Clearing the current IPVS table:                           [  OK  ]
Applying IPVS configuration:                               [  OK  ]
 
[root@lb1 ~]# /etc/init.d/ipvsadm status
ipvsadm dead but subsys locked
 
[root@lb1 ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  lb1.abcde.com:http rr
  -> rs1.abcde.com:http           Masq    1      0          0

[root@lb1 ~]# ipvsadm (after trying to access default page http://lb1)
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  lb1.abcde.com:http rr
  -> rs1.abcde.com:http           Masq    1      0          4
 
Thanks,
GV
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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