1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Centos5.9でbond0とbond1がランダムに入れ替わる件対応

Last updated at Posted at 2013-08-29

このバグに引っかかった。
参考
HPのサイト

チーミングを有効にするには

bond0

  • eth0とeth1をbond0として扱う
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
IPADDR=192.168.11.14
NETMASK=255.255.255.0
ONBOOT=yes

bond1

  • eth2とeth3をbond1として扱う
/etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
/etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE=eth3
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
/etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE=bond1
BOOTPROTO=static
IPADDR=192.168.12.14
NETMASK=255.255.255.0
ONBOOT=yes

bondingモジュールを使用

/etc/modprobe.conf
alias eth0 tg3
alias eth1 tg3
alias eth2 e1000e
alias eth3 e1000e
alias scsi_hostadapter ahci
alias scsi_hostadapter1 usb-storage

alias bond0 bonding
options bond0 mode=active-backup miimon=100 max_bonds=2

bond0とbond1が入れ替わる件対応

MACアドレス確認
$ dmesg | grep eth | grep PCI
e1000e 0000:08:00.0: eth0: (PCI Express:2.5GT/s:Width x4) 00:17:08:7b:11:93
e1000e 0000:08:00.1: eth1: (PCI Express:2.5GT/s:Width x4) 00:17:08:7b:11:94
tg3 0000:03:00.0: eth2: eth2: Tigon3 [partno(BCM95717) rev 5717100 PHY(5718C)] (PCI Express) 10/100/1000Base-T Ethernet 6c:3b:e5:52:bf:21
tg3 0000:03:00.1: eth3: eth3: Tigon3 [partno(BCM95717) rev 5717100 PHY(5718C)] (PCI Express) 10/100/1000Base-T Ethernet 6c:3b:e5:52:bf:22
/etc/udev/rules.d/60-net.rules
# デフォルトの設定をコメントアウト
# ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/rename_device"
# SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug"
SUBSYSTEM=="net",ACTION=="add",BUS=="pci",KERNEL=="eth*",SYSFS{address}=="6c:3b:e5:52:bf:21",NAME="eth0"
SUBSYSTEM=="net",ACTION=="add",BUS=="pci",KERNEL=="eth*",SYSFS{address}=="6c:3b:e5:52:bf:22",NAME="eth1"
SUBSYSTEM=="net",ACTION=="add",BUS=="pci",KERNEL=="eth*",SYSFS{address}=="00:17:08:7b:11:93",NAME="eth2"
SUBSYSTEM=="net",ACTION=="add",BUS=="pci",KERNEL=="eth*",SYSFS{address}=="00:17:08:7b:11:94",NAME="eth3"

何度か再起動して入れ替わらないことを確認。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?