Question

Nic Bonding with bridge

Asked by: tblinc

Hi folks,

I have one Archlinux VirtualBox (Host) server. I installed two NIC card in my server, for bonding purpose. I need to set up the bond0 interface in bridge mode to share my NIC card to my Guest VMs.


So I make this first : http://wiki.archlinux.org/index.php/Configuring_network#bonding

Secondly, I installed brctl-utils to create my bridge.

brctl addbr br0
ifconfig bond0 0.0.0.0
brctl addif br0 bond0
ifconfig br0 x.x.x.x netmask x.x.x.x

My rc.conf looks like this :

eth0="eth0 up"
eth1="eth1 up"
bond0="bond0 up"
br0="br0 10.0.0.45 netmask 255.255.255.0 up"
INTERFACES=(lo eth0 eth1 bond0 br0)

My /etc/conf.d/bonding

bond_bond0="eth0 eth1"
BOND_INTERFACES=(bond0)

My /etc/conf.d/bridges

bridge_br0="bond0"
BRIDGE_INTERFACES=(br0)

So with those settings, when I reboot my server, I have a warning that said : Can't add bond0 to bridge br0: Invalid argument

After the boot process, I tried to ping.. and it says : Destination Host Unreachable.

I tried /etc/rc.d/network restart... and everything seems to be working but I have this anoying error :
Illegal operation: The specified slave interface "Eth0" is already a slave Master "bond0", Slave "eth0":Error: Enslave failed
Illegal operation: The specified slave interface "Eth1" is already a slave Master "bond0", Slave "eth1":Error: Enslave failed

I try to ping :
Archlinux ~]# ping www.google.com
PING google.navigation.opendns.com (208.67.217.231) 56(84) bytes of data.
64 bytes from google.navigation.opendns.com (208.67.217.231): icmp_seq=1 ttl=52 time=59.0 ms
64 bytes from google.navigation.opendns.com (208.67.217.231): icmp_seq=1 ttl=52 time=59.0 ms (DUP!)
64 bytes from google.navigation.opendns.com (208.67.217.231): icmp_seq=2 ttl=52 time=75.9 ms
64 bytes from google.navigation.opendns.com (208.67.217.231): icmp_seq=2 ttl=52 time=76.0 ms (DUP!)

So I need to fix all those bugs

Thanks for your help

Frank !

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-03-13 at 11:12:28ID24228586
Tags

Linux

,

Networking

Topics

Linux Networking

,

Debian Linux

,

Miscellaneous Networking

Participating Experts
2
Points
250
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Channel Bonding: ARP tables
    SITUATION: I've set up channel bonding [IAW bonding.txt] on a 1.8 GHz dual processor AMD (2 GB Ram) running RH9.0 with a couple of 3c59x ethernet cards. The switch is a Cisco GigE switch and the ports are also trunked. ifconfig produces bond0, eth0, eth1, tap0, lo. ifcfg-b...
  2. VLANs and Bonding
    Okay, so heres what we are trying to accomplish: We have a machine running yellow dog linux, with 2 NICs, eth0 and eth1. We want to be able to stradle 2 VLANs, ie vlan3 and vlan5 So this machine will have two IP addresses, ie 192.168.103.1 and 192.168.105.1 We also want bond...
  3. How do I properly bridge a host NIC with a static IP to a gue…
    May I have some assistance to verify that I know how to setup a bridged network correctly: The host machine is Windows XP running VM Workstation 6 with two NIC installed. Nic 1 is DHCP dynamic IP for example 72.1.1.100 for regular internet surfing. Nic 2 is static IP also a ...
  4. Can Ping Guest Bridged VM from Everywhere But Host
    I've got a VMware Server 1.0.4 running on WinXP SP2. I've got a virtual machine running Ubuntu 7.1 with a bridged network connection. The host has the static IP 172.30.45.38 and the vm has a dynamically assigned IP 172.30.45.152. The vm can ping the host and all other mach...
  5. VMware VLANs and ethernet bonding HELP!!!
    I want to know if a configuration I'm thinking of is somehow possible I Want to build a VMware-Server Server farm for some network testing/concept proofing we need to do at my company What I am seeking to do, Install VMware Server on 10 CentOS 5 Host servers run about 30-40...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: giltjrPosted on 2009-03-14 at 08:09:19ID: 23887348

What is the physical setup?  bonding two interfaces together and creating a bridge between two interfaces should not be done.

A bridge assumes your computer sits in the middle of two networks that you are trying connect together like:

  physical NET1 <----> computer <----> physical NET2

Bonding assumes that your computer has two connections to the same network like:

                   /--> NET1  
  computer <
                   \--> NET1

Which are you trying to do?

 

by: nociPosted on 2009-03-14 at 09:03:31ID: 23887495

If you make a bond of two interfaces the switch into which they are plugged needs it's interfaces to be bonded TOO, otherwise you just have two interfaces tied together.


you describe this:
            +-------TUN/TAP for virtual machine
            |
System |(br0)
            |                    +eth0-----+
            +---bond0 ---+               |
                                 +eth1-----+
                                                 |


What should have been:

            +-------TUN/TAP for virtual machine
            |
System |(br0)
            |                    +eth0-----+
            +---bond0 ---+               +bondX---+
                                 +eth1-----+               |
                                                                  |

For cisco these bonds are named port channels. Providing fallback (to less interfaces per channel) and more bandwidth then one interface can provide.  BOTH sides need to be bonded like this.

The reason you get two answers stems from the fact that your switch (or equipment at bondX 's site doesn't known those interfaces belong together.

 

by: giltjrPosted on 2009-03-14 at 09:15:41ID: 23887528

You don't necessary need to have the switch bond the ports together.  It depends on what you are attempting to do.  

If you want to increase both inbound and outbound bandwidth, then both NIC's need to be connected to the same switch and the switch needs to bond them together.  However if the switch fails, you loose access to the computer.

If you are going for availability then each NIC should be connected to a different switch.  The computer will send traffic out on both NIC's, but only one NIC will be used for inbound traffic.  Say you have eth0 connected to sw0 and eth1 connected to sw1.  If either switch fails, you still have connectivity to the computer.

One setup gives you more inbound and outbound bandwidth, but availability is less.

The other setup gives you more outbound bandwidth only, but more availability.

 

by: tblincPosted on 2009-03-17 at 09:01:04ID: 23909475

Hi,

For giltjr :

I need to set up a bond on two NIC card and after that I need to bridge my bond.

I need the brige because my server is a VirtualBox server with many Guest Os on it. Every guest Os is configured with a Bridged interface because I need my Guest OS in the range of my current network.

For Noci :

I don't see the purpose of switch configuration.. I only need the configuration method for this



            +------- ETH0                        |--vbox0-- VboxGuest1 (OS)
            |                   |                       |--vbox1-- VboxGuest2 (OS)
System |                   |--bond0----br0-|--vbox2-- VboxGuest3 (OS)
            |                   |                       |--vbox3-- VboxGuest4 (OS)
            +------- ETH1                        |--vbox4-- VboxGuest5 (OS)

Note : vbox0 is the GuestOS interface that is affected to my bridge.



I need availability.

Thank you  

 

by: giltjrPosted on 2009-03-17 at 10:12:52ID: 23910221

What I would suggest is that you use a different IP subnet for the guest OS's and route to them.  

What virtualization software are you using?

 

by: nociPosted on 2009-03-17 at 11:48:11ID: 23911143

Ok...
If it is a hub it acts like a cable, so you will receive all data on all circuits.
A switch work differently, broadcast go to every interface, unicast go to any interface until the address of the interface is KNOWN in a cam-table/mac-table (name depends on switch manufacturer).

If the switch doesn't know it is a bonded link then the interface will flap to the interface that has seen the latest packet coming from your virtualised system(s).

If you use a switchcluster like two CISCO 3750 or likewise switches you reduce your SPOF on switching if you use one interface on one switch and another on the other switch. If one switch fails you can continue over the other.

(The upstreamlinks need to double too).

IF you don't want to use that than DONT bond them, hang them in a bridge and setup for spanning tree.
(brctl stp br0 on; ).

It is a pity the Fast Spanning tree is not supported on linux.  That would make failover near instantanous and forwards with wirespeed in stead of avg. 45 second delay delay.

 

by: nociPosted on 2009-03-17 at 12:01:16ID: 23911316

 

by: tblincPosted on 2009-03-17 at 12:10:18ID: 23911435

Hum.. just to be sure that everybody is understanding me well.

My server is running on Archlinux dist. My Virtualization software is VirtualBox 2.0.0 Headless

I already configured my Archlinux server with NIC bonding (Without bridge) and everything is working fine.

So I really don't understand why you're talking about switches, switchcluster and hubs since I just want to BRIDGE my bonded interface (wich is working great)

Oh and I don't want to make any routing for my vm guest os.

Thank you for your help, it's appreciated.

 

by: giltjrPosted on 2009-03-17 at 12:59:23ID: 23912159

You may need to check with Archlinux, I have seen that trying to using a bonded interface as a bridge has had problems on other Linux distributions.

What samples I have seen have had multiple interface defined on the bridge, the bonded interface and the virtual "tap" interfaces as VirtualBox calls them.    

You may want to look at VirtualBox 2.1, according to the documentation they have change the way you do this:

"With VirtualBox 2.1, net filter drivers were also added for the Windows and Linux hosts, replacing the mechanisms previously present in VirtualBox for these platforms; especially on Linux, the earlier method required creating TAP interfaces and bridges, which was complex and varied from one distribution to the next. None of this is necessary any more."

That is if upgrading is an option.

I will also say that the examples of networking configuration I have seen for VirtualBox is a routed enviroment.  I know you said you did not want to do this, but generally routing to virtual environments is more efficient as it cuts out all of the noise that you get from a bridged/switched network.  You may also need to look at running stp protocol because you basically are running a "switch" and it will appear to be a loop to the network.

 

by: nociPosted on 2009-03-17 at 15:13:42ID: 23913792

Your problem/question is about duplicate packets ....
Duplicate packets most likely indicate a loop in your network,  network-loops & switches don't mix very well.

Several solutions exist like forming rings (HP uses this) Spanning Tree.
Spanning tree has more or less three forms Classic Spanning tree (STP, IEE802.1D) , Rapid Spanning Tree (RSTP, IEE802.1w)  and Multi vlan spanning tree (MSTP).
STP & RSTP are compatible amongst each other as RSTP fallsback to STP.
MSTP is a different beast.
Bonding more or less is equivalent to striping ethernet interfaces. (with eth0 & eth1-->
send on eth0 send on eth1 send on eth0 send on eth1 etc.
If the switch doesn't know about this is will constantly update it switching tables to send anything with the MAC address back over one of the links (the one a packet is last seen), if it can't keep up with updating switching tables it will start broadcasting -> send all  packets to ALL interfaces (which causes duplicates). If the switch knows about the bond it will also use the striping method of sending you data. And it will understand to see the MAC address of your bonded interface of separate channels.
Binding needs to be done on BOTH ends of a bonded set of cables.

Other forms are LAG (Link Agregation) with a supporting protocol for automatic formation
of agregated links. (LACP protocol).
http://en.wikipedia.org/wiki/Link_aggregation

 

by: tblincPosted on 2009-09-10 at 05:33:10ID: 25299495

All right thank you, I'll take a look at this

 

by: tblincPosted on 2009-09-29 at 06:16:20ID: 31557850

thx

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...