«

»

Oct
16

NetworkManager and /etc/network/interfaces

Ever wondered how to manage interfaces declared in /etc/network/interfaces with NetworkManager? I recently updated an Ubuntu desktop remotely, and to my horror she hadn’t re-appeared after 5000 pings, that’s longer than a disk check.

When I got back in front of the machine I could see she had rebooted just fine, but I had to login locally for NetworkManager to start up the interface. Not ideal.

So I checked /etc/network/interfaces and find these lines commented out:

# eth0 auto
# iface eth0 inet dhcp

Uncomment; job done. The interface will now come up at boot time. Unfortunately NetworkManager ignores any interfaces declared there, which means I can’t easily use my saved VPN connexions, etc.

Checked /etc/NetworkManager/NetworkManager.conf and it was empty. On RTFM NetworkManager.conf man page its clear you can have a lot of control over how your interfaces are managed.

So, sudo vi /etc/NetworkManager/NetworkManager.conf and added the following lines:

[main]
plugins=ifupdown
[ifupdown]
managed=true

The interface comes up at boot, so I can reliably reboot remotely but still have access to the nice NM features!

2 pings

  1. Apache Basic Guide | Umar's Website says:

    [...] NetworkManager and /etc/network/interfaces | TechAnswers [...]

  2. Linux File System Locations & Directory Structure | Umar's Website says:

    [...] NetworkManager and /etc/network/interfaces | TechAnswers [...]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">