Network configuration

Can somebody suggest me how network configuration should be done on f39 and f40? AFAIK, there are systemd-networkd and NetworkManager. What is the default and what should I use?

There is a netplan package as well (but not installed as default). Is this the way to go in the future?

NetworkManager is the default solution and is best suited for desktop integration.
systemd-networkd requires manual installation, but works fine for servers, VMs, and containers.

What is the process for switching from network manager to networkd in F41?
My previous process of disabling network manager and enabling networkd no longer works.

# systemctl enable network.service 
Failed to enable unit: Unit network.service does not exist
# systemctl enable networkd.service 
Failed to enable unit: Unit networkd.service does not exist
# dnf list *networkd*
Updating and loading repositories:
Repositories loaded.
Installed packages
systemd-networkd.x86_64                 256.8-1.fc41 <unknown>
systemd-networkd-defaults.noarch        256.8-1.fc41 updates

Available packages
netplan-default-backend-networkd.noarch 0.105-8.fc41 fedora
sudo systemctl enable systemd-networkd.service --now
sudo systemctl mask NetworkManager.service --now

I think you have the wrong service name:

❯ systemctl list-unit-files *network*
UNIT FILE                                   STATE     PRESET
systemd-network-generator.service           enabled   enabled
systemd-networkd-persistent-storage.service static    -
systemd-networkd-wait-online.service        disabled  disabled
systemd-networkd-wait-online@.service       disabled  disabled
systemd-networkd.service                    disabled  disabled
systemd-networkd.socket                     disabled  disabled
network-online.target                       static    -
network-pre.target                          static    -
network.target                              static    -

I think you’re looking for systemd-networkd.service rather than networkd.service

So, to sum it up, network.service has been renamed into systemd-networkd.service?
Just what we needed!

I’ve only used systemd-networkd to refer to it, so I don’t know what other aliases it may have had.

I’m fairly sure that the plain network.service referred to the legacy ifup scripts which were removed in F41 along with the deprecated ISC dhcp client - see the Change Proposal and links for more explanation of that.

Or more precisely, /etc/rc.d/init.d/network, which via systemd-sysv-generator crates the network.service unit file.

1 Like