求章博士和各位大仙指点:piranha dr模式,最简单测试行不通

我看了论坛的文章《http://www.linuxtone.org/html/07/t-1607.html》
准备了3台机器,都装了redhat el 5.3,都只有一张网卡。
lvs-active: 192.168.4,170-真实ip
lvs-vip: 192.168.4.190-准备虚拟的ip
realserver1: 192.168.4.171-真实ip
realserver2: 192.168.4.172-真实ip

===============

用http://localhost:3636配置后得到lvs.cf

===============

serial_no = 35
primary = 192.168.4.170
service = lvs
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = direct
nat_nmask = 255.255.255.0
debug_level = NONE
virtual lvs1 {
active = 1
address = 192.168.4.190 eth0:1
vip_nmask = 255.255.255.0
port = 80
pmask = 255.255.255.0
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wrr
protocol = tcp
timeout = 6
reentry = 15
quiesce_server = 0
server rs1 {
address = 192.168.4.171
active = 1
weight = 1
}
server rs2 {
address = 192.168.4.172
active = 1
weight = 1
}
}
========
启动pulse服务,网页显示信息如下。
========
CURRENT LVS ROUTING TABLE IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddressort Scheduler Flags
-> RemoteAddressort Forward Weight ActiveConn InActConn
TCP 192.168.4.190:80 wrr
-> 192.168.4.171:80 Route 1 0 0
-> 192.168.4.172:80 Route 1 0 0

CURRENT LVS PROCESSES
root 4560 0.0 0.0 1904 344 ? Ss 09:13 0:00 pulse
root 4614 0.0 0.0 1888 616 ? Ss 09:13 0:00 /usr/sbin/lvsd --nofork -c /etc/sysconfig/ha/lvs.cf
root 4632 0.0 0.0 1868 672 ? Ss 09:13 0:00 /usr/sbin/nanny -c -h192.168.4.171 -p 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -a 15 -I/sbin/ipvsadm -t 6 -w 1 -V 192.168.4.190 -M g -U none --lvs
root 4633 0.0 0.0 1868 656 ? Ss 09:13 0:00 /usr/sbin/nanny -c -h192.168.4.172 -p 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -a 15 -I/sbin/ipvsadm -t 6 -w 1 -V 192.168.4.190 -M g -U none --lvs
root 10774 0.0 1.2 81240 22160 pts/1 S+ 10:29 0:00 gedit /etc/sysconfig/ha/lvs.cf
========
配置主LVS服务器.
# vi /etc/sysctl.conf找到下面行 //启用数据转发.
net.ipv4.ip_forward = 0将0 改成1,net.ipv4.ip_forward = 1
执行如下命令来应用:sysctl –p
========
realserver上我做了如下配置
========
ifconfig lo:0 192.168.4.190 netmask 255.255.255.255 broadcast 192.168.4190
/sbin/route add -host 192.168.4.190 dev lo:0
echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
sysctl -p >/dev/null 2>&1 //这话我不知干什么
========
realserver 都开了http的服务,都能访问
========
现在我的情况是:http://192.168.4.190
不能打开,有的人说 注意路由,可是同网段 无需通过路由器进行转发的

清各位高手帮忙看看。

Forums:

哇,又是abcboy同学,还把我的文章直接放到这里来了。。。。呵呵

不知道各位大仙,能否在百忙中,抽出空来,解答我等疑惑。
以上配置的机器,我把iptables和selinux都关了。

使用KA很简单

Important

The /etc/sysctl.conf and /etc/sysconfig/iptables files do not change when
you configure LVS using the Piranha Configuration Tool.

Such an imsiepsrve answer! You've beaten us all with that!

You put the lime in the coocunt and drink the article up.

Clear, inomtfarive, simple. Could I send you some e-hugs?