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