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