paulgorman.org/technical

NetworkManager

(August 2017)

NetworkManager is a linux daemon that tries (with mixed success) to ease the configuration of network interfaces.

Background

In the past, NetworkManager had reliability problems, and failed to work well with bridges. As of 2017, NetworkManager may finally be safe to use. There’s no compelling reason to switch to NetworkManager (except, possibly, for laptops), but there’s no longer a strong reason to switch away from NetworkManager if it’s already the system default. NetworkManager does not currently support some advanced features (e.g. network namespaces).

Without NetworkManager, network configuration happens in manually edited config files, which are read by shell scripts.

On RHEL6, for example, these included the files in /etc/sysconfig/network-scripts/, such as ifcfg-eth0, along with files like:

- `/etc/hosts` to resolve names that won't get the desired answer from DNS
- `/etc/resolv.conf` to set the IP address of the DNS server and the search domain
- `/etc/sysconfig/network` sets global host and routing info for all interfaces

See /usr/share/doc/initscripts-*/sysconfig.txt.

Debian is similar, but interfaces are configured in the /etc/network/interfaces file instead of /etc/sysconfig/network-scripts/. See INTERFACES(5).

NetworkManager

NetworkManager setting are bundled in “connection profiles”. One network device might be configured with a different connection profile depending on circumstances (e.g. a “work” or “home” profile). A connection profile includes numerous key/value settings, as described in NM-SETTINGS(5).

NetworkManager stores its config in /etc/NetworkManager/system-connections/, but these files are not intended to be directly edited. Edit network connections with one of these tools:

See NETWORKMANAGER(8), NM-SETTINGS(5), and NETWORKMANAGER.CONF(5).