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