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 word ...
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 are ...
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 ope ...
-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 services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s.
How it works
![Simplified Structure of the Linux Kernel](https://upload.wikimedia.org/wikipedia/commons/6/65/Simplified_Structure_of_the_Linux_Kernel.svg)
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 synchr ...
s have been developed, e.g.
IEEE 802.3 (Ethernet),
IEEE 802.11
IEEE 802.11 is part of the IEEE 802 set of local area network (LAN) technical standards, and specifies the set of media access control (MAC) and physical layer (PHY) protocols for implementing wireless local area network (WLAN) computer commun ...
("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 packet ...
,
PPPoA
In computer networking, the Point-to-Point Protocol over ATM (PPPoA) is a layer 2 data-link protocol typically used to connect domestic broadband modems to ISPs via phone lines. It is used mainly with DOCSIS and DSL carriers, by encapsulating P ...
, 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.
Ear ...
or
wireless network card
A wireless network interface controller (WNIC) is a network interface controller which connects to a wireless network, such as Wi-Fi or Bluetooth, rather than a wired network, such as a Token Ring or Ethernet. A WNIC, just like other NICs, wor ...
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
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow a ...
. 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 byte ...
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
The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution.
SSH applications are based on ...
/
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
ifconfig (short for ''interface config'') is a system administration utility in Unix-like operating systems for network interface configuration.
The utility is a command-line interface tool and is also used in the system startup scripts of man ...
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 and
IEEE 802.11
IEEE 802.11 is part of the IEEE 802 set of local area network (LAN) technical standards, and specifies the set of media access control (MAC) and physical layer (PHY) protocols for implementing wireless local area network (WLAN) computer commun ...
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
systemd is a software suite that provides an array of system components for Linux operating systems. Its main aim is to unify service configuration and behavior across Linux distributions; Its primary component is a "system and service manager ...
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
A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. The be ...
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
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, ...
.
* 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 part ...
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 word ...
, the actual software which manages connections and reports network changes
# several graphical
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of data, as in design and manufacture ...
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
GNOME Panel is a highly configurable taskbar for GNOME. It formed a core part of the desktop in GNOME 1 and GNOME 2. It has been replaced in GNOME 3 by default with GNOME Shell, which only works with the Mutter window manager.
There are many '' ...
, 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 default ...
, 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, breakfa ...
, 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 graphica ...
s which implement the Freedesktop.org
freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Hav ...
System Tray Protocol, including GNOME, KDE Plasma Workspaces, Enlightenment (software)
Enlightenment, also known simply as E, is a compositing window manager for the X Window System. Since version 20, Enlightenment is also a Wayland compositor. Enlightenment developers have referred to it as "the original eye-candy window manager ...
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 lead ...
for SUSE Linux.
=Graphical front-ends and command line interfaces
=
File:Network Manager 0.9.5.png, The GUI shows all available APs. 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
A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
applet
In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program w ...
for NetworkManager.
;nmcli
:nmcli is NetworkManager's built-in command-line interface
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
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
In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an ear ...
. 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
Red Hat, Inc. is an American software company that provides open source software products to enterprises. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina, with other offices worldwide.
Red Hat has become ass ...
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 c ...
. 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 198 ...
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 An ...
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 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
Besides the Linux distributions designed for general-purpose use on desktops and servers, distributions may be specialized for different purposes including computer architecture support, embedded systems, stability, security, localization to a spec ...
* BlueZ
A Bluetooth stack is software that is an implementation of the Bluetooth protocol stack.
Bluetooth stacks can be roughly divided into two distinct categories:
# ''General-purpose'' implementations that are written with emphasis on feature-richn ...
* GNOME Keyring Manager
* usbserial
* 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 becam ...
– network manager written in Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pro ...
* 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 s ...
* 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 conn ...
* 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. All co ...
– 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
GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever sin ...
, targets embedded devices
* ConnMan – 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