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