Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For months I've been running 12.04 headless home server with a bridge connected through eth0. I've been using this /etc/network/interfaces file:

 auto lo
 iface lo inet loopback

 auto br0
 iface br0 inet static
        address 192.168.8.1
        netmask 255.255.255.0
        network 192.168.8.0
        broadcast 192.168.8.255
        gateway 192.168.8.2
        dns-nameservers 192.168.8.2
        dns-search cluster.toy
        pre-up ip link set eth0 down
        pre-up brctl addbr br0
        pre-up brctl addif br0 eth0
        pre-up ip link set eth0 up
        post-down ip link set eth0 down
        post-down ip link set br0 down
        post-down brctl delif br0 eth0
        post-down brctl delbr br0

However, after a weird network error I looked at my logs and saw that NetworkManager was repeatedly trying to bring up eth0, which it absolutely should not be doing (eth0 is a slave to br0, which is statically configured).

My understanding is that since I have NetworkManager.conf set with this setting:

[ifupdown]
managed=false

It is supposed to ignore any interfaces mentioned in the /etc/network/interfaces file. So I have some questions:

  • Am I missing something, or is there a bug in NetworkManager that it doesn't parse bridge stanzas in /etc/network/interfaces correctly to know to ignore them?
  • Is there some sort of dummy statement I now have to put in /etc/network/interfaces to trick network manager into leaving it alone?
  • Alternatively, can I just apt-get remove network-manager with no negative consequences?
share|improve this question
    
Note this config was copied over from my old server which was originally running 6.06. –  clemej Feb 20 '13 at 3:36
add comment

2 Answers

up vote 2 down vote accepted
  1. NetworkManager tries to manage eth0 because eth0 is not configured in /etc/network/interfaces.

  2. To cause NetworkManager not to touch eth0, add the following stanza to /etc/network/interfaces.

    iface eth0 inet manual

  3. If you aren't using NetworkManager then you can safely remove network-manager.

By the way, there's an easier way to configure bridges in /e/n/i. Use the bridge_* options as illustrated in the answer by bodhi.zazen.

share|improve this answer
    
Ahh, I see. I didn't know about the manual option, or about the newer-then-when-I-created-this-file bridge_ports option. I also seem to recall times that network-manager was tied to things like ubuntu-desktop so that it couldn't be removed easily. I've simplified the file and its removed network-manager, that should keep things happy from now on. –  clemej Feb 21 '13 at 5:46
    
I also think I'll file a bug report to have network-manager ignore interfaces listed in bridge_ports (unless it already does? hmm) –  clemej Feb 21 '13 at 5:47
add comment

NetworkManager does not handle bridges. This has been a long standing shortcoming of NetworkManager. If you want a bridge, you need to disable NetworkManager and use ifup instead, configured in /etc/network/interfaces.

Example:

auto br0
iface br0 inet static
    address 192.168.0.10
    netmask 255.255.255.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    bridge_ports eth0
    bridge_stp off
    bridge_maxwait 5
share|improve this answer
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.