作者:Toby_魚5902 | 来源:互联网 | 2017-11-06 11:49
#clientmodprobeipipipaddradd192.168.52.18532devtunl0iplinksettunl0upsbinifconfigtunl0192.168.52.185broadcast192.168.52.185netmask255.255.255.255upecho2procsysnetipv4confallarp_announceecho1procsysnet
#client
modprobe ipip
ip addr add 192.168.52.185/32 dev tunl0
ip link set tunl0 up
/sbin/ifconfig tunl0 192.168.52.185 broadcast 192.168.52.185 netmask 255.255.255.255 up
echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
echo 2 > /proc/sys/net/ipv4/conf/tunl0/arp_announce
echo 1 > /proc/sys/net/ipv4/conf/tunl0/arp_ignore
#server(debian)
modprobe ip_vs
apt-get install ipvsadm
ifconfig eth1:1 192.168.52.185 netmask 255.255.255.255 broadcast 192.168.52.255 up
echo 1 > /proc/sys/net/ipv4/ip_forward
ipvsadm -C
ipvsadm -A -t 192.168.52.185:80 -s wlc
ipvsadm -a -t 192.168.52.185:80 -r 192.168.52.119:80 -w 2 -i
ipvsadm -a -t 192.168.52.185:80 -r 192.168.51.14:80 -w 2 -i
转自http://sudone.com/