The VIP management script of the LVS back-end Realserver lvs-realsvr.sh

Source: Internet
Author: User

The VIP management script of the LVS back-end Realserver lvs-realsvr.sh


#!/bin/bash# # 2015/3/27# lvs real server## chkconfig:   -  85 15# description:  control vip on lvs realserver # source  function library.  /etc/rc.d/init.d/functions# source networking configuration.  /etc/sysconfig/network# check that networking is up. [  "$NETWORKING"  =  "no"  ] && exit 0lockfile= "/var/lock/subsys/ Lvs-real "  s_vip= ' 10.0.205.100 ' Start ()  {  ifconfig lo:1 ${s_vip}  netmask 255.255.255.255 broadcast ${s_vip}  echo 1 >/proc/sys/net/ipv4/ Conf/lo/arp_ignore  echo 2 >/proc/sys/net/ipv4/conf/lo/arp_announce  echo  1 >/proc/sys/net/ipv4/conf/all/arp_ignore  echo 2 >/proc/sys/net/ipv4/ Conf/all/arp_announce  retval=$?  echo  [  $retval  -eq 0 ] && touch  $lockfile   return   $retval}stop ()  {  echo 0 >/proc/sys/net/ipv4/conf/lo/arp_ignore   echo 0 >/proc/sys/net/ipv4/conf/lo/arp_announce  echo 0 >/proc/sys/net/ ipv4/conf/all/arp_ignore  echo 0 >/proc/sys/net/ipv4/conf/all/arp_announce   ifconfig lo:1 down  retval=$?  echo  [  $retval  -eq 0  ] && rm -f  $lockfile   return  $retval}status ()  {   ip a |grep inet |grep -v inet6  }case $1 in     start)     start    status    ;;   stop)     stop    status    ;;   status)     status    ;;   *)       echo $ "Usage: $0 {start|stop|status}"      exit 2 esac


The VIP management script of the LVS back-end Realserver lvs-realsvr.sh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.