LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-21-2009, 05:06 AM   #1
OggVorbis2
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 1
Bridging a bond (802.3ad) only works when stp is enabled?


Hi,

For redundancy I've created a 802.3ad bond on a server (Debian Lenny). This server will be a host for several virtual (KVM) servers, so I created a bridge on the bond. The strange thing (that took me hours to figure out) is that this bridge only works when I enable spanning tree protocol (stp) on the bridge. Is that normal?
Normally I don't use bonds, and I create the bridge on the interface directly. I never have to enable stp when I do that.

This is the relevant part op my /etc/network/interfaces:

Code:
auto bond0
iface bond0 inet manual
        slaves eth0 eth4
        bond_mode 802.3ad

auto br0
iface br0 inet static
        address x.x.x.48
        netmask 255.255.255.128
        network x.x.x.0
        broadcast x.x.x.127
        gateway x.x.x.126
        bridge_ports bond0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp on
When I use "bridge_stp on" like I normally do everything seems to work, but no data is sent or received at all.
I hope somebody knows if and why this is correct behaviour. I cannot find much information about this subject (bridging a bond), although it seems very relevant to me with so many people using KVM and Xen.
 
Old 07-22-2009, 08:40 AM   #2
SteveK1979
Member
 
Registered: Feb 2004
Location: UK
Distribution: RHEL5/6, Solaris 10/11, NetBSD, OpenBSD, FreeBSD, MacOS
Posts: 221

Rep: Reputation: 40
Hi,

I've not used the combination that you are referring to (bridged + bonded) but I think I can help from a networking perspective. I think that the reason you will need STP enabled is that if not, there are two paths to the network that you have bridged to, which from a networking perspective has the potential to introduce loops within your network. This is a Very Bad Thing. With spanning tree enabled, one of these paths will be blocked, therefor restoring sanity to the mac address tables.

If the active path fails, spanning tree should reconverge and the previously blocked link should become the active path. I would guess the only way around this is to configure bonding/aggregation or whatever your network vendor calls it to bond the switch ports together.

I don't think I've explained this two well, I feel I'm a bit rusty or got sucked into Cisco specifics these days - I can't decide which!

Hope that gives some indications.

Cheers,
Steve
 
Old 07-23-2009, 01:54 AM   #3
OggVorbis2
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 1
Thanks for your answer Steve. But your explanation doesn't really match my observations. I already configured 'trunking' (my vendor calls it that way) on my switch, this is necessary for 802.3ad to work. And also, I see that both links are used, like defined in 802.3ad. It's not that STP disables one of the two links.

Another problem I have now is that after a live migration of a KVM it takes a while (30 seconds or so) before the route to the new location is found. Without using bonds this is much much faster (<1 sec). KVM sends a 'gratuitous Arp' after a migration and the switch knows the new route immediately. With my current setup this apparently doesn't work, but I don't know why.

Third problem: I've read that it's also possible to attach two (or more) interfaces to a bond directly. I did that to test it:

Code:
auto br0
iface br0 inet static
        address x.x.x.48
        netmask 255.255.255.128
        network x.x.x.0
        broadcast x.x.x.127
        gateway x.x.x.126
        bridge_ports eth0 eth4
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp on
But when I activated this my WHOLE network became unreachable, and I had to get to the server and plug it off to get the network working again. (Yes we have power switches, but they were also unreachable due to the setup above!) Can somebody explain why this could happen? It's quite scary that one server can just put down a complete network (over several switches).
 
Old 07-24-2009, 03:44 AM   #4
OggVorbis2
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 1
I fixed the stp problem by removing the trunks from my switch, and opting for bond_mode balance-tlb (5) instead of 802.3ad. This works great with bridge_stp set to off.
The only problem that remains is that after a live migration the switch doesn't know about the new location, so the KVM becomes unreachable for some time (until the arp cache expires, I think).
 
  


Reply

Tags
bond, bridge, debian


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you need STP enabled to run active active bonding one CentOS4? ch19251 Linux - Networking 1 06-17-2009 09:30 AM
bonding 802.3ad -- sanity check td3201 Linux - Networking 1 04-07-2009 11:50 AM
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
802.3ad Link Aggregation Issues. hweng Linux - Wireless Networking 0 02-09-2007 09:36 AM
Is there a way to monitor individual throughput of an 802.3ad link aggregation setup? BrianK Linux - Wireless Networking 1 01-18-2007 10:34 PM


All times are GMT -5. The time now is 03:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration