]>
Commit | Line | Data |
---|---|---|
514094f9 | 1 | <?xml version='1.0'?> |
3a54a157 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
db9ecf05 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
d9000fd3 | 5 | |
e6de49ab | 6 | <refentry id="networkctl" conditional='ENABLE_NETWORKD' |
d9000fd3 ZJS |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
8 | ||
9 | <refentryinfo> | |
10 | <title>networkctl</title> | |
11 | <productname>systemd</productname> | |
d9000fd3 ZJS |
12 | </refentryinfo> |
13 | ||
14 | <refmeta> | |
15 | <refentrytitle>networkctl</refentrytitle> | |
16 | <manvolnum>1</manvolnum> | |
17 | </refmeta> | |
18 | ||
19 | <refnamediv> | |
20 | <refname>networkctl</refname> | |
dd9f909e | 21 | <refpurpose>Query or modify the status of network links</refpurpose> |
d9000fd3 ZJS |
22 | </refnamediv> |
23 | ||
24 | <refsynopsisdiv> | |
25 | <cmdsynopsis> | |
26 | <command>networkctl</command> | |
27 | <arg choice="opt" rep="repeat">OPTIONS</arg> | |
28 | <arg choice="plain">COMMAND</arg> | |
29 | <arg choice="opt" rep="repeat">LINK</arg> | |
30 | </cmdsynopsis> | |
31 | </refsynopsisdiv> | |
32 | ||
33 | <refsect1> | |
34 | <title>Description</title> | |
35 | ||
dd9f909e | 36 | <para><command>networkctl</command> may be used to query or modify the |
d9000fd3 ZJS |
37 | state of the network links as seen by |
38 | <command>systemd-networkd</command>. Please refer to | |
39 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
1d3eaa93 | 40 | for an introduction to the basic concepts, functionality, and |
d9000fd3 ZJS |
41 | configuration syntax.</para> |
42 | </refsect1> | |
43 | ||
d9000fd3 ZJS |
44 | <refsect1> |
45 | <title>Commands</title> | |
46 | ||
47 | <para>The following commands are understood:</para> | |
48 | ||
49 | <variablelist> | |
50 | <varlistentry> | |
51 | <term> | |
52 | <command>list</command> | |
f3eeecf4 | 53 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
54 | </term> |
55 | ||
56 | <listitem> | |
ba669952 | 57 | <para>Show a list of existing links and their status. If one or more |
f3eeecf4 YW |
58 | <replaceable>PATTERN</replaceable>s are specified, only links matching one of them are shown. |
59 | If no further arguments are specified shows all links, | |
e997c4b0 LP |
60 | otherwise just the specified links. Produces output similar to: |
61 | ||
62 | <programlisting>IDX LINK TYPE OPERATIONAL SETUP | |
d9000fd3 ZJS |
63 | 1 lo loopback carrier unmanaged |
64 | 2 eth0 ether routable configured | |
65 | 3 virbr0 ether no-carrier unmanaged | |
66 | 4 virbr0-nic ether off unmanaged | |
67 | ||
68 | 4 links listed.</programlisting></para> | |
abcf95e9 JAK |
69 | |
70 | <para>The operational status is one of the following: | |
71 | <variablelist> | |
5cbaf95e DDM |
72 | <varlistentry> |
73 | <term>missing</term> | |
74 | <listitem> | |
cae4ad36 | 75 | <para>The device is missing.</para> |
ec07c3c8 AK |
76 | |
77 | <xi:include href="version-info.xml" xpointer="v245"/> | |
5cbaf95e DDM |
78 | </listitem> |
79 | </varlistentry> | |
abcf95e9 JAK |
80 | <varlistentry> |
81 | <term>off</term> | |
82 | <listitem> | |
cae4ad36 | 83 | <para>The device is powered down.</para> |
ec07c3c8 AK |
84 | |
85 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
86 | </listitem> |
87 | </varlistentry> | |
88 | <varlistentry> | |
89 | <term>no-carrier</term> | |
90 | <listitem> | |
cae4ad36 | 91 | <para>The device is powered up, but does not yet have a carrier.</para> |
ec07c3c8 AK |
92 | |
93 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
94 | </listitem> |
95 | </varlistentry> | |
96 | <varlistentry> | |
97 | <term>dormant</term> | |
98 | <listitem> | |
cae4ad36 | 99 | <para>The device has a carrier, but is not yet ready for normal traffic.</para> |
ec07c3c8 AK |
100 | |
101 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
102 | </listitem> |
103 | </varlistentry> | |
c9cc0383 YW |
104 | <varlistentry> |
105 | <term>degraded-carrier</term> | |
106 | <listitem> | |
cae4ad36 ZJS |
107 | <para>One of the bonding or bridge slave network interfaces is in off, no-carrier, or |
108 | dormant state, and the master interface has no address.</para> | |
ec07c3c8 AK |
109 | |
110 | <xi:include href="version-info.xml" xpointer="v242"/> | |
c9cc0383 YW |
111 | </listitem> |
112 | </varlistentry> | |
abcf95e9 JAK |
113 | <varlistentry> |
114 | <term>carrier</term> | |
115 | <listitem> | |
cae4ad36 ZJS |
116 | <para>The link has carrier, or for bond or bridge master, all bonding or bridge slave |
117 | network interfaces are enslaved to the master.</para> | |
ec07c3c8 AK |
118 | |
119 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
120 | </listitem> |
121 | </varlistentry> | |
122 | <varlistentry> | |
123 | <term>degraded</term> | |
124 | <listitem> | |
cae4ad36 | 125 | <para>The link has carrier and addresses valid on the local link configured. For bond or |
cf4dbd84 HH |
126 | bridge master this means that not all slave network interfaces have carrier but at least |
127 | one does.</para> | |
ec07c3c8 AK |
128 | |
129 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
130 | </listitem> |
131 | </varlistentry> | |
806c86ad YW |
132 | <varlistentry> |
133 | <term>enslaved</term> | |
134 | <listitem> | |
cae4ad36 ZJS |
135 | <para>The link has carrier and is enslaved to bond or bridge master network interface. |
136 | </para> | |
ec07c3c8 AK |
137 | |
138 | <xi:include href="version-info.xml" xpointer="v242"/> | |
806c86ad YW |
139 | </listitem> |
140 | </varlistentry> | |
abcf95e9 JAK |
141 | <varlistentry> |
142 | <term>routable</term> | |
143 | <listitem> | |
cae4ad36 | 144 | <para>The link has carrier and routable address configured. For bond or bridge master it is |
cf4dbd84 | 145 | not necessary for all slave network interfaces to have carrier, but at least one must.</para> |
ec07c3c8 AK |
146 | |
147 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
148 | </listitem> |
149 | </varlistentry> | |
150 | </variablelist> | |
151 | </para> | |
152 | ||
153 | <para>The setup status is one of the following: | |
154 | <variablelist> | |
155 | <varlistentry> | |
156 | <term>pending</term> | |
157 | <listitem> | |
cae4ad36 ZJS |
158 | <para><citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
159 | is still processing the link, we don't yet know if we will manage it.</para> | |
ec07c3c8 AK |
160 | |
161 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
162 | </listitem> |
163 | </varlistentry> | |
164 | <varlistentry> | |
c322cfaf | 165 | <term>initialized</term> |
abcf95e9 | 166 | <listitem> |
cae4ad36 ZJS |
167 | <para><citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
168 | has processed the link, but we don't yet know if we will manage it.</para> | |
ec07c3c8 AK |
169 | |
170 | <xi:include href="version-info.xml" xpointer="v251"/> | |
abcf95e9 JAK |
171 | </listitem> |
172 | </varlistentry> | |
173 | <varlistentry> | |
174 | <term>configuring</term> | |
175 | <listitem> | |
cae4ad36 | 176 | <para>Configuration for the link is being retrieved or the link is being configured.</para> |
ec07c3c8 AK |
177 | |
178 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
179 | </listitem> |
180 | </varlistentry> | |
181 | <varlistentry> | |
182 | <term>configured</term> | |
183 | <listitem> | |
cae4ad36 | 184 | <para>Link has been configured successfully.</para> |
ec07c3c8 AK |
185 | |
186 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
187 | </listitem> |
188 | </varlistentry> | |
189 | <varlistentry> | |
190 | <term>unmanaged</term> | |
191 | <listitem> | |
cae4ad36 | 192 | <para><command>systemd-networkd</command> is not handling the link.</para> |
ec07c3c8 AK |
193 | |
194 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
195 | </listitem> |
196 | </varlistentry> | |
c322cfaf YW |
197 | <varlistentry> |
198 | <term>failed</term> | |
199 | <listitem> | |
cae4ad36 | 200 | <para><command>systemd-networkd</command> failed to configure the link.</para> |
ec07c3c8 AK |
201 | |
202 | <xi:include href="version-info.xml" xpointer="v240"/> | |
c322cfaf YW |
203 | </listitem> |
204 | </varlistentry> | |
abcf95e9 JAK |
205 | <varlistentry> |
206 | <term>linger</term> | |
207 | <listitem> | |
cae4ad36 | 208 | <para>The link is gone, but has not yet been dropped by <command>systemd-networkd</command>.</para> |
ec07c3c8 AK |
209 | |
210 | <xi:include href="version-info.xml" xpointer="v240"/> | |
abcf95e9 JAK |
211 | </listitem> |
212 | </varlistentry> | |
213 | </variablelist> | |
214 | </para> | |
ec07c3c8 | 215 | |
aefdc112 | 216 | <xi:include href="version-info.xml" xpointer="v219"/> |
d9000fd3 ZJS |
217 | </listitem> |
218 | </varlistentry> | |
219 | ||
220 | <varlistentry> | |
221 | <term> | |
222 | <command>status</command> | |
f3eeecf4 | 223 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
224 | </term> |
225 | ||
226 | <listitem> | |
f3eeecf4 | 227 | <para>Show information about the specified links: type, state, kernel module driver, hardware and |
ba669952 | 228 | IP address, configured DNS servers, etc. If one or more <replaceable>PATTERN</replaceable>s are |
f3eeecf4 | 229 | specified, only links matching one of them are shown.</para> |
d9000fd3 | 230 | |
e997c4b0 LP |
231 | <para>When no links are specified, an overall network status is shown. Also see the option |
232 | <option>--all</option>.</para> | |
d9000fd3 | 233 | |
e997c4b0 | 234 | <para>Produces output similar to: |
d9000fd3 | 235 | <programlisting> |
7e59cfe9 AŠ |
236 | ● State: routable |
237 | Online state: online | |
238 | Address: 10.193.76.5 on eth0 | |
239 | 192.168.122.1 on virbr0 | |
240 | 169.254.190.105 on eth0 | |
241 | fe80::5054:aa:bbbb:cccc on eth0 | |
242 | Gateway: 10.193.11.1 (CISCO SYSTEMS, INC.) on eth0 | |
243 | DNS: 8.8.8.8 | |
244 | 8.8.4.4</programlisting></para> | |
245 | ||
246 | <para>In the overall network status, the online state depends on the individual online state of all | |
247 | required links. Managed links are required for online by default. In this case, the online state is | |
248 | one of the following: | |
249 | <variablelist> | |
250 | <varlistentry> | |
251 | <term>unknown</term> | |
252 | <listitem> | |
cae4ad36 | 253 | <para>All links have unknown online status (i.e. there are no required links).</para> |
ec07c3c8 AK |
254 | |
255 | <xi:include href="version-info.xml" xpointer="v249"/> | |
7e59cfe9 AŠ |
256 | </listitem> |
257 | </varlistentry> | |
258 | <varlistentry> | |
259 | <term>offline</term> | |
260 | <listitem> | |
cae4ad36 | 261 | <para>All required links are offline.</para> |
ec07c3c8 AK |
262 | |
263 | <xi:include href="version-info.xml" xpointer="v249"/> | |
7e59cfe9 AŠ |
264 | </listitem> |
265 | </varlistentry> | |
266 | <varlistentry> | |
267 | <term>partial</term> | |
268 | <listitem> | |
cae4ad36 | 269 | <para>Some, but not all, required links are online.</para> |
ec07c3c8 AK |
270 | |
271 | <xi:include href="version-info.xml" xpointer="v249"/> | |
7e59cfe9 AŠ |
272 | </listitem> |
273 | </varlistentry> | |
274 | <varlistentry> | |
275 | <term>online</term> | |
276 | <listitem> | |
cae4ad36 | 277 | <para>All required links are online.</para> |
ec07c3c8 AK |
278 | |
279 | <xi:include href="version-info.xml" xpointer="v249"/> | |
7e59cfe9 AŠ |
280 | </listitem> |
281 | </varlistentry> | |
282 | </variablelist> | |
283 | </para> | |
ec07c3c8 | 284 | |
aefdc112 | 285 | <xi:include href="version-info.xml" xpointer="v219"/> |
d9000fd3 ZJS |
286 | </listitem> |
287 | ||
288 | </varlistentry> | |
289 | ||
290 | <varlistentry> | |
291 | <term> | |
292 | <command>lldp</command> | |
f3eeecf4 | 293 | <optional><replaceable>PATTERN…</replaceable></optional> |
d9000fd3 ZJS |
294 | </term> |
295 | ||
296 | <listitem> | |
f3eeecf4 YW |
297 | <para>Show discovered LLDP (Link Layer Discovery Protocol) neighbors. If one or more |
298 | <replaceable>PATTERN</replaceable>s are specified only neighbors on those interfaces are shown. | |
299 | Otherwise shows discovered neighbors on all interfaces. Note that for this feature to work, | |
300 | <varname>LLDP=</varname> must be turned on for the specific interface, see | |
e997c4b0 LP |
301 | <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
302 | details.</para> | |
303 | ||
304 | <para>Produces output similar to: | |
14a5c07a YW |
305 | <programlisting>LINK SYSTEM-NAME SYSTEM-DESCRIPTION CHASSIS-ID PORT-ID PORT-DESCRIPTION CAPS |
306 | enp0s25 GS1900 - 00:e0:4c:00:00:00 2 Port #2 ..b........ | |
e997c4b0 LP |
307 | |
308 | Capability Flags: | |
309 | o - Other; p - Repeater; b - Bridge; w - WLAN Access Point; r - Router; | |
310 | t - Telephone; d - DOCSIS cable device; a - Station; c - Customer VLAN; | |
311 | s - Service VLAN, m - Two-port MAC Relay (TPMR) | |
312 | ||
14a5c07a | 313 | 1 neighbor(s) listed.</programlisting></para> |
ec07c3c8 | 314 | |
aefdc112 | 315 | <xi:include href="version-info.xml" xpointer="v219"/> |
d9000fd3 ZJS |
316 | </listitem> |
317 | </varlistentry> | |
a5be8dab ZJS |
318 | |
319 | <varlistentry> | |
320 | <term> | |
321 | <command>label</command> | |
322 | </term> | |
323 | ||
324 | <listitem><para>Show numerical address labels that can be used for address selection. | |
325 | This is the same information that | |
b7a47345 | 326 | <citerefentry project='die-net'><refentrytitle>ip-addrlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
a5be8dab ZJS |
327 | shows. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink> |
328 | for a discussion of address labels.</para> | |
329 | ||
330 | <para>Produces output similar to: | |
331 | <programlisting>Prefix/Prefixlen Label | |
332 | ::/0 1 | |
333 | fc00::/7 5 | |
334 | fec0::/10 11 | |
335 | 2002::/16 2 | |
336 | 3ffe::/16 12 | |
337 | 2001:10::/28 7 | |
338 | 2001::/32 6 | |
339 | ::ffff:0.0.0.0/96 4 | |
340 | ::/96 3 | |
341 | ::1/128 0</programlisting></para> | |
ec07c3c8 AK |
342 | |
343 | <xi:include href="version-info.xml" xpointer="v234"/> | |
a5be8dab ZJS |
344 | </listitem> |
345 | </varlistentry> | |
346 | ||
9cd8c766 SS |
347 | <varlistentry> |
348 | <term> | |
349 | <command>delete</command> | |
f2c676c6 | 350 | <replaceable>DEVICE…</replaceable> |
9cd8c766 | 351 | </term> |
ec07c3c8 AK |
352 | <listitem><para>Deletes virtual netdevs. Takes interface name or index number.</para> |
353 | ||
aefdc112 | 354 | <xi:include href="version-info.xml" xpointer="v243"/></listitem> |
9cd8c766 SS |
355 | </varlistentry> |
356 | ||
c30ffcee SS |
357 | <varlistentry> |
358 | <term> | |
359 | <command>up</command> | |
f2c676c6 | 360 | <replaceable>DEVICE…</replaceable> |
c30ffcee | 361 | </term> |
ec07c3c8 AK |
362 | <listitem><para>Bring devices up. Takes interface name or index number.</para> |
363 | ||
aefdc112 | 364 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> |
c30ffcee SS |
365 | </varlistentry> |
366 | ||
367 | <varlistentry> | |
368 | <term> | |
369 | <command>down</command> | |
f2c676c6 | 370 | <replaceable>DEVICE…</replaceable> |
c30ffcee | 371 | </term> |
ec07c3c8 AK |
372 | <listitem><para>Bring devices down. Takes interface name or index number.</para> |
373 | ||
aefdc112 | 374 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> |
c30ffcee SS |
375 | </varlistentry> |
376 | ||
308e7dfd YW |
377 | <varlistentry> |
378 | <term> | |
379 | <command>renew</command> | |
f2c676c6 | 380 | <replaceable>DEVICE…</replaceable> |
308e7dfd YW |
381 | </term> |
382 | <listitem><para>Renew dynamic configurations e.g. addresses received from DHCP server. | |
ec07c3c8 AK |
383 | Takes interface name or index number.</para> |
384 | ||
aefdc112 | 385 | <xi:include href="version-info.xml" xpointer="v244"/></listitem> |
308e7dfd YW |
386 | </varlistentry> |
387 | ||
3efdd6af SS |
388 | <varlistentry> |
389 | <term> | |
390 | <command>forcerenew</command> | |
f2c676c6 | 391 | <replaceable>DEVICE…</replaceable> |
3efdd6af SS |
392 | </term> |
393 | <listitem><para>Send a FORCERENEW message to all connected clients, triggering DHCP reconfiguration. | |
ec07c3c8 AK |
394 | Takes interface name or index number.</para> |
395 | ||
aefdc112 | 396 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> |
3efdd6af SS |
397 | </varlistentry> |
398 | ||
8dc85c5e YW |
399 | <varlistentry> |
400 | <term> | |
401 | <command>reconfigure</command> | |
f2c676c6 | 402 | <replaceable>DEVICE…</replaceable> |
8dc85c5e | 403 | </term> |
ed89e54a YW |
404 | <listitem><para>Reconfigure network interfaces. Takes interface name or index number. Note that |
405 | this does not reload <filename>.netdev</filename> or <filename>.network</filename> | |
10f34849 | 406 | corresponding to the specified interface. So, if you edit config files, it is necessary to call |
ec07c3c8 AK |
407 | <command>networkctl reload</command> first to apply new settings.</para> |
408 | ||
aefdc112 | 409 | <xi:include href="version-info.xml" xpointer="v244"/></listitem> |
8dc85c5e YW |
410 | </varlistentry> |
411 | ||
a227674c YW |
412 | <varlistentry> |
413 | <term> | |
414 | <command>reload</command> | |
415 | </term> | |
416 | <listitem><para>Reload <filename>.netdev</filename> and <filename>.network</filename> files. | |
417 | If a new <filename>.netdev</filename> file is found, then the corresponding netdev is created. | |
418 | Note that even if an existing <filename>.netdev</filename> is modified or removed, | |
419 | <command>systemd-networkd</command> does not update or remove the netdev. | |
420 | If a new, modified or removed <filename>.network</filename> file is found, then all interfaces | |
ec07c3c8 AK |
421 | which match the file are reconfigured.</para> |
422 | ||
423 | <xi:include href="version-info.xml" xpointer="v244"/></listitem> | |
a227674c YW |
424 | </varlistentry> |
425 | ||
96bab8fd MY |
426 | <varlistentry> |
427 | <term> | |
428 | <command>edit</command> | |
429 | <replaceable>FILE</replaceable>|<replaceable>@DEVICE</replaceable>… | |
430 | </term> | |
431 | <listitem><para>Edit network configuration files, which include <filename>.network</filename>, | |
432 | <filename>.netdev</filename>, and <filename>.link</filename> files. If no network config file | |
2b98926f MY |
433 | matching the given name is found, a new one will be created under <filename>/etc/</filename> or |
434 | <filename>/run/</filename>, depending on whether <option>--runtime</option> is specified. | |
96bab8fd MY |
435 | Specially, if the name is prefixed by <literal>@</literal>, it will be treated as |
436 | a network interface, and editing will be performed on the network config files associated | |
437 | with it. Additionally, the interface name can be suffixed with <literal>:network</literal> (default) | |
438 | or <literal>:link</literal>, in order to choose the type of network config to operate on.</para> | |
439 | ||
440 | <para>If <option>--drop-in=</option> is specified, edit the drop-in file instead of | |
441 | the main configuration file. Unless <option>--no-reload</option> is specified, | |
442 | <command>systemd-networkd</command> will be reloaded after the edit of the | |
443 | <filename>.network</filename> or <filename>.netdev</filename> files finishes. | |
bf63dadb ZJS |
444 | The same applies for <filename>.link</filename> files and |
445 | <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
96bab8fd MY |
446 | Note that the changed link settings are not automatically applied after reloading. |
447 | To achieve that, trigger uevents for the corresponding interface. Refer to | |
448 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
ec07c3c8 AK |
449 | for more information.</para> |
450 | ||
451 | <xi:include href="version-info.xml" xpointer="v254"/></listitem> | |
96bab8fd MY |
452 | </varlistentry> |
453 | ||
454 | <varlistentry> | |
455 | <term> | |
456 | <command>cat</command> | |
78281bd5 | 457 | <optional><replaceable>FILE</replaceable>|<replaceable>@DEVICE</replaceable>…</optional> |
96bab8fd | 458 | </term> |
78281bd5 YW |
459 | <listitem> |
460 | <para>Show network configuration files. This command honors the <literal>@</literal> prefix in the | |
461 | same way as <command>edit</command>. When no argument is specified, | |
462 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
463 | and its drop-in files will be shown.</para> | |
ec07c3c8 | 464 | |
78281bd5 YW |
465 | <xi:include href="version-info.xml" xpointer="v254"/> |
466 | </listitem> | |
96bab8fd | 467 | </varlistentry> |
28bb29cb MY |
468 | |
469 | <varlistentry> | |
470 | <term> | |
471 | <command>mask</command> | |
472 | <replaceable>FILE</replaceable>… | |
473 | </term> | |
474 | <listitem><para>Mask network configuration files, which include <filename>.network</filename>, | |
475 | <filename>.netdev</filename>, and <filename>.link</filename> files. A symlink of the given name will | |
476 | be created under <filename>/etc/</filename> or <filename>/run/</filename>, depending on | |
477 | whether <option>--runtime</option> is specified, that points to <filename>/dev/null</filename>. | |
478 | If a non-empty config file with the specified name exists under the target directory or a directory | |
479 | with higher priority (e.g. <option>--runtime</option> is used while an existing config resides | |
480 | in <filename>/etc/</filename>), the operation is aborted.</para> | |
481 | ||
482 | <para>This command honors <option>--no-reload</option> in the same way as <command>edit</command>. | |
483 | </para> | |
484 | ||
485 | <xi:include href="version-info.xml" xpointer="v256"/></listitem> | |
486 | </varlistentry> | |
487 | ||
488 | <varlistentry> | |
489 | <term> | |
490 | <command>unmask</command> | |
491 | <replaceable>FILE</replaceable>… | |
492 | </term> | |
493 | <listitem><para>Unmask network configuration files, i.e. reverting the effect of <command>mask</command>. | |
494 | Note that this command operates regardless of the scope of the directory, i.e. <option>--runtime</option> | |
495 | is of no effect.</para> | |
496 | ||
497 | <para>This command honors <option>--no-reload</option> in the same way as <command>edit</command> | |
498 | and <command>mask</command>.</para> | |
499 | ||
500 | <xi:include href="version-info.xml" xpointer="v256"/></listitem> | |
91676b64 YW |
501 | </varlistentry> |
502 | ||
503 | <varlistentry> | |
504 | <term> | |
505 | <command>persistent-storage</command> | |
506 | <replaceable>BOOL</replaceable> | |
507 | </term> | |
508 | <listitem> | |
509 | <para>Notify <filename>systemd-networkd.service</filename> that the persistent storage for the | |
510 | service is ready. This is called by | |
511 | <filename>systemd-networkd-persistent-storage.service</filename>. Usually, this command should not | |
512 | be called manually by users or administrators.</para> | |
513 | ||
514 | <xi:include href="version-info.xml" xpointer="v256"/> | |
515 | </listitem> | |
28bb29cb | 516 | </varlistentry> |
d9000fd3 ZJS |
517 | </variablelist> |
518 | </refsect1> | |
519 | ||
e1fac8a6 ZJS |
520 | <refsect1> |
521 | <title>Options</title> | |
522 | ||
523 | <para>The following options are understood:</para> | |
524 | ||
525 | <variablelist> | |
526 | <varlistentry> | |
527 | <term> | |
528 | <option>-a</option> | |
529 | <option>--all</option> | |
530 | </term> | |
531 | ||
532 | <listitem> | |
533 | <para>Show all links with <command>status</command>.</para> | |
ec07c3c8 AK |
534 | |
535 | <xi:include href="version-info.xml" xpointer="v219"/> | |
e1fac8a6 ZJS |
536 | </listitem> |
537 | </varlistentry> | |
538 | ||
539 | <varlistentry> | |
540 | <term> | |
541 | <option>-s</option> | |
542 | <option>--stats</option> | |
543 | </term> | |
544 | ||
545 | <listitem> | |
546 | <para>Show link statistics with <command>status</command>.</para> | |
ec07c3c8 AK |
547 | |
548 | <xi:include href="version-info.xml" xpointer="v243"/> | |
10c71c36 YW |
549 | </listitem> |
550 | </varlistentry> | |
551 | ||
552 | <varlistentry> | |
553 | <term><option>-l</option></term> | |
554 | <term><option>--full</option></term> | |
555 | ||
556 | <listitem> | |
a42d9490 | 557 | <para>Do not ellipsize the output.</para> |
ec07c3c8 AK |
558 | |
559 | <xi:include href="version-info.xml" xpointer="v245"/> | |
10c71c36 YW |
560 | </listitem> |
561 | </varlistentry> | |
562 | ||
563 | <varlistentry> | |
564 | <term><option>-n</option></term> | |
565 | <term><option>--lines=</option></term> | |
566 | ||
567 | <listitem> | |
568 | <para>When used with <command>status</command>, controls the number of journal lines to show, | |
569 | counting from the most recent ones. Takes a positive integer argument. Defaults to 10.</para> | |
ec07c3c8 AK |
570 | |
571 | <xi:include href="version-info.xml" xpointer="v245"/> | |
e1fac8a6 ZJS |
572 | </listitem> |
573 | </varlistentry> | |
574 | ||
96bab8fd | 575 | <varlistentry> |
9bfabe14 | 576 | <term><option>--drop-in=<replaceable>NAME</replaceable></option></term> |
96bab8fd MY |
577 | |
578 | <listitem> | |
579 | <para>When used with <command>edit</command>, edit the drop-in file <replaceable>NAME</replaceable> | |
580 | instead of the main configuration file.</para> | |
ec07c3c8 AK |
581 | |
582 | <xi:include href="version-info.xml" xpointer="v254"/> | |
96bab8fd MY |
583 | </listitem> |
584 | </varlistentry> | |
585 | ||
586 | <varlistentry> | |
587 | <term><option>--no-reload</option></term> | |
588 | ||
589 | <listitem> | |
28bb29cb | 590 | <para>When used with <command>edit</command>, <command>mask</command>, or <command>unmask</command>, |
bf63dadb ZJS |
591 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
592 | or | |
593 | <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
28bb29cb | 594 | will not be reloaded after the operation finishes.</para> |
ec07c3c8 AK |
595 | |
596 | <xi:include href="version-info.xml" xpointer="v254"/> | |
96bab8fd | 597 | </listitem> |
35fcba4a | 598 | </varlistentry> |
2b98926f MY |
599 | |
600 | <varlistentry> | |
601 | <term><option>--runtime</option></term> | |
602 | ||
603 | <listitem> | |
28bb29cb MY |
604 | <para>When used with <command>edit</command> or <command>mask</command>, |
605 | operate on the file under <filename>/run/</filename> instead of <filename>/etc/</filename>.</para> | |
2b98926f MY |
606 | |
607 | <xi:include href="version-info.xml" xpointer="v256"/> | |
608 | </listitem> | |
609 | </varlistentry> | |
96bab8fd | 610 | |
bfc2b05e | 611 | <xi:include href="standard-options.xml" xpointer="json" /> |
e1fac8a6 ZJS |
612 | <xi:include href="standard-options.xml" xpointer="help" /> |
613 | <xi:include href="standard-options.xml" xpointer="version" /> | |
614 | <xi:include href="standard-options.xml" xpointer="no-legend" /> | |
615 | <xi:include href="standard-options.xml" xpointer="no-pager" /> | |
616 | ||
617 | </variablelist> | |
618 | </refsect1> | |
619 | ||
d9000fd3 ZJS |
620 | <refsect1> |
621 | <title>Exit status</title> | |
622 | ||
a5be8dab | 623 | <para>On success, 0 is returned, a non-zero failure code otherwise.</para> |
d9000fd3 ZJS |
624 | </refsect1> |
625 | ||
626 | <refsect1> | |
627 | <title>See Also</title> | |
13a69c12 DT |
628 | <para><simplelist type="inline"> |
629 | <member><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> | |
630 | <member><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> | |
631 | <member><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> | |
632 | <member><citerefentry project='die-net'><refentrytitle>ip</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> | |
633 | </simplelist></para> | |
d9000fd3 ZJS |
634 | </refsect1> |
635 | </refentry> |