NetworkManager-wait-online.service - Man Page

Wait for network to come online

Description

NetworkManager-wait-online.service delays network-online.target until network is ready.

The systemd target network-online.target acts as a synchronization point for services to start after network is configured. Such services should order themselves After=network-online.target (and never After=NetworkManager-wait-online.service). NetworkManager-wait-online.service is a one-shot service that itself is ordered Before=network-online.target and this way delays the target until the network is configured.

NetworkManager-wait-online.service itself is almost not configurable itself. Instead the connection profiles and configuration in NetworkManager affects the behavior.

In the best case, all services on the system can react to networking changes dynamically and no service orders itself after network-online.target. That way, NetworkManager-wait-online.service has no effect and, for example, does not delay the boot. That means, if the problem is a long boot time related to NetworkManager-wait-online.service, a possible solution is to investigate the services that claim to require network and fix those.

For services that require network configured, NetworkManager-wait-online.service is the default implementation provided by NetworkManager to delay the target. But it does nothing magical. With special requirements, it may be sensible to disable NetworkManager-wait-online.service and replace it with a similar service that better implements the requirement.

NetworkManager-wait-online.service blocks until NetworkManager logs "startup complete" and announces startup complete on D-Bus. How long that takes depends on the network and the NetworkManager configuration. If it takes longer than expected, then the reasons need to be investigated in NetworkManager.

There are various reasons what affects NetworkManager reaching "startup complete" and how long NetworkManager-wait-online.service blocks.

NetworkManager-wait-online.service internally uses nm-online.

Bugs

Please report any bugs in NetworkManager at the NetworkManager issue tracker[1].

See Also

NetworkManager home page[2], NetworkManager(8), nm-online(1),

Notes

  1. NetworkManager issue tracker
    https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues
  2. NetworkManager home page
    https://networkmanager.dev

Referenced By

NetworkManager(8), nm-online(1).

NetworkManager-wait-online Network management daemons