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