]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.network.xml
Merge pull request #7728 from poettering/fork-rework
[thirdparty/systemd.git] / man / systemd.network.xml
CommitLineData
ad943783 1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
eac684ef 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
eac684ef
TG
4
5<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
eac684ef
TG
8 This file is part of systemd.
9
10 Copyright 2013 Tom Gundersen
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24-->
25
26<refentry id="systemd.network" conditional='ENABLE_NETWORKD'>
27
798d3a52
ZJS
28 <refentryinfo>
29 <title>systemd.network</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Tom</firstname>
36 <surname>Gundersen</surname>
37 <email>teg@jklm.no</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>systemd.network</refentrytitle>
44 <manvolnum>5</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>systemd.network</refname>
49 <refpurpose>Network configuration</refpurpose>
50 </refnamediv>
51
52 <refsynopsisdiv>
53 <para><filename><replaceable>network</replaceable>.network</filename></para>
54 </refsynopsisdiv>
55
56 <refsect1>
57 <title>Description</title>
58
59 <para>Network setup is performed by
60 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
61 </para>
62
bac150e9
ZJS
63 <para>The main network file must have the extension <filename>.network</filename>; other
64 extensions are ignored. Networks are applied to links whenever the links appear.</para>
65
66 <para>The <filename>.network</filename> files are read from the files located in the system
67 network directory <filename>/usr/lib/systemd/network</filename>, the volatile runtime network
68 directory <filename>/run/systemd/network</filename> and the local administration network
69 directory <filename>/etc/systemd/network</filename>. All configuration files are collectively
70 sorted and processed in lexical order, regardless of the directories in which they live.
71 However, files with identical filenames replace each other. Files in <filename>/etc</filename>
72 have the highest priority, files in <filename>/run</filename> take precedence over files with
73 the same name in <filename>/usr/lib</filename>. This can be used to override a system-supplied
74 configuration file with a local file if needed. As a special case, an empty file (file size 0)
75 or symlink with the same name pointing to <filename>/dev/null</filename> disables the
76 configuration file entirely (it is "masked").</para>
77
78 <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory
79 <filename>foo.network.d/</filename> may exist. All files with the suffix
80 <literal>.conf</literal> from this directory will be parsed after the file itself is
81 parsed. This is useful to alter or add configuration settings, without having to modify the main
82 configuration file. Each drop-in file must have appropriate section headers.</para>
83
84 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
85 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
86 <filename>/run/systemd/network</filename> directories. Drop-in files in
87 <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn
88 take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these
89 directories take precedence over the main netdev file wherever located. (Of course, since
90 <filename>/run</filename> is temporary and <filename>/usr/lib</filename> is for vendors, it is
91 unlikely drop-ins should be used in either of those places.)</para>
92
93 <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
94 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
95 disabled for that interface by writing "1" to
96 <filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>.
82ecb4c3 97 </para>
798d3a52
ZJS
98 </refsect1>
99
100 <refsect1>
101 <title>[Match] Section Options</title>
102
103 <para>The network file contains a <literal>[Match]</literal>
104 section, which determines if a given network file may be applied
105 to a given device; and a <literal>[Network]</literal> section
106 specifying how the device should be configured. The first (in
107 lexical order) of the network files that matches a given device
a22e1850
LP
108 is applied, all later files are ignored, even if they match as
109 well.</para>
798d3a52
ZJS
110
111 <para>A network file is said to match a device if each of the
112 entries in the <literal>[Match]</literal> section matches, or if
113 the section is empty. The following keys are accepted:</para>
114
115 <variablelist class='network-directives'>
116 <varlistentry>
117 <term><varname>MACAddress=</varname></term>
118 <listitem>
de25aae1
DKG
119 <para>The hardware address of the interface (use full colon-delimited hexadecimal, e.g.,
120 01:23:45:67:89:ab).</para>
798d3a52
ZJS
121 </listitem>
122 </varlistentry>
123 <varlistentry>
124 <term><varname>Path=</varname></term>
125 <listitem>
5256e00e
TG
126 <para>A whitespace-separated list of shell-style globs
127 matching the persistent path, as exposed by the udev
618b196e
DM
128 property <literal>ID_PATH</literal>. If the list is
129 prefixed with a "!", the test is inverted; i.e. it is
130 true when <literal>ID_PATH</literal> does not match any
131 item in the list.</para>
798d3a52
ZJS
132 </listitem>
133 </varlistentry>
134 <varlistentry>
135 <term><varname>Driver=</varname></term>
136 <listitem>
5256e00e
TG
137 <para>A whitespace-separated list of shell-style globs
138 matching the driver currently bound to the device, as
798d3a52
ZJS
139 exposed by the udev property <literal>DRIVER</literal>
140 of its parent device, or if that is not set the driver
141 as exposed by <literal>ethtool -i</literal> of the
618b196e
DM
142 device itself. If the list is prefixed with a "!", the
143 test is inverted.</para>
798d3a52
ZJS
144 </listitem>
145 </varlistentry>
146 <varlistentry>
147 <term><varname>Type=</varname></term>
148 <listitem>
5256e00e
TG
149 <para>A whitespace-separated list of shell-style globs
150 matching the device type, as exposed by the udev property
618b196e
DM
151 <literal>DEVTYPE</literal>. If the list is prefixed with
152 a "!", the test is inverted.</para>
798d3a52
ZJS
153 </listitem>
154 </varlistentry>
155 <varlistentry>
156 <term><varname>Name=</varname></term>
157 <listitem>
5256e00e
TG
158 <para>A whitespace-separated list of shell-style globs
159 matching the device name, as exposed by the udev property
618b196e
DM
160 <literal>INTERFACE</literal>. If the list is prefixed
161 with a "!", the test is inverted.</para>
798d3a52
ZJS
162 </listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><varname>Host=</varname></term>
166 <listitem>
167 <para>Matches against the hostname or machine ID of the
168 host. See <literal>ConditionHost=</literal> in
169 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
170 for details.
171 </para>
172 </listitem>
173 </varlistentry>
174 <varlistentry>
175 <term><varname>Virtualization=</varname></term>
176 <listitem>
177 <para>Checks whether the system is executed in a virtualized
178 environment and optionally test whether it is a specific
179 implementation. See <literal>ConditionVirtualization=</literal> in
180 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
181 for details.
182 </para>
183 </listitem>
184 </varlistentry>
185 <varlistentry>
186 <term><varname>KernelCommandLine=</varname></term>
187 <listitem>
188 <para>Checks whether a specific kernel command line option is
189 set (or if prefixed with the exclamation mark unset). See
190 <literal>ConditionKernelCommandLine=</literal> in
191 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
192 for details.
193 </para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><varname>Architecture=</varname></term>
198 <listitem>
199 <para>Checks whether the system is running on a specific
200 architecture. See <literal>ConditionArchitecture=</literal> in
201 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
202 for details.
203 </para>
204 </listitem>
205 </varlistentry>
206 </variablelist>
207
208 </refsect1>
209
210 <refsect1>
211 <title>[Link] Section Options</title>
212
213 <para> The <literal>[Link]</literal> section accepts the following keys:</para>
214
215 <variablelist class='network-directives'>
216 <varlistentry>
217 <term><varname>MACAddress=</varname></term>
218 <listitem>
de25aae1 219 <para>The hardware address to set for the device.</para>
798d3a52
ZJS
220 </listitem>
221 </varlistentry>
222 <varlistentry>
223 <term><varname>MTUBytes=</varname></term>
224 <listitem>
225 <para>The maximum transmission unit in bytes to set for the
226 device. The usual suffixes K, M, G, are supported and are
227 understood to the base of 1024.</para>
439689c6
SS
228 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
229 below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para>
798d3a52
ZJS
230 </listitem>
231 </varlistentry>
99d2baa2
SS
232 <varlistentry>
233 <term><varname>ARP=</varname></term>
234 <listitem>
235 <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol)
236 for this interface. Defaults to unset, which means that the kernel default will be used.</para>
237 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
238 interfaces atop a single lower-level physical interface, which will then only serve as a
239 link/"bridge" device aggregating traffic to the same physical link and not participate in
240 the network otherwise.</para>
241 </listitem>
242 </varlistentry>
a09dc546
DM
243 <varlistentry>
244 <term><varname>Unmanaged=</varname></term>
245 <listitem>
246 <para>A boolean. When <literal>yes</literal>, no attempts are
247 made to bring up or configure matching links, equivalent to
248 when there are no matching network files. Defaults to
249 <literal>no</literal>.</para>
250 <para>This is useful for preventing later matching network
251 files from interfering with certain interfaces that are fully
252 controlled by other applications.</para>
253 </listitem>
254 </varlistentry>
c1a38904
MTL
255 <varlistentry>
256 <term><varname>RequiredForOnline=</varname></term>
257 <listitem>
258 <para>A boolean. When <literal>yes</literal>, the network is deemed
259 required when determining whether the system is online when running
260 <literal>systemd-networkd-wait-online</literal>.
261 When <literal>no</literal>, the network is ignored when checking for
262 online state. Defaults to <literal>yes</literal>.</para>
263 <para>The network will be brought up normally in all cases, but in
264 the event that there is no address being assigned by DHCP or the
265 cable is not plugged in, the link will simply remain offline and be
266 skipped automatically by <literal>systemd-networkd-wait-online</literal>
267 if <literal>RequiredForOnline=true</literal>.</para>
268 </listitem>
269 </varlistentry>
798d3a52
ZJS
270 </variablelist>
271 </refsect1>
272
273 <refsect1>
274 <title>[Network] Section Options</title>
275
276 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
277
278 <variablelist class='network-directives'>
279 <varlistentry>
280 <term><varname>Description=</varname></term>
281 <listitem>
282 <para>A description of the device. This is only used for
283 presentation purposes.</para>
284 </listitem>
285 </varlistentry>
286 <varlistentry>
287 <term><varname>DHCP=</varname></term>
288 <listitem>
ad943783 289 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
798d3a52 290 <literal>yes</literal>, <literal>no</literal>,
c702bd3b
LY
291 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults
292 to <literal>no</literal>.</para>
e88d8021 293
f5a8c43f 294 <para>Note that DHCPv6 will by default be triggered by Router
7f3fdb7f 295 Advertisement, if that is enabled, regardless of this parameter.
f5a8c43f
TG
296 By enabling DHCPv6 support explicitly, the DHCPv6 client will
297 be started regardless of the presence of routers on the link,
298 or what flags the routers pass. See
f921f573 299 <literal>IPv6AcceptRA=</literal>.</para>
f5a8c43f
TG
300
301 <para>Furthermore, note that by default the domain name
e88d8021
ZJS
302 specified through DHCP is not used for name resolution.
303 See option <option>UseDomains=</option> below.</para>
2ef322fc
LP
304
305 <para>See the <literal>[DHCP]</literal> section below for further configuration options for the DHCP client
306 support.</para>
798d3a52
ZJS
307 </listitem>
308 </varlistentry>
309 <varlistentry>
310 <term><varname>DHCPServer=</varname></term>
311 <listitem>
ad943783
LP
312 <para>A boolean. Enables DHCPv4 server support. Defaults
313 to <literal>no</literal>. Further settings for the DHCP
314 server may be set in the <literal>[DHCPServer]</literal>
315 section described below.</para>
798d3a52
ZJS
316 </listitem>
317 </varlistentry>
318 <varlistentry>
56fd6bf7 319 <term><varname>LinkLocalAddressing=</varname></term>
798d3a52 320 <listitem>
d0d6a4cd
TG
321 <para>Enables link-local address autoconfiguration. Accepts
322 <literal>yes</literal>, <literal>no</literal>,
323 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to
324 <literal>ipv6</literal>.</para>
798d3a52
ZJS
325 </listitem>
326 </varlistentry>
327 <varlistentry>
328 <term><varname>IPv4LLRoute=</varname></term>
329 <listitem>
330 <para>A boolean. When true, sets up the route needed for
331 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
332 to false.
333 </para>
334 </listitem>
335 </varlistentry>
336 <varlistentry>
113bfde1
TG
337 <term><varname>IPv6Token=</varname></term>
338 <listitem>
339 <para>An IPv6 address with the top 64 bits unset. When set, indicates the
eb142d8e
TG
340 64-bit interface part of SLAAC IPv6 addresses for this link. Note that
341 the token is only ever used for SLAAC, and not for DHCPv6 addresses, even
3708bd46 342 in the case DHCP is requested by router advertisement. By default, the
eb142d8e 343 token is autogenerated.</para>
113bfde1
TG
344 </listitem>
345 </varlistentry>
346 <varlistentry>
798d3a52
ZJS
347 <term><varname>LLMNR=</varname></term>
348 <listitem>
aaa297d4
LP
349 <para>A boolean or <literal>resolve</literal>. When true,
350 enables <ulink
351 url="https://tools.ietf.org/html/rfc4795">Link-Local
352 Multicast Name Resolution</ulink> on the link. When set to
353 <literal>resolve</literal>, only resolution is enabled,
354 but not host registration and announcement. Defaults to
355 true. This setting is read by
356 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
357 </listitem>
358 </varlistentry>
359 <varlistentry>
360 <term><varname>MulticastDNS=</varname></term>
361 <listitem>
362 <para>A boolean or <literal>resolve</literal>. When true,
363 enables <ulink
364 url="https://tools.ietf.org/html/rfc6762">Multicast
365 DNS</ulink> support on the link. When set to
366 <literal>resolve</literal>, only resolution is enabled,
367 but not host or service registration and
368 announcement. Defaults to false. This setting is read by
369 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
370 </listitem>
371 </varlistentry>
ad6c0475
LP
372 <varlistentry>
373 <term><varname>DNSSEC=</varname></term>
374 <listitem>
375 <para>A boolean or
376 <literal>allow-downgrade</literal>. When true, enables
377 <ulink
378 url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink>
379 DNS validation support on the link. When set to
380 <literal>allow-downgrade</literal>, compatibility with
381 non-DNSSEC capable networks is increased, by automatically
785889e5 382 turning off DNSSEC in this case. This option defines a
ad6c0475
LP
383 per-interface setting for
384 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
385 global <varname>DNSSEC=</varname> option. Defaults to
386 false. This setting is read by
387 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
388 </listitem>
389 </varlistentry>
8a516214
LP
390 <varlistentry>
391 <term><varname>DNSSECNegativeTrustAnchors=</varname></term>
392 <listitem><para>A space-separated list of DNSSEC negative
393 trust anchor domains. If specified and DNSSEC is enabled,
394 look-ups done via the interface's DNS server will be subject
395 to the list of negative trust anchors, and not require
396 authentication for the specified domains, or anything below
397 it. Use this to disable DNSSEC authentication for specific
398 private domains, that cannot be proven valid using the
399 Internet DNS hierarchy. Defaults to the empty list. This
400 setting is read by
401 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
402 </listitem>
403 </varlistentry>
798d3a52
ZJS
404 <varlistentry>
405 <term><varname>LLDP=</varname></term>
406 <listitem>
da6c766d
LP
407 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
408 implemented on professional routers and bridges which announces which physical port a system is connected
409 to, as well as other related data. Accepts a boolean or the special value
34437b4f
LP
410 <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
411 neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers
412 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
7cececb2 413 others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
34437b4f 414 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
da6c766d
LP
415 collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below
416 for enabling LLDP packet emission from the local system.
798d3a52
ZJS
417 </para>
418 </listitem>
419 </varlistentry>
da6c766d
LP
420 <varlistentry>
421 <term><varname>EmitLLDP=</varname></term>
422 <listitem>
7272b25e
LP
423 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
424 <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and
425 <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
426 a short LLDP packet with information about the local system is sent out in regular intervals on the
427 link. The LLDP packet will contain information about the local host name, the local machine ID (as stored
428 in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
da6c766d
LP
429 local interface name, as well as the pretty hostname of the system (as set in
430 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
7272b25e
LP
431 emission is only available on Ethernet links. Note that this setting passes data suitable for
432 identification of host to the network and should thus not be enabled on untrusted networks, where such
433 identification data should not be made available. Use this option to permit other systems to identify on
434 which interfaces they are connected to this system. The three special values control propagation of the
435 LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest
436 connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but
437 not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge
438 is reached. For details about these concepts, see <ulink
439 url="http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE 802.1AB-2009</ulink>. Note that
440 configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and
441 most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP
442 reception.</para>
da6c766d
LP
443 </listitem>
444 </varlistentry>
0d4ad91d
AR
445 <varlistentry>
446 <term><varname>BindCarrier=</varname></term>
447 <listitem>
2ae7505f
TG
448 <para>A link name or a list of link names. When set, controls the behavior of the current
449 link. When all links in the list are in an operational down state, the current link is brought
450 down. When at least one link has carrier, the current interface is brought up.
0d4ad91d
AR
451 </para>
452 </listitem>
453 </varlistentry>
798d3a52
ZJS
454 <varlistentry>
455 <term><varname>Address=</varname></term>
456 <listitem>
457 <para>A static IPv4 or IPv6 address and its prefix length,
458 separated by a <literal>/</literal> character. Specify
459 this key more than once to configure several addresses.
460 The format of the address must be as described in
3ba3a79d 461 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
462 This is a short-hand for an [Address] section only
463 containing an Address key (see below). This option may be
464 specified more than once.
465 </para>
466
467 <para>If the specified address is 0.0.0.0 (for IPv4) or
468 [::] (for IPv6), a new address range of the requested size
469 is automatically allocated from a system-wide pool of
470 unused ranges. The allocated range is checked against all
471 current network interfaces and all known network
472 configuration files to avoid address range conflicts. The
473 default system-wide pool consists of 192.168.0.0/16,
474 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for
475 IPv6. This functionality is useful to manage a large
476 number of dynamically created network interfaces with the
477 same network configuration and automatic address range
478 assignment.</para>
479
480 </listitem>
481 </varlistentry>
482 <varlistentry>
483 <term><varname>Gateway=</varname></term>
484 <listitem>
485 <para>The gateway address, which must be in the format
486 described in
3ba3a79d 487 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
488 This is a short-hand for a [Route] section only containing
489 a Gateway key. This option may be specified more than
490 once.</para>
491 </listitem>
492 </varlistentry>
493 <varlistentry>
494 <term><varname>DNS=</varname></term>
495 <listitem>
496 <para>A DNS server address, which must be in the format
497 described in
3ba3a79d 498 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
f41b446a 499 This option may be specified more than once. This setting is read by
3df9bec5 500 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
501 </listitem>
502 </varlistentry>
503 <varlistentry>
504 <term><varname>Domains=</varname></term>
505 <listitem>
2df22529
ZJS
506 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
507 should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the
508 prefix are called "routing-only domains". The domains without the prefix are called "search domains" and
509 are first used as search suffixes for extending single-label host names (host names containing no dots) to
510 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
511 each of the specified search domains are appended to it in turn, converting it into a fully qualified
512 domain name, until one of them may be successfully resolved.</para>
513
514 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names
515 ending in those domains (hence also single label names, if any "search domains" are listed), are routed to
516 the DNS servers configured for this interface. The domain routing logic is particularly useful on
517 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para>
518
519 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain,
520 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
521 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
522 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
523 if a link on which they are connected is available.</para>
3df9bec5
LP
524
525 <para>This setting is read by
2df22529
ZJS
526 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
527 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in
98e9d710 528 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
2df22529
ZJS
529 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
530 name servers limited to a specific link.</para>
798d3a52
ZJS
531 </listitem>
532 </varlistentry>
533 <varlistentry>
534 <term><varname>NTP=</varname></term>
535 <listitem>
f41b446a 536 <para>An NTP server address. This option may be specified more than once. This setting is read by
3df9bec5 537 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
538 </listitem>
539 </varlistentry>
540 <varlistentry>
541 <term><varname>IPForward=</varname></term>
765afd5c
LP
542 <listitem><para>Configures IP packet forwarding for the
543 system. If enabled, incoming packets on any network
544 interface will be forwarded to any other interfaces
545 according to the routing table. Takes either a boolean
546 argument, or the values <literal>ipv4</literal> or
547 <literal>ipv6</literal>, which only enable IP packet
548 forwarding for the specified address family. This controls
549 the <filename>net.ipv4.ip_forward</filename> and
550 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
551 options of the network interface (see <ulink
4046d836
LP
552 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
553 for details about sysctl options). Defaults to
554 <literal>no</literal>.</para>
555
765afd5c
LP
556 <para>Note: this setting controls a global kernel option,
557 and does so one way only: if a network that has this setting
558 enabled is set up the global setting is turned on. However,
559 it is never turned off again, even after all networks with
560 this setting enabled are shut down again.</para>
561
562 <para>To allow IP packet forwarding only between specific
563 network interfaces use a firewall.</para>
4046d836 564 </listitem>
798d3a52
ZJS
565 </varlistentry>
566 <varlistentry>
567 <term><varname>IPMasquerade=</varname></term>
568 <listitem><para>Configures IP masquerading for the network
b938cb90 569 interface. If enabled, packets forwarded from the network
798d3a52
ZJS
570 interface will be appear as coming from the local host.
571 Takes a boolean argument. Implies
5c82dd13 572 <varname>IPForward=ipv4</varname>. Defaults to
4046d836 573 <literal>no</literal>.</para></listitem>
798d3a52 574 </varlistentry>
a46e37cb
SS
575 <varlistentry>
576 <term><varname>IPv6PrivacyExtensions=</varname></term>
1f0d9695
LP
577 <listitem><para>Configures use of stateless temporary
578 addresses that change over time (see <ulink
579 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
580 Privacy Extensions for Stateless Address Autoconfiguration
581 in IPv6). Takes a boolean or the special values
582 <literal>prefer-public</literal> and
b938cb90 583 <literal>kernel</literal>. When true, enables the privacy
1f0d9695 584 extensions and prefers temporary addresses over public
b938cb90 585 addresses. When <literal>prefer-public</literal>, enables the
1f0d9695
LP
586 privacy extensions, but prefers public addresses over
587 temporary addresses. When false, the privacy extensions
b938cb90 588 remain disabled. When <literal>kernel</literal>, the kernel's
1f0d9695 589 default setting will be left in place. Defaults to
a46e37cb
SS
590 <literal>no</literal>.</para></listitem>
591 </varlistentry>
941d0aa8 592 <varlistentry>
f921f573 593 <term><varname>IPv6AcceptRA=</varname></term>
1e7a0e21
LP
594 <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes
595 a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
596 forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
597 is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if
598 the relevant flags are set in the RA data, or if no routers are found on the link.</para>
599
600 <para>Further settings for the IPv6 RA support may be configured in the
f921f573 601 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
1e7a0e21
LP
602
603 <para>Also see <ulink
604 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
605 documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of
606 <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para>
ebf98081 607 </listitem>
941d0aa8 608 </varlistentry>
44de7fb1
SS
609 <varlistentry>
610 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
a8eaaee7
JE
611 <listitem><para>Configures the amount of IPv6 Duplicate
612 Address Detection (DAD) probes to send. Defaults to unset.
44de7fb1
SS
613 </para></listitem>
614 </varlistentry>
a86cba89
SS
615 <varlistentry>
616 <term><varname>IPv6HopLimit=</varname></term>
617 <listitem><para>Configures IPv6 Hop Limit. For each router that
618 forwards the packet, the hop limit is decremented by 1. When the
619 hop limit field reaches zero, the packet is discarded.
620 Defaults to unset.
621 </para></listitem>
622 </varlistentry>
23d8b221 623 <varlistentry>
8f9a206b
SS
624 <term><varname>IPv4ProxyARP=</varname></term>
625 <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
23d8b221
SS
626 usually a router, answers ARP requests intended for another machine. By "faking" its identity,
627 the router accepts responsibility for routing packets to the "real" destination. (see <ulink
628 url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>.
629 Defaults to unset.
630 </para></listitem>
631 </varlistentry>
a0e5c15d 632 <varlistentry>
465dfe59
HV
633 <term><varname>IPv6ProxyNDP=</varname></term>
634 <listitem><para>A boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery
635 Protocol) is a technique for IPv6 to allow routing of addresses to a different
636 destination when peers expect them to be present on a certain physical link.
a0e5c15d
FK
637 In this case a router answers Neighbour Advertisement messages intended for
638 another machine by offering its own MAC address as destination.
465dfe59 639 Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour
a0e5c15d 640 Advertisement messages for addresses in the IPv6 neighbor proxy table,
465dfe59
HV
641 which can also be shown by <command>ip -6 neighbour show proxy</command>.
642 systemd-networkd will control the per-interface `proxy_ndp` switch for each configured
643 interface depending on this option.
644 Defautls to unset.
645 </para></listitem>
646 </varlistentry>
647 <varlistentry>
648 <term><varname>IPv6ProxyNDPAddress=</varname></term>
649 <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be
650 proxied. This option may be specified more than once. systemd-networkd will add the
651 <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table.
652 This option implies <option>IPv6ProxyNDP=true</option> but has no effect if
653 <option>IPv6ProxyNDP</option> has been set to false. Defaults to unset.
a0e5c15d
FK
654 </para></listitem>
655 </varlistentry>
3f9e0236
PF
656 <varlistentry>
657 <term><varname>IPv6PrefixDelegation=</varname></term>
658 <listitem><para>Whether to enable or disable Router Advertisement sending on a link.
659 Defaults to <literal>false</literal>. See the <literal>[IPv6PrefixDelegation]</literal>
660 and the <literal>[IPv6Prefix]</literal> sections for configuration options.
661 </para></listitem>
662 </varlistentry>
798d3a52
ZJS
663 <varlistentry>
664 <term><varname>Bridge=</varname></term>
665 <listitem>
9e35b3de
ZJS
666 <para>The name of the bridge to add the link to. See
667 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
668 </para>
798d3a52
ZJS
669 </listitem>
670 </varlistentry>
671 <varlistentry>
672 <term><varname>Bond=</varname></term>
673 <listitem>
9e35b3de
ZJS
674 <para>The name of the bond to add the link to. See
675 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
676 </para>
798d3a52
ZJS
677 </listitem>
678 </varlistentry>
6cb955c6
AR
679 <varlistentry>
680 <term><varname>VRF=</varname></term>
681 <listitem>
9e35b3de
ZJS
682 <para>The name of the VRF to add the link to. See
683 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
684 </para>
6cb955c6
AR
685 </listitem>
686 </varlistentry>
798d3a52
ZJS
687 <varlistentry>
688 <term><varname>VLAN=</varname></term>
689 <listitem>
9e35b3de
ZJS
690 <para>The name of a VLAN to create on the link. See
691 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
692 This option may be specified more than once.</para>
798d3a52
ZJS
693 </listitem>
694 </varlistentry>
695 <varlistentry>
696 <term><varname>MACVLAN=</varname></term>
697 <listitem>
9e35b3de
ZJS
698 <para>The name of a MACVLAN to create on the link. See
699 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
700 This option may be specified more than once.</para>
798d3a52
ZJS
701 </listitem>
702 </varlistentry>
703 <varlistentry>
704 <term><varname>VXLAN=</varname></term>
705 <listitem>
9e35b3de
ZJS
706 <para>The name of a VXLAN to create on the link. See
707 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
708 This option may be specified more than once.</para>
798d3a52
ZJS
709 </listitem>
710 </varlistentry>
711 <varlistentry>
712 <term><varname>Tunnel=</varname></term>
713 <listitem>
9e35b3de
ZJS
714 <para>The name of a Tunnel to create on the link. See
715 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
716 This option may be specified more than once.</para>
798d3a52
ZJS
717 </listitem>
718 </varlistentry>
dd5f3175
SS
719 <varlistentry>
720 <term><varname>ActiveSlave=</varname></term>
721 <listitem>
722 <para>A boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal>
723 option is only valid for following modes:
724 <literal>active-backup</literal>,
725 <literal>balance-alb</literal> and
726 <literal>balance-tlb</literal>. Defaults to false.
727 </para>
728 </listitem>
729 </varlistentry>
730 <varlistentry>
731 <term><varname>PrimarySlave=</varname></term>
732 <listitem>
733 <para>A boolean. Specifies which slave is the primary device. The specified
734 device will always be the active slave while it is available. Only when the
735 primary is off-line will alternate devices be used. This is useful when
736 one slave is preferred over another, e.g. when one slave has higher throughput
737 than another. The <literal>PrimarySlave=</literal> option is only valid for
738 following modes:
739 <literal>active-backup</literal>,
740 <literal>balance-alb</literal> and
741 <literal>balance-tlb</literal>. Defaults to false.
742 </para>
743 </listitem>
744 </varlistentry>
dad2d78e
SS
745 <varlistentry>
746 <term><varname>ConfigureWithoutCarrier=</varname></term>
747 <listitem>
748 <para>A boolean. Allows networkd to configure a specific link even if it has no carrier.
749 Defaults to false.
750 </para>
751 </listitem>
752 </varlistentry>
798d3a52
ZJS
753 </variablelist>
754
755 </refsect1>
756
757 <refsect1>
758 <title>[Address] Section Options</title>
759
760 <para>An <literal>[Address]</literal> section accepts the
761 following keys. Specify several <literal>[Address]</literal>
762 sections to configure several addresses.</para>
763
764 <variablelist class='network-directives'>
765 <varlistentry>
766 <term><varname>Address=</varname></term>
767 <listitem>
768 <para>As in the <literal>[Network]</literal> section. This
769 key is mandatory.</para>
770 </listitem>
771 </varlistentry>
772 <varlistentry>
773 <term><varname>Peer=</varname></term>
774 <listitem>
775 <para>The peer address in a point-to-point connection.
776 Accepts the same format as the <literal>Address</literal>
777 key.</para>
778 </listitem>
779 </varlistentry>
780 <varlistentry>
781 <term><varname>Broadcast=</varname></term>
782 <listitem>
783 <para>The broadcast address, which must be in the format
784 described in
3ba3a79d 785 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
786 This key only applies to IPv4 addresses. If it is not
787 given, it is derived from the <literal>Address</literal>
788 key.</para>
789 </listitem>
790 </varlistentry>
791 <varlistentry>
792 <term><varname>Label=</varname></term>
793 <listitem>
794 <para>An address label.</para>
795 </listitem>
796 </varlistentry>
b5834a0b
SS
797 <varlistentry>
798 <term><varname>PreferredLifetime=</varname></term>
799 <listitem>
800 <para>Allows the default "preferred lifetime" of the address to be overridden.
801 Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal>
802 which is the default and means that the address never expires, and <literal>0</literal> which means
803 that the address is considered immediately "expired" and will not be used,
804 unless explicitly requested. A setting of PreferredLifetime=0 is useful for
805 addresses which are added to be used only by a specific application,
806 which is then configured to use them explicitly.</para>
807 </listitem>
808 </varlistentry>
2959fb07
SS
809 <varlistentry>
810 <term><varname>Scope=</varname></term>
811 <listitem>
812 <para>The scope of the address, which can be <literal>global</literal>,
813 <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255.
814 Defaults to <literal>global</literal>.</para>
815 </listitem>
816 </varlistentry>
e63be084
SS
817 <varlistentry>
818 <term><varname>HomeAddress=</varname></term>
819 <listitem>
820 <para>Takes a boolean argument. Designates this address the "home address" as defined in
821 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>.
822 Supported only on IPv6. Defaults to false.</para>
823 </listitem>
824 </varlistentry>
825 <varlistentry>
826 <term><varname>DuplicateAddressDetection=</varname></term>
827 <listitem>
828 <para>Takes a boolean argument. Do not perform Duplicate Address Detection
829 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink> when adding this address.
830 Supported only on IPv6. Defaults to false.</para>
831 </listitem>
832 </varlistentry>
833 <varlistentry>
834 <term><varname>ManageTemporaryAddress=</varname></term>
835 <listitem>
836 <para>Takes a boolean argument. If true the kernel manage temporary addresses created
837 from this one as template on behalf of Privacy Extensions
838 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become
839 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
840 The given address needs to have a prefix length of 64. This flag allows to use privacy
841 extensions in a manually configured network, just like if stateless auto-configuration
842 was active. Defaults to false. </para>
843 </listitem>
844 </varlistentry>
845 <varlistentry>
846 <term><varname>PrefixRoute=</varname></term>
847 <listitem>
848 <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace
849 application needs a way to suppress adding a prefix route. This is for example relevant
850 together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses,
851 but depending on on-link, no route for the prefix should be added. Defaults to false.</para>
852 </listitem>
853 </varlistentry>
854 <varlistentry>
855 <term><varname>AutoJoin=</varname></term>
856 <listitem>
857 <para>Takes a boolean argument. Joining multicast group on ethernet level via
858 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
859 IGMP snooping since the switch would not replicate multicast packets on ports that did not
860 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
861 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
862 that enables then to do the required join. By extending ip address command with option
863 <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan
864 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
865 Defaults to <literal>no</literal>.</para>
866 </listitem>
867 </varlistentry>
798d3a52
ZJS
868 </variablelist>
869 </refsect1>
870
95b74ef6
SS
871 <refsect1>
872 <title>[IPv6AddressLabel] Section Options</title>
873
874 <para>An <literal>[IPv6AddressLabel]</literal> section accepts the
875 following keys. Specify several <literal>[IPv6AddressLabel]</literal>
785889e5 876 sections to configure several address labels. IPv6 address labels are
95b74ef6
SS
877 used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>.
878 Precedence is managed by userspace, and only the label itself is stored in the kernel</para>
879
880 <variablelist class='network-directives'>
881 <varlistentry>
882 <term><varname>Label=</varname></term>
883 <listitem>
884 <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294.
885 0xffffffff is reserved. This key is mandatory.</para>
886 </listitem>
887 </varlistentry>
888 <varlistentry>
889 <term><varname>Prefix=</varname></term>
890 <listitem>
891 <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character.
892 This key is mandatory. </para>
893 </listitem>
894 </varlistentry>
895 </variablelist>
896 </refsect1>
897
bce67bbe
SS
898 <refsect1>
899 <title>[RoutingPolicyRule] Section Options</title>
900
901 <para>An <literal>[RoutingPolicyRule]</literal> section accepts the
902 following keys. Specify several <literal>[RoutingPolicyRule]</literal>
903 sections to configure several rules.</para>
904
905 <variablelist class='network-directives'>
906 <varlistentry>
907 <term><varname>TypeOfService=</varname></term>
908 <listitem>
909 <para>Specifies the type of service to match a number between 0 to 255.</para>
910 </listitem>
911 </varlistentry>
912 <varlistentry>
913 <term><varname>From=</varname></term>
914 <listitem>
915 <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para>
916 </listitem>
917 </varlistentry>
918 <varlistentry>
919 <term><varname>To=</varname></term>
920 <listitem>
921 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para>
922 </listitem>
923 </varlistentry>
924 <varlistentry>
925 <term><varname>FirewallMark=</varname></term>
926 <listitem>
927 <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para>
928 </listitem>
929 </varlistentry>
930 <varlistentry>
931 <term><varname>Table=</varname></term>
932 <listitem>
933 <para>Specifies the routing table identifier to lookup if the rule
934 selector matches. The table identifier for a route (a number between 1 and 4294967295).</para>
935 </listitem>
936 </varlistentry>
937 <varlistentry>
938 <term><varname>Priority=</varname></term>
939 <listitem>
940 <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned
941 integer. Higher number means lower priority, and rules get processed in order of increasing number.</para>
942 </listitem>
943 </varlistentry>
762e2659
SS
944 <varlistentry>
945 <term><varname>IncomingInterface=</varname></term>
946 <listitem>
947 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para>
948 </listitem>
949 </varlistentry>
950 <varlistentry>
951 <term><varname>OutgoingInterface=</varname></term>
952 <listitem>
953 <para>Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device.</para>
954 </listitem>
955 </varlistentry>
bce67bbe
SS
956 </variablelist>
957 </refsect1>
958
798d3a52
ZJS
959 <refsect1>
960 <title>[Route] Section Options</title>
961 <para>The <literal>[Route]</literal> section accepts the
962 following keys. Specify several <literal>[Route]</literal>
963 sections to configure several routes.</para>
964
965 <variablelist class='network-directives'>
966 <varlistentry>
967 <term><varname>Gateway=</varname></term>
968 <listitem>
969 <para>As in the <literal>[Network]</literal> section.</para>
970 </listitem>
971 </varlistentry>
28959f7d
SS
972 <varlistentry>
973 <term><varname>GatewayOnlink=</varname></term>
974 <listitem>
320ac7a6 975 <para>The <literal>GatewayOnlink</literal> option tells the kernel that it does not have
28959f7d
SS
976 to check if the gateway is reachable directly by the current machine (i.e., the kernel does
977 not need to check if the gateway is attached to the local network), so that we can insert the
978 route in the kernel table without it being complained about. A boolean, defaults to <literal>no</literal>.
979 </para>
980 </listitem>
981 </varlistentry>
798d3a52
ZJS
982 <varlistentry>
983 <term><varname>Destination=</varname></term>
984 <listitem>
985 <para>The destination prefix of the route. Possibly
b938cb90 986 followed by a slash and the prefix length. If omitted, a
798d3a52
ZJS
987 full-length host route is assumed.</para>
988 </listitem>
989 </varlistentry>
990 <varlistentry>
991 <term><varname>Source=</varname></term>
992 <listitem>
993 <para>The source prefix of the route. Possibly followed by
b938cb90 994 a slash and the prefix length. If omitted, a full-length
798d3a52
ZJS
995 host route is assumed.</para>
996 </listitem>
997 </varlistentry>
998 <varlistentry>
999 <term><varname>Metric=</varname></term>
1000 <listitem>
b938cb90 1001 <para>The metric of the route (an unsigned integer).</para>
798d3a52
ZJS
1002 </listitem>
1003 </varlistentry>
b5bf6f64
SS
1004 <varlistentry>
1005 <term><varname>IPv6Preference=</varname></term>
1006 <listitem>
1007 <para>Specifies the route preference as defined in <ulink
1008 url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages.
1009 Which can be one of <literal>low</literal> the route has a lowest priority,
1010 <literal>medium</literal> the route has a default priority or
1011 <literal>high</literal> the route has a highest priority.</para>
1012 </listitem>
1013 </varlistentry>
769b56a3
TG
1014 <varlistentry>
1015 <term><varname>Scope=</varname></term>
1016 <listitem>
a8eaaee7 1017 <para>The scope of the route, which can be <literal>global</literal>,
769b56a3
TG
1018 <literal>link</literal> or <literal>host</literal>. Defaults to
1019 <literal>global</literal>.</para>
1020 </listitem>
0d07e595
JK
1021 </varlistentry>
1022 <varlistentry>
1023 <term><varname>PreferredSource=</varname></term>
1024 <listitem>
1025 <para>The preferred source address of the route. The address
1026 must be in the format described in
1027 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
1028 </listitem>
769b56a3 1029 </varlistentry>
c953b24c
SS
1030 <varlistentry>
1031 <term><varname>Table=<replaceable>num</replaceable></varname></term>
1032 <listitem>
1033 <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset).
1034 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1035 </para>
1036 </listitem>
1037 </varlistentry>
c83ecc04
SS
1038 <varlistentry>
1039 <term><varname>Protocol=</varname></term>
1040 <listitem>
1041 <para>The Protocol identifier for the route. Takes a number between 0 and 255 or the special values
1042 <literal>kernel</literal>, <literal>boot</literal> and <literal>static</literal>. Defaults to
1043 <literal>static</literal>.
1044 </para>
1045 </listitem>
1046 </varlistentry>
983226f3
SS
1047 <varlistentry>
1048 <term><varname>Type=</varname></term>
1049 <listitem>
1050 <para>The Type identifier for special route types, which can be
1051 <literal>unicast</literal> route to a destination network address which describes the path to the destination,
1052 <literal>blackhole</literal> packets are discarded silently,
1053 <literal>unreachable</literal> packets are discarded and the ICMP message host unreachable is generated,
1054 <literal>prohibit</literal> packets are discarded and the ICMP message communication administratively
1055 prohibited is generated. Defaults to <literal>unicast</literal>.
1056 </para>
1057 </listitem>
1058 </varlistentry>
1059
798d3a52
ZJS
1060 </variablelist>
1061 </refsect1>
1062
1063 <refsect1>
1064 <title>[DHCP] Section Options</title>
ad943783
LP
1065 <para>The <literal>[DHCP]</literal> section configures the
1066 DHCPv4 and DHCP6 client, if it is enabled with the
1067 <varname>DHCP=</varname> setting described above:</para>
798d3a52
ZJS
1068
1069 <variablelist class='network-directives'>
1070 <varlistentry>
1071 <term><varname>UseDNS=</varname></term>
1072 <listitem>
1073 <para>When true (the default), the DNS servers received
1074 from the DHCP server will be used and take precedence over
1075 any statically configured ones.</para>
e88d8021
ZJS
1076
1077 <para>This corresponds to the <option>nameserver</option>
ad943783
LP
1078 option in <citerefentry
1079 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
1080 </listitem>
1081 </varlistentry>
301f4073
MM
1082 <varlistentry>
1083 <term><varname>UseNTP=</varname></term>
1084 <listitem>
1085 <para>When true (the default), the NTP servers received
1086 from the DHCP server will be used by systemd-timesyncd
1087 and take precedence over any statically configured ones.</para>
1088 </listitem>
1089 </varlistentry>
798d3a52
ZJS
1090 <varlistentry>
1091 <term><varname>UseMTU=</varname></term>
1092 <listitem>
1093 <para>When true, the interface maximum transmission unit
1094 from the DHCP server will be used on the current link.
95ab9eff 1095 Defaults to false.</para>
798d3a52
ZJS
1096 </listitem>
1097 </varlistentry>
7585baa0 1098 <varlistentry>
1099 <term><varname>Anonymize=</varname></term>
1100 <listitem>
1101 <para>Takes a boolean argument. When true, the options sent to the DHCP server will
1102 follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
1103 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1104 Defaults to false.</para>
1105
1106 <para>This option should only be set to true when
1107 <varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
1108 (see <citerefentry
1109 project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
1110
1111 <para>Note that this configuration will overwrite others.
1112 In concrete, the following variables will be ignored:
1113 <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
1114 <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>,
1115 <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>,
1116 <varname>UseTimezone=</varname>.</para>
1117 </listitem>
1118 </varlistentry>
798d3a52
ZJS
1119 <varlistentry>
1120 <term><varname>SendHostname=</varname></term>
1121 <listitem>
d59be2cf
ZJS
1122 <para>When true (the default), the machine's hostname will
1123 be sent to the DHCP server.</para>
798d3a52
ZJS
1124 </listitem>
1125 </varlistentry>
1126 <varlistentry>
1127 <term><varname>UseHostname=</varname></term>
1128 <listitem>
1129 <para>When true (the default), the hostname received from
ad943783 1130 the DHCP server will be set as the transient hostname of the system
d59be2cf 1131 </para>
798d3a52
ZJS
1132 </listitem>
1133 </varlistentry>
1adc5d0b
SS
1134 <varlistentry>
1135 <term><varname>Hostname=</varname></term>
1136 <listitem>
d59be2cf
ZJS
1137 <para>Use this value for the hostname which is sent to the
1138 DHCP server, instead of machine's hostname.</para>
1adc5d0b
SS
1139 </listitem>
1140 </varlistentry>
798d3a52
ZJS
1141 <varlistentry>
1142 <term><varname>UseDomains=</varname></term>
1143 <listitem>
07ff561c 1144 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
b2a81c0b
LP
1145 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1146 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
1147 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1148 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
1149 false.</para>
1150
1151 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1e7a0e21 1152 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
b2a81c0b
LP
1153 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1154 single-label names.</para>
1155
1156 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1157 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
1158 </listitem>
1159 </varlistentry>
1160 <varlistentry>
1161 <term><varname>UseRoutes=</varname></term>
1162 <listitem>
d6eac9bd
DW
1163 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1164 routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's
1165 destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the
1166 link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a
1167 "link" scope will be used. For anything else, scope defaults to "global".</para>
798d3a52
ZJS
1168 </listitem>
1169 </varlistentry>
ad943783
LP
1170
1171 <varlistentry>
1172 <term><varname>UseTimezone=</varname></term>
1173
1174 <listitem><para>When true, the timezone received from the
7f3fdb7f 1175 DHCP server will be set as timezone of the local
ad943783
LP
1176 system. Defaults to <literal>no</literal>.</para></listitem>
1177 </varlistentry>
1178
798d3a52
ZJS
1179 <varlistentry>
1180 <term><varname>CriticalConnection=</varname></term>
1181 <listitem>
1182 <para>When true, the connection will never be torn down
1183 even if the DHCP lease expires. This is contrary to the
1184 DHCP specification, but may be the best choice if, say,
1185 the root filesystem relies on this connection. Defaults to
1186 false.</para>
1187 </listitem>
1188 </varlistentry>
e2e08e77 1189
3e43b2cd
JJ
1190 <varlistentry>
1191 <term><varname>ClientIdentifier=</varname></term>
1192 <listitem>
076ea6f6 1193 <para>The DHCPv4 client identifier to use. Either <literal>mac</literal> to use the MAC address of the link
037a3ded 1194 or <literal>duid</literal> (the default, see below) to use an RFC4361-compliant Client ID.</para>
3e43b2cd
JJ
1195 </listitem>
1196 </varlistentry>
e2e08e77 1197
798d3a52
ZJS
1198 <varlistentry>
1199 <term><varname>VendorClassIdentifier=</varname></term>
1200 <listitem>
1201 <para>The vendor class identifier used to identify vendor
1202 type and configuration.</para>
1203 </listitem>
1204 </varlistentry>
076ea6f6 1205
e2e08e77
ZJS
1206 <varlistentry>
1207 <term><varname>DUIDType=</varname></term>
1208 <listitem>
1209 <para>Override the global <varname>DUIDType</varname> setting for this network. See
1210 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1211 for a description of possible values.</para>
1212 </listitem>
1213 </varlistentry>
076ea6f6 1214
e2e08e77
ZJS
1215 <varlistentry>
1216 <term><varname>DUIDRawData=</varname></term>
1217 <listitem>
1218 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
1219 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1220 for a description of possible values.</para>
076ea6f6
LP
1221 </listitem>
1222 </varlistentry>
e2e08e77 1223
d05def16
LP
1224 <varlistentry>
1225 <term><varname>IAID=</varname></term>
1226 <listitem>
1227 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
1228 </listitem>
1229 </varlistentry>
1230
798d3a52
ZJS
1231 <varlistentry>
1232 <term><varname>RequestBroadcast=</varname></term>
1233 <listitem>
1234 <para>Request the server to use broadcast messages before
1235 the IP address has been configured. This is necessary for
1236 devices that cannot receive RAW packets, or that cannot
1237 receive packets at all before an IP address has been
1238 configured. On the other hand, this must not be enabled on
1239 networks where broadcasts are filtered out.</para>
1240 </listitem>
1241 </varlistentry>
e2e08e77 1242
798d3a52
ZJS
1243 <varlistentry>
1244 <term><varname>RouteMetric=</varname></term>
1245 <listitem>
1246 <para>Set the routing metric for routes specified by the
1247 DHCP server.</para>
1248 </listitem>
1249 </varlistentry>
f594276b
JK
1250
1251 <varlistentry>
1252 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1253 <listitem>
d11e656a 1254 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
f594276b
JK
1255 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1256 </para>
917b2260
AR
1257 <para>When used in combination with <varname>VRF=</varname> the
1258 VRF's routing table is used unless this parameter is specified.
1259 </para>
f594276b
JK
1260 </listitem>
1261 </varlistentry>
9faed222
SS
1262
1263 <varlistentry>
1264 <term><varname>ListenPort=</varname></term>
1265 <listitem>
1266 <para>Allow setting custom port for the DHCP client to listen on.</para>
1267 </listitem>
1268 </varlistentry>
ad943783 1269 </variablelist>
076ea6f6 1270 </refsect1>
413708d1 1271
1e7a0e21 1272 <refsect1>
f921f573
LP
1273 <title>[IPv6AcceptRA] Section Options</title>
1274 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1275 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1e7a0e21
LP
1276 above:</para>
1277
1278 <variablelist class='network-directives'>
1279 <varlistentry>
1280 <term><varname>UseDNS=</varname></term>
1281 <listitem>
1282 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1283 precedence over any statically configured ones.</para>
1284
1285 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1286 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1287 </listitem>
1288 </varlistentry>
1289
1290 <varlistentry>
1291 <term><varname>UseDomains=</varname></term>
1292 <listitem>
1293 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
1294 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1295 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1296 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1297 effect of the <option>Domains=</option> setting when the argument is prefixed with
1298 <literal>~</literal>. Defaults to false.</para>
1299
1300 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1301 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1302 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1303 single-label names.</para>
1304
1305 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1306 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1307 </listitem>
1308 </varlistentry>
2ba31d29
JK
1309
1310 <varlistentry>
1311 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1312 <listitem>
d11e656a
ZJS
1313 <para>The table identifier for the routes received in the Router Advertisement
1314 (a number between 1 and 4294967295, or 0 to unset).
2ba31d29
JK
1315 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1316 </para>
1317 </listitem>
1318 </varlistentry>
1e7a0e21
LP
1319 </variablelist>
1320 </refsect1>
1321
1322
ad943783
LP
1323 <refsect1>
1324 <title>[DHCPServer] Section Options</title>
1325 <para>The <literal>[DHCPServer]</literal> section contains
1326 settings for the DHCP server, if enabled via the
1327 <varname>DHCPServer=</varname> option described above:</para>
1328
1329 <variablelist class='network-directives'>
1330
9b3a67c5
TG
1331 <varlistentry>
1332 <term><varname>PoolOffset=</varname></term>
1333 <term><varname>PoolSize=</varname></term>
1334
1335 <listitem><para>Configures the pool of addresses to hand out. The pool
1336 is a contiguous sequence of IP addresses in the subnet configured for
1337 the server address, which does not include the subnet nor the broadcast
1338 address. <varname>PoolOffset=</varname> takes the offset of the pool
1339 from the start of subnet, or zero to use the default value.
1340 <varname>PoolSize=</varname> takes the number of IP addresses in the
b938cb90 1341 pool or zero to use the default value. By default, the pool starts at
9b3a67c5
TG
1342 the first address after the subnet address and takes up the rest of
1343 the subnet, excluding the broadcast address. If the pool includes
1344 the server address (the default), this is reserved and not handed
1345 out to clients.</para></listitem>
1346 </varlistentry>
1347
ad943783
LP
1348 <varlistentry>
1349 <term><varname>DefaultLeaseTimeSec=</varname></term>
1350 <term><varname>MaxLeaseTimeSec=</varname></term>
1351
1352 <listitem><para>Control the default and maximum DHCP lease
1353 time to pass to clients. These settings take time values in seconds or
1354 another common time unit, depending on the suffix. The default
1355 lease time is used for clients that did not ask for a specific
1356 lease time. If a client asks for a lease time longer than the
b938cb90 1357 maximum lease time, it is automatically shortened to the
ad943783
LP
1358 specified time. The default lease time defaults to 1h, the
1359 maximum lease time to 12h. Shorter lease times are beneficial
1360 if the configuration data in DHCP leases changes frequently
1361 and clients shall learn the new settings with shorter
1362 latencies. Longer lease times reduce the generated DHCP
1363 network traffic.</para></listitem>
1364 </varlistentry>
1365
1366 <varlistentry>
1367 <term><varname>EmitDNS=</varname></term>
1368 <term><varname>DNS=</varname></term>
1369
1370 <listitem><para>Configures whether the DHCP leases handed out
1371 to clients shall contain DNS server information. The
1372 <varname>EmitDNS=</varname> setting takes a boolean argument
1373 and defaults to <literal>yes</literal>. The DNS servers to
1374 pass to clients may be configured with the
1375 <varname>DNS=</varname> option, which takes a list of IPv4
1376 addresses. If the <varname>EmitDNS=</varname> option is
b938cb90 1377 enabled but no servers configured, the servers are
ad943783
LP
1378 automatically propagated from an "uplink" interface that has
1379 appropriate servers set. The "uplink" interface is determined
1380 by the default route of the system with the highest
1381 priority. Note that this information is acquired at the time
1382 the lease is handed out, and does not take uplink interfaces
1383 into account that acquire DNS or NTP server information at a
1384 later point. DNS server propagation does not take
1385 <filename>/etc/resolv.conf</filename> into account. Also, note
a8eaaee7 1386 that the leases are not refreshed if the uplink network
ad943783 1387 configuration changes. To ensure clients regularly acquire the
b938cb90 1388 most current uplink DNS server information, it is thus
ad943783
LP
1389 advisable to shorten the DHCP lease time via
1390 <varname>MaxLeaseTimeSec=</varname> described
1391 above.</para></listitem>
1392 </varlistentry>
1393
1394 <varlistentry>
1395 <term><varname>EmitNTP=</varname></term>
1396 <term><varname>NTP=</varname></term>
1397
1398 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
b938cb90 1399 <varname>DNS=</varname> settings described above, these
ad943783
LP
1400 settings configure whether and what NTP server information
1401 shall be emitted as part of the DHCP lease. The same syntax,
1402 propagation semantics and defaults apply as for
1403 <varname>EmitDNS=</varname> and
1404 <varname>DNS=</varname>.</para></listitem>
1405 </varlistentry>
1406
77ff6022
CG
1407 <varlistentry>
1408 <term><varname>EmitRouter=</varname></term>
1409
1410 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1411 setting described above, this setting configures whether the
1412 DHCP lease should contain the router option. The same syntax,
1413 propagation semantics and defaults apply as for
1414 <varname>EmitDNS=</varname>.</para></listitem>
1415 </varlistentry>
1416
ad943783
LP
1417 <varlistentry>
1418 <term><varname>EmitTimezone=</varname></term>
1419 <term><varname>Timezone=</varname></term>
1420
1421 <listitem><para>Configures whether the DHCP leases handed out
1422 to clients shall contain timezone information. The
1423 <varname>EmitTimezone=</varname> setting takes a boolean
1424 argument and defaults to <literal>yes</literal>. The
1425 <varname>Timezone=</varname> setting takes a timezone string
1426 (such as <literal>Europe/Berlin</literal> or
1427 <literal>UTC</literal>) to pass to clients. If no explicit
b938cb90 1428 timezone is set, the system timezone of the local host is
ad943783
LP
1429 propagated, as determined by the
1430 <filename>/etc/localtime</filename> symlink.</para></listitem>
1431 </varlistentry>
1432
1433 </variablelist>
1434 </refsect1>
1435
798d3a52 1436 <refsect1>
3f9e0236
PF
1437 <title>[IPv6PrefixDelegation] Section Options</title>
1438 <para>The <literal>[IPv6PrefixDelegation]</literal> section contains
1439 settings for sending IPv6 Router Advertisements and whether to act as
1440 a router, if enabled via the <varname>IPv6PrefixDelegation=</varname>
1441 option described above. IPv6 network prefixes are defined with one or
1442 more <literal>[IPv6Prefix]</literal> sections.</para>
1443
1444 <variablelist class='network-directives'>
1445
1446 <varlistentry>
1447 <term><varname>Managed=</varname></term>
1448 <term><varname>OtherInformation=</varname></term>
1449
1450 <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6
1451 addresses on the network link when <varname>Managed=</varname> boolean
1452 is set to <literal>true</literal> or if only additional network
1453 information can be obtained via DHCPv6 for the network link when
1454 <varname>OtherInformation=</varname> boolean is set to
1455 <literal>true</literal>. Both settings default to
1456 <literal>false</literal>, which means that a DHCPv6 server is not being
1457 used.</para></listitem>
1458 </varlistentry>
1459
1460 <varlistentry>
1461 <term><varname>RouterLifetimeSec=</varname></term>
1462
1463 <listitem><para>Configures the IPv6 router lifetime in seconds. If set,
1464 this host also announces itself in Router Advertisements as an IPv6
1465 router for the network link. Defaults to unset, which means the host is
1466 not acting as a router.</para>
1467 </listitem>
1468 </varlistentry>
1469
1470 <varlistentry>
1471 <term><varname>RouterPreference=</varname></term>
1472
1473 <listitem><para>Configures IPv6 router preference if
1474 <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are
1475 <literal>high</literal>, <literal>medium</literal> and
1476 <literal>low</literal>, with <literal>normal</literal> and
1477 <literal>default</literal> added as synonyms for
1478 <literal>medium</literal> just to make configuration easier. See
1479 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
1480 for details. Defaults to <literal>medium</literal>.</para></listitem>
1481 </varlistentry>
1482
1483 <varlistentry>
4cb8478c 1484 <term><varname>EmitDNS=</varname></term>
3f9e0236
PF
1485 <term><varname>DNS=</varname></term>
1486
4cb8478c
PF
1487 <listitem><para><varname>DNS=</varname> specifies a list of recursive
1488 DNS server IPv6 addresses that distributed via Router Advertisement
1489 messages when <varname>EmitDNS=</varname> is true. If <varname>DNS=
1490 </varname> is empty, DNS servers are read from the
1491 <literal>[Network]</literal> section. If the
1492 <literal>[Network]</literal> section does not contain any DNS servers
1493 either, DNS servers from the uplink with the highest priority default
1494 route are used. When <varname>EmitDNS=</varname> is false, no DNS server
1495 information is sent in Router Advertisement messages.
1496 <varname>EmitDNS=</varname> defaults to true.
3f9e0236
PF
1497 </para></listitem>
1498 </varlistentry>
1499
760021c0 1500 <varlistentry>
4cb8478c 1501 <term><varname>EmitDomains=</varname></term>
760021c0
PF
1502 <term><varname>Domains=</varname></term>
1503
4cb8478c
PF
1504 <listitem><para>A list of DNS search domains distributed via Router
1505 Advertisement messages when <varname>EmitDomains=</varname> is true. If
1506 <varname>Domains=</varname> is empty, DNS search domains are read from the
1507 <literal>[Network]</literal> section. If the <literal>[Network]</literal>
1508 section does not contain any DNS search domains either, DNS search
1509 domains from the uplink with the highest priority default route are
1510 used. When <varname>EmitDomains=</varname> is false, no DNS search domain
1511 information is sent in Router Advertisement messages.
1512 <varname>EmitDomains=</varname> defaults to true.
1513 </para></listitem>
760021c0
PF
1514 </varlistentry>
1515
3f9e0236
PF
1516 <varlistentry>
1517 <term><varname>DNSLifetimeSec=</varname></term>
1518
1519 <listitem><para>Lifetime in seconds for the DNS server addresses listed
760021c0
PF
1520 in <varname>DNS=</varname> and search domains listed in
1521 <varname>Domains=</varname>.</para></listitem>
3f9e0236
PF
1522 </varlistentry>
1523
1524 </variablelist>
1525 </refsect1>
1526
1527 <refsect1>
1528 <title>[IPv6Prefix] Section Options</title>
1529 <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6
1530 prefixes that are announced via Router Advertisements. See
1531 <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink>
1532 for further details.</para>
1533
1534 <variablelist class='network-directives'>
1535
1536 <varlistentry>
1537 <term><varname>AddressAutoconfiguration=</varname></term>
1538 <term><varname>OnLink=</varname></term>
1539
1540 <listitem><para>Boolean values to specify whether IPv6 addresses can be
1541 autoconfigured with this prefix and whether the prefix can be used for
1542 onlink determination. Both settings default to <literal>true</literal>
1543 in order to ease configuration.
1544 </para></listitem>
1545 </varlistentry>
1546
1547 <varlistentry>
1548 <term><varname>Prefix=</varname></term>
1549
1550 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
1551 Similarly to configuring static IPv6 addresses, the setting is
1552 configured as an IPv6 prefix and its prefix length, separated by a
1553 <literal>/</literal> character. Use multiple
1554 <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6
1555 prefixes since prefix lifetimes, address autoconfiguration and onlink
1556 status may differ from one prefix to another.</para></listitem>
1557 </varlistentry>
1558
1559 <varlistentry>
1560 <term><varname>PreferredLifetimeSec=</varname></term>
1561 <term><varname>ValidLifetimeSec=</varname></term>
1562
1563 <listitem><para>Preferred and valid lifetimes for the prefix measured in
1564 seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800
1565 seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults
1566 to 2592000 seconds (30 days).</para></listitem>
1567 </varlistentry>
1568
1569 </variablelist>
1570 </refsect1>
1571
1572 <refsect1>
798d3a52
ZJS
1573 <title>[Bridge] Section Options</title>
1574 <para>The <literal>[Bridge]</literal> section accepts the
1575 following keys.</para>
1576 <variablelist class='network-directives'>
165c41a9
SS
1577 <varlistentry>
1578 <term><varname>UnicastFlood=</varname></term>
1579 <listitem>
072f9e4a
ZJS
1580 <para>A boolean. Controls whether the bridge should flood
1581 traffic for which an FDB entry is missing and the destination
1582 is unknown through this port. Defaults to on.
47c7dfe2 1583 </para>
165c41a9
SS
1584 </listitem>
1585 </varlistentry>
1586 <varlistentry>
1587 <term><varname>HairPin=</varname></term>
1588 <listitem>
47c7dfe2
ZJS
1589 <para>A boolean. Configures whether traffic may be sent back
1590 out of the port on which it was received. By default, this
1591 flag is false, and the bridge will not forward traffic back
1592 out of the receiving port.</para>
165c41a9
SS
1593 </listitem>
1594 </varlistentry>
1595 <varlistentry>
84c34096 1596 <term><varname>UseBPDU=</varname></term>
165c41a9 1597 <listitem>
47c7dfe2 1598 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
84c34096 1599 processed by the bridge port. Defaults to yes.</para>
165c41a9
SS
1600 </listitem>
1601 </varlistentry>
1602 <varlistentry>
1603 <term><varname>FastLeave=</varname></term>
1604 <listitem>
47c7dfe2 1605 <para>A boolean. This flag allows the bridge to immediately stop multicast
a8eaaee7 1606 traffic on a port that receives an IGMP Leave message. It is only used with
47c7dfe2 1607 IGMP snooping if enabled on the bridge. Defaults to off.</para>
165c41a9
SS
1608 </listitem>
1609 </varlistentry>
1610 <varlistentry>
23da66bb 1611 <term><varname>AllowPortToBeRoot=</varname></term>
165c41a9 1612 <listitem>
47c7dfe2
ZJS
1613 <para>A boolean. Configures whether a given port is allowed to
1614 become a root port. Only used when STP is enabled on the bridge.
23da66bb 1615 Defaults to on.</para>
165c41a9
SS
1616 </listitem>
1617 </varlistentry>
798d3a52
ZJS
1618 <varlistentry>
1619 <term><varname>Cost=</varname></term>
1620 <listitem>
47c7dfe2 1621 <para>Sets the "cost" of sending packets of this interface.
a8eaaee7 1622 Each port in a bridge may have a different speed and the cost
798d3a52 1623 is used to decide which link to use. Faster interfaces
785889e5 1624 should have lower costs. It is an integer value between 1 and
b56be296
DJL
1625 65535.</para>
1626 </listitem>
1627 </varlistentry>
1628 <varlistentry>
1629 <term><varname>Priority=</varname></term>
1630 <listitem>
1631 <para>Sets the "priority" of sending packets on this interface.
1632 Each port in a bridge may have a different priority which is used
1633 to decide which link to use. Lower value means higher priority.
785889e5 1634 It is an integer value between 0 to 63. Networkd does not set any
b56be296 1635 default, meaning the kernel default value of 32 is used.</para>
798d3a52
ZJS
1636 </listitem>
1637 </varlistentry>
1638 </variablelist>
1639 </refsect1>
798d3a52
ZJS
1640 <refsect1>
1641 <title>[BridgeFDB] Section Options</title>
1642 <para>The <literal>[BridgeFDB]</literal> section manages the
1643 forwarding database table of a port and accepts the following
1644 keys. Specify several <literal>[BridgeFDB]</literal> sections to
1645 configure several static MAC table entries.</para>
1646
1647 <variablelist class='network-directives'>
1648 <varlistentry>
1649 <term><varname>MACAddress=</varname></term>
1650 <listitem>
1651 <para>As in the <literal>[Network]</literal> section. This
1652 key is mandatory.</para>
1653 </listitem>
1654 </varlistentry>
1655 <varlistentry>
1656 <term><varname>VLANId=</varname></term>
1657 <listitem>
a8eaaee7 1658 <para>The VLAN ID for the new static MAC table entry. If
db9b9fb9 1659 omitted, no VLAN ID information is appended to the new static MAC
798d3a52
ZJS
1660 table entry.</para>
1661 </listitem>
1662 </varlistentry>
1663 </variablelist>
1664 </refsect1>
13b498f9
TJ
1665 <refsect1>
1666 <title>[BridgeVLAN] Section Options</title>
1667 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
1668 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
1669 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
1670 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1671
1672 <variablelist class='network-directives'>
1673 <varlistentry>
1674 <term><varname>VLAN=</varname></term>
1675 <listitem>
1676 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1677 from 1 to 4094.</para>
1678 </listitem>
1679 </varlistentry>
1680 <varlistentry>
1681 <term><varname>EgressUntagged=</varname></term>
1682 <listitem>
1683 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1684 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
1685 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
1686 </listitem>
1687 </varlistentry>
1688 <varlistentry>
1689 <term><varname>PVID=</varname></term>
1690 <listitem>
1691 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1692 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
1693 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
1694 </listitem>
1695 </varlistentry>
1696 </variablelist>
1697 </refsect1>
798d3a52
ZJS
1698
1699 <refsect1>
9e35b3de 1700 <title>Examples</title>
798d3a52 1701 <example>
9e35b3de 1702 <title>Static network configuration</title>
798d3a52 1703
9e35b3de
ZJS
1704 <programlisting># /etc/systemd/network/50-static.network
1705[Match]
eac684ef
TG
1706Name=enp2s0
1707
1708[Network]
1709Address=192.168.0.15/24
1710Gateway=192.168.0.1</programlisting>
9e35b3de
ZJS
1711
1712 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
1713 specified gateway will be used for a default route.</para>
798d3a52 1714 </example>
eac684ef 1715
798d3a52 1716 <example>
9e35b3de 1717 <title>DHCP on ethernet links</title>
eac684ef 1718
9e35b3de
ZJS
1719 <programlisting># /etc/systemd/network/80-dhcp.network
1720[Match]
eac684ef
TG
1721Name=en*
1722
1723[Network]
9c8ca3f7 1724DHCP=yes</programlisting>
9e35b3de
ZJS
1725
1726 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
1727 <literal>en</literal> (i.e. ethernet interfaces).</para>
798d3a52 1728 </example>
eac684ef 1729
798d3a52 1730 <example>
9e35b3de 1731 <title>A bridge with two enslaved links</title>
f47c5c47 1732
9e35b3de
ZJS
1733 <programlisting># /etc/systemd/network/25-bridge-static.network
1734[Match]
f47c5c47 1735Name=bridge0
1736
1737[Network]
1738Address=192.168.0.15/24
1739Gateway=192.168.0.1
1740DNS=192.168.0.1</programlisting>
f47c5c47 1741
9e35b3de
ZJS
1742 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
1743[Match]
f47c5c47 1744Name=enp2s0
1745
1746[Network]
1747Bridge=bridge0</programlisting>
9e35b3de
ZJS
1748
1749 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
1750[Match]
1751Name=wlp3s0
1752
1753[Network]
1754Bridge=bridge0</programlisting>
1755
1756 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
1757 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
1758 and network assigned, and a default route via the specified gateway will be
1759 added. The specified DNS server will be added to the global list of DNS resolvers.
1760 </para>
13b498f9 1761 </example>
9e35b3de 1762
13b498f9 1763 <example>
9e35b3de 1764 <title></title>
13b498f9 1765
9e35b3de
ZJS
1766 <programlisting>
1767# /etc/systemd/network/20-bridge-slave-interface-vlan.network
1768[Match]
13b498f9
TJ
1769Name=enp2s0
1770
1771[Network]
1772Bridge=bridge0
1773
1774[BridgeVLAN]
1775VLAN=1-32
1776PVID=42
1777EgressUntagged=42
1778
1779[BridgeVLAN]
1780VLAN=100-200
1781
1782[BridgeVLAN]
1783EgressUntagged=300-400</programlisting>
0a8a0fad 1784
9e35b3de
ZJS
1785 <para>This overrides the configuration specified in the previous example for the
1786 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
1787 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
1788 untagged when they leave on this interface. Untagged packets which arrive on this
1789 interface will be assigned VLAN ID 42.</para>
798d3a52 1790 </example>
0a8a0fad 1791
798d3a52 1792 <example>
9e35b3de 1793 <title>Various tunnels</title>
0a8a0fad 1794
9e35b3de
ZJS
1795 <programlisting>/etc/systemd/network/25-tunnels.network
1796[Match]
1797Name=ens1
0a8a0fad
TG
1798
1799[Network]
9e35b3de
ZJS
1800Tunnel=ipip-tun
1801Tunnel=sit-tun
1802Tunnel=gre-tun
1803Tunnel=vti-tun
1804 </programlisting>
1805
1806 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
1807[NetDev]
1808Name=ipip-tun
1809Kind=ipip
1810 </programlisting>
1811
1812 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
1813[NetDev]
1814Name=sit-tun
1815Kind=sit
1816 </programlisting>
1817
1818 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
1819[NetDev]
1820Name=gre-tun
1821Kind=gre
1822 </programlisting>
1823
1824 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
1825[NetDev]
1826Name=vti-tun
1827Kind=vti
1828 </programlisting>
1829
1830 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
1831 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
798d3a52 1832 </example>
0a8a0fad 1833
798d3a52 1834 <example>
9e35b3de 1835 <title>A bond device</title>
0a8a0fad 1836
9e35b3de
ZJS
1837 <programlisting># /etc/systemd/network/30-bond1.network
1838[Match]
1839Name=bond1
0a8a0fad
TG
1840
1841[Network]
9e35b3de
ZJS
1842DHCP=ipv6
1843</programlisting>
0a8a0fad 1844
9e35b3de
ZJS
1845 <programlisting># /etc/systemd/network/30-bond1.netdev
1846[NetDev]
1847Name=bond1
1848Kind=bond
1849</programlisting>
0a8a0fad 1850
301a21a8 1851 <programlisting># /etc/systemd/network/30-bond1-dev1.network
9e35b3de
ZJS
1852[Match]
1853MACAddress=52:54:00:e9:64:41
0a8a0fad
TG
1854
1855[Network]
9e35b3de
ZJS
1856Bond=bond1
1857</programlisting>
d94facdc 1858
301a21a8 1859 <programlisting># /etc/systemd/network/30-bond1-dev2.network
9e35b3de
ZJS
1860[Match]
1861MACAddress=52:54:00:e9:64:42
d94facdc
MH
1862
1863[Network]
9e35b3de 1864Bond=bond1
6cb955c6 1865</programlisting>
9e35b3de
ZJS
1866
1867 <para>This will create a bond device <literal>bond1</literal> and enslave the two
1868 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
1869 will be used to acquire an address.</para>
6cb955c6
AR
1870 </example>
1871
1872 <example>
9e35b3de
ZJS
1873 <title>Virtual Routing and Forwarding (VRF)</title>
1874 <para>Add the <literal>bond1</literal> interface to the VRF master interface
1875 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
11d38b90
AR
1876 within the routing table defined during VRF creation. For kernels before 4.8 traffic
1877 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
1878 </para>
9e35b3de
ZJS
1879 <programlisting># /etc/systemd/network/25-vrf.network
1880[Match]
6cb955c6
AR
1881Name=bond1
1882
1883[Network]
9e35b3de 1884VRF=vrf1
d94facdc
MH
1885</programlisting>
1886 </example>
1887
42125eda
SS
1888 <example>
1889 <title>MacVTap</title>
1890 <para>This brings up a network interface <literal>macvtap-test</literal>
1891 and attaches it to <literal>enp0s25</literal>.</para>
83ddf5d3 1892 <programlisting># /usr/lib/systemd/network/25-macvtap.network
42125eda
SS
1893[Match]
1894Name=enp0s25
1895
1896[Network]
1897MACVTAP=macvtap-test
1898</programlisting>
1899 </example>
798d3a52
ZJS
1900 </refsect1>
1901
1902 <refsect1>
1903 <title>See Also</title>
1904 <para>
1905 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
f41b446a 1906 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 1907 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
aaa297d4
LP
1908 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1909 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
1910 </para>
1911 </refsect1>
eac684ef
TG
1912
1913</refentry>