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