controlling network manager from the console

Hi everyone For a project at work, I'm working with a Nvidia Jetson Nano (https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-nan...). In order to get it hooked up to the wireless network, I came across the following tutorial: https://learn.sparkfun.com/tutorials/adding-wifi-to-the-nvidia-jetson/all The interesting tidbit in this article was the "nmcli" tool (https://linux.die.net/man/1/nmcli) to control the network manager from the console. Really neat! Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

The NVIDIA® Jetson Nano™ Developer Kit <https://developer.nvidia.com/embedded/jetson-nano-developer-kit> looks like quite an interesting competitor to the R-Pi4<https://www.raspberrypi.org/products/raspberry-pi-4-model-b/> ...if you like heat sinks 😉 Regarding...
...the "nmcli" [NetworkManager command line interface] tool to control the network manager from the console. Really neat!
...according the wikipedia article on NetworkManager<https://en.wikipedia.org/wiki/NetworkManager>... 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. nmcli is NetworkManager's built-in command-line interface utility that was added in 2010. nmcli allows easy display of NetworkManager's current status, manage connections and devices, monitor connections. NetworkManager and its suite of utilities ship with the Ubuntu distros, and I suspect with most other major distros. A $ nm <tab> on an Ubuntu console reveals... ian(a)ian:~$ nm nm nm-connection-editor nmtui-edit nm-applet nm-online nmtui-hostname nmblookup nmtui nmcli nmtui-connect ...and it's under the control of systemctl... ian(a)ian:~$ systemctl status NetworkManager ● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendo> Active: active (running) since Thu 2020-10-01 07:31:07 NZDT; 10h ago Docs: man:NetworkManager(8) Main PID: 848 (NetworkManager) Tasks: 3 (limit: 19043) Memory: 13.7M CGroup: /system.slice/NetworkManager.service └─848 /usr/sbin/NetworkManager --no-daemon Possibly NetworkManager, and its utilities like nmcli and its GUI equivalent are the way forward in the world of Linux, and the other, older, networking utilities can be put to rest ? cheers, Ian.

On Thu, Oct 01, 2020 at 04:46:47AM +0000, Ian Stewart wrote:
Possibly NetworkManager, and its utilities like nmcli and its GUI equivalent are the way forward in the world of Linux, and the other, older, networking utilities can be put to rest ?
It's useful in systems that may have changing network configurations (for example, a laptop), otherwise I find it to be a complete pain in the .... I personally do not allow it to be installed on any headless system or any system that has a static IP. Lower-level utilities are much better for that. Cheers Michael.

Hi, Recently... Peter mentioned about using the nmcli. (network-manager command line interface) Ian looked up Wikipedia to find out about nmcli and network-manager Michael mentioned that network-manager is a pain, particularly if you have static IP addresses. Ian has now stumbled upon some Ubuntu flavoured articles that suggests using Netplan<https://netplan.io/>. Quote from the Netplan website... Netplan The network configuration abstraction renderer Netplan is a utility for easily configuring networking on a linux system. You simply create a YAML description of the required network interfaces and what each should be configured to do. From this description Netplan will generate all the necessary configuration for your chosen renderer tool. How does it work? Netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators, installers, cloud image instantiations, or other OS deployments. During early boot, Netplan generates backend specific configuration files in /run to hand off control of devices to a particular networking daemon. Netplan currently works with these supported renderers NetworkManager Systemd-networkd ...end of quote. An article<https://wiki.ubuntu.com/MigratingToNetplan> on Migration to Netplan explains the rationale. An alternative on Ubuntu to NetworkManager is systemd-networkd, which is the default backend service in Ubuntu server 18.04 and 20.04. Man page on systemd.networkd... http://manpages.ubuntu.com/manpages/bionic/man5/systemd.network.5.html Plus info on systemd-networkd in wikis for Arch<https://wiki.archlinux.org/index.php/Systemd-networkd> and Debian<https://wiki.debian.org/SystemdNetworkd>. For some info on changing between Network-Manager and systemd-networkd... https://www.configserverfirewall.com/ubuntu-linux/ubuntu-network-manager/ So maybe the Linux direction is Netplan and systemd-networkd??? cheers, Ian ===== PS: Some views of a Ubuntu 20.04 Server and its default networking (Strange it doesn't state "renderer: networkd") ... $ cat /etc/netplan/00-network-manager-all.yaml # This is the network config written by 'subiquity' network: ethernets: enp0s25: dhcp4: true version: 2 $ systemctl status systemd-networkd ● systemd-networkd.service - Network Service Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-10-08 07:17:58 UTC; 1min 13s ago TriggeredBy: ● systemd-networkd.socket Docs: man:systemd-networkd.service(8) Main PID: 802 (systemd-network) Status: "Processing requests..." Tasks: 1 (limit: 9210) Memory: 4.1M CGroup: /system.slice/systemd-networkd.service └─802 /lib/systemd/systemd-networkd Oct 08 07:17:58 ian systemd[1]: Starting Network Service... Oct 08 07:17:58 ian systemd-networkd[802]: Enumeration completed Oct 08 07:17:58 ian systemd-networkd[802]: wlx8c882b05a26e: Interface name change detected, wlx8c882b05a26e has been renamed to wlan0. Oct 08 07:17:58 ian systemd[1]: Started Network Service. Oct 08 07:17:58 ian systemd-networkd[802]: wlan0: Interface name change detected, wlan0 has been renamed to wlx8c882b05a26e. Oct 08 07:17:58 ian systemd-networkd[802]: enp0s25: IPv6 successfully enabled Oct 08 07:17:59 ian systemd-networkd[802]: enp0s25: Link UP Oct 08 07:18:00 ian systemd-networkd[802]: enp0s25: Gained carrier Oct 08 07:18:01 ian systemd-networkd[802]: enp0s25: Gained IPv6LL Oct 08 07:18:04 ian systemd-networkd[802]: enp0s25: DHCPv4 address 192.168.1.2/24 via 192.168.1.1 ===== Some views of my Ubuntu 20.04 Mate desktop and its default networking... ian(a)ian:~$ systemctl status network-manager ● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-10-08 07:40:38 NZDT; 8h ago Docs: man:NetworkManager(8) Main PID: 863 (NetworkManager) Tasks: 3 (limit: 19043) Memory: 13.6M CGroup: /system.slice/NetworkManager.service └─863 /usr/sbin/NetworkManager --no-daemon ...and systemd-networkd is dead... ian(a)ian:~$ systemctl status systemd-networkd ● systemd-networkd.service - Network Service Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:systemd-networkd.service(8) However, probably not surprising as "renderer: NetworkManager" as opposed to "renderer: networkd"... ian(a)ian:~$ cat /etc/netplan/01-network-manager-all.yaml # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager =====
participants (3)
-
Ian Stewart
-
Michael Cree
-
Peter Reutemann