0

My Raspberry Pi 3B+ is running on Ubuntu Server 18.04. I have it connected to my PC via ethernet dongle in link-local mode.

I tried adding a static IP on the Pi with netplan, but I couldn't connect at all. I'm getting a "no route to host" error.

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      addresses: [169.254.2.14/24]

I used this same netplan on Ubuntu MATE 18.04 (running on Pi 3) which worked fine.

I can, however, connect through WiFi, but the problem is that my school's WiFi will make it impossible for me to SSH it via wireless.

1 Answers1

1

Must've been super groggy, because I didn't realize that the subnet I set for the Pi is 24, not 16.

After changing that and setting the renderer to networkd, it now works.

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      addresses: [169.254.2.14/16]

Though I set NetworkManager's ethernet.enabled to true, so I thought that should've worked (# snap set network-mananger ethernet.enable=true, which I got from here).

In addition, I had to run # systemctl disable systemd-networkd-wait-online.service & # systemctl mask systemd-networkd-wait-online.service in order for the Pi to boot faster (thanks to this answer). Leaving it enabled made the Pi stuck & waiting for connection (correct me if I'm wrong).