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