What Is a NetworkManager and How Does a NetworkManager Work?

How does a network manager work (1)

NetworkManager is a software daemon that automatically configures and manages network connections on Linux systems. It detects available network interfaces, applies saved connection settings, assigns IP configuration, manages routes and DNS settings, and responds when network conditions change.

Instead of requiring a user or administrator to configure every Ethernet, Wi-Fi, VPN, or mobile broadband connection manually, NetworkManager centralizes these tasks in a background service. Applications and command-line tools can communicate with the daemon to inspect the network, modify connection settings, or activate a different connection.

What Is NetworkManager?

NetworkManager is a network management service designed to make network configuration more automatic and consistent. It runs in the background and manages supported network interfaces, including Ethernet adapters, Wi-Fi devices, mobile broadband connections, virtual interfaces, and VPN connections.

NetworkManager Logo

The program is commonly written as NetworkManager, with both words capitalized and no space between them. It is the name of the software project and its primary daemon, not a job title or a person responsible for managing a network.

When NetworkManager finds an available network device with a suitable connection profile, it can activate that connection automatically. It also exposes network information through D-Bus, allowing desktop environments, command-line utilities, scripts, and other applications to inspect and control network operations.

What Is a Daemon?

A daemon is a program that runs in the background without requiring a user to interact with it continuously. Daemons commonly start during the system boot process and remain active so they can provide services to other programs.

The NetworkManager daemon performs the actual network management work. A graphical Wi-Fi menu or command entered through nmcli does not normally configure the network independently. Instead, the tool sends a request to the NetworkManager daemon, which evaluates the request and changes the system’s network configuration.

This separation allows multiple tools to work with the same central network management service.

How Does NetworkManager Work?

NetworkManager works by monitoring network devices, reviewing saved connection profiles, selecting an appropriate profile and applying its configuration to an available interface.

A typical NetworkManager process follows these steps:

  1. NetworkManager detects a network interface.
  2. It determines whether the interface should be managed.
  3. It searches for a compatible connection profile.
  4. It selects a profile based on availability and connection preferences.
  5. It activates the interface and applies the profile.
  6. It configures addressing, routes and DNS information.
  7. It continues monitoring the interface for changes.
  8. It updates applications and users when the connection state changes.

This process can happen automatically when the computer starts, when an Ethernet cable is connected, when a known Wi-Fi network becomes available or when a user manually activates a connection.

1. NetworkManager Detects Network Interfaces

NetworkManager begins by identifying the network devices available to the operating system. These may include:

  • Ethernet interfaces
  • Wi-Fi adapters
  • Mobile broadband modems
  • VPN interfaces
  • VLAN interfaces
  • Network bridges
  • Bonded interfaces
  • Virtual network devices

NetworkManager uses information from the Linux device management system to discover network devices. An administrator can also designate certain interfaces as unmanaged when another service or manual configuration process should control them instead.

A device is not the same as a connection. The device is the physical or virtual network interface. The connection is the collection of settings NetworkManager may apply to that device.

For example, a laptop might have one Wi-Fi device but dozens of saved Wi-Fi connection profiles.

2. NetworkManager Loads Connection Profiles

NetworkManager is built around connection profiles. A connection profile is a saved group of settings describing how the system should connect to a particular network.

A profile may contain:

  • The connection name
  • A unique identifier
  • The network type
  • The Wi-Fi network name
  • Authentication requirements
  • IPv4 and IPv6 settings
  • DHCP or static addressing preferences
  • DNS servers
  • Routes
  • Gateway information
  • Autoconnect behavior
  • Interface-specific settings

When NetworkManager activates a profile, it applies those settings to a compatible network device and establishes an active network connection.

System connection profiles using the keyfile format are commonly stored in:

/etc/NetworkManager/system-connections

NetworkManager can also maintain profiles in memory. An in-memory profile can be used temporarily without necessarily being written permanently to disk.

3. NetworkManager Selects a Connection

Once an interface becomes available, NetworkManager looks for connection profiles that could be used with it.

Suppose a laptop starts with both an Ethernet adapter and a Wi-Fi adapter. NetworkManager may detect that:

  • An Ethernet cable is connected
  • A saved Wi-Fi network is nearby
  • Both interfaces have compatible profiles
  • One connection has a higher priority

NetworkManager then uses the profile settings and current network conditions to determine which connections should be activated.

Connection profiles can be configured to connect automatically. When several profiles are eligible for the same device, NetworkManager can consider their autoconnect priority. When priorities are equal, it may prefer the profile that was connected most recently.

Administrators can also disable automatic connection behavior and require a profile to be activated manually.

4. NetworkManager Activates the Interface

After selecting a connection profile, NetworkManager activates it on the appropriate network interface.

The exact activation process depends on the connection type. For a Wi-Fi network, NetworkManager may need to:

  1. Scan for nearby access points.
  2. Locate the requested network.
  3. Obtain the necessary password or authentication credentials.
  4. Associate the Wi-Fi adapter with the access point.
  5. Configure IP addressing.
  6. Add routes and DNS information.
  7. mark the connection as active.

For an Ethernet connection using DHCP, the process may be simpler. NetworkManager detects the active link, applies the profile and obtains configuration information from the network’s DHCP service.

A profile can also use manual addressing. In that case, NetworkManager applies the specified IP address, network prefix, gateway, DNS servers and routes instead of requesting them dynamically.

5. NetworkManager Configures the System

Establishing a network connection involves more than turning an interface on. NetworkManager may need to configure several parts of the Linux networking stack.

Depending on the profile, it can manage:

  • IPv4 and IPv6 addresses
  • Default gateways
  • Static routes
  • Route metrics
  • DNS servers
  • DNS search domains
  • DHCP information
  • Maximum transmission unit settings
  • Connection sharing
  • Virtual network interfaces

For example, an administrator can use NetworkManager to create a VLAN, assign a static IP address, append a DNS server or enable IPv4 connection sharing.

NetworkManager does not replace the underlying Linux networking stack. It configures the operating system’s interfaces, addresses, routes and related settings so that applications can communicate over the network.

6. NetworkManager Monitors Connection State

Network conditions are not permanent. A cable can be disconnected, a wireless access point can disappear, a VPN can fail or a laptop can move from one network to another.

NetworkManager continues monitoring devices and active connections after the initial configuration is complete. When conditions change, it can update the connection state, deactivate a profile or activate another available connection.

NetworkManager recognizes several levels of connectivity, including:

  • Unknown
  • None
  • Portal
  • Limited
  • Full

A portal state commonly indicates that the device has connected to a local network but must complete a sign-in process before receiving normal internet access.

This ongoing monitoring is one reason NetworkManager is particularly useful on laptops and other devices that frequently move between networks.

How Do Users Control NetworkManager?

Users do not usually communicate with the daemon directly. Instead, they use a client tool that sends commands to NetworkManager.

Graphical Network Controls

Most Linux desktop environments provide graphical menus for selecting Wi-Fi networks, enabling or disabling networking, entering passwords and viewing connection status.

Although the menu appears to configure the network, it normally acts as a client of the NetworkManager daemon.

The nmcli Command

nmcli is NetworkManager’s primary command-line tool built within its command-line interface. It can display device status, show connection profiles, activate connections and modify network settings.

Common commands include:

nmcli general status

nmcli device status

nmcli connection show

nmcli connection show –active

nmcli device wifi list

Administrators can also use nmcli to create, edit, activate, deactivate and delete connection profiles. Because it supports structured and concise output, it can be used in scripts as well as interactive terminal sessions.

The nmtui Interface

nmtui provides a text-based interface for controlling NetworkManager. It is useful on servers or minimal Linux systems where a full graphical desktop is unavailable but the administrator prefers a menu-driven interface.

D-Bus and Application APIs

NetworkManager exports network devices, profiles, active connections, IP configuration, DHCP state, wireless access points and other information through D-Bus.

Applications can use this interface to:

  • View network status
  • List available connections
  • Activate or deactivate profiles
  • Monitor state changes
  • Request network credentials
  • Inspect IP configuration
  • Manage network settings

Developers can work with the D-Bus interface directly or use the libnm library and supported language bindings.

What Is the Difference Between a Device, Profile and Active Connection?

Understanding these three terms makes NetworkManager much easier to understand.

Network Device

A device is the interface NetworkManager can manage. Examples include an Ethernet adapter, Wi-Fi card, VPN interface or network bridge.

Connection Profile

A connection profile is the saved configuration that can be applied to a compatible device. It defines how the device should connect and what settings it should use.

Active Connection

An active connection exists when NetworkManager applies a profile to a device and successfully activates it.

For example:

  • wlan0 is the Wi-Fi device.
  • “Office Wi-Fi” is the connection profile.
  • The current connection between wlan0 and the office access point is the active connection.

A profile may exist without being active, and one device may have multiple profiles available even though it can only use one of them at a particular time.

What Are NetworkManager Dispatcher Scripts?

NetworkManager can run scripts when certain network events occur. These are known as dispatcher scripts.

An administrator might use a dispatcher script to:

  • Mount a network drive after connecting
  • Start an application when a VPN becomes active
  • Update firewall rules
  • Send connection information to a monitoring system
  • Run a backup after joining a trusted network
  • Stop a service when an interface disconnects

Dispatcher scripts are stored in designated NetworkManager directories and receive information about the interface, connection and event that triggered them.

These scripts extend NetworkManager’s capabilities, but they should be used carefully. A poorly designed script can delay network changes or create unexpected behavior.

Is NetworkManager Required?

Linux can operate without NetworkManager. Administrators can configure interfaces through other services, distribution-specific tools, systemd-networkd or manual networking commands.

However, multiple network management systems should not attempt to control the same interface simultaneously. Competing configurations can cause routes, addresses, DNS settings or connection states to change unexpectedly.

NetworkManager is especially useful for:

  • Desktop Linux systems
  • Laptops that move between networks
  • Computers using Wi-Fi
  • Systems that connect through VPNs
  • Devices that need automatic failover
  • Servers that benefit from centralized profile management
  • Administrators who want consistent command-line and graphical controls

Interfaces that must be controlled by another system can be marked as unmanaged so NetworkManager leaves them alone.

NetworkManager Versus Network Monitoring

NetworkManager manages the configuration and operation of a Linux system’s network connections. It is not a complete network monitoring platform.

It can report interface states, IP information, connection status and connectivity changes. However, it is not designed to provide organization-wide traffic analysis, long-term performance reporting, device discovery or centralized infrastructure monitoring.

A monitoring platform observes network performance across devices and systems. NetworkManager primarily ensures that an individual Linux system’s network interfaces are configured and connected correctly.

Why Is NetworkManager Important?

Without a network management service, users may need to configure interfaces, addresses, routes, Wi-Fi authentication and DNS settings manually. Those configurations would also need to be updated whenever the device moved to a different network.

NetworkManager provides a centralized layer that remembers network settings and applies them when the right interface and network become available. It also gives graphical tools, terminal utilities and applications a consistent way to inspect and control networking.

In practical terms, NetworkManager is the background service that allows many Linux systems to connect to Ethernet, Wi-Fi, VPN and other networks without requiring the user to rebuild the network configuration each time conditions change.

Frequently Asked Questions About NetworkManager

How Does NetworkManager Handle Interface Configuration?

NetworkManager handles interface configuration by applying a saved connection profile to a compatible network interface. The profile can define IP addresses, gateways, DNS servers, routes and whether the connection should activate automatically. Administrators can manage these settings through graphical tools, configuration files or an nmcli connection command.

What Network Devices Can NetworkManager Control?

NetworkManager can control many types of network devices, including Ethernet adapters, Wi-Fi cards, mobile broadband modems, bridges, bonds, VLANs and virtual interfaces. It can manage both wired and wireless devices, provided the operating system recognizes the underlying hardware and the interface has not been assigned to another network management service.

Where Does NetworkManager Store Connection Files?

NetworkManager commonly stores persistent connection files in the /etc/NetworkManager/system-connections/ directory. These files contain settings for individual network profiles, such as authentication information, IP addressing and autoconnect preferences. Because they may contain sensitive credentials, their access permissions should be restricted.

What Is the NetworkManager D-Bus API?

The dbus api allows desktop environments, command-line tools and other applications to communicate with the NetworkManager daemon. Through this interface, applications can inspect devices, retrieve connection information, activate profiles and monitor changes in network status without modifying the Linux networking stack directly.

How Can You Change the NetworkManager Configuration?

The main NetworkManager configuration file is typically located at /etc/NetworkManager/NetworkManager.conf. Administrators can use it to change global behavior, select plugins, define connectivity checks and identify interfaces NetworkManager should not control. Changes may require the NetworkManager service to be reloaded or restarted before they take effect.

Can NetworkManager Connect to Wi-Fi Automatically?

Yes. NetworkManager can automatically connect to a known wifi network when a compatible wireless adapter is available and the saved profile permits automatic activation. It can remember the network name, security method, password and IP settings, allowing the system to reconnect when the network becomes available again.

PARTNER WITH BCA

Schedule a Free Technology Assessment

Recent Posts

Recent Posts

Managed Technology That Drives You Forward.

Together we can help your business eliminate IT downtime and improve workplace productivity with technology.