2009/07/03

Конфигурирование bonding для сетевых интерфейсов на RHEL/CentOS 5

Конфигурация необходимых сетевых интерфейсов:
  • eth0
# cat > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
[Ctrl+D]
  • eth1:
# cat > /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
[Ctrl+D]
  • bond0:
# cat > /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.10.70.0
IPADDR=10.10.70.77
NETMASK=255.255.255.0
USERCTL=NO
[Ctrl+D]
Загружаем модуль и перегружаем сеть:
# cat >> /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=1 miimon=100
[Ctrl+D]
# service network restart
Просмотр статуса:
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 2
Permanent HW addr: 00:1b:11:50:7a:01

Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:18:fe:8c:a1:96

Links:
  1. Implement bonding in RHEL 5
  2. Network Card Bonding On CentOS

1 comment:

chip said...

Небольшое замечание/комментарий по настройке bonding.