LVS DR模型RS端修改配置脚本

 1 #!/bin/bash
 2 vip=x.x.x.x
 3 case $1 in
 4 start)
 5     echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
 6     echo 1 > /proc/sys/net/ipv4/conf/ethX/arp_ignore
 7     echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
 8     echo 2 > /proc/sys/net/ipv4/conf/ethX/arp_announce
 9     ifconfig lo:0 $vip netmask 255.255.255.255 broadcast $vip up
10     ;;
11 stop)
12     ifconfig lo:0 down
13     echo 0 > /proc/sys/net/ipv4/conf/all/arp_ignore
14     echo 0 > /proc/sys/net/ipv4/conf/ethX/arp_ignore
15     echo 0 > /proc/sys/net/ipv4/conf/all/arp_announce
16     echo 0 > /proc/sys/net/ipv4/conf/ethX/arp_announce
17     ;;
18 esac

ethX为director端添加的RS地址的物理接口,请对应更改即可。

posted @ 2017-06-27 16:02  普朗克·李  阅读(316)  评论(0编辑  收藏  举报