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