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