Skip to content

Website & Server Help

Unlimited Webspace Help

Menu
  • Home
  • Apps
  • Website
    • Sending email from a WordPress website hosted on an IONOS server
    • How to increase Upload Max Filesize
    • How to reset a WordPress password
    • 22 Ways To Speed-Up A Plesk Website
  • Server
    • Linux or Plesk Server Error 500
    • Windows Server: File cannot be loaded. The file is not digitally signed.
    • Adding or modifying IP addresses on a Linux server
    • Installing Remote Desktop on Debian 12
    • Installing Remote Desktop on Ubuntu 22.04
    • How To Install a Let’s Encrypt SSL in Apache on Debian/Ubuntu
  • Favs
    • How to Connect to a Server
    • The Ultimate Guide to Setting Up a Proper Plesk Email Server With IONOS
    • The Ultimate IONOS Migration Guide
    • Help! My Plesk Websites Are Down!
    • Running tests for a slow server or dropped packets
    • Checking File System and Hard Drive Health
Menu

Troubleshooting Ubuntu 22.04 With Netplan

Posted on December 28, 2023 by admin

Since Ubuntu 16.10, the developers switched to using systemd-networkd by default on the server editions, moving away from ifupdown. On their Ubuntu Desktop editions, NetworkManager is still used. Having to determine and differentiate between two different networking configurations became confusing. Thus, Netplan was born in Ubuntu 18.04 and continues to be used. Netplan reads .yaml files within the /etc/netplan/ directory, and then automatically creates network configuration files for /run/systemd/network/ or /run/NetworkManager/ depending on the system configuration.

Check that Netplan is installed:

dpkg -l | grep netplan.io

List all network devices:

ip link

To show your current configuration from the system state:

netplan get

To show a detailed overview of your system’s current network configuration:

netplan status --all

List all your Netplan config files:

ls /etc/netplan/

If there is more than one file, you only have one ethernet card, you are having networking issues, and you’ve saved a backup, I recommend deleting all but one .yaml and keep networking within one file for simplicity.

View the Netplan config:

cat /etc/netplan/00-Public_network.yaml

Of course, your yaml file may be named differently.

If you’re having issues on a server with Ubuntu 22.04 you can try replacing your config with this default config (using a text editor such as nano or vim):

network:
  ethernets:
    ens192:
      dhcp4: true
      accept-ra: true
  version: 2

If you had a different ethernet name from the ip link output then replace it.

Now apply your new configuration:

netplan apply

Confirm that the IP is being read correctly:

ip addr


If this did not work, IPs are not being read, or the DHCP server is unavailable, you can try a static IP configuration instead:

network:
  ethernets:
    ens192:
      dhcp4: false
      dhcp6: false
      addresses:
        – 74.208.82.33/32
        – fe80::a00:10a/64
    gateway4: 10.255.255.1
    gateway6: fe80::a00:101
    nameservers:
      addresses:
        – 212.227.123.16
        – 212.227.123.17
    routes:
      – to: default
      via: 10.255.255.1
      – to: default
      via: fe80::1

Of course replace 74.208.82.33 with your server’s public IP, and /32 with the subnet provided by your host. Same thing for the IPv6 and /64. The gateway and nameserver provided are default for IONOS Cloud, otherwise they should be changed according to your provider.


If the command dpkg -l | grep netplan.io returned no output, or netplan returns command not found, it means Netplan is not being used to manage your networking.

If the netplan.io package is not installed and the /etc/netplan directory does not exist, netplan has not been installed. In this case, do not install netplan, but follow the steps described in the following article:

Adding a Public IPv4 and IPv6 Address to a Cloud Server or Virtual Private Server (IONOS)

Special Offer

The internet's fastest, cheapest, unlimited bandwidth VPS

VPS
1core | 1GB RAM | 10GB NVMe
Unlimited Bandwidth | 1Gbps
$2/month - risk free