FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-29-2012, 02:02 PM
Steve Dowe
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

Hello,

I have absolutely no doubt that someone reading this list knows more
than I do on this..

The issue I'm having, using wheezy, is that if I set up a bridged
ethernet interface for eth0 (br0), as per instructions on the Debian
wiki etc, NetworkManager can no longer manage my wired ethernet connection.

If I edit /etc/NetworkManager/NetworkManager.conf and change

[ifupdown]
managed=false

to

[ifupdown]
managed=true

then eth0 and br0 both pick up the same IP address.

This is my current /etc/network/interfaces:

# The loopback network interface
auto lo br0
iface lo inet loopback

# bridging
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0


I must be missing something simple here. Could anyone point me in the
right direction please? Has anyone got a working config?

TIA...

Steve
--
Steve Dowe

Warp Universal Limited
http://warp2.me/sd


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEDB591.1090709@warpuniversal.co.uk">http://lists.debian.org/4FEDB591.1090709@warpuniversal.co.uk
 
Old 06-29-2012, 02:34 PM
Camaleón
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On Fri, 29 Jun 2012 15:02:57 +0100, Steve Dowe wrote:

(...)

> If I edit /etc/NetworkManager/NetworkManager.conf and change
>
> [ifupdown]
> managed=false
>
> to
>
> [ifupdown]
> managed=true
>
> then eth0 and br0 both pick up the same IP address.

Mmm... and what's what you want to bridge? Remember that any bridge
needs at least two end points.

> This is my current /etc/network/interfaces:
>
> # The loopback network interface
> auto lo br0
> iface lo inet loopback
>
> # bridging
> iface br0 inet dhcp
> bridge_ports eth0
> bridge_stp off
> bridge_maxwait 0
> bridge_fd 0
>
>
> I must be missing something simple here. Could anyone point me in the
> right direction please? Has anyone got a working config?

There are some bridging samples here:

http://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_. 2BAC8-etc.2BAC8-network.2BAC8-interfaces

But shouldn't be better to use the same networking method (ifup or N-M but
not a mix of them) to configure the interfaces (eth0 and br0)? :-?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jsked2$68h$8@dough.gmane.org
 
Old 06-29-2012, 03:08 PM
Steve Dowe
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On 29/06/12 15:34, Camaleón wrote:
>
>> If I edit /etc/NetworkManager/NetworkManager.conf and change
>>
>> [ifupdown] managed=false
>>
>> to
>>
>> [ifupdown] managed=true
>>
>> then eth0 and br0 both pick up the same IP address.
>
> Mmm... and what's what you want to bridge? Remember that any bridge
> needs at least two end points.

My intention is allow my ethernet interface to be allocated as many IPs
on my local network as necessary to service the virtual machines I'm
running. The "bridge", in this case, is a virtual-to-physical one.

>> This is my current /etc/network/interfaces:
>>
>> # The loopback network interface
>> auto lo br0
>> iface lo inet loopback
>>
>> # bridging iface br0
>> inet dhcp
>> bridge_ports eth0
>> bridge_stp off
>> bridge_maxwait 0
>> bridge_fd 0
>>
>>
>> I must be missing something simple here. Could anyone point me in
>> the right direction please? Has anyone got a working config?
>
> There are some bridging samples here:
>
> http://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_. 2BAC8-etc.2BAC8-network.2BAC8-interfaces

Thanks. I did look at those. And by following that configuration:

# Set up interfaces manually, avoiding conflicts with, e.g., network
manager
iface eth0 inet manual

iface eth1 inet manual

# Bridge setup
iface br0 inet dhcp
bridge_ports eth0

... Network Manager cannot control eth0. Under "Wired Networks" it
reports "Device not managed".

Besides, the comment in that configuration is "# Set up interfaces
manually, avoiding conflicts with, e.g., network manager" - so it's
clearly acknowledge here that bridging does indeed conflict with network
manager, and I shouldn't expect it to work using that example.

> But shouldn't be better to use the same networking method (ifup or
> N-M but not a mix of them) to configure the interfaces (eth0 and
> br0)? :-?

Ok, so I'm getting used to the Debian way of doing things, having come
from another distro. I assumed I /was/ using the N-M way of doing
things, editing a N-M config file. But, I glean from your comment that
there is overlap here.

When I keep the above settings in /etc/network/interfaces and change
/etc/NetworkManager/NetworkManager.conf, from

[ifupdown] managed=false

to

[ifupdown] managed=true

then I can control eth0 through Network Manager, and I'm back at square
one - both eth0 and br0 get the same IP address, and routing breaks.

I believe harmony is possible between NM and br0 - I'm just unsure of
the approach in Debian.


--
Steve Dowe

Warp Universal Limited
http://warp2.me/sd


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEDC4EA.5070103@warpuniversal.co.uk">http://lists.debian.org/4FEDC4EA.5070103@warpuniversal.co.uk
 
Old 06-29-2012, 03:54 PM
Camaleón
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On Fri, 29 Jun 2012 16:08:26 +0100, Steve Dowe wrote:

> On 29/06/12 15:34, Camaleón wrote:

>> Mmm... and what's what you want to bridge? Remember that any bridge
>> needs at least two end points.
>
> My intention is allow my ethernet interface to be allocated as many IPs
> on my local network as necessary to service the virtual machines I'm
> running. The "bridge", in this case, is a virtual-to-physical one.

Ah, then maybe you don't need a bridge but a virtual addressing layout:

http://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_One_ Interface

>> There are some bridging samples here:
>>
>> http://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_. 2BAC8-etc.2BAC8-network.2BAC8-interfaces
>
> Thanks. I did look at those. And by following that configuration:
>
> # Set up interfaces manually, avoiding conflicts with, e.g., network
> manager
> iface eth0 inet manual
>
> iface eth1 inet manual
>
> # Bridge setup
> iface br0 inet dhcp
> bridge_ports eth0
^^^^^^^^^^^^^^^^^

(you still need a second interface to create the bridge)

> ... Network Manager cannot control eth0. Under "Wired Networks" it
> reports "Device not managed".

Yes, that's correct.

Why do you want N-M to be in charge of your network? It does not look
like a good approach if you are planning to use Debian as a VM host :-?

> Besides, the comment in that configuration is "# Set up interfaces
> manually, avoiding conflicts with, e.g., network manager" - so it's
> clearly acknowledge here that bridging does indeed conflict with network
> manager, and I shouldn't expect it to work using that example.

It's not that clear, at least from a practical point of view :-)

My experience tells me that I better do not mix them.

>> But shouldn't be better to use the same networking method (ifup or N-M
>> but not a mix of them) to configure the interfaces (eth0 and br0)? :-?
>
> Ok, so I'm getting used to the Debian way of doing things, having come
> from another distro. I assumed I /was/ using the N-M way of doing
> things, editing a N-M config file. But, I glean from your comment that
> there is overlap here.
>
> When I keep the above settings in /etc/network/interfaces and change
> /etc/NetworkManager/NetworkManager.conf, from
>
> [ifupdown] managed=false
>
> to
>
> [ifupdown] managed=true
>
> then I can control eth0 through Network Manager, and I'm back at square
> one - both eth0 and br0 get the same IP address, and routing breaks.
>
> I believe harmony is possible between NM and br0 - I'm just unsure of
> the approach in Debian.

I think you still need to add a second interface to the bridge...

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jskj2t$68h$14@dough.gmane.org
 
Old 06-29-2012, 04:19 PM
Steve Dowe
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On 29/06/12 16:54, Camaleón wrote:
> Ah, then maybe you don't need a bridge but a virtual addressing layout:
>
> http://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_One_ Interface

But that fixes the IP addresses both to my local network. The intended
NM approach was to allow the virtual network interfaces of virtual
machines the chance to pick up an IP address using DHCP whatever local
network they're on.

>>> There are some bridging samples here:
>>>
>>> http://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_. 2BAC8-etc.2BAC8-network.2BAC8-interfaces
>>
>> Thanks. I did look at those. And by following that configuration:
>>
>> # Set up interfaces manually, avoiding conflicts with, e.g., network
>> manager
>> iface eth0 inet manual
>>
>> iface eth1 inet manual
>>
>> # Bridge setup
>> iface br0 inet dhcp
>> bridge_ports eth0
> ^^^^^^^^^^^^^^^^^
>
> (you still need a second interface to create the bridge)

That would seem to conflict with this:

http://www.linux-kvm.org/page/Networking#public_bridge (Debian's way)

(notwithstanding it was published some time ago and not by a
Debian-focused organisation, but still, it's documentation...


>> ... Network Manager cannot control eth0. Under "Wired Networks" it
>> reports "Device not managed".
>
> Yes, that's correct.

Hmm. Kinda doesn't fit the use case then

> Why do you want N-M to be in charge of your network? It does not look
> like a good approach if you are planning to use Debian as a VM host :-?

Because I have a multiplicity of networking requirements on my laptop.
I need VPN access, easy wireless configuration, and the ability to run
virtual machines with IP addresses on the local network (wherever I am).

>
>> Besides, the comment in that configuration is "# Set up interfaces
>> manually, avoiding conflicts with, e.g., network manager" - so it's
>> clearly acknowledge here that bridging does indeed conflict with network
>> manager, and I shouldn't expect it to work using that example.
>
> It's not that clear, at least from a practical point of view :-)

Agreed. A conflict doesn't necessarily mean a mutex. That was just
what I was inferring, reading between the lines and all that...

>
> My experience tells me that I better do not mix them.

My experience is becoming more like yours in Debian .. but less like
yours in Fedora (sorry, I said the F-word!).


>> I believe harmony is possible between NM and br0 - I'm just unsure of
>> the approach in Debian.
>
> I think you still need to add a second interface to the bridge...

Would this second interface have to physically exist?

Cheers,
Steve

--
Steve Dowe

Warp Universal Limited
http://warp2.me/sd


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEDD58F.6000000@warpuniversal.co.uk">http://lists.debian.org/4FEDD58F.6000000@warpuniversal.co.uk
 
Old 06-29-2012, 04:31 PM
Steve Dowe
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On 29/06/12 17:19, Steve Dowe wrote:
> On 29/06/12 16:54, Camaleón wrote:
>> > Ah, then maybe you don't need a bridge but a virtual addressing layout:
>> >
>> > http://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_One_ Interface
> But that fixes the IP addresses both to my local network. The intended
> NM approach was to allow the virtual network interfaces of virtual
> machines the chance to pick up an IP address using DHCP whatever local
> network they're on.

Gah, now I /can/ be accused of not RTFM!

'An alias interface should not have "gateway" or "dns-nameservers";
*dynamic IP assignment is permissible.* '

So, this may be the answer after all! I'll report back.

Thanks,
Steve

--
Steve Dowe

Warp Universal Limited
http://warp2.me/sd


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEDD86A.2070509@warpuniversal.co.uk">http://lists.debian.org/4FEDD86A.2070509@warpuniversal.co.uk
 
Old 06-29-2012, 04:34 PM
Neal Murphy
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On Friday 29 June 2012 10:02:57 Steve Dowe wrote:
> Hello,
>
> I have absolutely no doubt that someone reading this list knows more
> than I do on this..
>
> The issue I'm having, using wheezy, is that if I set up a bridged
> ethernet interface for eth0 (br0), as per instructions on the Debian
> wiki etc, NetworkManager can no longer manage my wired ethernet connection.

The answer is to not use N-M. I stopped using it years ago after finding it
would get in my way, undoing changes I made manually (I may even have
uninstalled it because it *insisted* on running). Besides, I don't need yet
another program running whose sole purpose is to slurp CPU cycles, take up
screen real estate and make me click-click-click...click-click-click-click to
find what 'ip addr' would tell me. And if you are running a bunch of VMs,
you've moved beyond the utility of N-M; you do not want it controlling your
network.

You're doing pretty much what I do. I have four bridges (but only 3 NICs: one
bridge goes nowhere) for testing my firewalls (RED/GREEN/PURPLE/ORANGE). I can
have a number of firewalls running in KVMs, attached to any combination of
four bridges. I can direct Squeeze's default route to any of them or to the
bridge direct to my perimeter F/W.

The bridge device (e.g. br0) is a network interface. The NIC is a network
interface. The tap device (e.g. tap0) appears as a network interface to the
VM. A bridge device doesn't need a real NIC to operate. It's perfectly happy
to bridge zero or more taps to itself. The host doesn't need to actively use a
brX device (with IP address, et al) for it to bridge VMs together. Kernel-
wise, a bridge device is very similar to a run-of-the-mill 8-port ethernet
switch: it bridges whatever is connected to it. Or it sits idle when it has no
member devices other than itself.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201206291234.35532.neal.p.murphy@alum.wpi.edu">htt p://lists.debian.org/201206291234.35532.neal.p.murphy@alum.wpi.edu
 
Old 06-29-2012, 05:06 PM
Camaleón
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On Fri, 29 Jun 2012 17:19:27 +0100, Steve Dowe wrote:

> On 29/06/12 16:54, Camaleón wrote:
>> Ah, then maybe you don't need a bridge but a virtual addressing layout:
>>
>> http://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_One_ Interface
>
> But that fixes the IP addresses both to my local network. The intended
> NM approach was to allow the virtual network interfaces of virtual
> machines the chance to pick up an IP address using DHCP whatever local
> network they're on.

Maybe is time now for you to tell us more about the kind of VM you are
planning to use...

>> (you still need a second interface to create the bridge)
>
> That would seem to conflict with this:
>
> http://www.linux-kvm.org/page/Networking#public_bridge (Debian's way)
>
> (notwithstanding it was published some time ago and not by a
> Debian-focused organisation, but still, it's documentation...

Ah, okay, are you using KVM? If yes, then better read from here:

http://wiki.debian.org/KVM

>>> ... Network Manager cannot control eth0. Under "Wired Networks" it
>>> reports "Device not managed".
>>
>> Yes, that's correct.
>
> Hmm. Kinda doesn't fit the use case then

:-)

I mean is "correct" becasue is what N-M has been configured for.

>> Why do you want N-M to be in charge of your network? It does not look
>> like a good approach if you are planning to use Debian as a VM host :-?
>
> Because I have a multiplicity of networking requirements on my laptop. I
> need VPN access, easy wireless configuration, and the ability to run
> virtual machines with IP addresses on the local network (wherever I am).

I still don't see the relation of using N-M and the possibility of having
multiple IP addresses :-?

>> My experience tells me that I better do not mix them.
>
> My experience is becoming more like yours in Debian .. but less like
> yours in Fedora (sorry, I said the F-word!).

Well, for this scenario, I wouldn't use N-M regardless the linux distribution,
not just Debian. N-M is aimed for laptops or mobile devices.

>>> I believe harmony is possible between NM and br0 - I'm just unsure of
>>> the approach in Debian.
>>
>> I think you still need to add a second interface to the bridge...
>
> Would this second interface have to physically exist?

For a "true" bridge, I guess yes :-)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jsknba$68h$17@dough.gmane.org
 
Old 06-29-2012, 10:47 PM
Chris Davies
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

Steve Dowe <sd@warpuniversal.co.uk> wrote:
> The issue I'm having, using wheezy, is that if I set up a bridged
> ethernet interface for eth0 (br0), as per instructions on the Debian
> wiki etc, NetworkManager can no longer manage my wired ethernet connection.

You can't do that :-(

If you need a bridge (like I do), AFAIK the only two solutions are:

- uninstall network manager and return to using /etc/network/interfaces
- add the missing code to network manager

I have tried various ways of "persuading" NM that it wants to control
my bridged interface instead of the physical one, and it really won't
play ball. I had wanted to try and keep NM on my laptop because it does
wireless better than my previous home-grown solutions. But I've had
to unmanage my wired NIC and now NM tries really hard to bring up the
wireless interface each time someone logs in.

Oh well. I suppose I should be glad I'm not alone. But it doesn't really
help you, does it.

Chris


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1tn1c9xh9s.ln2@news.roaima.co.uk">http://lists.debian.org/1tn1c9xh9s.ln2@news.roaima.co.uk
 
Old 06-30-2012, 04:49 PM
Arun Khan
 
Default Bridging eth0/br0 & NetworkManager - can they coexist?

On Fri, Jun 29, 2012 at 7:32 PM, Steve Dowe <sd@warpuniversal.co.uk> wrote:
> Hello,
>
> I have absolutely no doubt that someone reading this list knows more
> than I do on this..
>
> The issue I'm having, using wheezy, is that if I set up a bridged
> ethernet interface for eth0 (br0), as per instructions on the Debian
> wiki etc, NetworkManager can no longer manage my wired ethernet connection.
>
> If I edit /etc/NetworkManager/NetworkManager.conf and change
>
> [ifupdown]
> managed=false
>
> to
>
> [ifupdown]
> managed=true
>
> then eth0 and br0 both pick up the same IP address.
>
> This is my current /etc/network/interfaces:
>
> # The loopback network interface
> auto lo br0
> iface lo inet loopback
>
> # bridging
> iface br0 inet dhcp
> * bridge_ports eth0
> * bridge_stp off
> * bridge_maxwait 0
> * bridge_fd 0
>
>
> I must be missing something simple here. *Could anyone point me in the
> right direction please? *Has anyone got a working config?
>

When you use bridge: To the best of my knowledge - the IP is assigned
to the bridge and *not* eth0 the physical interface. eth0 should
*not* have any IP assigned to it.

I have run into this problem on my laptop to use Linux KVM VMs.

I have solved it by maintaining two /etc/networks/interfaces files like this

<quote>
$ ls -l /etc/network/interfaces*
lrwxrwxrwx 1 root root 17 Jun 25 10:27 /etc/network/interfaces ->
interfaces.debian
-rw-r--r-- 1 root root 686 May 21 21:38 /etc/network/interfaces.debian
-rw-r--r-- 1 root root 32 May 21 21:38 /etc/network/interfaces.ubuntu.orig
</quote>

When I need a bridge with tap interface I link the /etc/interfaces
file to interfaces.debian (NM reports error but I know networking is
fine ...

and when I need WiFI I link /etc/network/interfaces to interfaces.ubuntu.orig


<interfaces.debian>
$ cat /etc/network/interfaces.debian

... snip default stuff ....

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual

# Bridge setup
auto br0

iface br0 inet dhcp
pre-up /usr/sbin/tunctl -u <userid> -t tap0
post-down /usr/sbin/tunctl -d tap0
bridge_ports eth0 tap
</interfaces.debian>

<interfaces.ubuntu.orig>
$ cat /etc/network/interfaces.ubuntu.orig
auto lo
iface lo inet loopback

</interfaces.ubuntu.orig>

HTH
-- Arun Khan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAHhM8gDorTcbNxiP8EaTpzq1sYTfPSCTUBmZQyqAejQksY6o3 w@mail.gmail.com">http://lists.debian.org/CAHhM8gDorTcbNxiP8EaTpzq1sYTfPSCTUBmZQyqAejQksY6o3 w@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 06:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org