Submitted by liuyikm on 周一, 2007-07-02 02:34
我采用DR模式,调度算法用的是源地址散列,我关掉一台realserver后,前台还能访问?
VIP:192.168.64.31
LVS Server IP:192.168.64.21
RealServer1:192.168.64.11
RealServer2:192.168.64.12
LVS配置:
/sbin/ifconfig eth0:1 192.168.64.31 netmask 255.255.255.255 up
/sbin/route add -host 192.168.64.31 dev eth0:1
/sbin/ipvsadm -A -t192.168.64.31:80 -s sh
/sbin/ipvsadm -a -t192.168.64.11:80 -g
/sbin/ipvsadm -a -t192.168.64.12:80 -g
/sbin/ipvsadm
RealServer配置(两台,分别为A、B):