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