]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.network.xml
networkd: initcwn/initwnd use the right parsers
[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 is used during the start of a TCP connection. During the start of a TCP
1074 session, when a client requests a resource, the server's initial congestion window determines how many data bytes
1075 will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual
1076 suffixes K, M, G are supported and are understood to the base of 1024. Defaults to unset.
1077 </para>
1078 </listitem>
1079 </varlistentry>
1080 <varlistentry>
1081 <term><varname>InitialAdvertisedReceiveWindow=</varname></term>
1082 <listitem>
1083 <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initally be buffered at one time
1084 on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update
1085 from the receiving host. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual suffixes K, M, G are supported
1086 and are understood to the base of 1024. Defaults to unset.
1087 </para>
1088 </listitem>
1089 </varlistentry>
1090
1091 </variablelist>
1092 </refsect1>
1093
1094 <refsect1>
1095 <title>[DHCP] Section Options</title>
1096 <para>The <literal>[DHCP]</literal> section configures the
1097 DHCPv4 and DHCP6 client, if it is enabled with the
1098 <varname>DHCP=</varname> setting described above:</para>
1099
1100 <variablelist class='network-directives'>
1101 <varlistentry>
1102 <term><varname>UseDNS=</varname></term>
1103 <listitem>
1104 <para>When true (the default), the DNS servers received
1105 from the DHCP server will be used and take precedence over
1106 any statically configured ones.</para>
1107
1108 <para>This corresponds to the <option>nameserver</option>
1109 option in <citerefentry
1110 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1111 </listitem>
1112 </varlistentry>
1113 <varlistentry>
1114 <term><varname>UseNTP=</varname></term>
1115 <listitem>
1116 <para>When true (the default), the NTP servers received
1117 from the DHCP server will be used by systemd-timesyncd
1118 and take precedence over any statically configured ones.</para>
1119 </listitem>
1120 </varlistentry>
1121 <varlistentry>
1122 <term><varname>UseMTU=</varname></term>
1123 <listitem>
1124 <para>When true, the interface maximum transmission unit
1125 from the DHCP server will be used on the current link.
1126 Defaults to false.</para>
1127 </listitem>
1128 </varlistentry>
1129 <varlistentry>
1130 <term><varname>Anonymize=</varname></term>
1131 <listitem>
1132 <para>Takes a boolean argument. When true, the options sent to the DHCP server will
1133 follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
1134 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1135 Defaults to false.</para>
1136
1137 <para>This option should only be set to true when
1138 <varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
1139 (see <citerefentry
1140 project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
1141
1142 <para>Note that this configuration will overwrite others.
1143 In concrete, the following variables will be ignored:
1144 <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
1145 <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>,
1146 <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>,
1147 <varname>UseTimezone=</varname>.</para>
1148 </listitem>
1149 </varlistentry>
1150 <varlistentry>
1151 <term><varname>SendHostname=</varname></term>
1152 <listitem>
1153 <para>When true (the default), the machine's hostname will
1154 be sent to the DHCP server.</para>
1155 </listitem>
1156 </varlistentry>
1157 <varlistentry>
1158 <term><varname>UseHostname=</varname></term>
1159 <listitem>
1160 <para>When true (the default), the hostname received from
1161 the DHCP server will be set as the transient hostname of the system
1162 </para>
1163 </listitem>
1164 </varlistentry>
1165 <varlistentry>
1166 <term><varname>Hostname=</varname></term>
1167 <listitem>
1168 <para>Use this value for the hostname which is sent to the
1169 DHCP server, instead of machine's hostname.</para>
1170 </listitem>
1171 </varlistentry>
1172 <varlistentry>
1173 <term><varname>UseDomains=</varname></term>
1174 <listitem>
1175 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
1176 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1177 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
1178 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1179 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
1180 false.</para>
1181
1182 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1183 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1184 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1185 single-label names.</para>
1186
1187 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1188 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1189 </listitem>
1190 </varlistentry>
1191 <varlistentry>
1192 <term><varname>UseRoutes=</varname></term>
1193 <listitem>
1194 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1195 routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's
1196 destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the
1197 link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a
1198 "link" scope will be used. For anything else, scope defaults to "global".</para>
1199 </listitem>
1200 </varlistentry>
1201
1202 <varlistentry>
1203 <term><varname>UseTimezone=</varname></term>
1204
1205 <listitem><para>When true, the timezone received from the
1206 DHCP server will be set as timezone of the local
1207 system. Defaults to <literal>no</literal>.</para></listitem>
1208 </varlistentry>
1209
1210 <varlistentry>
1211 <term><varname>CriticalConnection=</varname></term>
1212 <listitem>
1213 <para>When true, the connection will never be torn down
1214 even if the DHCP lease expires. This is contrary to the
1215 DHCP specification, but may be the best choice if, say,
1216 the root filesystem relies on this connection. Defaults to
1217 false.</para>
1218 </listitem>
1219 </varlistentry>
1220
1221 <varlistentry>
1222 <term><varname>ClientIdentifier=</varname></term>
1223 <listitem>
1224 <para>The DHCPv4 client identifier to use. Either <literal>mac</literal> to use the MAC address of the link
1225 or <literal>duid</literal> (the default, see below) to use an RFC4361-compliant Client ID.</para>
1226 </listitem>
1227 </varlistentry>
1228
1229 <varlistentry>
1230 <term><varname>VendorClassIdentifier=</varname></term>
1231 <listitem>
1232 <para>The vendor class identifier used to identify vendor
1233 type and configuration.</para>
1234 </listitem>
1235 </varlistentry>
1236
1237 <varlistentry>
1238 <term><varname>DUIDType=</varname></term>
1239 <listitem>
1240 <para>Override the global <varname>DUIDType</varname> setting for this network. See
1241 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1242 for a description of possible values.</para>
1243 </listitem>
1244 </varlistentry>
1245
1246 <varlistentry>
1247 <term><varname>DUIDRawData=</varname></term>
1248 <listitem>
1249 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
1250 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1251 for a description of possible values.</para>
1252 </listitem>
1253 </varlistentry>
1254
1255 <varlistentry>
1256 <term><varname>IAID=</varname></term>
1257 <listitem>
1258 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
1259 </listitem>
1260 </varlistentry>
1261
1262 <varlistentry>
1263 <term><varname>RequestBroadcast=</varname></term>
1264 <listitem>
1265 <para>Request the server to use broadcast messages before
1266 the IP address has been configured. This is necessary for
1267 devices that cannot receive RAW packets, or that cannot
1268 receive packets at all before an IP address has been
1269 configured. On the other hand, this must not be enabled on
1270 networks where broadcasts are filtered out.</para>
1271 </listitem>
1272 </varlistentry>
1273
1274 <varlistentry>
1275 <term><varname>RouteMetric=</varname></term>
1276 <listitem>
1277 <para>Set the routing metric for routes specified by the
1278 DHCP server.</para>
1279 </listitem>
1280 </varlistentry>
1281
1282 <varlistentry>
1283 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1284 <listitem>
1285 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
1286 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1287 </para>
1288 <para>When used in combination with <varname>VRF=</varname> the
1289 VRF's routing table is used unless this parameter is specified.
1290 </para>
1291 </listitem>
1292 </varlistentry>
1293
1294 <varlistentry>
1295 <term><varname>ListenPort=</varname></term>
1296 <listitem>
1297 <para>Allow setting custom port for the DHCP client to listen on.</para>
1298 </listitem>
1299 </varlistentry>
1300 </variablelist>
1301 </refsect1>
1302
1303 <refsect1>
1304 <title>[IPv6AcceptRA] Section Options</title>
1305 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1306 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1307 above:</para>
1308
1309 <variablelist class='network-directives'>
1310 <varlistentry>
1311 <term><varname>UseDNS=</varname></term>
1312 <listitem>
1313 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1314 precedence over any statically configured ones.</para>
1315
1316 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1317 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1318 </listitem>
1319 </varlistentry>
1320
1321 <varlistentry>
1322 <term><varname>UseDomains=</varname></term>
1323 <listitem>
1324 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
1325 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1326 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1327 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1328 effect of the <option>Domains=</option> setting when the argument is prefixed with
1329 <literal>~</literal>. Defaults to false.</para>
1330
1331 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1332 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1333 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1334 single-label names.</para>
1335
1336 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1337 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1338 </listitem>
1339 </varlistentry>
1340
1341 <varlistentry>
1342 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1343 <listitem>
1344 <para>The table identifier for the routes received in the Router Advertisement
1345 (a number between 1 and 4294967295, or 0 to unset).
1346 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1347 </para>
1348 </listitem>
1349 </varlistentry>
1350 </variablelist>
1351 </refsect1>
1352
1353
1354 <refsect1>
1355 <title>[DHCPServer] Section Options</title>
1356 <para>The <literal>[DHCPServer]</literal> section contains
1357 settings for the DHCP server, if enabled via the
1358 <varname>DHCPServer=</varname> option described above:</para>
1359
1360 <variablelist class='network-directives'>
1361
1362 <varlistentry>
1363 <term><varname>PoolOffset=</varname></term>
1364 <term><varname>PoolSize=</varname></term>
1365
1366 <listitem><para>Configures the pool of addresses to hand out. The pool
1367 is a contiguous sequence of IP addresses in the subnet configured for
1368 the server address, which does not include the subnet nor the broadcast
1369 address. <varname>PoolOffset=</varname> takes the offset of the pool
1370 from the start of subnet, or zero to use the default value.
1371 <varname>PoolSize=</varname> takes the number of IP addresses in the
1372 pool or zero to use the default value. By default, the pool starts at
1373 the first address after the subnet address and takes up the rest of
1374 the subnet, excluding the broadcast address. If the pool includes
1375 the server address (the default), this is reserved and not handed
1376 out to clients.</para></listitem>
1377 </varlistentry>
1378
1379 <varlistentry>
1380 <term><varname>DefaultLeaseTimeSec=</varname></term>
1381 <term><varname>MaxLeaseTimeSec=</varname></term>
1382
1383 <listitem><para>Control the default and maximum DHCP lease
1384 time to pass to clients. These settings take time values in seconds or
1385 another common time unit, depending on the suffix. The default
1386 lease time is used for clients that did not ask for a specific
1387 lease time. If a client asks for a lease time longer than the
1388 maximum lease time, it is automatically shortened to the
1389 specified time. The default lease time defaults to 1h, the
1390 maximum lease time to 12h. Shorter lease times are beneficial
1391 if the configuration data in DHCP leases changes frequently
1392 and clients shall learn the new settings with shorter
1393 latencies. Longer lease times reduce the generated DHCP
1394 network traffic.</para></listitem>
1395 </varlistentry>
1396
1397 <varlistentry>
1398 <term><varname>EmitDNS=</varname></term>
1399 <term><varname>DNS=</varname></term>
1400
1401 <listitem><para>Configures whether the DHCP leases handed out
1402 to clients shall contain DNS server information. The
1403 <varname>EmitDNS=</varname> setting takes a boolean argument
1404 and defaults to <literal>yes</literal>. The DNS servers to
1405 pass to clients may be configured with the
1406 <varname>DNS=</varname> option, which takes a list of IPv4
1407 addresses. If the <varname>EmitDNS=</varname> option is
1408 enabled but no servers configured, the servers are
1409 automatically propagated from an "uplink" interface that has
1410 appropriate servers set. The "uplink" interface is determined
1411 by the default route of the system with the highest
1412 priority. Note that this information is acquired at the time
1413 the lease is handed out, and does not take uplink interfaces
1414 into account that acquire DNS or NTP server information at a
1415 later point. DNS server propagation does not take
1416 <filename>/etc/resolv.conf</filename> into account. Also, note
1417 that the leases are not refreshed if the uplink network
1418 configuration changes. To ensure clients regularly acquire the
1419 most current uplink DNS server information, it is thus
1420 advisable to shorten the DHCP lease time via
1421 <varname>MaxLeaseTimeSec=</varname> described
1422 above.</para></listitem>
1423 </varlistentry>
1424
1425 <varlistentry>
1426 <term><varname>EmitNTP=</varname></term>
1427 <term><varname>NTP=</varname></term>
1428
1429 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
1430 <varname>DNS=</varname> settings described above, these
1431 settings configure whether and what NTP server information
1432 shall be emitted as part of the DHCP lease. The same syntax,
1433 propagation semantics and defaults apply as for
1434 <varname>EmitDNS=</varname> and
1435 <varname>DNS=</varname>.</para></listitem>
1436 </varlistentry>
1437
1438 <varlistentry>
1439 <term><varname>EmitRouter=</varname></term>
1440
1441 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1442 setting described above, this setting configures whether the
1443 DHCP lease should contain the router option. The same syntax,
1444 propagation semantics and defaults apply as for
1445 <varname>EmitDNS=</varname>.</para></listitem>
1446 </varlistentry>
1447
1448 <varlistentry>
1449 <term><varname>EmitTimezone=</varname></term>
1450 <term><varname>Timezone=</varname></term>
1451
1452 <listitem><para>Configures whether the DHCP leases handed out
1453 to clients shall contain timezone information. The
1454 <varname>EmitTimezone=</varname> setting takes a boolean
1455 argument and defaults to <literal>yes</literal>. The
1456 <varname>Timezone=</varname> setting takes a timezone string
1457 (such as <literal>Europe/Berlin</literal> or
1458 <literal>UTC</literal>) to pass to clients. If no explicit
1459 timezone is set, the system timezone of the local host is
1460 propagated, as determined by the
1461 <filename>/etc/localtime</filename> symlink.</para></listitem>
1462 </varlistentry>
1463
1464 </variablelist>
1465 </refsect1>
1466
1467 <refsect1>
1468 <title>[IPv6PrefixDelegation] Section Options</title>
1469 <para>The <literal>[IPv6PrefixDelegation]</literal> section contains
1470 settings for sending IPv6 Router Advertisements and whether to act as
1471 a router, if enabled via the <varname>IPv6PrefixDelegation=</varname>
1472 option described above. IPv6 network prefixes are defined with one or
1473 more <literal>[IPv6Prefix]</literal> sections.</para>
1474
1475 <variablelist class='network-directives'>
1476
1477 <varlistentry>
1478 <term><varname>Managed=</varname></term>
1479 <term><varname>OtherInformation=</varname></term>
1480
1481 <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6
1482 addresses on the network link when <varname>Managed=</varname> boolean
1483 is set to <literal>true</literal> or if only additional network
1484 information can be obtained via DHCPv6 for the network link when
1485 <varname>OtherInformation=</varname> boolean is set to
1486 <literal>true</literal>. Both settings default to
1487 <literal>false</literal>, which means that a DHCPv6 server is not being
1488 used.</para></listitem>
1489 </varlistentry>
1490
1491 <varlistentry>
1492 <term><varname>RouterLifetimeSec=</varname></term>
1493
1494 <listitem><para>Configures the IPv6 router lifetime in seconds. If set,
1495 this host also announces itself in Router Advertisements as an IPv6
1496 router for the network link. Defaults to unset, which means the host is
1497 not acting as a router.</para>
1498 </listitem>
1499 </varlistentry>
1500
1501 <varlistentry>
1502 <term><varname>RouterPreference=</varname></term>
1503
1504 <listitem><para>Configures IPv6 router preference if
1505 <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are
1506 <literal>high</literal>, <literal>medium</literal> and
1507 <literal>low</literal>, with <literal>normal</literal> and
1508 <literal>default</literal> added as synonyms for
1509 <literal>medium</literal> just to make configuration easier. See
1510 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
1511 for details. Defaults to <literal>medium</literal>.</para></listitem>
1512 </varlistentry>
1513
1514 <varlistentry>
1515 <term><varname>EmitDNS=</varname></term>
1516 <term><varname>DNS=</varname></term>
1517
1518 <listitem><para><varname>DNS=</varname> specifies a list of recursive
1519 DNS server IPv6 addresses that distributed via Router Advertisement
1520 messages when <varname>EmitDNS=</varname> is true. If <varname>DNS=
1521 </varname> is empty, DNS servers are read from the
1522 <literal>[Network]</literal> section. If the
1523 <literal>[Network]</literal> section does not contain any DNS servers
1524 either, DNS servers from the uplink with the highest priority default
1525 route are used. When <varname>EmitDNS=</varname> is false, no DNS server
1526 information is sent in Router Advertisement messages.
1527 <varname>EmitDNS=</varname> defaults to true.
1528 </para></listitem>
1529 </varlistentry>
1530
1531 <varlistentry>
1532 <term><varname>EmitDomains=</varname></term>
1533 <term><varname>Domains=</varname></term>
1534
1535 <listitem><para>A list of DNS search domains distributed via Router
1536 Advertisement messages when <varname>EmitDomains=</varname> is true. If
1537 <varname>Domains=</varname> is empty, DNS search domains are read from the
1538 <literal>[Network]</literal> section. If the <literal>[Network]</literal>
1539 section does not contain any DNS search domains either, DNS search
1540 domains from the uplink with the highest priority default route are
1541 used. When <varname>EmitDomains=</varname> is false, no DNS search domain
1542 information is sent in Router Advertisement messages.
1543 <varname>EmitDomains=</varname> defaults to true.
1544 </para></listitem>
1545 </varlistentry>
1546
1547 <varlistentry>
1548 <term><varname>DNSLifetimeSec=</varname></term>
1549
1550 <listitem><para>Lifetime in seconds for the DNS server addresses listed
1551 in <varname>DNS=</varname> and search domains listed in
1552 <varname>Domains=</varname>.</para></listitem>
1553 </varlistentry>
1554
1555 </variablelist>
1556 </refsect1>
1557
1558 <refsect1>
1559 <title>[IPv6Prefix] Section Options</title>
1560 <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6
1561 prefixes that are announced via Router Advertisements. See
1562 <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink>
1563 for further details.</para>
1564
1565 <variablelist class='network-directives'>
1566
1567 <varlistentry>
1568 <term><varname>AddressAutoconfiguration=</varname></term>
1569 <term><varname>OnLink=</varname></term>
1570
1571 <listitem><para>Boolean values to specify whether IPv6 addresses can be
1572 autoconfigured with this prefix and whether the prefix can be used for
1573 onlink determination. Both settings default to <literal>true</literal>
1574 in order to ease configuration.
1575 </para></listitem>
1576 </varlistentry>
1577
1578 <varlistentry>
1579 <term><varname>Prefix=</varname></term>
1580
1581 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
1582 Similarly to configuring static IPv6 addresses, the setting is
1583 configured as an IPv6 prefix and its prefix length, separated by a
1584 <literal>/</literal> character. Use multiple
1585 <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6
1586 prefixes since prefix lifetimes, address autoconfiguration and onlink
1587 status may differ from one prefix to another.</para></listitem>
1588 </varlistentry>
1589
1590 <varlistentry>
1591 <term><varname>PreferredLifetimeSec=</varname></term>
1592 <term><varname>ValidLifetimeSec=</varname></term>
1593
1594 <listitem><para>Preferred and valid lifetimes for the prefix measured in
1595 seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800
1596 seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults
1597 to 2592000 seconds (30 days).</para></listitem>
1598 </varlistentry>
1599
1600 </variablelist>
1601 </refsect1>
1602
1603 <refsect1>
1604 <title>[Bridge] Section Options</title>
1605 <para>The <literal>[Bridge]</literal> section accepts the
1606 following keys.</para>
1607 <variablelist class='network-directives'>
1608 <varlistentry>
1609 <term><varname>UnicastFlood=</varname></term>
1610 <listitem>
1611 <para>A boolean. Controls whether the bridge should flood
1612 traffic for which an FDB entry is missing and the destination
1613 is unknown through this port. Defaults to on.
1614 </para>
1615 </listitem>
1616 </varlistentry>
1617 <varlistentry>
1618 <term><varname>HairPin=</varname></term>
1619 <listitem>
1620 <para>A boolean. Configures whether traffic may be sent back
1621 out of the port on which it was received. By default, this
1622 flag is false, and the bridge will not forward traffic back
1623 out of the receiving port.</para>
1624 </listitem>
1625 </varlistentry>
1626 <varlistentry>
1627 <term><varname>UseBPDU=</varname></term>
1628 <listitem>
1629 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
1630 processed by the bridge port. Defaults to yes.</para>
1631 </listitem>
1632 </varlistentry>
1633 <varlistentry>
1634 <term><varname>FastLeave=</varname></term>
1635 <listitem>
1636 <para>A boolean. This flag allows the bridge to immediately stop multicast
1637 traffic on a port that receives an IGMP Leave message. It is only used with
1638 IGMP snooping if enabled on the bridge. Defaults to off.</para>
1639 </listitem>
1640 </varlistentry>
1641 <varlistentry>
1642 <term><varname>AllowPortToBeRoot=</varname></term>
1643 <listitem>
1644 <para>A boolean. Configures whether a given port is allowed to
1645 become a root port. Only used when STP is enabled on the bridge.
1646 Defaults to on.</para>
1647 </listitem>
1648 </varlistentry>
1649 <varlistentry>
1650 <term><varname>Cost=</varname></term>
1651 <listitem>
1652 <para>Sets the "cost" of sending packets of this interface.
1653 Each port in a bridge may have a different speed and the cost
1654 is used to decide which link to use. Faster interfaces
1655 should have lower costs. It is an integer value between 1 and
1656 65535.</para>
1657 </listitem>
1658 </varlistentry>
1659 <varlistentry>
1660 <term><varname>Priority=</varname></term>
1661 <listitem>
1662 <para>Sets the "priority" of sending packets on this interface.
1663 Each port in a bridge may have a different priority which is used
1664 to decide which link to use. Lower value means higher priority.
1665 It is an integer value between 0 to 63. Networkd does not set any
1666 default, meaning the kernel default value of 32 is used.</para>
1667 </listitem>
1668 </varlistentry>
1669 </variablelist>
1670 </refsect1>
1671 <refsect1>
1672 <title>[BridgeFDB] Section Options</title>
1673 <para>The <literal>[BridgeFDB]</literal> section manages the
1674 forwarding database table of a port and accepts the following
1675 keys. Specify several <literal>[BridgeFDB]</literal> sections to
1676 configure several static MAC table entries.</para>
1677
1678 <variablelist class='network-directives'>
1679 <varlistentry>
1680 <term><varname>MACAddress=</varname></term>
1681 <listitem>
1682 <para>As in the <literal>[Network]</literal> section. This
1683 key is mandatory.</para>
1684 </listitem>
1685 </varlistentry>
1686 <varlistentry>
1687 <term><varname>VLANId=</varname></term>
1688 <listitem>
1689 <para>The VLAN ID for the new static MAC table entry. If
1690 omitted, no VLAN ID information is appended to the new static MAC
1691 table entry.</para>
1692 </listitem>
1693 </varlistentry>
1694 </variablelist>
1695 </refsect1>
1696 <refsect1>
1697 <title>[BridgeVLAN] Section Options</title>
1698 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
1699 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
1700 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
1701 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1702
1703 <variablelist class='network-directives'>
1704 <varlistentry>
1705 <term><varname>VLAN=</varname></term>
1706 <listitem>
1707 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1708 from 1 to 4094.</para>
1709 </listitem>
1710 </varlistentry>
1711 <varlistentry>
1712 <term><varname>EgressUntagged=</varname></term>
1713 <listitem>
1714 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1715 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
1716 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
1717 </listitem>
1718 </varlistentry>
1719 <varlistentry>
1720 <term><varname>PVID=</varname></term>
1721 <listitem>
1722 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1723 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
1724 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
1725 </listitem>
1726 </varlistentry>
1727 </variablelist>
1728 </refsect1>
1729
1730 <refsect1>
1731 <title>Examples</title>
1732 <example>
1733 <title>Static network configuration</title>
1734
1735 <programlisting># /etc/systemd/network/50-static.network
1736 [Match]
1737 Name=enp2s0
1738
1739 [Network]
1740 Address=192.168.0.15/24
1741 Gateway=192.168.0.1</programlisting>
1742
1743 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
1744 specified gateway will be used for a default route.</para>
1745 </example>
1746
1747 <example>
1748 <title>DHCP on ethernet links</title>
1749
1750 <programlisting># /etc/systemd/network/80-dhcp.network
1751 [Match]
1752 Name=en*
1753
1754 [Network]
1755 DHCP=yes</programlisting>
1756
1757 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
1758 <literal>en</literal> (i.e. ethernet interfaces).</para>
1759 </example>
1760
1761 <example>
1762 <title>A bridge with two enslaved links</title>
1763
1764 <programlisting># /etc/systemd/network/25-bridge-static.network
1765 [Match]
1766 Name=bridge0
1767
1768 [Network]
1769 Address=192.168.0.15/24
1770 Gateway=192.168.0.1
1771 DNS=192.168.0.1</programlisting>
1772
1773 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
1774 [Match]
1775 Name=enp2s0
1776
1777 [Network]
1778 Bridge=bridge0</programlisting>
1779
1780 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
1781 [Match]
1782 Name=wlp3s0
1783
1784 [Network]
1785 Bridge=bridge0</programlisting>
1786
1787 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
1788 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
1789 and network assigned, and a default route via the specified gateway will be
1790 added. The specified DNS server will be added to the global list of DNS resolvers.
1791 </para>
1792 </example>
1793
1794 <example>
1795 <title></title>
1796
1797 <programlisting>
1798 # /etc/systemd/network/20-bridge-slave-interface-vlan.network
1799 [Match]
1800 Name=enp2s0
1801
1802 [Network]
1803 Bridge=bridge0
1804
1805 [BridgeVLAN]
1806 VLAN=1-32
1807 PVID=42
1808 EgressUntagged=42
1809
1810 [BridgeVLAN]
1811 VLAN=100-200
1812
1813 [BridgeVLAN]
1814 EgressUntagged=300-400</programlisting>
1815
1816 <para>This overrides the configuration specified in the previous example for the
1817 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
1818 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
1819 untagged when they leave on this interface. Untagged packets which arrive on this
1820 interface will be assigned VLAN ID 42.</para>
1821 </example>
1822
1823 <example>
1824 <title>Various tunnels</title>
1825
1826 <programlisting>/etc/systemd/network/25-tunnels.network
1827 [Match]
1828 Name=ens1
1829
1830 [Network]
1831 Tunnel=ipip-tun
1832 Tunnel=sit-tun
1833 Tunnel=gre-tun
1834 Tunnel=vti-tun
1835 </programlisting>
1836
1837 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
1838 [NetDev]
1839 Name=ipip-tun
1840 Kind=ipip
1841 </programlisting>
1842
1843 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
1844 [NetDev]
1845 Name=sit-tun
1846 Kind=sit
1847 </programlisting>
1848
1849 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
1850 [NetDev]
1851 Name=gre-tun
1852 Kind=gre
1853 </programlisting>
1854
1855 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
1856 [NetDev]
1857 Name=vti-tun
1858 Kind=vti
1859 </programlisting>
1860
1861 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
1862 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
1863 </example>
1864
1865 <example>
1866 <title>A bond device</title>
1867
1868 <programlisting># /etc/systemd/network/30-bond1.network
1869 [Match]
1870 Name=bond1
1871
1872 [Network]
1873 DHCP=ipv6
1874 </programlisting>
1875
1876 <programlisting># /etc/systemd/network/30-bond1.netdev
1877 [NetDev]
1878 Name=bond1
1879 Kind=bond
1880 </programlisting>
1881
1882 <programlisting># /etc/systemd/network/30-bond1-dev1.network
1883 [Match]
1884 MACAddress=52:54:00:e9:64:41
1885
1886 [Network]
1887 Bond=bond1
1888 </programlisting>
1889
1890 <programlisting># /etc/systemd/network/30-bond1-dev2.network
1891 [Match]
1892 MACAddress=52:54:00:e9:64:42
1893
1894 [Network]
1895 Bond=bond1
1896 </programlisting>
1897
1898 <para>This will create a bond device <literal>bond1</literal> and enslave the two
1899 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
1900 will be used to acquire an address.</para>
1901 </example>
1902
1903 <example>
1904 <title>Virtual Routing and Forwarding (VRF)</title>
1905 <para>Add the <literal>bond1</literal> interface to the VRF master interface
1906 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
1907 within the routing table defined during VRF creation. For kernels before 4.8 traffic
1908 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
1909 </para>
1910 <programlisting># /etc/systemd/network/25-vrf.network
1911 [Match]
1912 Name=bond1
1913
1914 [Network]
1915 VRF=vrf1
1916 </programlisting>
1917 </example>
1918
1919 <example>
1920 <title>MacVTap</title>
1921 <para>This brings up a network interface <literal>macvtap-test</literal>
1922 and attaches it to <literal>enp0s25</literal>.</para>
1923 <programlisting># /usr/lib/systemd/network/25-macvtap.network
1924 [Match]
1925 Name=enp0s25
1926
1927 [Network]
1928 MACVTAP=macvtap-test
1929 </programlisting>
1930 </example>
1931 </refsect1>
1932
1933 <refsect1>
1934 <title>See Also</title>
1935 <para>
1936 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1937 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1938 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1939 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1940 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1941 </para>
1942 </refsect1>
1943
1944 </refentry>