LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] problem setting up an LVS-NAT load balancing scenario

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] problem setting up an LVS-NAT load balancing scenario
From: "Ajay Keshavapatnam" <ajay.keshavapatnam@xxxxxxxxx>
Date: Fri, 6 Jul 2007 17:09:47 +0530
Hi Joe
Thanks a lot for your reply.
I have made the changes as you have suggested.

But still
"when i send a http request to the virtual IP from client, I receive no
response."

Network looks like the following (I am testing with one real server at the
moment)

[CIP]192.168.3.38 --> [eth0:162 VIP]192.168.3.162 --> [eth0
RIP]192.168.2.197
              [eth0 DIP]192.168.2.160


Director:
OS is Trustix Secure Linux - kernel 2.4.34-2tr
Ipvsadm version: 1.0.12
1 NIC
DIP Eth0 192.168.2.160
VIP Eth0:162 192.168.3.162


Real server:
OS is Fedora core 2 - kernel 2.6.5-1.358
1 NIC
Eth0 192.168.2.197


Iam following the steps in LVS mini howto to setup LVS nat.
5.2 setup by hand

Step 1: i have modified mini-rc.lvs_dr-director
 script according to my config and run the script on the director.



root@director ~# sh /root/ajay/lvs-nat-dir-setup.sh
1
0
0
0
SIOCADDRT: File exists
PING 192.168.2.197 (192.168.2.197) 56(84) bytes of data.
64 bytes from 192.168.2.197: icmp_seq=1 ttl=64 time=0.189 ms


--- 192.168.2.197 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.189/0.189/0.189/0.000 ms
IP Virtual Server version 1.0.12 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.3.162:http rr
  -> cccc-o4n5o2e.cccc.net:h Masq    1      0          0





Step 2: i have modified mini-rc.lvs_dr-realserver
 script according to my config and run the script on the realserver.


[root@realserver]$sh /root/ajay/lvs-nat-realserver-setup.sh
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.2.0     0.0.0.0         255.255.254.0   U         0 0          0
eth0
169.254.0.0     0.0.0.0         255.255.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         192.168.2.160   0.0.0.0         UG        0 0          0
eth0
0.0.0.0         192.168.2.3     0.0.0.0          UG        0 0          0
eth0
PING 192.168.2.160 (192.168.2.160) 56(84) bytes of data.
64 bytes from 192.168.2.160: icmp_seq=0 ttl=64 time=0.205 ms


--- 192.168.200.160 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.205/0.205/0.205/0.000 ms, pipe 2
PING 192.168.201.162 ( 192.168.201.162) 56(84) bytes of data.
64 bytes from 192.168.201.162: icmp_seq=0 ttl=64 time=0.309 ms


--- 192.168.3.162 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.309/0.309/0.309/0.000 ms, pipe 2
0


step 3:
root@client:~$ wget http://192.168.3.162
--12:54:30--  http://192.168.201.162/
           => `index.html.1'
Connecting to 192.168.3.162:80 <http://192.168.3.162/>...


Behaviour:

When i attempt to http to the virtual IP from client, I receive no
response, ipvsadm shows one inactive connection.


RIP can ping DIP, VIP and CIP

step 4

root@director ~# ipvsadm -L -n
IP Virtual Server version 1.0.12 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.201.162:80 <http://192.168.201.162/> rr
  -> 192.168.200.197:80 <http://192.168.200.197/>           Masq    1
0          1



NOTE:
i have a firewall running on the director
and i have cleared the iptables using iptables -F



Do let me know if you need more information to answer the query.

Any thoughts would be very much appreciated!!

Thanks in advance,
Ajay


On 7/3/07, Joseph Mack NA3T <jmack@xxxxxxxx> wrote:
>
> On Tue, 3 Jul 2007, Ajay Keshavapatnam wrote:
>
> > Hi Graeme
> >
> > I have made changes as you have suggested me  not to have client on the
> > same  network  as  the real server.
> >
> > i have used a new client with CIP:  192.168.3.38 . still having the same
> > problem. unable to telnet from client to the VIP.
>
>
> there's a big notice at the start of the LVS-NAT section in
> the mini-HOWTO that you should read. You need the VIP and
> the RIP to be on separate networks (not the CIP and the RIP)
>
> Joe
>
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
>
> _______________________________________________
> 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>