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: Tue, 3 Jul 2007 16:17:42 +0530
Hi Graeme

Really appreciate for your immediate reply.
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.

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.2.162 (Director)[eth0 DIP]
192.168.2.160 --> [eth0 RIP]192.168.2.197


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.2.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.234 ms

--- 192.168.2.197
 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.234/0.234/0.234/0.000 ms
IP Virtual Server version 1.0.12 (size=4096)
Prot LocalAddress:Port Scheduler Flags

  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  vmxp:telnet rr
  -> xxxx-o4n5o2e.xxxx.net:t 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@tt-ent-ajay ~]$sh /root/ajay/lvs-nat-realserver-setup.sh
SIOCADDRT: File exists
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.197 ms


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


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


*step 3*: telnet from client to the VIP
root@client ~# telnet 192.168.2.162
Trying 192.168.2.162...



Behaviour:

When i attempt to telnet to the virtual IP from client, I receive no

response, ipvsadm shows one inactive connection and the following can be
seen in tcpdump:

RIP can ping DIP, VIP and CIP


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.2.162:23
 rr
  -> 192.168.2.197:23           Masq    1      0          1





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, Graeme Fowler <graeme@xxxxxxxxxxx> wrote:
>
> Hi Ajay
>
> On Tue, 2007-07-03 at 15:06 +0530, Ajay Keshavapatnam wrote:
> > I'm having a problem setting up an LVS-NAT load balancing scenario and
> am
> > wondering if someone can point out where i'm going wrong!
>
>
> http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-NAT.html#one_network
>
> You've picked just about the trickiest setup to get right.
>
> In short: in LVS-NAT, clients should not be on the same network as the
> realservers. The setup can be modified to work around it though - have a
> read of the HOWTO.
>
> Graeme
>
>
> _______________________________________________
> 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>