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