I had a (headless) server running 18.04LTS. On it ran some standard software: Apache, Docker, SSH, etc.

I ran do-release-upgrade and after a seemingly normal set of questions and actions, a reboot was required. After the reboot, I lost all connection to it. Sites didn't load, SSH timed out. Ubuntu 19.10 is installed, but nothing works.

Via the VPS hoster interface I am able to log in from a browser.

How can I configure my server to be connected to internet (without being connected to internet)

Basic flow:

  1. I boot, login, sudo su
  2. ip a shows for eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 02:xx:xx:xx:xx:27 brd ff:ff:ff:ff:ff:ff
  1. ip link set dev eth0 up then ip a s eth0 changes to
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:xx:xx:xx:xx:27 brd ff:ff:ff:ff:ff:ff
    inet6 fe80:xx:xx:xx:xx:xx:xxx/64 scope link
        valid_lft forever preferred_lft forever
  1. Adding the network with ip addr add [my ipv4 address]/22 dev eth0 changes it to
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:xx:xx:xx:xx:27 brd ff:ff:ff:ff:ff:ff
    inet [my ipv4 address]/22 scope scope eth0
        valid_lft forever preferred_lft forever
    inet6 fe80:xx:xx:xx:xx:xx:xxx/64 scope link
        valid_lft forever preferred_lft forever
  1. dkpg-reconfigure network-manager gives network-manager is broken or not fully installed. I tried this because at some point, I regained connectivity via dkpg-reconfigure network-manager only to lose it some minor updates and reboots later.

Important files


auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp


# [Contains only comments, no config]


does not exist

Commands unavailable:

  • dhclient, ping, netstat, ifup, ifdown, mtr, ifconfig, arp, route, ethtool, nmcli

More things I tried

  • Installing network-manager or dhclient from cache: There are no deb-files in /var/cache/apt/archives. There's still a lock file though.
  • Trying to see the difference between no connection and not resolving the DNS. I used echo 1234 | netcat -v 80 since ping is missing, and got a Network is unreachable, so it's not just the DNS.
  • Mounting a volume, so I can load missing files that way. Sadly, couldn't mount because nfs-common isn't installed, it seems.
  • Querying the networking service: Unit networking.service could not be found.
  • Checking the status of systemd-networkd.service: it's active and running, but in logs it only reports eth0: Gained IPv6LL then Enumeration completed. Nothing on IPv4. Will check that German wiki page now.
  • 1
    Maybe sudo cat /var/log/apt/term.log can show you what happened during the upgrade. While sudo cat /var/log/boot.log can maybe tell you something about some startup issues. Did you try sudo dpkg --reconfigure -a and sudo apt-get install -f after sudo apt update? Are your /etc/apt/sources.list entries set correctly? Had a look what sudo tasksel tells about installed meta packages? – starkus Mar 30 '20 at 13:06
  • 1
    term.log shows I removed network-manager, after I fixed the connectivity, right before I lost it again, probably as part of removing gnome. I cannot reinstall though without internet. I run on OpenStack so will look into mounting a volume... – TacoV Mar 31 '20 at 13:17
  • 1
    sudo apt-get --no-install-recommends install network-manager would fix your dependencies issues. But without connection I'm not sure if it gets installed from the archives. But you could try sudo dpkg -i /var/cache/apt/archives/network-manager*.deb. In this case I'm not sure if the network-manager-gnome also gets installed, but you could complete the line before the* in a way that it won't. You could try sudo dhclient eth0, or nmcli dev status and nmcli con up YOURCONNECTION. The dhclient opinion would be used if network-manager is not installed. – starkus Mar 31 '20 at 16:39
  • 1
    Ah, didn't noticed you've edited and updated your question and that those commands are unavailable. if it's in the archives you maybe can install dhclient with sudo dpkg -i /var/cache/apt/archives/isc-dhcp-client*.deb. – starkus Mar 31 '20 at 17:22
  • 1
    What does sudo systemctl status networking.service tell you? Are you able to start it? Does sudo systemctl start systemd-networkd.service help you somehow? This page is in german language, but maybe worth to read through: wiki.ubuntuusers.de/systemd/networkd – starkus Mar 31 '20 at 17:27


The German wiki from starkus helped me find the solution!

I added a config file in /etc/systemd/network containing

Address=[my address]/22

It shouldn't work, as another (working) system lacks this file too, but it does, so I'm gonna quickly snapshot it before I do anything else. Everything works, nothing seems broken, my understanding is still minimal, but my relieve is huge.

Thanks for the input, if someone can formulate it in an answer that explains it I can accept that as answer.

(Now let's hope this time it keeps working)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.