You are not logged in.

#1 2009-12-23 12:47:59

dsf
Member
From: Portugal
Registered: 2009-12-23
Posts: 5

Bonding issues with more than 2 Bonds in different modes

Hi there!!

I found using Arch with bonding.ko driver that have some issues regarding having 4 adapters with 2 bondings in different modes.

The scenario:
  bond0 : eth0 eth1 mode failover
  bond1: eth2 eth3 mode alb

The problem:
  All bond interfaces stays in failover mode.

The solution:
  # modprobe.conf  file #
     options bonding miimon=100 max_bonds=2
     alias bond0 bonding
     alias bond1 bonding

Now the changes if Arch People agrees.:D
on file /etc/conf.d/bonding

add a new VARIABLE called

mod_bond0="fault-tolerance"
mod_bond1=""

and i changed the /etc/rc.d/network script a little
on function bond_up

for ifline in ${BOND_INTERFACES[@]}; do
                if [ "$ifline" = "${ifline#!}" ]; then
                        eval bondcfg="\$bond_${ifline}"
                        eval bondmod="\$mod_${ifline}"  ### Add this line to get bonding mode #########
                        if [ -n "${bondcfg}" ]; then
                                /sbin/ifenslave $ifline $bondcfg || error=1
                        fi
                        ####  adding this condition to apply mode to bonding adapter #################
                        if [ -n "${bondmod}" ]; then
                                /sbin/ifconfig $ifline down || error=1
                                /bin/echo $bondmod > /sys/class/net/$ifline/bonding/mode || error=1
                                /sbin/ifconfig $ifline up || error=1
                        fi
                fi
        done

on function bond_down

for ifline in ${BOND_INTERFACES[@]}; do
                if [ "$ifline" = "${ifline#!}" ]; then
                        eval bondcfg="\$bond_${ifline}"
                        /sbin/ifenslave -d $ifline $bondcfg || error=1
                        /sbin/ifconfig $ifline down || error=1
                fi
        done

This code solve my problem, and works very well in my ArchLinux, my suggestion is if it is possible to include this changes in next initscripts package.
Cheers,
         Daniel

Offline

#2 2009-12-23 22:03:43

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Bonding issues with more than 2 Bonds in different modes

Welcome to the Arch Linux forums dsf smile

Please don't cross-post:
http://bbs.archlinux.org/viewtopic.php?id=87338

You should read the Forum Etiquette before posting: http://wiki.archlinux.org/index.php/Forum_Etiquette

Offline

#3 2009-12-23 22:14:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: Bonding issues with more than 2 Bonds in different modes

Filing a bug report is the way to get things fixed.  Forum posts often get missed by the relevant developer.

Offline

Board footer

Powered by FluxBB