LoginSignup
4
3

More than 5 years have passed since last update.

Debianでbondingの設定を行う

Last updated at Posted at 2014-03-01

DebianでLACP(IEEE802.3ad)を使ってbondingの設定をしたときのメモ

環境

OSはDebian 7.4(wheezy)また、LACPを使用するので対応したスイッチが必要。
また、bondingを行うので2つ以上のネットワークインタフェースが必要。

セットアップ

まず、インタフェースの設定変更を行うためのコマンドをインストールする。

コマンドのインストール
$ aptitude install ifenslave-2.6

次にネットワークインタフェースを停止させる。

ネットワークの停止
$ /etc/init.d/networking stop

次にbondingモジュールの設定を行う。

bondingモジュールの設定
$ vi /etc/modprobe.d/bonding.conf
alias bond0 bonding
        options bonding mode=4 miimon=100 lacp_rate=1

次にbondingインタフェースの設定を行う。

ボンディングインタフェースの設定(例)
$ vi /etc/network/interfaces
auto eth0
   iface eth0 inet manual
   bond-master bond0

auto eth1
    iface eth1 inet manual
    bond-master bond0

auto bond0
iface bond0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    gateway 192.168.1.254
    slaves eth0 eth1
    bond_mode 802.3ad
    bond_miimon 100
    bond_downdelay 200
    bond_updelay 200
    bond-lacp-rate 4
    bond-slaves none
    dns-nameservers 192.168.1.254
    dns-search example.jp

上記の設定が終わったら下記のコマンドでネットワークインタフェースを開始する。

ネットワークの開始
$ /etc/init.d/networking start

動作状態のチェック

下記のコマンドを実行して、インタフェースが作成されているかと、正しくIPアドレスは振られているか
またbondingがLCAPで動いているか調べる。

チェック用
$ ifconfig
$ cat /sys/class/net/bond0/bonding/mode

参考

https://wiki.debian.org/Bonding
http://crashmag.net/how-to-configure-network-bonding-lacp-on-debian-wheezy
http://www.cyberciti.biz/tips/debian-ubuntu-teaming-aggregating-multiple-network-connections.html
http://www.tokiwinter.com/configuring-interface-bonding-on-debian-wheezy/

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3