1

edit: I found it may be more efficient to reinstall the OS. I may encounter this again so I'll either create a new issue or find a way to continue this one. Also note below I created a bug report on netplan https://bugs.launchpad.net/netplan/+bug/1953054

edit: This is interesting https://onet.vn/install-netplan-on-ubuntu.html

By default, Netplan is disabled on Ubuntu 16.04 LTS. You have to enable it manually. To enable Netplan, you have to create a file netplan in the /etc/default/ directory and add ENABLED=1 to it.


I have Ubuntu 18.04.6 LTS. For consistency with other servers I want to use netplan.io /etc/netplan/01-netcfg.yml I've followed several postings which offer similar instructions in disabling NetworkManager and configuring / enabling netplan. This is one of them, yet it does not offer the results I'm looking for: How to enable netplan on ubuntu server upgraded from 16.04 to 18.04

In sum, I want to completely disable NetworkManager. I want /etc/netplan to be the only means of configuring static addressing on this server.

I've disabled / enabled the appropriate services:

# systemctl list-unit-files | grep -i network
dbus-org.freedesktop.network1.service                            enabled
network-manager.service                                          masked
networkd-dispatcher.service                                      enabled
NetworkManager-dispatcher.service                                enabled
NetworkManager-wait-online.service                               enabled
NetworkManager.service                                           masked
systemd-networkd-wait-online.service                             enabled
systemd-networkd.service                                         enabled

And I've written a netplan configuration:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: no
      addresses: [192.168.1.30/24]
      gateway4: 192.168.1.1

However I continue to get an address from DHCP, not the netplan config:

2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:13:77:bd:fb:7c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0
       valid_lft 1750sec preferred_lft 1750sec
    inet6 fe80::6815:1b1b:6a5a:4049/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

I've looked over https://netplan.io/troubleshooting/#debugging-issues-with-the-networkd-backend and I do not see files in /run/systemd/network In fact:

# ls /run/systemd/network
ls: cannot access '/run/systemd/network': No such file or directory

Also, in troubleshooting I've created a totally bogus /etc/netplan/01-netcfg.yml and it's still accepted:

FOO:
        BAR:
                FOO

# netplan try -d
Do you want to keep these settings?

Press ENTER before the timeout to accept the new configuration

Changes will revert in 120 seconds Configuration accepted.

netplan apply -d

What the heck is going on here?

me2017
  • 21
  • 1
  • 3
  • Possibly helpful: https://askubuntu.com/questions/1091653/how-do-i-disable-network-manager-permanently – chili555 Dec 02 '21 at 16:38
  • Thanks @chili555 --this is another item I followed yet the results it offers is on part of what I'm trying to accomplish. This will disable networkmanager yet it doesn't enable netplan. The result is the NIC is never configured on boot. No network. – me2017 Dec 02 '21 at 17:45
  • Did you try: sudo netplan generate and: sudo netplan apply? Any errors or interesting clues? – chili555 Dec 02 '21 at 19:54
  • Yes both of those many times. A couple of examples is in question. I'll include more recent results as I found netplan <command> -d is incorrect. Verbose output will only be generated by way of netplan --debug <command> – me2017 Dec 02 '21 at 20:28
  • Edit your question and show me cat /etc/network/interfaces and sudo lshw -C network and cat /etc/netplan/*.yaml and the output of sudo netplan generate and sudo netplan apply and a screenshot of the IPv4 tab of your wired connection profile in the GUI. – heynnema Dec 02 '21 at 22:13
  • I did a quick CBA and found reinstalling the system was more beneficial and efficient. I submitted a bug against netplan https://bugs.launchpad.net/netplan/+bug/1953054 This shouldn't be so flimsy. I need to be done with this one it's a hell of a time sink with too many mysterious details. – me2017 Dec 02 '21 at 23:20
  • @me2017 I saw your bug report. It really lacks details, and doesn't provide any real bug for anyone to solve. I'd recommend that you delete it. – heynnema Dec 03 '21 at 00:31

0 Answers0