Dyweni - Bridge
2011-Dec-21 16:01 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
Hi All, I'm getting an 'Invalid argument' error when trying to add a bonded interface to a new bridge. Has anyone seen this before? I'm running Linux 3.2-rc6 Bonded interface was created like this: echo "+public-bond" > /sys/class/net/bonding_masters echo "+eth0" > /sys/class/net/public-bond/bonding/slaves The bridged interface was created like this: brctl addbr pubbridge brctl addif pubbridge public-bond -- -- Thanks, Dyweni -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linuxfoundation.org/pipermail/bridge/attachments/20111221/81f60dc4/attachment.html>
Dyweni - Bridge
2011-Dec-21 17:15 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
Hi Again, I checked the kernel source (net/bridge/br_ioctl.c)... The Invalid Argument is being returned by add_del_if after __dev_get_by_index is under to find the network interface using the index that was passed to it. I checked with GDB and determine that the index being passed in 8... That corresponds to the public bond interface index # (/sys/class/net/public-bond/ifindex). Where should I be looking next? --- Thanks, Dyweni On Wed, 21 Dec 2011 10:01:52 -0600, Dyweni - Bridge wrote:> Hi All, > > I'm getting an 'Invalidargument' error when trying to add a bonded interface to a new bridge. Has anyone seen this before?> > I'm running Linux 3.2-rc6 > >Bonded interface was created like this:> > echo "+public-bond" >/sys/class/net/bonding_masters> echo "+eth0" >/sys/class/net/public-bond/bonding/slaves> > The bridged interfacewas created like this:> > brctl addbr pubbridge > brctl addifpubbridge public-bond> > -- > > -- > Thanks, > Dyweni-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linuxfoundation.org/pipermail/bridge/attachments/20111221/c92341d2/attachment.html>
Dyweni - NetDev
2011-Dec-22 14:08 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
Hi All, I need some help figuring this one out... Whenever I try to add a bond to a bridge, I get back an invalid argument error. I've confirmed this on 3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked earlier kernels). Here's my setup: 32bit KVM virtual machine with no network cards (... -net none ... ). I created the bond with: echo "+x"> /sys/class/net/bonding_mastersI created the bridge with: brctl addbr b I try to add the bond to the bridge with: brctl addif b x -- Thanks, Dyweni -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linuxfoundation.org/pipermail/bridge/attachments/20111222/a3410cf5/attachment.html>
Dyweni - NetDev
2011-Dec-22 14:25 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
Hi All, I need some help figuring this one out... Whenever I try to add a bond to a bridge, I get back an invalid argument error. I've confirmed this on 3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked earlier kernels). Here's my setup: 32bit KVM virtual machine with no network cards (... -net none ... ). I created the bond with: echo "+x" > /sys/class/net/bonding_masters I created the bridge with: brctl addbr b I try to add the bond to the bridge with: brctl addif b x -- Thanks, Dyweni
David Lamparter
2011-Dec-22 14:35 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
Add an interface to the bond, then add the bond to the bridge. bond without interface = 00:00:00:00:00:00 MAC = invalid. On Thu, Dec 22, 2011 at 08:25:54AM -0600, Dyweni - NetDev wrote:> I created the bond with: echo "+x" > /sys/class/net/bonding_masters > > I created the bridge with: brctl addbr b > > I try to add the bond to the bridge with: brctl addif b x
Stephen Hemminger
2011-Dec-22 16:45 UTC
[Bridge] Invalid Argument when adding a bond to a bridge
On Thu, 22 Dec 2011 08:25:54 -0600 Dyweni - NetDev <xmCM8KtKk25K at dyweni.com> wrote:> Hi All, > > I need some help figuring this one out... Whenever I try to add a bond > to a > bridge, I get back an invalid argument error. I've confirmed this on > 3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked earlier kernels). > > Here's my setup: 32bit KVM virtual machine with no network cards (... > -net > none ... ). > > I created the bond with: echo "+x" > /sys/class/net/bonding_masters > > I created the bridge with: brctl addbr b > > I try to add the bond to the bridge with: brctl addif b x >The bonding device inherits its MAC address from the slave devices. Therefore until the you add a slave to the bonding device it's MAC address isn't set (all zeros). Bridging is not allowed without a valid MAC address. The solution is to fully configure the bonding device before adding to the bridge.