Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Edge-Friend: Fast and Deterministic Catmull-Clark Subdivision Surfaces
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Real-Time Procedural Generation with GPU Work Graphs
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
    • Towards Practical Meshlet Compression
  • About
  • Archive

Fixing network after Ubuntu 19.04 to 19.10 upgrade

October 26, 2019
  • Server
approximately 3 minutes to read

I updated my server from Ubuntu 19.04 to 19.10 recently, and ran into a rather curious issue: My virtual machines connected to the network bridge would continue to work fine, and I could connect to the host via SSH as well, but any kind of DNS lookup on the host would fail. I.e. you’d run nslookup anteru.net and you’d get a SERVFAIL response. After you manually restarted the resolver using systemctl restart systemd-resolved, things would immediately work again on the host. I’ve been poking around without much luck and eventually turned to askubuntu.com. That paid off big time – I did get the right hint there to solve my issue, which is: Migrate to netplan!

The original guide linked is a bit shy on how to do it properly and how we ended up here in the first place, so here’s the long version: Before Ubuntu 18.04, you’d manage your network using /etc/network/interfaces and ifupdown. Additionally, the DNS resolver was configured using resolveconf. Since 18.04, Ubuntu server uses systemd-networkd for network setup, and to ease the configuration, netplan is used to create configuration files (and systemd-resolved is taking care of resolving.) You’ll be wondering what this netplan thing is good for: It’s a unified way to create configurations for both systemd-networkd and NetworkManager, the latter being most likely what you’re using on your desktop.

With that information at hand, our goal is clear – move to systemd-networkd and netplan manually. This is fairly simple now that we know what we’re doing. I’ll recommend using some kind of console access to do this, as I had the network disconnect me over SSH.

Let’s start by writing the netplan configuration. This is pretty much a 1:1 port of your /etc/network/interfaces file. What I needed was a bridge (there’s a simple example of how to use it) and I wanted to set the forward delay parameter on it. I stuffed this into /etc/netplan/01-config.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no

  bridges:
    br0:
      interfaces: [eno1]
        dhcp4: yes 
        dhcp6: yes
        parameters:
          forward-delay: 5

We’re nearly done here. After a quick netplan try to make sure the config is valid, let’s run netplan apply to generate the configuration files. From here on, the network should be configured correctly. The only remaining bit is to remove things we don’t need:

  • apt remove --purge ifupdown resolveconf – no longer needed, and --purge makes sure we remove all related configuration files.
  • systemctl stop NetworkManager && systemctl disable NetworkManager – we’re using systemd-networkd, so no need for NetworkManager to stick around.
  • rm /etc/network/interfaces just in case they’re still floating around

And that’s it – your server should be working again, without having to reinstall from scratch!

Previous post
Next post

Recent posts

  • Data formats: Why CSV and JSON aren't the best
    Posted on 2024-12-29
  • Replacing cron with systemd-timers
    Posted on 2024-04-21
  • Open Source Maintenance
    Posted on 2024-04-02
  • Angular, Caddy, Gunicorn and Django
    Posted on 2023-10-21
  • Effective meetings
    Posted on 2022-09-12
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

Anteru NIV_Anteru
Contents © 2005-2025
Anteru
Imprint/Impressum
Privacy policy/Datenschutz
Made with Liara
Last updated October 26, 2019