]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-networkd-wait-online.service.xml
9c6b02ac1c80fe5d29b3a96563022ef89fec4352
[thirdparty/systemd.git] / man / systemd-networkd-wait-online.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="systemd-networkd-wait-online.service" conditional='ENABLE_NETWORKD'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd-networkd-wait-online.service</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd-networkd-wait-online.service</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd-networkd-wait-online.service</refname>
21 <refname>systemd-networkd-wait-online</refname>
22 <refpurpose>Wait for network to come online</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <para><filename>systemd-networkd-wait-online.service</filename></para>
27 <para><filename>/usr/lib/systemd/systemd-networkd-wait-online</filename></para>
28 </refsynopsisdiv>
29
30 <refsect1>
31 <title>Description</title>
32
33 <para><command>systemd-networkd-wait-online</command> is a
34 oneshot system service (see <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>), that waits for the network to be
35 configured. By default, it will wait for all links it is aware of
36 and which are managed by
37 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
38 to be fully configured or failed, and for at least one link to be online. Here, online means that
39 the link's operational state is equal or higher than <literal>degraded</literal>. The threshold
40 can be configured by <option>--operational-state=</option> option.</para>
41 </refsect1>
42
43 <refsect1>
44 <title>Options</title>
45
46 <para>The following options are understood:</para>
47
48 <variablelist>
49 <varlistentry>
50 <term><option>-i</option> <replaceable>INTERFACE</replaceable><optional>:<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></optional></term>
51 <term><option>--interface=</option><replaceable>INTERFACE</replaceable><optional>:<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></optional></term>
52
53 <listitem><para>Network interface to wait for before deciding if the system is online. This
54 is useful when a system has several interfaces which will be configured, but a particular
55 one is necessary to access some network resources. When used, all other interfaces are ignored.
56 This option may be used more than once to wait for multiple network interfaces. When this
57 option is specified multiple times, then <command>systemd-networkd-wait-online</command> waits
58 for all specified interfaces to be online. Optionally, required minimum and maximum operational
59 states can be specified after a colon <literal>:</literal>. Please see
60 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
61 for possible operational states. If the operational state is not specified here, then
62 the value from <varname>RequiredForOnline=</varname> in the corresponding
63 <filename>.network</filename> file is used if present, and <literal>degraded</literal> otherwise.
64 </para></listitem>
65 </varlistentry>
66
67 <varlistentry>
68 <term><option>--ignore=</option><replaceable>INTERFACE</replaceable></term>
69
70 <listitem><para>Network interfaces to be ignored when deciding
71 if the system is online. By default, only the loopback
72 interface is ignored. This option may be used more than once
73 to ignore multiple network interfaces. </para></listitem>
74 </varlistentry>
75
76 <varlistentry>
77 <term><option>-o</option> <replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></term>
78 <term><option>--operational-state=</option><replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></term>
79
80 <listitem><para>Takes a minimum operational state and an optional maximum operational state.
81 Please see <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
82 for possible operational states. If set, the specified value overrides
83 <varname>RequiredForOnline=</varname> settings in <filename>.network</filename> files.
84 But this does not override operational states specified in <option>--interface=</option> option.
85 </para></listitem>
86 </varlistentry>
87
88 <varlistentry>
89 <term><option>-4</option></term>
90 <term><option>--ipv4</option></term>
91
92 <listitem><para>Waiting for an IPv4 address of each network interface to be configured. If this
93 option is specified with <option>--any</option>, then
94 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
95 becomes online and has an IPv4 address. If the required minimum operational state is
96 below <literal>routable</literal>, then each link (or at least one link with
97 <option>--any</option>) must have an IPv4 link-local or routable address. If the required
98 minimum operational state is <literal>routable</literal>, then each link must have an IPv4
99 routable address.</para>
100 <para>If neither <option>--ipv4</option> nor
101 <option>--ipv6</option> is specified, then the value from
102 <varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
103 file is used if present.</para></listitem>
104 </varlistentry>
105
106 <varlistentry>
107 <term><option>-6</option></term>
108 <term><option>--ipv6</option></term>
109
110 <listitem><para>Waiting for an IPv6 address of each network interface to be configured. If this
111 option is specified with <option>--any</option>, then
112 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
113 becomes online and has an IPv6 address. If the required minimum operational state is
114 below <literal>routable</literal>, then each link (or at least one link with
115 <option>--any</option>) must have an IPv6 link-local or routable address. If the required
116 minimum operational state is <literal>routable</literal>, then each link must have an IPv6
117 routable address.</para>
118 <para>If neither <option>--ipv4</option> nor
119 <option>--ipv6</option> is specified, then the value from
120 <varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
121 file is used if present.</para></listitem>
122 </varlistentry>
123
124 <varlistentry>
125 <term><option>--any</option></term>
126
127 <listitem><para>Even if several interfaces are in configuring state,
128 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
129 becomes online. When this option is specified with <option>--interface=</option>, then
130 <command>systemd-networkd-wait-online</command> waits for one of the specified interfaces to be
131 online. This option is useful when some interfaces may not have carrier on boot.
132 </para></listitem>
133 </varlistentry>
134
135 <varlistentry>
136 <term><option>--timeout=</option><replaceable>SECS</replaceable></term>
137
138 <listitem><para>Fail the service if the network is not online
139 by the time the timeout elapses. A timeout of 0 disables the
140 timeout. Defaults to 120 seconds. </para></listitem>
141 </varlistentry>
142
143 <varlistentry>
144 <term><option>-q</option></term>
145 <term><option>--quiet</option></term>
146
147 <listitem><para>Suppress log messages.</para></listitem>
148 </varlistentry>
149
150 <xi:include href="standard-options.xml" xpointer="help" />
151 <xi:include href="standard-options.xml" xpointer="version" />
152 </variablelist>
153 </refsect1>
154
155 <refsect1>
156 <title>See Also</title>
157 <para>
158 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
159 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
160 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
161 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
162 </para>
163 </refsect1>
164
165 </refentry>