Where is network configuration "hidden" on Ubuntu 16.04?

Harald Weidner hweidner-lists at gmx.net
Mon Oct 8 23:29:16 UTC 2018


Hello,

On Fri, Oct 05, 2018 at 07:29:47PM +0000, Leroy Tennison wrote:

> I did a recursive grep of /etc for it's first two octets and found
> nothing.  In fact /etc/rc.local has the default contents and neither
> /etc/network/interfaces or the file in /etc/network/interfaces.d even
> configures eth9.

> Where else can I look for the remnnts of the "5" configuration which are
> being applied at boot and preventing parts of the file-based configuration
> from working?  I even decompressed a copy of initrd.img...  and found
> nothing.

There are several ways to configure a network interface under Ubuntu.

The most common way is probably the package ifupdown, which reads the
contents of /etc/network/interfaces and /etc/network/interfaces.d/*.

A (more or less) drop-in replacement is ifupdown2, written by the
maintainers of the Cumulus Linux distribution for network devices.
It uses the same config files as above.

If you run a desktop system, you have most likely the NetworkManager
installed. NM likes to grab any interface not configured by ifupdown,
and applies its default configuration on it, which is running a DHCP
client on wired devices. You can check with "nmcli device", which of
your devices are controlled by NM.

Another less popular graphical tool for network configuration is WICD.
It is typically installed with lightweight desktop environments like
Xfce or LXDE.

Systemd also has the ability to configure network interfaces. Static
configuration lies in /etc/systemd/network, dynamic (volatile) config
under /run/systemd/network, and default configurations under
/lib/systemd/network. See "man systemd-networkd" for details.

Newer versions of Ubuntu ship with Netplan, a network configuration
utility with its config files under /etc/netplan. Netplan is in an
early stage of development, lacking important features like IPv6
privacy extensions. If you use it, I'd consider replacing it by
ifupdown, ifupdown2, or systemd-networkd.

I'm sure this list is incomplete. However, those are the most
popular network configuration options.

Best regards,
Harald



More information about the ubuntu-server mailing list