ArticleslgStudy

computer science

NetworkManager

NetworkManager is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand NetworkManager rather than just read about it. In short: 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 to simplify the use of computer networks on Linux distributions. How it works To connect computers with each other, various communications protocols have been developed, e.g.

NetworkManager — main illustration
NetworkManager — illustration

Key takeaways

  • NetworkManager belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect NetworkManager to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of NetworkManager from memory before moving on to harder problems.

Reference excerpt

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 to simplify the use of computer networks on Linux distributions.

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, etc. 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 by 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 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 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 for Debian Linux distributions and its derivatives or ifcfg files in /etc/sysconfig/network-scripts/ for Fedora and its derivatives, and DNS-servers in /etc/resolv.conf. /etc/network/interfaces or /etc/sysconfig/network-scripts/ifcfg-* 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 D-Bus. Configuration is stored in /etc/NetworkManager/NetworkManager.conf But as we've transitioned from physically large servers to more portable hosts that may be plugged and unplugged (or moved from WiFi hotspot to WiFi hotspot) at the user's discretion, dynamic configurations (i.e., not stored in a static configuration file but taken from outside the host, and potentially changing after boot) have become a more prevalent configuration. 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 the graphical or command-line interface

Graphical front-ends and command line interfaces

nm‑applet nm‑applet is a GTK 3-based GUI for NetworkManager which runs in the system tray. The applet is maintained by the GNOME project, and can be used with any desktop environment which implements the fd.o System Tray Protocol (this excludes the GNOME Shell, which has its own built-in implementation). plasma‑nm KDE Plasma 6 has its own applet for configuring connections through NetworkManager, plasma‑nm. The applet is not included in Plasma 6 by default. 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 the built-in text-based user interface for NetworkManager. It is basic when compared to nmcli, as it only allows users to add, edit, activate and deactivate connections; set the hostname of the system; and enable and disable radios. It does not allow for the setup of wired connections, WPA-Enterprise, or VPNs; preconfigured connections can be used. cnetworkmanager cnetworkmanager is a Python-based CLI for NetworkManager, written by Martin Vidner. The project's last commit was in August 2010; its final version (0.21.1) was released in August 2009.

Mobile broadband support NetworkManager is used in conjunction with ModemManager and Paul's PPP Package for WWAN/mobile broadband support. Antti Kaijanmäki announced the development of a mobile broadband configuration assistant for NetworkManager in April 2008; the required changes were made to NetworkManager in 0.7.1.

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. 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

… excerpt ends here. Continue reading the full article.

Illustrations

NetworkManager: NetworkManager is a system daemon, with various graphical front-ends available
NetworkManager is a system daemon, with various graphical front-ends available
NetworkManager: Linux kernel: network device drivers and network stack. Utility programs are not depicted, they communicate through the SCI with the different components of the kernel.
Linux kernel: network device drivers and network stack. Utility programs are not depicted, they communicate through the SCI with the different components of the kernel.
NetworkManager illustration
NetworkManager illustration

Worked examples

Example 1 — a first encounter with NetworkManager

Start with the simplest possible case. Write down what NetworkManager claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to NetworkManager before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about NetworkManager ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of NetworkManager

In research
NetworkManager appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses NetworkManager in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
NetworkManager is common in secondary-school and first-year university syllabi. It links to neighbouring topics Applications using D-Bus, Free network-related software, Linux network-related software, so understanding it makes those chapters shorter.
In everyday life
Look for NetworkManager outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “NetworkManager” →

How to study NetworkManager in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what NetworkManager means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain NetworkManager out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is NetworkManager in simple terms?

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 to simplify the use of computer networks on Linux distributions. How it works To connect compu…

Why does NetworkManager matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study NetworkManager?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on NetworkManager.

Tags

  • Applications using D-Bus
  • Free network-related software
  • Linux network-related software
  • Red Hat software

Keep exploring