Hello,
I am running a redhat 6.1 linux box (off the shelf). i have facing
problems with the following lvs configuration.
my card configuration is
eth0: 192.168.100.210
eth1: 172.16.0.210
i used 192.168.100.212 as the virtual ip. the connections are not
forwarded to the server 172.16.0.100 as expected. i have a feeling that
i am missing something.
Pls help me in overcoming this problem.
thanks
bhaskar
my script is
#!/bin/sh
IPVSADM=/usr/sbin/ipvsadm
case "$1" in
start)
if [ -x $IPVSADM ]
then
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -A forward -j MASQ -s 172.16.0.210/16 -d 0.0.0.0/0
$IPVSADM -A -t 192.168.100.212:21 -s wlc
$IPVSADM -a -t 192.168.100.212:21 -R 172.16.0.101:21 -m -w 1
fi
;;
stop)
if [ -x $IPVSADM ]
then
$IPVSADM -C
fi
;;
*)
echo "usage : lvs {start|stop}"
exit 1
esac
exit 0
After running the script the ipvsadm command shows the rule table as
[root@linux /root]# ./lvs start
[root@linux /root]# ipvsadm
IP Virtual Server version 0.8.3 (size=4096)
Protocol LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.100.212:21 wlc
-> 172.16.0.101:21 Masq 1 0 0
[root@linux /root]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.16.0.210 * 255.255.255.255 UH 0
0 0 eth1
172.16.0.0 * 255.255.255.0 U 0
0 0 eth1
172.16.0.0 * 255.255.0.0 U 0
0 0 eth0
192.168.0.0 * 255.255.0.0 U 0
0 0 eth0
127.0.0.0 * 255.0.0.0 U
0 0 0 lo
default 172.16.0.11 0.0.0.0 UG 0
0 0 eth1
|