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