real server 的vip 启动脚本
#!/bin/bash
#chkconfig:
#description: real server init script VIP=192.168.80.80
case $ in
"start")
echo "starting real server ..."
ifconfig lo: $VIP broadcast $VIP netmask 255.255.255.255 up
echo "">/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "">/proc/sys/net/ipv4/conf/lo/arp_announce
echo "">/proc/sys/net/ipv4/conf/all/arp_ignore
echo "">/proc/sys/net/ipv4/conf/all/arp_announce
;;
"stop")
echo "stoping real server ..."
ifconfig lo: $VIP down
echo "">/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "">/proc/sys/net/ipv4/conf/lo/arp_announce
echo "">/proc/sys/net/ipv4/conf/all/arp_ignore
echo "">/proc/sys/net/ipv4/conf/all/arp_announce ;;
"*")
echo "not suport option $1" ;;
esac