]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-networkd-wait-online.service.xml
Merge pull request #29122 from yuwata/network-allow-multiple-ipv6-null-addresses
[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@.service</refname>
22 <refname>systemd-networkd-wait-online</refname>
23 <refpurpose>Wait for network to come online</refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <para><filename>systemd-networkd-wait-online.service</filename></para>
28 <para><filename>systemd-networkd-wait-online@.service</filename></para>
29 <para><filename>/usr/lib/systemd/systemd-networkd-wait-online</filename></para>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Description</title>
34
35 <para><command>systemd-networkd-wait-online</command> is a
36 oneshot system service (see <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>), that waits for the network to be
37 configured. By default, it will wait for all links it is aware of
38 and which are managed by
39 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
40 to be fully configured or failed, and for at least one link to be online. Here, online means that
41 the link's operational state is equal or higher than <literal>degraded</literal>. The threshold
42 can be configured by <option>--operational-state=</option> option.</para>
43
44 <para>The service <filename>systemd-networkd-wait-online.service</filename> invokes
45 <command>systemd-networkd-wait-online</command> without any options. Thus, it waits for all managed
46 interfaces to be configured or failed, and for at least one to be online.</para>
47
48 <para>The service <filename>systemd-networkd-wait-online@.service</filename> takes an interface
49 name, and invokes <command>systemd-networkd-wait-online</command> with <option>-i</option> and the
50 specified interface name. Thus, wait for the specified interface to be configured and online. For
51 example, <filename>systemd-networkd-wait-online@eth0.service</filename> waits for
52 <filename>eth0</filename> to be configured by <command>systemd-networkd</command> and online.
53 </para>
54 </refsect1>
55
56 <refsect1>
57 <title>Options</title>
58
59 <para>The following options are understood:</para>
60
61 <variablelist>
62 <varlistentry>
63 <term><option>-i</option> <replaceable>INTERFACE</replaceable><optional>:<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></optional></term>
64 <term><option>--interface=</option><replaceable>INTERFACE</replaceable><optional>:<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></optional></term>
65
66 <listitem><para>Network interface to wait for before deciding if the system is online. This
67 is useful when a system has several interfaces which will be configured, but a particular
68 one is necessary to access some network resources. When used, all other interfaces are ignored.
69 This option may be used more than once to wait for multiple network interfaces. When this
70 option is specified multiple times, then <command>systemd-networkd-wait-online</command> waits
71 for all specified interfaces to be online. Optionally, required minimum and maximum operational
72 states can be specified after a colon <literal>:</literal>. Please see
73 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
74 for possible operational states. If the operational state is not specified here, then
75 the value from <varname>RequiredForOnline=</varname> in the corresponding
76 <filename>.network</filename> file is used if present, and <literal>degraded</literal> otherwise.
77 </para>
78
79 <xi:include href="version-info.xml" xpointer="v213"/></listitem>
80 </varlistentry>
81
82 <varlistentry>
83 <term><option>--ignore=</option><replaceable>INTERFACE</replaceable></term>
84
85 <listitem><para>Network interfaces to be ignored when deciding
86 if the system is online. By default, only the loopback
87 interface is ignored. This option may be used more than once
88 to ignore multiple network interfaces. </para>
89
90 <xi:include href="version-info.xml" xpointer="v219"/></listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term><option>-o</option> <replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></term>
95 <term><option>--operational-state=</option><replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></term>
96
97 <listitem><para>Takes a minimum operational state and an optional maximum operational state.
98 Please see <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
99 for possible operational states. If set, the specified value overrides
100 <varname>RequiredForOnline=</varname> settings in <filename>.network</filename> files.
101 But this does not override operational states specified in <option>--interface=</option> option.
102 </para>
103
104 <xi:include href="version-info.xml" xpointer="v242"/></listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term><option>-4</option></term>
109 <term><option>--ipv4</option></term>
110
111 <listitem><para>Waiting for an IPv4 address of each network interface to be configured. If this
112 option is specified with <option>--any</option>, then
113 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
114 becomes online and has an IPv4 address. If the required minimum operational state is
115 below <literal>routable</literal>, then each link (or at least one link with
116 <option>--any</option>) must have an IPv4 link-local or routable address. If the required
117 minimum operational state is <literal>routable</literal>, then each link must have an IPv4
118 routable address.</para>
119 <para>If neither <option>--ipv4</option> nor
120 <option>--ipv6</option> is specified, then the value from
121 <varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
122 file is used if present.</para>
123
124 <xi:include href="version-info.xml" xpointer="v249"/></listitem>
125 </varlistentry>
126
127 <varlistentry>
128 <term><option>-6</option></term>
129 <term><option>--ipv6</option></term>
130
131 <listitem><para>Waiting for an IPv6 address of each network interface to be configured. If this
132 option is specified with <option>--any</option>, then
133 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
134 becomes online and has an IPv6 address. If the required minimum operational state is
135 below <literal>routable</literal>, then each link (or at least one link with
136 <option>--any</option>) must have an IPv6 link-local or routable address. If the required
137 minimum operational state is <literal>routable</literal>, then each link must have an IPv6
138 routable address.</para>
139 <para>If neither <option>--ipv4</option> nor
140 <option>--ipv6</option> is specified, then the value from
141 <varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
142 file is used if present.</para>
143
144 <xi:include href="version-info.xml" xpointer="v249"/></listitem>
145 </varlistentry>
146
147 <varlistentry>
148 <term><option>--any</option></term>
149
150 <listitem><para>Even if several interfaces are in configuring state,
151 <command>systemd-networkd-wait-online</command> exits with success when at least one interface
152 becomes online. When this option is specified with <option>--interface=</option>, then
153 <command>systemd-networkd-wait-online</command> waits for one of the specified interfaces to be
154 online. This option is useful when some interfaces may not have carrier on boot.
155 </para>
156
157 <xi:include href="version-info.xml" xpointer="v242"/></listitem>
158 </varlistentry>
159
160 <varlistentry>
161 <term><option>--timeout=</option><replaceable>SECS</replaceable></term>
162
163 <listitem><para>Fail the service if the network is not online
164 by the time the timeout elapses. A timeout of 0 disables the
165 timeout. Defaults to 120 seconds. </para>
166
167 <xi:include href="version-info.xml" xpointer="v219"/></listitem>
168 </varlistentry>
169
170 <varlistentry>
171 <term><option>-q</option></term>
172 <term><option>--quiet</option></term>
173
174 <listitem><para>Suppress log messages.</para>
175
176 <xi:include href="version-info.xml" xpointer="v242"/></listitem>
177 </varlistentry>
178
179 <xi:include href="standard-options.xml" xpointer="help" />
180 <xi:include href="standard-options.xml" xpointer="version" />
181 </variablelist>
182 </refsect1>
183
184 <refsect1>
185 <title>See Also</title>
186 <para>
187 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
188 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
189 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
190 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
191 </para>
192 </refsect1>
193
194 </refentry>