NetworkManager is a daemon that sits on top of libudev and other Linux kernel interfaces (and a couple of other daemons) and provides a high-level interface for the configuration of the network interfaces.
Video NetworkManager
Rationale
NetworkManager is a software utility that aims to simplify the use of computer networks. NetworkManager is available for Linux kernel-based and other Unix-like operating systems.
Maps NetworkManager
How it works
To connect computers with each other various communications protocols have been developed, e.g. IEEE 802.3 (Ethernet), IEEE 802.11 ("wireless"), IEEE 802.15.1 (Bluetooth), PPPoE, PPPoA, and many many more. Each participating computer must have the suitable hardware, e.g. network card 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 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/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-bundle) are used to configure IEEE 802.3 and .11 hardware. Please consult their man page to learn about their operation. In any case, 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 scripts 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
, DNS-servers in /etc/resolv.conf
. /etc/network/interfaces
can define a static IP-address or dhclient
to be used, and all kinds of VPN can be configured here as well.
In case the configuration has to be changed, DHCP-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.
- Own 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 was an early protocol used for this, and to this day its descendant DHCP 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, the actual software which manages connections and reports network changes
- several graphical front-ends for diverse surfaces, such as GNOME Shell, GNOME Panel, KDE Plasma Workspaces, Cinnamon, etc.
Both components are intended by the developers to be reasonably portable, and the applet is available to desktop environments 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 for SUSE Linux.
Graphical front-ends and command line interfaces
-
- nm-applet
- the GNOME applet for NetworkManager.
- nmcli
- built-in command-line interface (added in 2010)
- nmtui
- built-in text-based user interface (incomplete).
- 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 a NetworkManager project in 2004 with the goal of enabling Linux users to deal more easily with modern networking needs, particularly wireless networking. 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 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 keys as needed.
The NetworkManager project was among the first major Linux desktop components to utilize D-Bus 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
- BlueZ
- GNOME Keyring Manager
- UMTSMON
- usbserial
- Wicd Network Manager written in Python
- wicked tool and library provides a new, experimental framework for network configuration, GPLv2, created 2010-09-13
- wpa_supplicant
- wvdial
- netifd a tiny daemon with the ability to listen on netlink events; does not require D-Bus, does not depend on GLib, targets embedded devices
- ConnMan - connection manager is a daemon for managing Internet connections within embedded devices
- wifi-switcher simple frontend to command-line utilities (iwlist, ifup, ifdown, isc-dhcp-server, wpa_supplicant, hostapd). Automatically connects to available wireless networks according to priorities. Creates ad-hoc wireless hotspot with ftp server. To be used either with IceWM or in terminal via pdmenu.
References
External links
- NetworkManager Homepage
- Service Provider Database
- NetworkManager in freedesktop.org
- NetworkManager status on the freebsd-gnome mailing list
- Original NetworkManager page at redhat.com via WaybackMachine
- Announcement of the first public release of NetworkManager
- How to use a WiFi interface with NetworkManager
Source of the article : Wikipedia