Welcome to the Linux Foundation Forum!

Network configuration (networking service and systemd-networkd)

k0dard Posts: 58
edited March 4 in LFS211 Class Forum


I have a question concerning network configuration.

If I understood well netplan is just a front end tool for generating configuration files either for systemd-networkd or Network Manager.

Since it's a Ubuntu specific thing I decided to remove it from my Ubuntu 20.04 server and to use systemd-networkd directly.

I've managed to do that and everything works fine but while exploring around the system I've noticed that different services created files under /etc/network/ subdirectories (like if-down.d, if-up.d, etc). I do not have /etc/network/interfaces file and /etc/network/interfaces.d is empty

However, when I do # systemctl status networking I see that the service is running but I also see error

ifquery: couldn't open interfaces file "/etc/network/interfaces": No such file or directory

So I was wondering what is the link between networking service and networkd-systemd and is it normal to run both services at the same time ?

I saw some tutorials online where people remove netplan and go for networking service, but they also disable systemd-networkd. Can systemd-networkd work without networking ?

Would it be safe to disable networking seeing that postfix, bind9 and vlan have all created files inside /etc/network/intefaces ?

Sorry if it's a stupid question, but I am a bit confused about this...

Thanks in advance for your time :)


  • lee42x
    lee42x Posts: 317

    Sorry for the delay.
    There are three methods to configure the network. As discovered, netplan is a Ubuntu tool to create a configuration file for networking. netplan can create either a "NetworkManager configuration or a "systemd-networkd" configuration file at system boot time.
    NetworkManager is common across most distros and has several interfaces, a GUI, curses (text menus) and a command line. This is the default networking management used in our class VM's.

    As for systemd-networkd, it uses its own set of configuration files that you can edit with your favourite editor.

    I believe the oldest of the bunch "network" is still functional to maintain compatibility, but it is not the favourite.

    Initially I would recommend NetworkManager as it has a variety of interfaces.
    Some distros are using "systemd-networkd" and it works fine, just a little more challenging to configure.

    As for "/etc/network/interfaces" , this is the classic networking configuration file, from the Ubuntu network package, if it exists NetworkManager will use it.

    Regards, Lee

  • k0dard
    k0dard Posts: 58

    Thanks a lot for your reply !

    Everything is clear now.

    In the meantime I also did some research and came to conclusion (and someone correct me if I am wrong) that one can run both networking service and systemd-networkd as long as there is no overlapping (they don't manage the same interfaces)



Upcoming Training