LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Newbie on ipvs

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Newbie on ipvs
From: guioc@xxxxxxxxxxxxxxxx
Date: Wed, 30 Jul 2003 13:43:55 -0300

Hello,

I am trying to build a LVS Cluster using IPVS but I am facing some difficulty in
putting it to work. I've read extensively for an answer but I still got stuck.
I'll explain what I did, and I'll be glad if someone can point out my error.

I am working on a cluster that has nodes with IP's ranging from 192.168.1.1
through 192.168.1.20 (called node1 through node20). I am using node2 as a
director and nodes 15 and 16 as real servers.

I succeded in patch, compile, install and load ipvs module. After this I created
a VIP 192.168.1.77 on node2 to serve as the cluster IP

Then I did, on node2

echo 1 > /proc/sys/net/ipv4/ip_forward

# and to test it all I used iptables internal load balancing utility
# with the command
iptables -t nat -A PREROUTING -d 192.168.1.77 -j DNAT 192.168.1.15-192.168.1.16

after this I logged on node1 (external client) to ping 192.168.1.77 several
times in order to see what happens and the ping returns in a roud robin fashion
from nodes 15 and 16 as planned

in order to use ssh I added the folowing line to node2, so the connection can
look as coming from node2 directly

iptables -t nat -A POSTROUTING -j SNAT 192.168.1.77

then I did the ping test from node1 and the ping seems to come from node2, then
I tried to ssh several times from node1 on node2 and succefully loged on node15
and node16 in a round robin fashion.

Then I went to ipvs, i flushed all the iptables entries and issued, on node2 the
command

/sbin/ipvsadm -A -t 192.168.1.77:22 -s rr

to add the virtual service
and the commands

/sbin/ipvsadm -a -t 192.168.1.77:22 -r 192.168.1.15:22 -m -w 1
/sbin/ipvsadm -a -t 192.168.1.77:22 -r 192.168.1.16:22 -m -w 1

to add the real servers.

In order to do the test i tried to ssh from node1 on node2 put the conections
never completes and I got no login prompt, it just hangs.

What could be happenning?

Thanks,

Guilherme O'Connor
-------------------
Integrable Systems Lab -- LSI-USP



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