we try to configure our network connections on a RPI with Core 18 via network-manager. The network setup on RPI with network-manager just does not work as we would expect it. Let me post our steps and the problems we face:
We use a plain Ubuntu Core 18 RPI 3 image
On startup we use an ethernet connection to set up the device. Everything is working out fine and I can access the internet, install snaps, …
We install the network manager and configure our wifi:
snap install network-manager
nmcli r wifi on
nmcli d wifi list
nmcli d wifi connect my_wifi password
sudo reboot
We also enable the ethernet connection via network-manager:
snap set network-manager ethernet.enable=true
sudo reboot
Now our wifi connection is established and everything looks fine in the network-manager:
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Wired connection 1
wlan0 wifi connected FRITZ!Box 7312
Now the following problems occur:
During device startup it is shown
Ubuntu Core 18 on (tty1)
You cannot log in until the system has an IP address. (Is there supposed to be a DHCP server running on your network?)
(eventually this vanishes and the default screen is shown)
If I want to access a website (e.g. via curl), I get the following:
[main]
plugins=ifupdown,keyfile
# Not using dnsmasq yet. Need to get it properly integrated
# into the snap or reuse the one shiped with the OS snap.
# rc-manager=resolvconf directs NM to use the resolvconf
# binary to update resolv.conf, which is necessary as there's
# more than one network management stack on core devices.
dns=default
rc-manager=resolvconf
# Use internal DHCP stack which is based on the systemd
# implementation and is enough for our purpose until we
# need something more complex.
dhcp=internal
[ifupdown]
managed=false
/etc/netplan/00-default-nm-renderer.yaml:
network:
renderer: NetworkManager
/etc/netplan/00-snapd-config.yaml:
# This is the network config written by 'console_conf'
network:
ethernets:
eth0:
addresses: []
dhcp4: true
version: 2
wifis:
wlan0:
access-points:
addresses: []
dhcp4: true
It is likely the line ‘rc-manager=resolvconf’ in the config which causes the problem, as resolvconf has been deprecated in Ubuntu 18.04 on which Core 18 is based. The NetworkManager snap will need updating to be able to integrate with the systemd-resolved process which is now used to manage DNS.
I was now finally able to try it out and it network-manager 1.10 snap was working for me on by armhf RPI. Though I was wondering why this version is not pushed to the latest channel. Do you know anything about this?
The 1.10 snap uses core18, that’s why it is in a separate track. Eventually this track will become the default, but meanwhile feel free to use it and forget about the latest track.
a bit of time has gone but I am back at this topic.
Currently we are migrating our application to core18. For that the 1.10 network-manager snap is required.
My problem is now following: We create an image for an RPI with our application and the network-manager. If I specify network-manager as a required snap, I will not get the 1.10 version because it is still on the 1.10 track.
"required-snaps": ["network-manager"]
I tried some syntax like this but it did not work:
"required-snaps": ["network-manager=1.10"]
What other options do I have? Obviously the easiest way would be that you push the 1.10 track to the master track.
this really depends, if you want to dynamically change your network config a lot, want to manage mobile connections or quickly set up a wifi AP, network manager is surely best …
if you dont touch/change your network config regulary, i’d go with netplan.
I have the same problem, and until required-snaps knows how to parse track information, there’s a workaround: Drop network-manager from the required-snaps and include it instead as an extra snap parameter in your image build command.