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