2016年01月06日
さくらインターネット株式会社 / さくらインターネット研究所
上級研究員 松本直人
1) UCARPをインストールする(CentOS 7.1/x86_64の場合)
# systemctl disable firewalld; systemctl stop firewalld
# yum groupinstall "Development Tools" -y
# yum install -y epel-release; yum install -y ucarp libpcap-devel
# cd /opt; wget https://download.pureftpd.org/pub/ucarp/ucarp-1.5.2.tar.gz
# tar xzvf ./ucarp-1.5.2.tar.gz
# vi /opt/ucarp-1.5.2/src/carp.c
eh.ether_shost[0] = 0x00;
eh.ether_shost[1] = 0x00;
eh.ether_shost[2] = 0x5e;
eh.ether_shost[3] = 0x00;
eh.ether_shost[4] = 0x01; ←通信制限に合わせて
eh.ether_shost[5] = vhid; 送信元MACアドレス範囲を変更
# cd /opt/ucarp-1.5.2; ./configure; make
# cp /usr/sbin/ucarp /usr/sbin/ucarp.old; cp /opt/ucarp-1.5.2/src/ucarp /usr/sbin/ucarp
# vi /usr/libexec/ucarp/vip-down
ip address del "$2"/32 dev "$1"
# cat /usr/libexec/ucarp/vip-up
ip address add "$2"/32 dev "$1"
# vi /etc/ucarp/vip-common.conf
PASSWORD="SeCrEt"
BIND_INTERFACE="eth0"
SOURCE_ADDRESS="V.V.V.66"
OPTIONS="--shutdown --preempt --deadratio=3"
# vi /etc/ucarp/vip-1.conf
VIP_ADDRESS="V.V.V.1"
# systemctl enable ucarp@vip-1; systemctl start ucarp@vip-1
通信制限に合わせてUCARPを変更
SOURCE: SAKURA Internet Research Center. 01/2016
Linux
Linux
UCARP
仮想スイッチ
仮想MACアドレスの通信制限
00:00:5e:00:01:01-4まで許可
さくらのクラウド

さくらのクラウドでUCARPを使う方法 -メモ-

  • 1.
  • 2.
    1) UCARPをインストールする(CentOS 7.1/x86_64の場合) #systemctl disable firewalld; systemctl stop firewalld # yum groupinstall "Development Tools" -y # yum install -y epel-release; yum install -y ucarp libpcap-devel # cd /opt; wget https://download.pureftpd.org/pub/ucarp/ucarp-1.5.2.tar.gz # tar xzvf ./ucarp-1.5.2.tar.gz # vi /opt/ucarp-1.5.2/src/carp.c eh.ether_shost[0] = 0x00; eh.ether_shost[1] = 0x00; eh.ether_shost[2] = 0x5e; eh.ether_shost[3] = 0x00; eh.ether_shost[4] = 0x01; ←通信制限に合わせて eh.ether_shost[5] = vhid; 送信元MACアドレス範囲を変更 # cd /opt/ucarp-1.5.2; ./configure; make # cp /usr/sbin/ucarp /usr/sbin/ucarp.old; cp /opt/ucarp-1.5.2/src/ucarp /usr/sbin/ucarp # vi /usr/libexec/ucarp/vip-down ip address del "$2"/32 dev "$1" # cat /usr/libexec/ucarp/vip-up ip address add "$2"/32 dev "$1" # vi /etc/ucarp/vip-common.conf PASSWORD="SeCrEt" BIND_INTERFACE="eth0" SOURCE_ADDRESS="V.V.V.66" OPTIONS="--shutdown --preempt --deadratio=3" # vi /etc/ucarp/vip-1.conf VIP_ADDRESS="V.V.V.1" # systemctl enable ucarp@vip-1; systemctl start ucarp@vip-1 通信制限に合わせてUCARPを変更 SOURCE: SAKURA Internet Research Center. 01/2016 Linux Linux UCARP 仮想スイッチ 仮想MACアドレスの通信制限 00:00:5e:00:01:01-4まで許可 さくらのクラウド