Why is systemd-networkd not enabled from the beginning?

Hello Friends

For Debian 12 as Server I am trying to define a static IP. About the official documentation I read the following links:

Thus in the /etc/systemd/network directory was created the static.network file with its respective settings.

Now the reason of this post. In both links are covered about

  • How to define DHCP and Static IPs

but is indicated the following in the second link:

Next enable systemd-networkd. You don’t need to start the service yet because your old network is still running and there is currently no systemd-networkd defined.

systemctl enable systemd-networkd

If is executed the systemctl list-units | grep network command appears the following:

networking.service load active exited Raise Network interfaces
network.target     load active active Network

And for the systemctl list-unit-files | grep network command appears the following:

networking.service                    enabled  enabled
systemd-network-generator.service     disabled enabled
systemd-networkd-wait-online.service  disabled disabled
systemd-networkd-wait-online@.service disabled enabled
systemd-networkd.service              disabled enabled
systemd-networkd.socket               disabled enabled
network-online.target                 static   -
network-pre.target                    static   -
network.target                        static   -

Until here:

  • The “network service manager” is networking.service
  • systemd-networkd.service is disabled

Even more, the networkctl list command in its output has as the first line the following:

WARNING: systemd-networkd is not running, output will be incomplete.

Therefore if to define DHCP and Static IPs is mandatory work with systemd-networkd

Question

  • Why from the beginning is disabled the systemd-networkd service?

I want understand the reason about this approach

Therefore from the previous question arises a parallel question as follows:

  • What does networking.service have in special over systemd-networkd?

Thank You

1 Like

I dont understand enough of this to be sure, but I would ask you to note that only one networking daemon should be enabled at any time.

You are learning that systemd is overly complicated.
Consider using a non-systemd distro (preferably dinit) 
 it will make your config work simpler.

4 Likes

Hello Neville

I dont understand enough of this to be sure, but I would ask you to note that only one networking daemon should be enabled at any time.

Yes correct, just to sharp the idea remember

Therefore if to define DHCP and Static IPs is mandatory work with systemd-networkd

  • Why from the beginning is disabled the systemd-networkd service?

In other words the official docs works with systemd-networkd but the current daemon is networking.service. Is it other different than the systemd world, right?

You are learning that systemd is overly complicated.

Practice and practice 
 it has its own “tricks”

Consider using a non-systemd distro (preferably dinit) 
 it will make your config work simpler.

Thanks for the suggestion.

Stay safe

2 Likes

I dont know networking.service, but its name sounds like it is part of systemd too.?.. are you sure it is a daemon?

 ie if you look with ‘ps ax’ is it running?.. or is it just some name for a service and not a real daemon.

Systemd seems to name all sorts of abstract things , that dont exist or run as a program
 it is hard to know what they are. Dont let them confuse you
 find out what the real daemon process is
 that is the only thing that matters.

Other init systems do not use these mysterious abstract entities. There are daemon processes that are either running or not running, and that is all there is.

3 Likes

Probably 'cause your system is not using it? Maybe NetworkManager?

It sounds like you don’t know enough about what’s going on - don’t touch it - the installer defaults are usually okay for most people and smart enough. I hardly ever have to tweak my network configuration - it mostly just works from the moment of install (I mostly use DHCP - but - e.g. on my desktop machine with Pop!_OS 22.04 - I run my Synergy KVM “server” - so it needs a fixed IP address - so I set it in the Gnome Settings “Network” applet - but - its also outside the DHCP scope of my router, and regardless, I have a static lease set for that IP address in my router, regardless).

Pop!_OS 22.04 system (x86_64 on a ThinkPad E495) :

╭─x@fenrix ~  
╰─➀  sudo systemctl status systemd-networkd
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)

Debian 9 system (Raspbian 9) :

╭─x@telesto ~  
╰─➀  sudo systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-networkd.service(8)

Debian 12 system (Raspbian 12) :

╭─x@frambo ~  
╰─➀  sudo systemctl status systemd-networkd
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; preset: enabled)
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)an 12 system (Raspbian 12) :

Debian 11 system (Raspbian 11) :

x@anthe  ~  sudo systemctl status systemd-networkd
● systemd-networkd.service - Network Service
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8

The ONLY system I have that’s running systemd-networkd is Ubuntu 24.04 on a Raspberry Pi5 :

╭─x@razuberi ~  
╰─➀  sudo systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; preset: enabled)
     Active: active (running) since Tue 2025-03-11 09:15:00 AWST; 2 weeks 0 days ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   Main PID: 14519 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 9061)
   FD Store: 0 (limit: 512)
     Memory: 2.4M (peak: 3.3M swap: 244.0K swap peak: 244.0K zswap: 34.0K)
        CPU: 1min 38.464s
     CGroup: /system.slice/systemd-networkd.service
             └─14519 /usr/lib/systemd/systemd-networkd

Note: it says its disabled - but it’s still running (“active (running)”) - don’t ask me to explain why, I don’t know and I don’t care enough to find the answer.

If I look at my network settings on the Pi5 (Ubuntu 24.04) :

╭─x@razuberi ~  
╰─➀  nmcli -p device                                                                                                                                          2 ↔
=====================
  Status of devices
=====================
DEVICE         TYPE      STATE                   CONNECTION   
------------------------------------------------------------------------------------
eth0           ethernet  connected               netplan-eth0 
wlan0          wifi      connected               REDACTED   
lo             loopback  connected (externally)  lo           
p2p-dev-wlan0  wifi-p2p  disconnected

This shows that the NetworkManager config is coming via netplan (“netplan-eth0”)

My other Ubuntu 24.04 (a Dell Latitude 7270) isn’t running systemd-networkd :

╭─x@mimasii ~  
╰─➀  systemctl status systemd-networkd                                                                                     3 ↔
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; preset: enabled)
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   FD Store: 0 (limit: 512)

It’s “loaded” but inactive
 So it’s not really running


All the above are working just fine for me - I don’t need to fiddle with anything there


My Debian 9 uses dhcpcd, Debian 11 and 12 are using NetworkManager, Ubuntu 24.04 x64 is using netplan / NetworkManager (renderer: NetworkManager), Pop!_OS is using NetworkManager


Note : there is no systemd unit file for systemd-networkd on my RHEL9 VM - so it’s purely running NetworkManager and using NetworkManager alone


So this begs the question - WHY do you think you need to fiddle with this stuff? Don’t mean to sound rude - but I’m curious what you’re hoping to achieve


5 Likes

Hello and thanks for the replies

Neville

I dont know networking.service

+1

but its name sounds like it is part of systemd too.?.. are you sure it is a daemon?

Being honest I always assumed everything shown through the systemctl command and having .service in its Unit Name was a daemon.


 ie if you look with ‘ps ax’ is it running?.

It does not appear

or is it just some name for a service and not a real daemon.

Oh that sentence 
 :cry: it changes now my perspective about services and daemon 
 well more to learn through research :nerd_face:

Systemd seems to name all sorts of abstract things , that dont exist or run as a program
 it is hard to know what they are. Dont let them confuse you
 find out what the real daemon process is
 that is the only thing that matters.

Thank you .. that’s why I use the systemctl cat <unitname> too for more details

Other init systems do not use these mysterious abstract entities. There are daemon processes that are either running or not running, and that is all there is.

Oh 


Dan

Probably 'cause your system is not using it? Maybe NetworkManager?

I thought the same, but in other machines where Debian 12 as server was installed and NetworkManager never was installed the output is the same is reported in the OP

Yes, I know I indicated in other post that NetworkManager was installed in Debian 12 server, it is true. It was in other machine and the fact NetworkManager was already uninstalled because was not possible integrate in peace NetworkManager in Debian. Thus to solve the situation of the static IP address I found the 2 links shared

It sounds like you don’t know enough about what’s going on - don’t touch it - the installer defaults are usually okay for most people and smart enough.

Yes, I am agree, but because I am working with VirtualBox, the Debian instances are in isolated environments. Thus if something goes wrong is ok.

I hardly ever have to tweak my network configuration - it mostly just works from the moment of install (I mostly use DHCP - but - e.g. on my desktop machine with Pop!_OS 22.04 - I run my Synergy KVM “server” - so it needs a fixed IP address - so I set it in the Gnome Settings “Network” applet - but - its also outside the DHCP scope of my router, and regardless, I have a static lease set for that IP address in my router, regardless ).

I always work with static ips in my Lan for SSH and network access 
 and well to work with Web Applications with Spring. So I need the static ips. So far the goal was accomplished in peace for Fedora and Ubuntu. Now playing with Debian. It is part of the learning curve when anyone starts with a new distro. Let’s see what happens when I play with openSuSE too.

Thanks for the commands

Just in case I share the same commands by my side

  • systemctl-status-systemd-networkd

  • systemctl-status-networking.service

The nmcli command is not installed. Thus nothing involved about NetworkManager in this Debian 12 Server instance

My Debian 9 uses dhcpcd, Debian 11 and 12 are using NetworkManager, Ubuntu 24.04 x64 is using netplan / NetworkManager (renderer: NetworkManager ), Pop!_OS is using NetworkManager


I tried the integration of NetworkManager in Debian 12 server was not possible. It is other history. Anyway the nmcli command would be installed only for referential report purposes . Anyway about Debian I found the 2 links shared in the OP and the syntax of the configuration file is not complicated as YAML. Thus I decided to work with the official approach of Debian.

Note : there is no systemd unit file for systemd-networkd on my RHEL9 VM - so it’s purely running NetworkManager and using NetworkManager alone


It has a lot of sense because Fedora Server 41 works by default with NetworkManager too (nmcli)

So this begs the question - WHY do you think you need to fiddle with this stuff? Don’t mean to sound rude - but I’m curious what you’re hoping to achieve


No offense taken. Just to be clear:

  • Fedora : NetworkManager (nmcli command)
  • Ubuntu: Netplan (YAML)

Because I found more practical use the nmcli command:

  • For Ubuntu: I tried move from to YAML to the nmcli command. I remember in few places and even by you the key line: renderer: NetworkManager 
 and other settings. Well it did not work as expected. It is other history
  • For Debian: I tried use NetworkManager and failed.

Thus for experimental purposes I tried to use these 3 OS in peace with the same approach of configuration NetworkManager.

For Ubuntu the reports of device and connections are not ok (there are no neither lo nor enp0s3) and even when is created a device and connection is impossible “up” a connection. Almost the same situation with Debian for enp0s3. My unique assumption is that because each one was installed through VB the network settings would be the problem. Of course it is an assumption because it works fine for Fedora Server (installed through VB too)

Anyway I already have learned 3 ways to configure networks, it for each OS, and I did do a deep research of the systemctl and nmcli commands. So it is not a waste of time

Thanks to all

1 Like

So do I.
I use various methods

  • do the static ip with NM
  • disable the static ip for NM and use ifupdown for the static ip
  • use dhcpcd for everything

It depends which distro. Most distros setup something for a DHCP internet link at install time. I tend to leave that alone as it is separate from the LAN with static ip’s.
My modem is not on the LAN
 it is separate and requires a separate ethernet or wireless interface.

Dont ask me why I configured it that way?
I think because I used to use the main machine as a gateway
 it has 2 NIC’s.

1 Like