NetworkManager is a
daemon
Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and mythology and of later Hellenistic religion and philosophy.
The wo ...
that sits on top of
libudev
udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices a ...
and other Linux kernel interfaces (and a couple of other daemons) and provides a high-level interface for the configuration of the network interfaces.
Rationale
NetworkManager is a software utility that aims to simplify the use of
computer network
A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections ar ...
s.
NetworkManager is available for
Linux kernel
The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
-based and other
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s.
How it works

To connect computers with each other, various
communications protocol
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchro ...
s have been developed, e.g.
IEEE 802.3
IEEE 802.3 is a working group and a collection standards defining the physical layer and data link layer's media access control (MAC) of wired Ethernet. The standards are produced by the working group of Institute of Electrical and Electronics Eng ...
(Ethernet),
IEEE 802.11 ("wireless"),
IEEE 802.15.1 (Bluetooth),
PPPoE
The Point-to-Point Protocol over Ethernet (PPPoE) is a network protocol for encapsulating Point-to-Point Protocol (PPP) frames inside Ethernet frames. It appeared in 1999, in the context of the boom of DSL as the solution for tunneling packets ...
,
PPPoA, and many many more. Each participating computer must have the suitable hardware, e.g.
network card
A network interface controller (NIC, also known as a network interface card, network adapter, LAN adapter or physical network interface, and by similar terms) is a computer hardware component that connects a computer to a computer network.
E ...
or
wireless network card and this hardware must be configured accordingly to be able to establish a connection.
In case of a monolithic kernel all the device drivers are part of it. The hardware is accessed (and also configured) through its device driver. In case of Linux, the kernel presents for each device driver a representation in form of a
device file. All device files are found in the
/dev
directory, and traditionally the device files for Ethernet hardware have been named
eth0
,
eth1
, etc. Since systemd, they are named differently:
enp4s0
, etc. (This abstraction is called the
everything is a file
Everything is a file is an idea that Unix, and its derivatives handle input/output to and from resources such as documents, hard-drives, modems, keyboards, printers and even some inter-process and network communications as simple streams of bytes ...
concept.)
Anything in user-space accesses the hardware through its device file. The configuration utility to configure the hardware, and programs like the
web browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
/
SSH/
NTP-client/etc. to send and receive network packets.
Configuration of network interfaces without NetworkManager
On Linux and all Unix-like operating systems, the utilities
ifconfig
and the newer
ip
(from the
iproute2
iproute2 is a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel, including routing, network interfaces, tunnels, traffic control, and network-related device drivers.
iproute2 ...
-bundle) are used to configure
IEEE 802.3
IEEE 802.3 is a working group and a collection standards defining the physical layer and data link layer's media access control (MAC) of wired Ethernet. The standards are produced by the working group of Institute of Electrical and Electronics Eng ...
and
IEEE 802.11 hardware. These utilities configure the kernel directly and the configuration is applied immediately. After boot-up, the user is required to configure them again.
To apply the same static configuration after each boot-up, the PID1-programs are used:
System V init executes
shell script
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
s and binary programs,
systemd parses its own conf-files (and executes programs). The boot-up configuration for network interfaces is stored in
/etc/network/interfaces
/code> for Debian Linux distributions and its derivatives or ifcfg
/code> files in /etc/sysconfig/network-scripts/
for Fedora
A fedora () is a hat with a soft brim and indented crown.Kilgour, Ruth Edwards (1958). ''A Pageant of Hats Ancient and Modern''. R. M. McBride Company. It is typically creased lengthwise down the crown and "pinched" near the front on both sides ...
and its derivatives, and DNS
The Domain Name System (DNS) is a hierarchical and distributed naming system for computers, services, and other resources in the Internet or other Internet Protocol (IP) networks. It associates various information with domain names assigned to ...
-servers in /etc/resolv.conf
. /etc/network/interfaces
or /etc/sysconfig/network-scripts/ifcfg-*
can define a static IP-address or dhclient
/code> to be used, and all kinds of VPN can be configured here as well.
In case the configuration has to be changed, DHCP
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a cli ...
-protocol goes a long way to do so automatically, without the user even noticing.
Configuration of network interfaces with NetworkManager
* NetworkManager is accessible via dbus.
* Configuration is stored in /etc/NetworkManager/NetworkManager.conf
However, dynamic configurations (i.e., not stored in a static configuration file but taken from outside the host, and potentially changing after boot) have been an increasingly more common configuration, especially as we've moved from physically large servers to more portable hosts that may be plugged and unplugged (or moved from WiFi hotspot to WiFi hotspot) at the will of the user. Bootp
The Bootstrap Protocol (BOOTP) is a computer networking protocol used in
Internet Protocol networks to automatically assign an IP address to network devices from a configuration server. The BOOTP was originally defined in RFC 951.
While some p ...
was an early protocol used for this, and to this day its descendant DHCP
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a cli ...
is still very common. Many Unix-like systems include a program called dhclient to handle this dynamic configuration. Given a relatively static or simple dynamic configuration, static configuration modified by dhclient works well. However, as networks and their topologies get more complex, a central manager for all the network configuration information becomes more essential.
Software architecture
NetworkManager has two components:
# the NetworkManager daemon
Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and mythology and of later Hellenistic religion and philosophy.
The wo ...
, the actual software which manages connections and reports network changes
# several graphical front-ends for diverse graphical desktop environments, such as GNOME Shell
GNOME Shell is the graphical shell of the GNOME desktop environment starting with version 3, which was released on April 6, 2011. It provides basic functions like launching applications, switching between windows and is also a widget engine. ...
, GNOME Panel, KDE Plasma Workspaces
KDE Plasma 5 is the fifth and current generation of the graphical workspaces environment created by KDE primarily for Linux systems. KDE Plasma 5 is the successor of KDE Plasma 4 and was first released on 15 July 2014.
It includes a new defaul ...
, Cinnamon
Cinnamon is a spice obtained from the inner bark of several tree species from the genus '' Cinnamomum''. Cinnamon is used mainly as an aromatic condiment and flavouring additive in a wide variety of cuisines, sweet and savoury dishes, brea ...
, etc.
Both components are intended by the developers to be reasonably portable, and the applet is available to desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s which implement the Freedesktop.org System Tray Protocol, including GNOME, KDE Plasma Workspaces, Enlightenment (software) and Xfce. As the components communicate via D-Bus, applications can be written to be “ link-aware”, or to replace the provided applet entirely. One example is KNetworkManager, a KDE frontend to NetworkManager developed by Novell
Novell, Inc. was an American software and services company headquartered in Provo, Utah, that existed from 1980 until 2014. Its most significant product was the multi- platform network operating system known as Novell NetWare.
Under the l ...
for SUSE Linux.
=Graphical front-ends and command line interfaces
=
File:Network Manager 0.9.5.png, The GUI shows all available APs
APS or Aps or aps or similar may refer to:
Education
* Abbottabad Public School
* Adarsh Public School, a public school in New Delhi, India
* Alamogordo Public Schools
* Albuquerque Public Schools, New Mexico, US school district
* Allendale Publ ...
. The user merely needs to click on the desired one.
File:GNOME Shell NM front-end 3.10.png, Graphical front-end for GNOME Shell
GNOME Shell is the graphical shell of the GNOME desktop environment starting with version 3, which was released on April 6, 2011. It provides basic functions like launching applications, switching between windows and is also a widget engine. ...
3.10
;nm-applet
:nm-applet is the GNOME applet for NetworkManager.
;nmcli
:nmcli is NetworkManager's built-in command-line interface added in 2010. nmcli allows easy display of NetworkManager's current status, manage connections and devices, monitor connections.
;nmtui
:nmtui is a built-in text-based user interface. nmtui is relatively basic compared to nmcli, which only allows users to add/edit a connection, activate a connection, and set the hostname of the system.
;cnetworkmanager
:cnetworkmanager command-line interface for NetworkManager.
Mobile broadband configuration assistant
Antti Kaijanmäki announced the development of a mobile broadband configuration assistant for NetworkManager in April 2008; it became available in NetworkManager version 0.7.0. Together with the package mobile-broadband-provider-info the connection is easily configured.
History
Red Hat initiated the NetworkManager project in 2004 with the goal of enabling Linux users to deal more easily with modern networking needs, particularly wireless networking
A wireless network is a computer network that uses wireless data connections between network nodes.
Wireless networking is a method by which homes, telecommunications networks and business installations avoid the costly process of introducing ...
. NetworkManager takes an opportunistic approach to network selection, attempting to use the best available connection as outages occur, or as the user roams between wireless networks. It prefers Ethernet
Ethernet () is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in ...
connections over “known” wireless networks, which are preferred over wireless networks with SSIDs to which the user has never connected. The user is prompted for WEP or WPA
WPA may refer to:
Computing
*Wi-Fi Protected Access, a wireless encryption standard
*Windows Product Activation, in Microsoft software licensing
*Wireless Public Alerting (Alert Ready), emergency alerts over LTE in Canada
* Windows Performance Ana ...
keys as needed.
The NetworkManager project was among the first major Linux desktop components to utilize D-Bus
In computing, D-Bus (short for "Desktop Bus")
is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project, ...
and HAL
HAL may refer to:
Aviation
* Halali Airport (IATA airport code: HAL) Halali, Oshikoto, Namibia
* Hawaiian Airlines (ICAO airline code: HAL)
* HAL Airport, Bangalore, India
* Hindustan Aeronautics Limited an Indian aerospace manufacturer of fight ...
extensively. Since June 2009, however, NetworkManager no longer depends on HAL, and since 0.9.10 (ca. 2014), neither does it require the D-Bus daemon to be running for root operation.
See also
* Linux on the desktop
* BlueZ
* GNOME Keyring Manager
GNOME Keyring is a software application designed to store security credentials such as usernames, passwords, and keys, together with a small amount of relevant metadata. The sensitive data is encrypted and stored in a keyring file in the user's ...
* usbserial
libusb is a library that provides applications with access for controlling data transfer to and from USB devices on Unix and non-Unix systems, without the need for kernel-mode drivers.
Availability
libusb is currently available for Linux, the ...
* Wicd
Wicd, which stands for Wireless Interface Connection Daemon, is an open-source software utility to manage both wireless and wired networks for Linux. The project started in late 2006 with the creation of Connection Manager, which eventually be ...
– network manager written in Python
* wpa_supplicant
wpa_supplicant is a free software implementation of an IEEE 802.11i supplicant for Linux, FreeBSD, NetBSD, QNX, AROS, Microsoft Windows, Solaris, OS/2 (including ArcaOS and eComStation) and Haiku. In addition to being a WPA3 and WPA2 sup ...
* wvdial
WvDial (pronounced 'weave-dial') is a utility that helps in making modem-based connections to the Internet that is included in some Linux distributions. WvDial is a Point-to-Point Protocol dialer: it dials a modem and starts pppd in order to co ...
* netifd
OpenWrt (from ''open wireless router'') is an open-source project for embedded operating systems based on Linux, primarily used on embedded devices to route network traffic. The main components are Linux, util-linux, musl, and BusyBox. ...
– tiny daemon with the ability to listen on netlink events; does not require D-Bus
In computing, D-Bus (short for "Desktop Bus")
is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project, ...
, does not depend on GLib, targets embedded devices
* ConnMan
ConnMan is an internet connection manager for embedded devices running the Linux operating system.
The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular syste ...
– daemon for managing Internet connections within embedded devices
References
External links
NetworkManager Homepage
Service Provider Database
NetworkManager in freedesktop.org
Original NetworkManager page at redhat.com via WaybackMachine
How to use a WiFi interface with NetworkManager
{{DEFAULTSORT:Networkmanager
Applications using D-Bus
Free network-related software
Linux network-related software
Red Hat software