Double bonding avec deux modes différents

Bonjour,

Je suis sous Squeeze.
J’aimerai faire deux bonding avec deux modes différents pour des problèmes matériels.

bond0 en mode Round Robin
bond1 en mode Active Backup

J’avais une configuration avec le même mode sous Lenny du style :

alias bond0 bonding
options bond0 mode=0 miimon=100 max_bonds=2
alias bond1 bonding
options bond1 mode=0 miimon=100 max_bonds=2

Ce qui devrait donner :

alias bond0 bonding
options bond0 mode=0 miimon=100 max_bonds=2
alias bond1 bonding
options bond1 mode=1 miimon=100 max_bonds=2

Cette configuration me permet bien de démarrer les deux interfaces bond0 et bond1, mais ces deux interfaces sont en mode Round Robin après reboot :

cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: load balancing (round-robin)
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: 0
Permanent HW addr: 00:xx:xx:xx:xx:xx

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx

et

cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:xx:xx:xx:xx:xx

Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx

J’ai également essayé ca, mais sans plus de succès car bond1 ne démarre même pas:

install bond0 /sbin/modprobe --ignore-install bonding mode=0 miimon=100                                                                                                                                                                  
install bond1 /sbin/modprobe --ignore-install bonding mode=1 miimon=10

Merci d’avance pour votre aide.

Bonjour,

Je me réponds car après pas mal de tests, j’ai enfin trouvé :

Il faut supprimer les fichiers /etc/modprobe.d/bonding ou /etc/modprobe.d/bonding.conf.
Il faut configurer le mode de bonding dans la définition des interfaces ( /etc/network/interface ):

auto bond0
iface bond0 inet static
        bond-slaves eth0 eth1
        bond-mode round-robin
        bond-miimon 100
        address 10.x.x.x
        netmask 255.255.255.0
        gateway 10.x.x.x

iface bond0 inet6 static
        address 2001:x:x:x::x
        netmask 64
        gateway 2001:x:x:x::x
        pre-up echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra
        pre-up echo 0 > /proc/sys/net/ipv6/conf/default/autoconf
        pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
        pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
        pre-up echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
        pre-up echo 0 > /proc/sys/net/ipv6/conf/all/autoconf

auto bond1
iface bond1 inet static
        bond-slaves eth2 eth3
        bond-mode active-backup
        bond-miimon 100
        bond-primary eth2
        address 10.x.x.x
        netmask 255.255.255.0

A+

Bonjour,

Je viens de configurer un serveur Debian Squeeze (2.6.32-5-amd64) avec 2 bond et 2 modes différents

bond0 sur 2 cartes Giga mode 6
bond1 sur 2 cartes 10Giga mode 0

lorsque j’utilise le bond1 (par ex : ping vers une machine ou ping depuis une machine) j’ai un kernel panic.

lorsque j’utilise le bond0 j’ai des pertes de trames

lorsque je désactive un des 2 bond tout est ok

lorsque je mets le même mode pour les 2 bond tout est ok

Avez vous eu déjà ce cas ?

Merci

ma configuration /etc/network/interface

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
auto bond0

iface bond0 inet dhcp

address 10.0.1.5

netmask 255.255.255.0

network 10.31.1.0

gateway 10.31.1.254

slaves eth0 eth1

bond-mode 6
bond-miimon 100
bond-downdelay 200
bond-updelay 200

auto bond1

iface bond1 inet static
address 1.2.3.4
netmask 255.255.255.255
slaves eth2 eth4
bond-mode 0
bond-miimon 100
bond-downdelay 200
bond-updelay 200

#auto eth2

#iface eth2 inet static

address 1.2.3.4

netmask 255.255.255.255

auto vlan100
iface vlan100 inet static
vlan_raw_device bond1
address 172.20.0.12
netmask 255.255.248.0
network 172.20.15.0

Bonjour,

As tu essayé sans les notions de delay ?
Je n’avais pas de vlan non plus.

Cordialement

Bonjour,

Sans Vlan j’ai la même chose.

J’ai une autre machine sous Etch configurée de la même façon mais je n’arrive pas à configurer 2 modes différents pour 2 bond différents.

Pour le delay c’est quel paramètre qu’il faut modifier ?

Merci

Patrikc