lvs_heartbeat+ldirectord 客户端adsl猫负载均衡拨号上网 经常无法登陆 或无法退出

由于是双猫负载上网 公网ip经常换 so 到lvs的session 经常导致不对
请问如何解决
2- 修改haresources文件
abfront1 IPaddr::192.168.1.150 lvsdr-basic ldirectord

ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
deadtime 20
initdead 20
bcast eth1 在eth1上发送心跳广播
mcast eth1 225.0.0.1 694 1 0
auto_failback on
node centos1
node centos2
ping_group group1 192.168.1.151 192.168.1.152
respawn root /usr/lib/heartbeat/ipfail
apiauth ipfail gid=root uid=root

ldirectord.cf
virtual=192.168.1.150:80
real=192.168.1.151:80 gate
real=192.168.1.152:80 gate
service=http // 服务名称http
request="test.html" // lvs服务器测试代码
receive="Test" //
scheduler=sh // 按照source hash 调度
protocol=tcp

/etc/init.d/lvsdr-basic
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

VIP=192.168.1.150
RIP1=192.168.1.151
RIP2=192.168.1.152
###########################
# ifconfig a
#
#/sbin/ifconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 up
#
############################

/sbin/route add -host $VIP dev eth0:0
echo "1" > /proc/sys/net/ipv4/ip_forward

谢谢 ,有什么不清楚的配置 我再补充

Forums:

randomness