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