请教如何在redhat as3中使用LVS

我有两台redhat as3,打算一部用来做directory(网卡ip是17.24.18.21),一部做realserver(172.24.18.22),VIP是172.24.18.23,根据资料说rhas3不用打补丁,所以我就把这一步省了,大家帮我看看我的操作有没有错:
directory:
修改内核运行参数,即修改/etc/sysctl.conf文件的内容如下:
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.eth0.send_redirects = 1

然后执行下面的命令是对内核修改的参数立即生效:
sysctl -p

配置VIP地址:
/sbin/ifconfig eth0:0 172.24.18.23 broadcast 172.24.18.23 netmask 255.255.255.255 up
/sbin/route add -host 172.24.18.23 dev eth0:0

清除ipvsadm表:
/sbin/ipvsadm -C

使用ipvsadm安装LVS服务:
/sbin/ipvsadm -A -t 172.24.18.23:http -s rr

增加realserver:
#forward http to realserver using direct routing with weight 1
/sbin/ipvsadm -a -t 172.24.18.23:http -r 172.24.18.22 -g -w 1

realserver:
修改内核运行参数,即修改/etc/sysctl.conf文件的内容如下:
net.ipv4.ip_forward = 0
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

然后执行下面的命令是对内核修改的参数立即生效:
sysctl -p

配置VIP地址:
/sbin/ifconfig lo:0 172.24.18.23 broadcast 172.24.18.23 netmask 255.255.255.255 up
/sbin/route add -host 172.24.18.23 dev lo:0

用浏览器输入http://172.24.18.23,连续访问多次,出现的都是directory(172.24.18.21)的内容,在directory中用/sbin/ipvsadm 来看,如下:
IP Virtual Server version 1.2.1 (size=65536)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.24.18.23:http rr
-> 172.24.18.22:http Route 1 0 0
ipvsadm没有起作用,请问各位我的做法是不是漏掉了什么?

Forums:

你确认AS3中有这些参数,先到/proc/sys/net/ipv4/conf/eth0 下看一下
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

lvs service 有启动吗?

A simple and ingtelilent point, well made. Thanks!

Reading posts like this make surfing such a plearuse

I never thought I would find such an everyday topic so enrnlatlihg!