systemd-networkd is inactive by default since ubuntu 23.10?

Bug #2066700 reported by cheng cheng
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

In the Ubuntu-23.10-64-Desktop and Ubuntu-24.04-64-Desktop, I run the commands as below. Found the systemd-networkd is inactive by default. In the ubuntu 22.10 and ubuntu 22.04 the systemd-networkd is active by default. I want to ask if there were any changes made since 23.10?

root@sc2-10-243-22-106:~# systemctl status systemd-networkd
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   FD Store: 0 (limit: 512)

root@sc2-10-243-22-106:~# systemctl status NetworkManager
● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.se>
     Active: active (running) since Thu 2024-05-23 02:21:52 UT>
       Docs: man:NetworkManager(8)
   Main PID: 1134 (NetworkManager)
      Tasks: 4 (limit: 4609)
     Memory: 16.6M (peak: 32.7M)
        CPU: 2.721s
     CGroup: /system.slice/NetworkManager.service
             └─1134 /usr/sbin/NetworkManager --no-daemon

root@sc2-10-243-22-106:~# netplan status
     Online state: online
    DNS Addresses: 127.0.0.53 (stub)
       DNS Search: nimbus.eng.vmware.com
                   eng.vmware.com
                   vmware.com

● 1: lo ethernet UNKNOWN/UP (unmanaged)
      MAC Address: 00:00:00:00:00:00
        Addresses: 127.0.0.1/8
                   ::1/128

● 2: eth0 ethernet UP (NetworkManager: eth0)
      MAC Address: 00:50:56:b2:ec:a2 (VMware)
        Addresses: 10.243.22.106/20 (dhcp)
                   2606:9680:2001:2:b7c5:7bc2:3df4:4a25/64
                   2606:9680:2001:2:250:56ff:feb2:eca2/64
                   fe80::250:56ff:feb2:eca2/64 (link)
    DNS Addresses: 10.166.1.1
                   10.166.1.2
                   10.142.7.2
       DNS Search: nimbus.eng.vmware.com
                   eng.vmware.com
                   vmware.com
           Routes: default via 10.243.31.254 from 10.243.22.106
metric 100 (dhcp)
                   10.243.16.0/20 from 10.243.22.106 metric 100
(link)
                   2606:9680:2001:2::/64 metric 256
                   fe80::/64 metric 256
                   default via fe80::50:56ff:fe56:4453 metric
1024 (ra)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Pengpeng Sun (pengpengs)
affects: network-manager (Ubuntu) → netplan.io (Ubuntu)
Revision history for this message
Nick Rosbrook (enr0n) wrote :

As far as I know, systemd-networkd has never been enabled by default for Desktop installations. It is enabled by default on Server installations.

Changed in netplan.io (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
cheng cheng (chcheng) wrote :

Hi Nick,

Got it. Thanks a lot for your reply.

Best Regards,
Cheng

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

Hi Nick,

Thanks for the info! So for Desktop, it's always NetworkManager as Netplan renderer; and for Server, it's systemd-networkd.
Another question, what if there is no renderer set in Netplan Yaml file, can Netplan load network configuration correctly?

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

For example:

network:
  version: 2
  ethernets:
    enp3s0:
      dhcp4: true

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

If no renderer is set anywhere in your YAMLs it will default to networkd.

Revision history for this message
cheng cheng (chcheng) wrote :

Hi Danilo,

Thanks for your reply.
In the Desktop version vm, as the systemd-networkd is disactive, when no renderer is set anywhere in the YAMLs, will it change to use Network Manager for the network configuration during "netplan apply"?

I tested on the ubuntu 23.10 Desktop vm, no render is set, the yaml file is as below:
  network:
  version: 2
  ethernets:
    eth0:
      dhcp4: yes
      dhcp4-overrides:
        use-dns: true
      dhcp6: yes
      dhcp6-overrides:
        use-dns: true

 Run the 'netplan apply' command, journalctl | grep netplan, it shows as below, does it mean it uses Network Manager at this configuration?

May 31 02:08:47 sc2-10-186-22-84 NetworkManager[852]: <info> [1717121327.8018] policy: auto-activating connection 'netplan-eth0' (626dd384-8b3d-3690-9511-192b2c79b3fd)
May 31 02:08:47 sc2-10-186-22-84 NetworkManager[852]: <info> [1717121327.8046] device (eth0): Activation: starting connection 'netplan-eth0' (626dd384-8b3d-3690-9511-192b2c79b3fd)
May 31 02:08:47 sc2-10-186-22-84 NetworkManager[852]: <info> [1717121327.8687] policy: set 'netplan-eth0' (eth0) as default for IPv4 routing and DNS

Revision history for this message
cheng cheng (chcheng) wrote :

Hi Ubuntu expert,

May I ask how can one differentiate whether an OS is a desktop or a server within the OS itself?
Can the presence of "/etc/netplan/01-network-manager-all.yaml" be used to differentiate a desktop environment?

Best Regards,
Cheng

Changed in netplan.io (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Lukas Märdian (slyon) wrote :

More recently the Desktop enablement configuration moved to /usr/lib/netplan/00-network-manager-all.yaml

Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

To differentiate an Ubuntu server system from an Ubuntu desktop system you should check with seeds/meta-package you have installed.

e.g.:
$ dpkg -l | grep "ubuntu-desktop-minimal" # or "ubuntu-server-minimal"

This is generated through the Ubuntu seeds and could be the authoritative way to check the type of system you're using.

PS: I'm closing this bug as "Invalid", as stated in comment #2 networkd is only enabled on Ubuntu server systems, NetworkManager only on Ubuntu desktop systems (by default), so I guess we're seeing the expeted behavior here.

Please comment & re-open if you feel otherwise.

Changed in netplan.io (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.