-I currently have 2 machines exactly identical with 3 nic cards which i am bonding together and then typing into several different vlans -You can not properlly add vlans to a bonded interface without getting an error message -Problem exists in baselayout 1.11.6-r1 and 1.10 -also init.bond0 scripts refuse to start unless the default interface has configuration information assocaited with it. When using 802.1Q tagging you normally don't want to set a default interface on your bonded interfaces. -Baselayout 1.10 has a minor error, it can be corrected by changing postup_bonding() to preup_bonding() -Baselayout 1.11.6-r1 is broken when using the following configuration and requires a significant amount of work to correct the problem -Here is my conf.d/net configuration from my working baselayout 1.10 machine -------------------------------- slaves_bond0="eth0 eth1 eth2" vlans_bond0="1 700 200" ipaddr_bond0_1=( "192.168.2.40/24 brd 192.168.2.255") ipaddr_bond0_700=( "192.168.3.40/24 brd 192.168.3.255") ipaddr_bond0_200=( "192.168.1.40/24 brd 192.168.1.255") ipaddr_bond0=("1.1.1.1/8 brd 255.255.255.255") ------------------------------- -Please note that ipaddr_bond0=("1.1.1.1/8 brd 255.255.255.255") should not be required to start the interface anyways. I normally don't assign an untag vlan on my switches for devices of this nature. -If i use the above configuration on a 1.11.6-r1 machine i get the following error message: "Error: trying to add vlan # 700 to IF -:bond0:- error: invalid argument"... this repeats for every vlan that is assigned to the bond0 interface... Reproducible: Always Steps to Reproduce: 1. Setup machine with bonding and vlans and install baselayout 1.11 or 1.10 2. setup configuration as above in baselayout 1.10 and in baselayout 1.11 add line modules("iproute2" "vlans") 3. Actual Results: See details error message Expected Results: I expect to have all the vlans assigned an ip address and set to an up status Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r1 i686) ================================================================= System uname: 2.6.9-gentoo-r1 i686 Celeron (Mendocino) Gentoo Base System version 1.6.6 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux-headers-2.4.22 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer" CHOST="i386-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://192.168.3.70/portage" USE="X apm arts avi berkdb bitmap-fonts crypt cups encode f77 foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
Fixed in CVS Please note that you can see a NULL address ipaddr_bond0=( "null" )
I got the same problem, with gentoo installed on friday. for what i try manually, the problem seems that when you had bond and vlans, vlans are created before the bond device is configured, so is not possible to make it work, when configured manually (only bond0 interface) and later add vlans , it work OK. Also i check /lib/rcscripts/net.modules.d/bonding, and it said, it depend after vlan, wich is wrong. This patch seems to fix the problem. it is for baselayout-helps a bit the startup of bonding + vlans (this is for baselayout-1.11.6-r1), also fix a small problem when starting slaves interfaces, reporting that net.1 didn't exist. --- bonding.orig 2004-11-27 17:38:27.475112848 +0000 +++ /lib/rcscripts/net.modules.d/bonding 2004-11-27 18:02:27.220238320 +0000 @@ -23,8 +23,12 @@ # void bonding_depend(void) # # Sets up the dependancies for the module +# FIXED: Originally, bonding depends on vlan, but you cant +# configure vlans on an unconfigured bond device, same thing +# for dhcp bonding_depend() { - after interface vlan dhcp + after interface + before vlan dhcp need interface } @@ -49,6 +53,11 @@ bonding_post_start() { local iface=${1} slaves s + #Just a small sanity check, we will not bond 2 bond device togheter. + #Or we shall ? maybe is there a better and nice way to check if the + #iface has slaves before scream the ugly bad substitution error. + # + [[ ! -z $(echo ${iface} | grep -e bond.\.) ]] && return 0 eval slaves=\"\$\{slaves_${iface}\}\" [[ -z ${slaves} ]] && return 0 @@ -63,10 +72,10 @@ for s in ${slaves}; do # If the interface does not exist, it may be because another # module needs to create it - net_start ${i} || continue + net_start ${s} || continue - if ! interface_exists ${i} ; then - ewarn "interface ${i} does not exist" + if ! interface_exists ${s} ; then + ewarn "interface ${s} does not exist" continue fi
Fixed in baselayout-1.11.7-r1
wrong product.