LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Problem with setting up Load Balance on Linux 2.6.18

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Problem with setting up Load Balance on Linux 2.6.18
From: Nikhil Trivedi <nikhil812@xxxxxxxxx>
Date: Wed, 3 Dec 2008 09:36:31 -0800 (PST)
Hello All,
I am trying to setup a load balance using the Linux Virtual Server, but I am 
running into some issues.

I did the following on the server where I am setting up the load balancer:

[root@091001ZF0NTG ~]# echo "1" > /proc/sys/net/ipv4/ip_forward
[root@091001ZF0NTG ~]# ifconfig eth0:0 <VS-IP> netmask 255.255.0.0 broadcast 
<VS-IP Subnet>
[root@091001ZF0NTG ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
[root@091001ZF0NTG ~]# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sda2  VolGroup00 lvm2 a-   148.94G    0
[root@091001ZF0NTG ~]# ipvsadm -A -t <VS-IP>:80 -s rr
[root@091001ZF0NTG ~]# ipvsadm -a -t <VS-IP>:80 -r <Actual Server - Running 
Apache WebServer-IP>:80 -m
[root@091001ZF0NTG ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  <VS-IP> rr
  -> <Actual-IP> Masq    1      0          0

After that I ran the following command on <Actual IP> (The server that I want 
the request to be forwarded to).
[root@081001SVOCJ2 ~]# echo "1" > /proc/sys/net/ipv4/ip_forward

Once I did that, I tested it by connecting to the <VS-IP>, Port 80 but I am not 
able to connect.
C:\Documents and Settings\xxxxx>telnet <VS-IP> 80
Connecting To <VS-IP>...Could not open connection to the host, on port 80
: Connect failed
 
I am able to execute the same command on <Actual-IP>.

Some help here would really be appreciated....

-NT


      


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