Linux Network Managers and Configuration Files

From KoanSoftware Wiki
Jump to: navigation, search

Linux Network Managers and Configuration Files

Linux supports various network management systems, each designed for different use cases such as desktop environments, servers, or embedded systems. Below is a summary of the most commonly used network managers along with their associated configuration files.

1. NetworkManager

NetworkManager is a dynamic network control and configuration daemon that attempts to keep network devices and connections up and active when they are available. It is widely used in desktop Linux distributions such as Ubuntu, Fedora, and others.

  • Service: NetworkManager
  • CLI Tools: nmcli, nmtui
  • Main Configuration Files:
    • /etc/NetworkManager/NetworkManager.conf – Main configuration file.
    • /etc/NetworkManager/system-connections/ – Directory containing individual connection profiles.
    • /var/lib/NetworkManager/ – Runtime data.

Example Connection File

/etc/NetworkManager/system-connections/wired-connection.nmconnection

[connection]
id=wired-connection
type=ethernet
interface-name=enp0s3

[ipv4]
method=auto

2. systemd-networkd

systemd-networkd is a system service that manages networks. It detects and configures network devices as they appear and can also create virtual network devices.

  • Service: systemd-networkd
  • CLI Tools: networkctl, systemctl
  • Main Configuration Files:
    • /etc/systemd/network/*.network – Match and configure physical interfaces.
    • /etc/systemd/network/*.netdev – Configuration for virtual devices.

Example Network File

/etc/systemd/network/20-wired.network

[Match]
Name=enp0s3

[Network]
DHCP=yes


3. ifupdown (traditional Debian tool)

ifupdown is the classic network configuration tool used in older Debian and Ubuntu systems. It is gradually being replaced by newer systems like NetworkManager or systemd-networkd.

  • Service: No dedicated service (scripts run via ifup/ifdown)
  • CLI Tools: ifup, ifdown
  • Main Configuration File:
    • /etc/network/interfaces

Example Interfaces File

/etc/network/interfaces

auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet dhcp


4. netplan

Netplan is a utility for configuring networking on modern Ubuntu systems (17.10 and later). It abstracts configuration and delegates to either NetworkManager or systemd-networkd.

  • Service: Depends on backend (NetworkManager or systemd-networkd)
  • CLI Tools: netplan apply, netplan try
  • Main Configuration Files:
    • /etc/netplan/*.yaml

Example Netplan YAML File

/etc/netplan/01-netcfg.yaml

network:
  version: 2
  ethernets:
    enp0s3:
      dhcp4: true


5. Wicd

Wicd is a network connection manager that aims to provide a simple interface to connect to networks. It is now mostly obsolete but may still be found on lightweight systems.

  • Service: wicd
  • CLI Tools: wicd-curses, wicd-cli
  • Main Coniguration Files:
    • /etc/wicd/ – Configuration directory
    • /etc/wicd/wireless-settings.conf – Wireless-specific configuration
    • /etc/wicd/wired-settings.conf – Wired-specific configuration


6. ConnMan (Connection Manager)

ConnMan is a daemon for managing internet connections within embedded devices. It is lightweight and often used in systems with limited resources.

  • Service: connmand
  • CLI Tools: connmanctl
  • Main Configuration Files:
    • /etc/connman/main.conf – General configuration
    • /var/lib/connman/ – Profiles and saved settings

Example ConnMan Configuration

/etc/connman/main.conf

[General]
PreferredTechnologies=ethernet,wifi
SingleConnectedTechnology=true


Summary Table

Network Manager Main Config File(s) CLI Tools Typical Use
NetworkManager /etc/NetworkManager/ nmcli, nmtui Desktop
systemd-networkd /etc/systemd/network/ networkctl Server, Embedded
ifupdown /etc/network/interfaces ifup, ifdown Legacy Debian/Ubuntu
netplan /etc/netplan/*.yaml netplan Ubuntu (modern)
Wicd /etc/wicd/ wicd-curses, wicd-cli Lightweight Desktop
ConnMan /etc/connman/ connmanctl Embedded Systems




+--------------------+
|   User Interface   |
|--------------------|
| nmcli / nmtui       <-- NetworkManager
| networkctl          <-- systemd-networkd
| netplan apply       <-- Netplan
+--------------------+

            ↓

+-----------------------------+
|   Configuration Files       |
|-----------------------------|
| /etc/netplan/*.yaml         <-- Netplan
| /etc/NetworkManager/*.conf  <-- NetworkManager
| /etc/systemd/network/*.network  <-- systemd-networkd
| /etc/network/interfaces     <-- ifupdown
+-----------------------------+

            ↓

+-----------------------------+
|  Network Managers (Daemons) |
|-----------------------------|
| NetworkManager.service
| systemd-networkd.service
| ifupdown (manual)
| connman.service
+-----------------------------+

            ↓

+-----------------------------+
|       Kernel/Drivers        |
|-----------------------------|
| Interface mgmt, DHCP, etc.  |
+-----------------------------+