それらの NIC を束ねて帯域幅を増やしたり、NIC を冗長化するなど活用法は多々あります。
今回は束ねて帯域幅を増やす設定のログを残しておきます。
環境
- OS: CentOS Linux release 7.2.1511 (Core)
- Kernel: 3.10.0-327.10.1.el7.x86_64
- NIC: ifcfg-(p2p1|p2p2|p3p1|p3p2) として認識している
束ねる集約先になる、仮想の Interface を作る
まずは集約先の Interface を作ります。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TYPE=Ethernet | |
NAME=p2p1 | |
UUID=01234567-abcd-abcd-abcd-0123456789ab | |
DEVICE=p2p1 | |
BOOTPROTO=none | |
MASTER=bond0 | |
SLAVE=yes | |
ONBOOT=yes |
とかを /etc/sysconfig/network-scripts/ifcfg-bond0 に作成。
mode=4 だと LACP で束ねてくれます。
物理NIC の Interface で集約先を指定
物理NIC の Interface で集約先を指定。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEVICE=bond0 | |
BOOTPROTO=none | |
TYPE=Bond | |
ONBOOT=yes | |
BONDING_OPTS="mode=4 miimon=100 lacp_rate=1 xmit_hash_policy=layer2+3" |
具体的には Master に bond0 を指定して、SLAVE=yes にします。
これを ifcfg-(p2p1|p2p2|p3p1|p3p2) 全てに適用してみます。そうすると4本を1つに束ねられる。
これを ifcfg-(p2p1|p2p2|p3p1|p3p2) 全てに適用してみます。そうすると4本を1つに束ねられる。
最後は、設定をファイルに書き込んだ後に
- # systemctl restart network
で適用。これできちんと network が上がってきたらOK。
単純に考えると帯域幅が4倍になってるはずです。
0 件のコメント:
コメントを投稿