systemd-networkd, wait-online, and .link files to speed up boot times and improve network performance.Imagine rebooting a server after a kernel update, only to watch the console sit on “A start job is running for Wait for Network to be Configured” for nearly two minutes.
Nothing may be broken. systemd-networkd-wait-online is simply waiting for managed interfaces to reach the required state, potentially including a spare NIC with no cable, until its 120-second timeout expires.
systemd-networkd, the network manager built into systemd and commonly used by Ubuntu Server through Netplan, provides several ways to reduce unnecessary boot delays and tune network interfaces.
With a few targeted changes to systemd-networkd-wait-online, .network files, and .link files, you can make servers boot faster and configure network performance to suit your workload.
How systemd-networkd Reads Its Configuration
The settings in this guide belong to two main file types. .network files configure IP addresses, DHCP, routes, and DNS, while .link files control link-level properties such as ring buffers and other hardware settings applied by udev when a network device appears.
Files in /etc/systemd/network/ take precedence over files with the same name in /run/systemd/network/ or /usr/lib/systemd/network/. Drop-in directories ending in .d/ let you override selected settings without replacing an entire configuration file.
Before making changes, record the current network-related startup delays so you can compare the results afterward:
systemd-analyze blame | grep -i network
Prepare systemd-networkd on Ubuntu and Rocky Linux
First, identify which configuration file manages your network interface. On Ubuntu 26.04, Netplan can generate systemd-networkd configuration files under /run/systemd/network/. Check the interface named enp1s0:
networkctl status enp1s0
Example output (trimmed):
● 2: enp1s0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /run/systemd/network/10-netplan-enp1s0.network
State: routable (configured)
Because Netplan regenerates these runtime files, avoid editing them directly. For persistent network configuration changes, modify the appropriate YAML file under /etc/netplan/ and apply the changes using Netplan.
Alternatively, where supported, a native systemd-networkd drop-in can override selected settings without modifying the generated file. See the systemd.network documentation for drop-in behavior.
On Rocky Linux 10, NetworkManager is the default networking service. Before attempting to switch to systemd-networkd, verify that a compatible networkd package is available for your exact release. Do not assume that enabling EPEL or CRB will provide it.
If your environment supports the switch and you have prepared an equivalent network configuration, use the VM console or another out-of-band management method. Disabling NetworkManager before confirming the replacement configuration can disconnect SSH and make the server unreachable.
Once systemd-networkd is installed and enabled, create a matching .network file. For example, to configure DHCP on enp1s0:
sudo vi /etc/systemd/network/10-enp1s0.network
Add the following configuration:
# /etc/systemd/network/10-enp1s0.network [Match] Name=enp1s0 [Network] DHCP=ipv4
Save the file and exit the editor. This minimal example assumes that the interface should obtain its IPv4 address through DHCP; adapt it to your existing network configuration before applying it.
After editing a .network file, reload the configuration:
sudo networkctl reload
The reload command reads updated network configuration and can reconfigure affected interfaces. Verify the result with networkctl status enp1s0 before proceeding.
In the following sections, Ubuntu examples use the appropriate persistent Netplan configuration or a supported native drop-in, while Rocky Linux examples assume that systemd-networkd is available and already manages the interface.
Speed Up Boot with systemd-networkd-wait-online
Now that you know where network settings belong, start with the most common source of boot delays: systemd-networkd-wait-online.
1. Wait for Any Interface with –any
By default, systemd-networkd-wait-online waits for the managed interfaces to reach their required online state. On servers with multiple NICs, an unused or disconnected interface can delay startup.
To override the service’s default behavior, open a systemd drop-in:
sudo systemctl edit systemd-networkd-wait-online.service
Add the following configuration:
# /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online –any –timeout=30
The settings work as follows:
ExecStart=clears the original service command so you can replace it.--anyallows the command to finish when any one managed interface reaches the required online state, rather than waiting for all eligible interfaces.--timeout=30limits the wait to 30 seconds instead of the usual 120-second default.
-v systemd-networkd-wait-online before using the override. Also, --any is appropriate only when the system can operate with at least one online interface; it may allow boot to proceed before a required storage, application, or management network is ready.After saving the override, reload systemd and restart the service if appropriate:
sudo systemctl daemon-reload sudo systemctl restart systemd-networkd-wait-online.service
For a boot-time comparison, reboot during a suitable maintenance window and inspect the results:
systemd-analyze blame | grep -i network
Measure the actual boot delay before and after the change rather than assuming that reducing the timeout alone will improve the server’s total boot time.
2. Skip Secondary NICs with RequiredForOnline=no
A backup or storage NIC that is not always connected can unnecessarily delay boot if the wait-online service requires it to become operational. To exclude an interface from the online requirement, set RequiredForOnline=no in the matching .network file:
# /etc/systemd/network/20-backup.network [Match] Name=enp2s0 [Link] RequiredForOnline=no
Replace enp2s0 with the actual interface name. This setting tells systemd-networkd-wait-online that the interface does not need to be online for the system to satisfy its network readiness requirement.
On Ubuntu, if Netplan manages the interface, you can instead mark it optional in the Netplan YAML configuration:
network:
version: 2
ethernets:
enp2s0:
dhcp4: true
optional: true
The optional: true setting prevents Netplan’s wait-online integration from requiring that interface before continuing boot. It does not disable the interface or prevent it from obtaining an address later.
3. Wait Only for IPv4 with RequiredFamilyForOnline
On a dual-stack network, an interface might obtain an IPv4 address promptly but take longer to configure IPv6. If your services require only IPv4, configure the wait-online service to require that address family.
Add the following setting to the relevant .network file:
[Link] RequiredFamilyForOnline=ipv4
With this setting, the interface can satisfy the online requirement with IPv4 connectivity without waiting for IPv6 configuration to complete.
Cut DHCP and IPv6 Delays in the .network File
Next, remove address configuration your server does not need.
4. Request Only DHCPv4 with DHCP=ipv4
Use DHCP=ipv4 on IPv4-only networks to request DHCPv4 without enabling DHCPv6. This avoids unnecessary DHCPv6 configuration when your server does not use IPv6.
5. Ignore Router Advertisements with IPv6AcceptRA=no
On IPv4-only servers, add IPv6AcceptRA=no under [Network] to disable accepting IPv6 router advertisements:
[Network] IPv6AcceptRA=no
6. Disable Link-Local Addresses with LinkLocalAddressing=no
To prevent systemd-networkd from configuring IPv4 and IPv6 link-local addresses, add the following under [Network]:
[Network] LinkLocalAddressing=no
This disables automatic 169.254.x.x and fe80:: addresses. Leave link-local addressing enabled if any services or applications depend on it.
7. Skip DHCP Entirely with a Static Address
A static address eliminates the DHCP exchange during address configuration. Reserve 192.168.122.248 in libvirt first, then replace DHCP=ipv4 on Rocky Linux.
On Ubuntu, configure the address through Netplan YAML.
# /etc/systemd/network/10-enp1s0.network [Match] Name=enp1s0 [Network] Address=192.168.122.248/24 DNS=192.168.122.1 [Route] Gateway=192.168.122.1
8. Tune the Initial TCP Window with InitialCongestionWindow
To adjust the initial TCP congestion and advertised receive windows, add these settings to the default route configuration:
# /etc/systemd/network/10-enp1s0.network [Route] Gateway=192.168.122.1 InitialCongestionWindow=20 InitialAdvertisedReceiveWindow=20
Here:
InitialCongestionWindow=20sets the initial TCP congestion window to 20 segments, potentially improving performance for short transfers.InitialAdvertisedReceiveWindow=20sets the initial advertised TCP receive window to 20 segments, allowing peers to send more data before receiving acknowledgements, subject to TCP window scaling and other limits.
These settings affect TCP performance, not boot time, and their benefits depend on the workload and network conditions.
If these changes eliminate your two-minute network wait, share the guide with someone still dealing with slow server reboots.
9. Skip IPv6 Duplicate Address Checks with IPv6DuplicateAddressDetection=0
On networks where IPv6 addresses are managed to prevent conflicts, duplicate address detection helps avoid assigning an address already in use. Setting IPv6DuplicateAddressDetection=0 under [Network] disables duplicate address detection for IPv6 addresses:
[Network] IPv6DuplicateAddressDetection=0
Use this only when you can guarantee that assigned IPv6 addresses are unique.
10. Keep Addresses During Restarts with KeepConfiguration=yes
To retain existing network configuration when systemd-networkd restarts, configure KeepConfiguration= under [Network]:
[Network] KeepConfiguration=yes
This can help prevent addresses from being removed during a restart, but the exact behavior depends on the installed systemd version and configuration.
11. Stop DHCP Changing Settings with UseDNS=no and UseHostname=no
If you manage DNS servers and the hostname yourself, prevent DHCPv4 from supplying DNS settings or a hostname:
[DHCPv4] UseDNS=no UseHostname=no
This keeps DHCP-provided DNS and hostname information from overriding your intended configuration.
12. Stop Multicast Name Lookups with LLMNR=no and MulticastDNS=no
If your server does not need local multicast name resolution, disable LLMNR and multicast DNS under [Network]:
[Network] LLMNR=no MulticastDNS=no
13. Ignore Brief Link Drops with IgnoreCarrierLoss=3s
To prevent temporary carrier loss from immediately disrupting network configuration, set an appropriate grace period:
[Network] IgnoreCarrierLoss=3s
This allows systemd-networkd to tolerate brief link interruptions. Support and behavior depend on your systemd version and interface configuration.
Tune Network Card Throughput with .link Files
With address configuration streamlined, the next step is tuning network interfaces. Only the first matching .link file applies, so identify the active file with networkctl status before adding overrides.
For example, if the active link file is 99-default.link, create a drop-in:
sudo mkdir -p /etc/systemd/network/99-default.link.d sudo nano /etc/systemd/network/99-default.link.d/tuning.conf
On Rocky Linux, use sudo vi if nano is unavailable. This drop-in affects every interface matched by 99-default.link.
14. Enable Jumbo Frames with MTUBytes=9000
Jumbo frames can reduce packet-processing overhead for large transfers. Set MTUBytes=9000 under [Link] in the applicable .link file or .network file:
[Link] MTUBytes=9000
Configure jumbo frames only when the NIC, switch, and every relevant peer support the required MTU, otherwise, oversized packets can be dropped or fragmented, depending on the protocol and network path.
15. Enlarge Ring Buffers with RxBufferSize=max
Small NIC ring buffers can contribute to packet drops during traffic bursts. Check the supported values first:
sudo ethtool -g enp1s0
Then configure the receive and transmit ring sizes where the driver supports these settings:
# /etc/systemd/network/99-default.link.d/tuning.conf [Link] RxBufferSize=max TxBufferSize=max
Larger buffers can help under bursty workloads but may increase latency and memory usage. Verify the actual settings after applying the configuration.
16. Spread Traffic Across CPUs with CombinedChannels
Multiple hardware queues can distribute packet processing across CPUs. Check the supported channel counts:
sudo ethtool -l enp1s0
If supported by the NIC and systemd version, configure two combined channels:
[Link] CombinedChannels=2
For a KVM guest using virtio-net, the VM’s virtual NIC must also expose multiple queues. Configure the appropriate queue count in the VM’s libvirt XML before expecting additional queues to improve throughput.
17. Keep Hardware Offloads On with GenericReceiveOffload
Network offloads reduce CPU overhead by letting the NIC or driver handle some packet-processing work. Inspect the current settings:
sudo ethtool -k enp1s0
Where supported by your systemd version and driver, configure these options in the applicable .link file:
[Link] GenericReceiveOffload=yes GenericSegmentationOffload=yes TCPSegmentationOffload=yes
Verify the resulting settings with ethtool -k enp1s0. Driver support and virtualized NIC capabilities determine which offloads are available.
Because .link settings are applied when the device appears, some changes require the interface to be recreated or the system to reboot before taking effect.
18. Use the fq Queue Discipline with [FairQueueing]
The fq (Fair Queueing) queuing discipline supports packet pacing and can work well with TCP congestion-control algorithms such as BBR.
Configure the queue discipline using the appropriate network configuration mechanism for your systemd version. Then verify the active discipline:
sudo tc qdisc show dev enp1s0
The output should show fq
19. Monitor Link Traffic and Errors with networkctl status –stats
Tuning is useful only when you measure the results. Inspect interface statistics:
networkctl status --stats enp1s0
If packet drops and errors continue to rise under load, investigate NIC ring buffers, queue configuration, driver limitations, and physical or virtual network constraints.
Monitor networkd events alongside the statistics:
journalctl -u systemd-networkd -f
Compare the counters under similar workloads before and after each change to identify which adjustments actually improve performance.
Pro Tips for Safe systemd-networkd Tuning
Several of these changes can disconnect a remote server, so keep console access available, apply one change at a time, and rerun systemd-analyze blame to measure the impact.
A common cause of ineffective tuning is a misspelled or unsupported directive. For example, networkd may log an Unknown key name warning and ignore the setting instead of applying it. Check the current boot’s logs with:
journalctl -u systemd-networkd -b | grep -i unknown
If a setting has no effect, verify its spelling, section, and support in your installed systemd version before troubleshooting further.
If this tip saves you time, share it with a colleague who manages systemd-networkd configurations.
Conclusion
You can now reduce unnecessary wait-online delays, skip DHCP and IPv6 configuration your server doesn’t need, and tune NIC buffers, queues, and offloads with systemd-networkd. Use networkctl status --stats to monitor interface statistics and evaluate the results under load.
How much boot time did you save by tuning wait-online? Did your NIC reject a .link setting? Share your results, configuration files, or networkctl errors in the comments.





