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