I have the following in a script (basically the how too)
#load kernel modules
modprobe ip_vs_ftp
#-----------------------------start----------------------------------
#zero/clear ipvsadm tables
/sbin/ipvsadm -Z
/sbin/ipvsadm -C
#install LVS services with ipvsadm
#EndUser
/sbin/ipvsadm -A -t 172.24.1.251:http -s wlc -p 1200
#Admin
/sbin/ipvsadm -A -t 172.24.1.252:http -s wlc -p 1200
#Image
/sbin/ipvsadm -A -t 172.24.1.240:http
# if your using pasv you need persistence....
/sbin/ipvsadm -A -t 172.24.1.240:ftp -p
## EndUser Farm
#forward http to realserver 192.168.1.10 using LVS-NAT (-m), with weight=1
/sbin/ipvsadm -a -t 172.24.1.251:http -r 192.168.1.10:http -m -w 3
#check that realserver is reachable from director
#ping -c 1 192.168.1.10
#forward http to realserver 192.168.1.20 using LVS-NAT (-m), with weight=1
/sbin/ipvsadm -a -t 172.24.1.251:http -r 192.168.1.20:http -m -w 2
#checking if realserver is reachable from director
#ping -c 1 192.168.1.20
## Admin Server
#forward http to realserver 192.168.1.25 using LVS-NAT (-m), with weight=1
/sbin/ipvsadm -a -t 172.24.1.252:http -r 192.168.1.25:http -m -w 1
#checking if realserver is reachable from director
#ping -c 1 192.168.1.25
## Image Server
#forward http to realserver 192.168.1.15 using LVS-NAT (-m), with weight=1
/sbin/ipvsadm -a -t 172.24.1.240:http -r 192.168.1.15:http -m -w 1
#checking if realserver is reachable from director
#ping -c 1 192.168.1.15
#forward ftp to realserver 192.168.1.20 using LVS-NAT (-m), with weight=1
/sbin/ipvsadm -a -t 172.24.1.240:ftp -r 192.168.1.20:ftp -m -w 1
#list ipvsadm table
/sbin/ipvsadm
#-----------------------------END-------------------------------------
if I change the wait of the .20 RIP to 0 and rerun the script
my connections continue to go that server even when I zeroed and clear
the table.
|