Droplet lost network config after update from 18.04 to 20.04 LTS

I have a droplet that was on Ubuntu 18.04 LTS, which I upgraded to Ubuntu 20.04 LTS using do-release-upgrade.

The upgrade completed successfully, but the droplet no longer configures its network correctly on startup. This means that whenever the droplet is rebooted, I need to enter the recovery console and execute the following commands to manually fix the networking. (After doing that, the network is fine until the next reboot.)

ifconfig eth0 up <ipv4>/20
ifoncifg etho inet6 add <ipv6>/64
route add default gw <ipv4gateway>
route -A inet6 add default gw <ipv6gateway>

in fact, the droplet initially didn’t have an eth0 interface at all anymore, which I only got back by adding the following udev rule:

# cat /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<macaddress>", NAME="eth0"

Is there something I need to do to let the droplet configure its network on startup again?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
July 31, 2023

Hey @christophmantaray,

You should be using Netplan as it’s the network standard starting from Ubuntu 18.04. The configuration is stored in the /etc/netplan/ directory in a file with a .yaml extension. This file will control how your droplet configures its network interfaces.

Check if this file exists and is configured correctly. A basic example of a configuration for both IPv4 and IPv6 might look like this:

    version: 2
            - <ipv4>/18
            - <ipv4>/16
                macaddress: <macaddress>
            mtu: 1500
                search: []
            -   to:
                via: <gateway>
            set-name: eth0

You can apply these settings without rebooting with the command:

sudo netplan apply

If this doesn’t work, or the configuration file doesn’t exist in the first place, there might be some other underlying issue. Consider contacting DigitalOcean support for more specific guidance. They will be happy to help with your network issue

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel