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