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