Skip to contentSkip to conversation

device eth0 is already a member of a bridge; can't enslave it to bridge Net6

Bridge Tim Keupen 2 participants 4 messages Oct 31, 2005 Ethernet bridge

lore
Share & tools
lore

Tim Keupen

author
#0 lore raw

Hello,
I am working on Network-Simulation (VNUML). Our simulator uses linux bridging to connect the UMLs.
So there is one problem:
The example is the following: There are two hosts simulating one big net.
The two hosts have connection over the external nets Net3 and Net6 (see http://www.uni-koblenz.de/~timbub/verteilteSim3.GIF), but in fact there is only one physical connection between the host: connected through a switch an each host has one interface card eth0. (so normaly you should bind the ip adresses related Net3 and to Net6 to the eth0 and it already is part of the two nets - even if there is one phsical connection)

So my virtual nets are implemented by linux bridges. But if I now connect the physical interface eth0 to the bridge Net3 and then to Net6 the following error occurs: "device eth0 is already a member of a bridge; can't enslave it to bridge Net6" Is this a bug or a feature? Why is it not allowed to bind an Interface to two different bridges?
Is there a workaround for this issue?

Problem:
UML1 ---- bridge1 \
eth0
UML2 ---- bridge2 /

Workaround?:

UML1 ---- bridge1  \
                             bridge3 ---- eth0

UML2 ---- bridge2 /

UML1   \
             bridge1 ---- eth0

UML2 /

Thanks for your help
Tim Keupen

#1 lore raw
Quoted 5 lines · On Mon, 31 Oct 2005 11:04:32 +0100 "Tim Keupen" <[email protected]> wrote:

Hello,
I am working on Network-Simulation (VNUML). Our simulator uses linux bridging to connect the UMLs.
So there is one problem:
The example is the following: There are two hosts simulating one big net.
The two hosts have connection over the external nets Net3 and Net6 (see http://www.uni-koblenz.de/~timbub/verteilteSim3.GIF), but in fact there is only one physical connection between the host: connected through a switch an each host has one interface card eth0. (so normaly you should bind the ip adresses related Net3 and to Net6 to the eth0 and it already is part of the two nets - even if there is one phsical connection)

Have you looked at umlsim

Quoted 12 lines

So my virtual nets are implemented by linux bridges. But if I now connect the physical interface eth0 to the bridge Net3 and then to Net6 the following error occurs: "device eth0 is already a member of a bridge; can't enslave it to bridge Net6" Is this a bug or a feature? Why is it not allowed to bind an Interface to two different bridges?
Is there a workaround for this issue?

Problem:
UML1 ---- bridge1 \
eth0
UML2 ---- bridge2 /

Workaround?:

Quoted 9 lines
UML1 ---- bridge1  \
                             bridge3 ---- eth0

UML2 ---- bridge2 /

UML1   \
             bridge1 ---- eth0

UML2 /

There was no good reason to allow it, I guess. Also, I would worry about races on deleting a bridge and the RCU issues.

Signature · 2 lines
Stephen Hemminger <[email protected]>
OSDL http://developer.osdl.org/~shemminger
author
#2 lore raw

Re: [Bridge] device eth0 is already a member of a bridge; can'tenslave it to bridge Net6

Quoted 1 line

Have you looked at umlsim

no, problem has to be solved with vnuml

Quoted 1 line
Quoted 1 line

Is this a bug or a feature? Why is it not allowed to bind an Interface

to two different bridges?

Quoted 3 lines
Quoted 1 line

Is there a workaround for this issue?

There was no good reason to allow it, I guess. Also, I would worry about races on deleting a bridge and the RCU issues.

But what should be a reasen not to allow it?
What du you mean with races and RCU issues?

thanks
Tim

#3 lore raw

Re: [Bridge] device eth0 is already a member of a bridge; can'tenslave it to bridge Net6

Quoted 10 lines · On Mon, 31 Oct 2005 19:43:01 +0100 "Tim Keupen" <[email protected]> wrote:
Quoted 1 line

Have you looked at umlsim

no, problem has to be solved with vnuml

Quoted 1 line
Quoted 1 line

Is this a bug or a feature? Why is it not allowed to bind an Interface

to two different bridges?

Quoted 4 lines
Quoted 1 line

Is there a workaround for this issue?

There was no good reason to allow it, I guess. Also, I would worry about races on deleting
a bridge and the RCU issues.

But what should be a reasen not to allow it?

Because it the input path hook how bridge's get data would cause increased stack depth (if it even worked).

Quoted 1 line

What du you mean with races and RCU issues?

Look at how interfaces are removed from bridges, and the code that notifies a bridge about interface changes. It would probably break as well.

Signature · 2 lines
Stephen Hemminger <[email protected]>
OSDL http://developer.osdl.org/~shemminger