Score:2

Can I use both systemd-networkd and NetworkManager, or is there an GUI/ncurses alternative to Network Manager?

de flag

I am getting used to netplan.io on my laptop after routinely uninstalling it for several years in favor of ifupdown.

This is probably far-fetched, but since it's running a desktop front-end (plasma), I'm wondering if it'd be possible to use it to use two different renderers simultaneously - one for ethernet, and one for wifi, as I have failed to find a GUI for systemd-networkd, but would still like to be able to configure the wifi with a GUI.

Example:

"network": {
  "version": 2,
  "renderer": "networkd",
  "ethernets": {
    "enp0s31f6": {
      "dhcp4": false,
      "addresses": [
        "192.168.1.28/24"
      ],
      "routes": [
        {
        "to": "default",
        "via": "192.168.1.1"
        }
      ],
      "nameservers": {
        "addresses": [
          "192.168.1.2", "192.168.1.3"
        ],
        "search": [
          "domain.com"
        ]
      },
      "dhcp6": true
    }
  },
  "wifis": {
    "wlan0": {
      "renderer": "NetworkManager"
    }
  }
}

(I've been writing my configs in JSON and converting them with yq, since I like how JSON is a bit more explicit)

If it is impossible to use two renderers at once, is there an alternative to NetworkManager but has a similar interface that uses ncurses or Qt, and will interact with wlan0 on systemd-networkd?

N0rbert avatar
zw flag
Did you tried `nmtui`?
AveryFreeman avatar
de flag
nmtui is through network manager, and I'd like to use systemd-networkd for the wired ethernet. Thanks, though!
Score:0
de flag

I came across Intel's connman package, which appears to work just fine, and there is a Qt interface package for it called cmst.

I didn't think it would work with systemd-networkd, but it let me join the local wifi network without any issues, and it is in fact controlling the configuration of systemd-networkd, as evidenced by its unit file:

$ sudo systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-01-31 23:04:42 PST; 22h ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
   Main PID: 4537 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 23746)
     Memory: 2.0M
        CPU: 5.559s
     CGroup: /system.slice/systemd-networkd.service
             └─4537 /lib/systemd/systemd-networkd

Feb 01 20:49:59 treygouty systemd-networkd[4537]: br-int: Gained carrier
Feb 01 20:50:00 treygouty systemd-networkd[4537]: ovs-system: Gained IPv6LL
Feb 01 20:50:00 treygouty systemd-networkd[4537]: br-int: Gained IPv6LL
Feb 01 20:50:02 treygouty systemd-networkd[4537]: enp0s31f6: Gained carrier
Feb 01 20:50:03 treygouty systemd-networkd[4537]: enp0s31f6: Gained IPv6LL
Feb 01 20:50:04 treygouty systemd-networkd[4537]: enp0s31f6: DHCPv6 address redacted/128 (valid for 4h, preferred for 2h 30min)
Feb 01 20:52:33 treygouty systemd-networkd[4537]: wlan0: Link UP
Feb 01 20:53:57 treygouty systemd-networkd[4537]: wlan0: Connected WiFi access point: happyhut (86:2a:a8:88:b5:21)
Feb 01 20:53:57 treygouty systemd-networkd[4537]: wlan0: Gained carrier
Feb 01 20:53:58 treygouty systemd-networkd[4537]: wlan0: Gained IPv6LL

connman appears to be a decent connection manager in its own right, with a CLI helper named connctl - here's the identification of the technologies, and a sampling of its CLI monitor:

$ for i in state technologies monitor; do connmanctl $i; done
  State = online
  OfflineMode = False
  SessionMode = False
/net/connman/technology/p2p
  Name = P2P
  Type = p2p
  Powered = False
  Connected = False
  Tethering = False
/net/connman/technology/ethernet
  Name = Wired
  Type = ethernet
  Powered = True
  Connected = True
  Tethering = False
/net/connman/technology/wifi
  Name = WiFi
  Type = wifi
  Powered = True
  Connected = True
  Tethering = False
  TetheringIdentifier = redacted
/net/connman/technology/bluetooth
  Name = Bluetooth
  Type = bluetooth
  Powered = False
  Connected = False
  Tethering = False
Manager      ServicesChanged      = {
unchanged                ethernet_c85b763c1a3d_cable
unchanged                ethernet_4e09c1a325ae_cable
unchanged                ethernet_7ab3c8ed895b_cable
unchanged                wifi_e4b318e0de7c_6861707079687574_managed_psk
unchanged                wifi_e4b318e0de7c_7866696e69747977696669_managed_none
unchanged                wifi_e4b318e0de7c_4d4f544f37464441_managed_psk
unchanged                wifi_e4b318e0de7c_4e4554474541523430_managed_psk
}, {
removed                  /net/connman/service/wifi_e4b318e0de7c_466c61707079_managed_psk
removed                  /net/connman/service/wifi_e4b318e0de7c_73616c6f6e333630_managed_psk
removed                  /net/connman/service/wifi_e4b318e0de7c_hidden_managed_ieee8021x
removed                  /net/connman/service/wifi_e4b318e0de7c_536861726a6f77696669_managed_psk
removed                  /net/connman/service/wifi_e4b318e0de7c_hidden_managed_psk
}
Manager      ServicesChanged      = {
unchanged                ethernet_c85b763c1a3d_cable
unchanged                ethernet_4e09c1a325ae_cable
unchanged                ethernet_7ab3c8ed895b_cable
unchanged                wifi_e4b318e0de7c_6861707079687574_managed_psk
}, {
removed                  /net/connman/service/wifi_e4b318e0de7c_4d4f544f37464441_managed_psk
removed                  /net/connman/service/wifi_e4b318e0de7c_7866696e69747977696669_managed_none
removed                  /net/connman/service/wifi_e4b318e0de7c_4e4554474541523430_managed_psk
}

But the GUI was what I was really after. Despite not looking all that slick, it actually appears to have access to quite a few more features than NetworkManager typically would:

cmst: tray icon

cmst: list of devices

cmst: wireless interface details

cmst: wireless interfaces overview

cmst: preferences

So, there you have it. Nice to know there's an alternative!

Score:0
us flag

Yes, it is possible to use NetworkManager for one set of interfaces and networkd for another. As documented at https://netplan.io/reference/:

renderer (scalar)
  Use the given networking backend for this definition. Currently
  supported are networkd and NetworkManager. This property can be
  specified globally in network:, for a device type (in e. g.
  ethernets:) or for a particular device definition. Default is
  networkd.

While not explained there, if you have multiple interfaces of each type, it is possible to have a separate file for each renderer and declare the renderer: at the top level within the file so that you don't have to repeat it for each interface.

AveryFreeman avatar
de flag
That's great, thank you. Can you demonstrate how to configure it in netplan, please? If I had been able to find documentation or other posts about it, I wouldn't have posted a question, and maybe your demonstration could help other people in the future as well.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.