LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

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

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] problem setting up an LVS-NAT load balancing scenario
From: "Ajay Keshavapatnam" <ajay.keshavapatnam@xxxxxxxxx>
Date: Tue, 3 Jul 2007 15:06:27 +0530
Hi all

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!


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

[CIP]192.168.2.234 --> [eth0:162 VIP]192.168.2.162 (Director)[eth0 DIP]
192.168.2.160 --> [eth0 RIP]192.168.2.197

I have set things up in the following way (all machines are located on the
same switch at the moment)

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

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