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