I think I screwed it up when tried to install Network Manager over networkd
running service. I have Ubuntu server installed on a brand new Raspberry PI 4 with only 1GB of ram, hence 'server'...
Much of the answers seen around are for Network Manager which is installed on desktops.
Uninstalling Network Manager didn't work. I think I did it. Hard to be sure.
Both interfaces, eth0
and wlan0
show same behavior. Up with IP address and all, but no internet connection .
netplan status
shows both IP address and default route assigned.
Ping success over local phone or router.
---> PING SUCCESS TO UBUNTU.COM. OR GGL.<---
Any thoughts?
Edit:
$ apt policy network-manager
network-manager:
Installed: none
Candidate: 1.44.2-1ubuntu1.2
Version table:
1.44.2-1ubuntu1.2 500
500 http://ports.ubuntu.com/ubuntu-ports mantic-updates/main arm64 Packages
1.44.2-1ubuntu1 500
500 http://ports.ubuntu.com/ubuntu-ports mantic/main arm64 Packages
$ sudo cat 50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
optional: true
dhcp4: true
routes:
-to: default
via: 192.168.100.1
metric: 100
wifis:
wlan0:
optional: true
dhcp4: true
access-points:
[my-ssid]:
password: [password]
user@host~$ ip a
1: lo:
2: eth0:
3: wlan0:
inet 192.168.220.73 metric 600 brd 192.168.220.255 scope global dynamic wlan0 valid_lt 2730sec preferred_lft 2730sec
inet6 fe80::
user@host~$ ip route
default via 192.168.220.124 dev wlan0 proto dhcp src 192.168.220.73 metric 600
192.168.220.0/24 dev wlan0 proto kernel scope src 192.168.220.73 metric 600
192.168.220.124 dev wlan0 proto scope src 192.168.220.73 metric 600
user@host~$ netplan status
Online state: offline
DNS Adressess: 8.8.8.8 8.8.8.1
1: lo unmanaged
3: wlan0 wifi/[my-ssid] UP networkd: wlan0
Mac address:
Addresses: 192.168.220.73/24 dhcp fe80::
Routes: default via: and the same
Using Linux rpi 6.5.0-1020-raspi#23-Ubuntu.
resolv.conf
file missing. Then I create it, same result.
$ resolvectl status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found
$ ls -l resolv.conf
-rw-r--r-- l root 57 nov 9 05:45 resolv.conf
You show the output of
resolvectl status
as:This indicates that
systemd-resolved
is not running.Additionally, the output of
ls -l /etc/resolv.conf
indicates that it's a static file and not a symlink to/etc/systemd/resolve/stub-resolv.conf
, which would be the default setup. You don't list the contents of this file nor why this has been changed.To solve your issue, first delete
/etc/resolv.conf
:Enable
systemd-resolved
:Then start
systemd-resolved
:Doing this will automatically create the symlink from
/etc/resolv.conf
to/etc/systemd/resolve/stub-resolv.conf
.Answer moved here from OP's question.