| 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.5/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>[email protected]</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>[email protected]</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>[email protected]</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>[email protected]</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=<replaceable>INTERFACE</replaceable><optional>:<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></optional></option></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=<replaceable>INTERFACE</replaceable></option></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=<replaceable>MIN_OPERSTATE</replaceable><optional>:<replaceable>MAX_OPERSTATE</replaceable></optional></option></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>--dns</option></term> |
| 149 |
|
| 150 |
<listitem><para>Waiting for DNS servers to be accessible on each interface. If this |
| 151 |
option is specified with <option>--any</option>, then |
| 152 |
<command>systemd-networkd-wait-online</command> exits with success when at least one interface |
| 153 |
becomes online and has an accessible DNS server.</para> |
| 154 |
<para>If a link has the property <varname>DefaultRoute=yes</varname> (either because the |
| 155 |
<varname>DNSDefaultRoute=</varname> network property is explicitly configured, or |
| 156 |
because the link does not have any "routing-only" domains), or if the search domain "." is |
| 157 |
configured, then wait for link-specific DNS servers to be accessible. Otherwise, allow global |
| 158 |
DNS servers to satisfy the condition.</para> |
| 159 |
|
| 160 |
<xi:include href="version-info.xml" xpointer="v258"/></listitem> |
| 161 |
</varlistentry> |
| 162 |
|
| 163 |
<varlistentry> |
| 164 |
<term><option>--any</option></term> |
| 165 |
|
| 166 |
<listitem><para>Even if several interfaces are in configuring state, |
| 167 |
<command>systemd-networkd-wait-online</command> exits with success when at least one interface |
| 168 |
becomes online. When this option is specified with <option>--interface=</option>, then |
| 169 |
<command>systemd-networkd-wait-online</command> waits for one of the specified interfaces to be |
| 170 |
online. This option is useful when some interfaces may not have carrier on boot. |
| 171 |
</para> |
| 172 |
|
| 173 |
<xi:include href="version-info.xml" xpointer="v242"/></listitem> |
| 174 |
</varlistentry> |
| 175 |
|
| 176 |
<varlistentry> |
| 177 |
<term><option>--timeout=<replaceable>SECS</replaceable></option></term> |
| 178 |
|
| 179 |
<listitem><para>Fail the service if the network is not online |
| 180 |
by the time the timeout elapses. A timeout of 0 disables the |
| 181 |
timeout. Defaults to 120 seconds. </para> |
| 182 |
|
| 183 |
<xi:include href="version-info.xml" xpointer="v219"/></listitem> |
| 184 |
</varlistentry> |
| 185 |
|
| 186 |
<varlistentry> |
| 187 |
<term><option>-q</option></term> |
| 188 |
<term><option>--quiet</option></term> |
| 189 |
|
| 190 |
<listitem><para>Suppress log messages.</para> |
| 191 |
|
| 192 |
<xi:include href="version-info.xml" xpointer="v242"/></listitem> |
| 193 |
</varlistentry> |
| 194 |
|
| 195 |
<xi:include href="standard-options.xml" xpointer="help" /> |
| 196 |
<xi:include href="standard-options.xml" xpointer="version" /> |
| 197 |
</variablelist> |
| 198 |
</refsect1> |
| 199 |
|
| 200 |
<refsect1> |
| 201 |
<title>See Also</title> |
| 202 |
<para><simplelist type="inline"> |
| 203 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 204 |
<member><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 205 |
<member><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 206 |
<member><citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 207 |
</simplelist></para> |
| 208 |
</refsect1> |
| 209 |
|
| 210 |
</refentry> |