Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I make heavy use of Linux Bridges (brctl) as I have a Xen environment. At the minute, only one physical NIC is connected to the bridge (There are many virtual NICs for the Xen VMs though). In order to get some redundancy working, what steps would I need to take to add another physical NIC to the bridge? This second NIC will be connected to a different switch. Do I need to run a cable between the 2 switches and enable STP?

Please note that the NIC do not have IP assigned to them (however the bridges do).

I do know the commands to add NICs to bridges; my question related to the redundancy aspect of it.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I think the answer is that you would need to create a bonded interface using a failover configuration where whatever NIC work get's the connection. Then you can make your bridges on top of the bond interfaces instead of directly on the nics.

share|improve this answer
    
And no cable needed between switched? And no STP? –  jtnire Apr 25 '11 at 20:58
    
No, I don't think STP is needed on the switch if you just setup a fail-over bond handled on the linux end. Only one physical interface will be brought up at a time. I can't make out what your first question is asking. –  Caleb Apr 25 '11 at 21:23
    
Sorry i typoed the first question. I'm asking weather I need to run a cable between the 2 switches. I think I do though, as in case some servers have flipped over to the second NIC while some are on the first (Due to NIC failure, rather than switch failure). Thanks –  jtnire Apr 25 '11 at 21:28
    
If you are going to use a bonded interface make sure you read the bonding documentation and choose the correct mode. I believe mode=1 is the only mode that provides HA without configuration on the switches. –  Zoredache Apr 25 '11 at 21:32
add comment

Add both interfaces to the bridge, and make sure that spanning tree is not disabled on your switches. Spanning tree should be enabled on Linux by default, but make sure that is not disabled brctl showstp <bridge>.

share|improve this answer
    
Since my switches don't actually support STP (I just found that out), would Caleb's solution work without needing STP? –  jtnire Apr 25 '11 at 21:34
    
Yes, assuming you configure the bonding properly. See my comment with a link to the docs which cover various different configurations. –  Zoredache Apr 25 '11 at 21:38
    
Thanks. Yes, I think the trick is to make sure that each server only ever appears on one switch port on the network –  jtnire Apr 25 '11 at 21:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.