Ubuntu – 12.04 NetworkManager trying to configure eth0 which is on a bridge

12.04network-bridgenetwork-manager

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?

Best Answer

  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.