1NETWORKMANAGER-WAIT-ONLINE(N8e)twork management daemoNnEsTWORKMANAGER-WAIT-ONLINE(8)
2
3
4
6 NetworkManager-wait-online.service - Wait for network to come online
7
9 NetworkManager-wait-online.service delays network-online.target until
10 network is ready.
11
12 The systemd target network-online.target acts as a synchronization
13 point for services to start after network is configured. Such services
14 should order themselves After=network-online.target (and never
15 After=NetworkManager-wait-online.service).
16 NetworkManager-wait-online.service is a one-shot service that itself is
17 ordered Before=network-online.target and this way delays the target
18 until the network is configured.
19
20 NetworkManager-wait-online.service itself is almost not configurable
21 itself. Instead the connection profiles and configuration in
22 NetworkManager affects the behavior.
23
24 In the best case, all services on the system can react to networking
25 changes dynamically and no service orders itself after
26 network-online.target. That way, NetworkManager-wait-online.service has
27 no effect and, for example, does not delay the boot. That means, if the
28 problem is a long boot time related to
29 NetworkManager-wait-online.service, a possible solution is to
30 investigate the services that claim to require network and fix those.
31
32 For services that require network configured,
33 NetworkManager-wait-online.service is the default implementation
34 provided by NetworkManager to delay the target. But it does nothing
35 magical. With special requirements, it may be sensible to disable
36 NetworkManager-wait-online.service and replace it with a similar
37 service that better implements the requirement.
38
39 NetworkManager-wait-online.service blocks until NetworkManager logs
40 "startup complete" and announces startup complete on D-Bus. How long
41 that takes depends on the network and the NetworkManager configuration.
42 If it takes longer than expected, then the reasons need to be
43 investigated in NetworkManager.
44
45 There are various reasons what affects NetworkManager reaching "startup
46 complete" and how long NetworkManager-wait-online.service blocks.
47
48 • In general, startup complete is not reached as long as
49 NetworkManager is busy activating a device and as long as there are
50 profiles in activating state. During boot, NetworkManager starts
51 autoactivating suitable profiles that are configured to
52 autoconnect. If activation fails, NetworkManager might retry right
53 away (depending on connection.autoconnect-retries setting). While
54 trying and retrying, NetworkManager is busy until all profiles and
55 devices either reached an activated or disconnected state and no
56 further events are expected.
57
58 • When a device reaches activated state, depends on its
59 configuration. For example, with a profile with both IPv4 and IPv6
60 addressing enabled, the device is possibly considered fully
61 activated when either of the address families is ready. This can be
62 controlled with the ipv4.may-fail and ipv6.may-fail settings, to
63 indicate that the address family is required. There are also
64 ipv4.required-timeout and ipv6.required-timeout settings which
65 affect how long to wait for an address family. Likewise, properties
66 like ipv4.dhcp-timeout and ipv6.ra-timeout affect how long
67 NetworkManager will try the IP configuration before giving up.
68
69 • For example, a bridge or bond profile cannot do IP configuration
70 without ports. When booting with such profiles that autoactivate
71 without ports, NetworkManager-wait-online.service blocks until
72 timeout. This is a configuration error.
73
74 • The property connection.wait-device-timeout of the connection
75 profiles waits until the waited devices appear. This is useful if
76 the driver takes a longer time to detect the networking interfaces.
77
78 • With Wi-Fi devices, NetworkManager needs to wait for the first scan
79 result to know which networks might be available. That always adds
80 a delay.
81
82 • With ethernet devices, NetworkManager waits for carrier until the
83 configurable [device*].carrier-timeout is reached. This is because
84 some devices take a long time to detect carrier and it means to
85 boot with cable unplugged, will unnecessarily delay
86 NetworkManager-wait-online.service.
87
88 NetworkManager-wait-online.service internally uses nm-online.
89
91 Please report any bugs in NetworkManager at the NetworkManager issue
92 tracker[1].
93
95 NetworkManager home page[2], NetworkManager(8), nm-online(1),
96
98 1. NetworkManager issue tracker
99 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues
100
101 2. NetworkManager home page
102 https://networkmanager.dev
103
104
105
106NetworkManager-wait-online NETWORKMANAGER-WAIT-ONLINE(8)