Tolérance aux pannes : Channel Bonding sous GNU/Linux Debian 6 (Squeeze)

Le déroulement

Installation des composants

# aptitude install firmware-bnx2 ifenslave

Détection des interfaces

# modprobe -r bnx2 && modprobe bnx2

Retrait de la configuration existante

# ip a d <address/cidr> dev eth1
# ifconfig eth1 down

Options pour les interfaces Bonding

# echo -en "alias bond0 bonding\nalias bond1 bonding\noptions bonding max_bonds=2 mode=1 miimon=100" > /etc/modprobe.d/bonding.conf

Configuration des interfaces

# vim /etc/network/interfaces
auto eth0 eth1 eth2 eth3 bond0 bond1
iface bond0 inet static
       address <ip1>
       netmask <mask1>
       gateway <gw1>
       up /sbin/ifenslave bond0 eth0 eth2
       down /sbin/ifenslave -d bond0 eth0 eth2
iface bond1 inet static
       address <ip2>
       netmask <mask2>
       up /sbin/ifenslave bond1 eth1 eth3
       down /sbin/ifenslave -d bond1 eth1 eth3
       up route add -net <net1> netmask <mask3> gw <gw2>

Montage des interfaces

# /etc/init.d/networking stop
# /etc/init.d/networking start

Leave a Reply