]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.network.xml
systemctl: fix broken vertical lines in list-dependencies --all (#5608)
[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
ZJS
273 <literal>yes</literal>, <literal>no</literal>,
274 <literal>ipv4</literal>, or <literal>ipv6</literal>.</para>
e88d8021 275
f5a8c43f 276 <para>Note that DHCPv6 will by default be triggered by Router
7f3fdb7f 277 Advertisement, if that is enabled, regardless of this parameter.
f5a8c43f
TG
278 By enabling DHCPv6 support explicitly, the DHCPv6 client will
279 be started regardless of the presence of routers on the link,
280 or what flags the routers pass. See
f921f573 281 <literal>IPv6AcceptRA=</literal>.</para>
f5a8c43f
TG
282
283 <para>Furthermore, note that by default the domain name
e88d8021
ZJS
284 specified through DHCP is not used for name resolution.
285 See option <option>UseDomains=</option> below.</para>
2ef322fc
LP
286
287 <para>See the <literal>[DHCP]</literal> section below for further configuration options for the DHCP client
288 support.</para>
798d3a52
ZJS
289 </listitem>
290 </varlistentry>
291 <varlistentry>
292 <term><varname>DHCPServer=</varname></term>
293 <listitem>
ad943783
LP
294 <para>A boolean. Enables DHCPv4 server support. Defaults
295 to <literal>no</literal>. Further settings for the DHCP
296 server may be set in the <literal>[DHCPServer]</literal>
297 section described below.</para>
798d3a52
ZJS
298 </listitem>
299 </varlistentry>
300 <varlistentry>
56fd6bf7 301 <term><varname>LinkLocalAddressing=</varname></term>
798d3a52 302 <listitem>
d0d6a4cd
TG
303 <para>Enables link-local address autoconfiguration. Accepts
304 <literal>yes</literal>, <literal>no</literal>,
305 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to
306 <literal>ipv6</literal>.</para>
798d3a52
ZJS
307 </listitem>
308 </varlistentry>
309 <varlistentry>
310 <term><varname>IPv4LLRoute=</varname></term>
311 <listitem>
312 <para>A boolean. When true, sets up the route needed for
313 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
314 to false.
315 </para>
316 </listitem>
317 </varlistentry>
318 <varlistentry>
113bfde1
TG
319 <term><varname>IPv6Token=</varname></term>
320 <listitem>
321 <para>An IPv6 address with the top 64 bits unset. When set, indicates the
eb142d8e
TG
322 64-bit interface part of SLAAC IPv6 addresses for this link. Note that
323 the token is only ever used for SLAAC, and not for DHCPv6 addresses, even
3708bd46 324 in the case DHCP is requested by router advertisement. By default, the
eb142d8e 325 token is autogenerated.</para>
113bfde1
TG
326 </listitem>
327 </varlistentry>
328 <varlistentry>
798d3a52
ZJS
329 <term><varname>LLMNR=</varname></term>
330 <listitem>
aaa297d4
LP
331 <para>A boolean or <literal>resolve</literal>. When true,
332 enables <ulink
333 url="https://tools.ietf.org/html/rfc4795">Link-Local
334 Multicast Name Resolution</ulink> on the link. When set to
335 <literal>resolve</literal>, only resolution is enabled,
336 but not host registration and announcement. Defaults to
337 true. This setting is read by
338 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
339 </listitem>
340 </varlistentry>
341 <varlistentry>
342 <term><varname>MulticastDNS=</varname></term>
343 <listitem>
344 <para>A boolean or <literal>resolve</literal>. When true,
345 enables <ulink
346 url="https://tools.ietf.org/html/rfc6762">Multicast
347 DNS</ulink> support on the link. When set to
348 <literal>resolve</literal>, only resolution is enabled,
349 but not host or service registration and
350 announcement. Defaults to false. This setting is read by
351 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
352 </listitem>
353 </varlistentry>
ad6c0475
LP
354 <varlistentry>
355 <term><varname>DNSSEC=</varname></term>
356 <listitem>
357 <para>A boolean or
358 <literal>allow-downgrade</literal>. When true, enables
359 <ulink
360 url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink>
361 DNS validation support on the link. When set to
362 <literal>allow-downgrade</literal>, compatibility with
363 non-DNSSEC capable networks is increased, by automatically
364 turning off DNSEC in this case. This option defines a
365 per-interface setting for
366 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
367 global <varname>DNSSEC=</varname> option. Defaults to
368 false. This setting is read by
369 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
370 </listitem>
371 </varlistentry>
8a516214
LP
372 <varlistentry>
373 <term><varname>DNSSECNegativeTrustAnchors=</varname></term>
374 <listitem><para>A space-separated list of DNSSEC negative
375 trust anchor domains. If specified and DNSSEC is enabled,
376 look-ups done via the interface's DNS server will be subject
377 to the list of negative trust anchors, and not require
378 authentication for the specified domains, or anything below
379 it. Use this to disable DNSSEC authentication for specific
380 private domains, that cannot be proven valid using the
381 Internet DNS hierarchy. Defaults to the empty list. This
382 setting is read by
383 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
384 </listitem>
385 </varlistentry>
798d3a52
ZJS
386 <varlistentry>
387 <term><varname>LLDP=</varname></term>
388 <listitem>
da6c766d
LP
389 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
390 implemented on professional routers and bridges which announces which physical port a system is connected
391 to, as well as other related data. Accepts a boolean or the special value
34437b4f
LP
392 <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
393 neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers
394 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
7cececb2 395 others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
34437b4f 396 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
da6c766d
LP
397 collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below
398 for enabling LLDP packet emission from the local system.
798d3a52
ZJS
399 </para>
400 </listitem>
401 </varlistentry>
da6c766d
LP
402 <varlistentry>
403 <term><varname>EmitLLDP=</varname></term>
404 <listitem>
7272b25e
LP
405 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
406 <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and
407 <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
408 a short LLDP packet with information about the local system is sent out in regular intervals on the
409 link. The LLDP packet will contain information about the local host name, the local machine ID (as stored
410 in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
da6c766d
LP
411 local interface name, as well as the pretty hostname of the system (as set in
412 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
7272b25e
LP
413 emission is only available on Ethernet links. Note that this setting passes data suitable for
414 identification of host to the network and should thus not be enabled on untrusted networks, where such
415 identification data should not be made available. Use this option to permit other systems to identify on
416 which interfaces they are connected to this system. The three special values control propagation of the
417 LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest
418 connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but
419 not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge
420 is reached. For details about these concepts, see <ulink
421 url="http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE 802.1AB-2009</ulink>. Note that
422 configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and
423 most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP
424 reception.</para>
da6c766d
LP
425 </listitem>
426 </varlistentry>
0d4ad91d
AR
427 <varlistentry>
428 <term><varname>BindCarrier=</varname></term>
429 <listitem>
2ae7505f
TG
430 <para>A link name or a list of link names. When set, controls the behavior of the current
431 link. When all links in the list are in an operational down state, the current link is brought
432 down. When at least one link has carrier, the current interface is brought up.
0d4ad91d
AR
433 </para>
434 </listitem>
435 </varlistentry>
798d3a52
ZJS
436 <varlistentry>
437 <term><varname>Address=</varname></term>
438 <listitem>
439 <para>A static IPv4 or IPv6 address and its prefix length,
440 separated by a <literal>/</literal> character. Specify
441 this key more than once to configure several addresses.
442 The format of the address must be as described in
3ba3a79d 443 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
444 This is a short-hand for an [Address] section only
445 containing an Address key (see below). This option may be
446 specified more than once.
447 </para>
448
449 <para>If the specified address is 0.0.0.0 (for IPv4) or
450 [::] (for IPv6), a new address range of the requested size
451 is automatically allocated from a system-wide pool of
452 unused ranges. The allocated range is checked against all
453 current network interfaces and all known network
454 configuration files to avoid address range conflicts. The
455 default system-wide pool consists of 192.168.0.0/16,
456 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for
457 IPv6. This functionality is useful to manage a large
458 number of dynamically created network interfaces with the
459 same network configuration and automatic address range
460 assignment.</para>
461
462 </listitem>
463 </varlistentry>
464 <varlistentry>
465 <term><varname>Gateway=</varname></term>
466 <listitem>
467 <para>The gateway address, which must be in the format
468 described in
3ba3a79d 469 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
470 This is a short-hand for a [Route] section only containing
471 a Gateway key. This option may be specified more than
472 once.</para>
473 </listitem>
474 </varlistentry>
475 <varlistentry>
476 <term><varname>DNS=</varname></term>
477 <listitem>
478 <para>A DNS server address, which must be in the format
479 described in
3ba3a79d 480 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
f41b446a 481 This option may be specified more than once. This setting is read by
3df9bec5 482 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
483 </listitem>
484 </varlistentry>
485 <varlistentry>
486 <term><varname>Domains=</varname></term>
487 <listitem>
2df22529
ZJS
488 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
489 should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the
490 prefix are called "routing-only domains". The domains without the prefix are called "search domains" and
491 are first used as search suffixes for extending single-label host names (host names containing no dots) to
492 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
493 each of the specified search domains are appended to it in turn, converting it into a fully qualified
494 domain name, until one of them may be successfully resolved.</para>
495
496 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names
497 ending in those domains (hence also single label names, if any "search domains" are listed), are routed to
498 the DNS servers configured for this interface. The domain routing logic is particularly useful on
499 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para>
500
501 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain,
502 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
503 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
504 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
505 if a link on which they are connected is available.</para>
3df9bec5
LP
506
507 <para>This setting is read by
2df22529
ZJS
508 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
509 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in
510 <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
511 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
512 name servers limited to a specific link.</para>
798d3a52
ZJS
513 </listitem>
514 </varlistentry>
515 <varlistentry>
516 <term><varname>NTP=</varname></term>
517 <listitem>
f41b446a 518 <para>An NTP server address. This option may be specified more than once. This setting is read by
3df9bec5 519 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
520 </listitem>
521 </varlistentry>
522 <varlistentry>
523 <term><varname>IPForward=</varname></term>
765afd5c
LP
524 <listitem><para>Configures IP packet forwarding for the
525 system. If enabled, incoming packets on any network
526 interface will be forwarded to any other interfaces
527 according to the routing table. Takes either a boolean
528 argument, or the values <literal>ipv4</literal> or
529 <literal>ipv6</literal>, which only enable IP packet
530 forwarding for the specified address family. This controls
531 the <filename>net.ipv4.ip_forward</filename> and
532 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
533 options of the network interface (see <ulink
4046d836
LP
534 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
535 for details about sysctl options). Defaults to
536 <literal>no</literal>.</para>
537
765afd5c
LP
538 <para>Note: this setting controls a global kernel option,
539 and does so one way only: if a network that has this setting
540 enabled is set up the global setting is turned on. However,
541 it is never turned off again, even after all networks with
542 this setting enabled are shut down again.</para>
543
544 <para>To allow IP packet forwarding only between specific
545 network interfaces use a firewall.</para>
4046d836 546 </listitem>
798d3a52
ZJS
547 </varlistentry>
548 <varlistentry>
549 <term><varname>IPMasquerade=</varname></term>
550 <listitem><para>Configures IP masquerading for the network
b938cb90 551 interface. If enabled, packets forwarded from the network
798d3a52
ZJS
552 interface will be appear as coming from the local host.
553 Takes a boolean argument. Implies
5c82dd13 554 <varname>IPForward=ipv4</varname>. Defaults to
4046d836 555 <literal>no</literal>.</para></listitem>
798d3a52 556 </varlistentry>
a46e37cb
SS
557 <varlistentry>
558 <term><varname>IPv6PrivacyExtensions=</varname></term>
1f0d9695
LP
559 <listitem><para>Configures use of stateless temporary
560 addresses that change over time (see <ulink
561 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
562 Privacy Extensions for Stateless Address Autoconfiguration
563 in IPv6). Takes a boolean or the special values
564 <literal>prefer-public</literal> and
b938cb90 565 <literal>kernel</literal>. When true, enables the privacy
1f0d9695 566 extensions and prefers temporary addresses over public
b938cb90 567 addresses. When <literal>prefer-public</literal>, enables the
1f0d9695
LP
568 privacy extensions, but prefers public addresses over
569 temporary addresses. When false, the privacy extensions
b938cb90 570 remain disabled. When <literal>kernel</literal>, the kernel's
1f0d9695 571 default setting will be left in place. Defaults to
a46e37cb
SS
572 <literal>no</literal>.</para></listitem>
573 </varlistentry>
941d0aa8 574 <varlistentry>
f921f573 575 <term><varname>IPv6AcceptRA=</varname></term>
1e7a0e21
LP
576 <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes
577 a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
578 forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
579 is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if
580 the relevant flags are set in the RA data, or if no routers are found on the link.</para>
581
582 <para>Further settings for the IPv6 RA support may be configured in the
f921f573 583 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
1e7a0e21
LP
584
585 <para>Also see <ulink
586 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
587 documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of
588 <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para>
ebf98081 589 </listitem>
941d0aa8 590 </varlistentry>
44de7fb1
SS
591 <varlistentry>
592 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
a8eaaee7
JE
593 <listitem><para>Configures the amount of IPv6 Duplicate
594 Address Detection (DAD) probes to send. Defaults to unset.
44de7fb1
SS
595 </para></listitem>
596 </varlistentry>
a86cba89
SS
597 <varlistentry>
598 <term><varname>IPv6HopLimit=</varname></term>
599 <listitem><para>Configures IPv6 Hop Limit. For each router that
600 forwards the packet, the hop limit is decremented by 1. When the
601 hop limit field reaches zero, the packet is discarded.
602 Defaults to unset.
603 </para></listitem>
604 </varlistentry>
23d8b221 605 <varlistentry>
8f9a206b
SS
606 <term><varname>IPv4ProxyARP=</varname></term>
607 <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
23d8b221
SS
608 usually a router, answers ARP requests intended for another machine. By "faking" its identity,
609 the router accepts responsibility for routing packets to the "real" destination. (see <ulink
610 url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>.
611 Defaults to unset.
612 </para></listitem>
613 </varlistentry>
a0e5c15d
FK
614 <varlistentry>
615 <term><varname>IPv6ProxyNDPAddress=</varname></term>
616 <listitem><para>An IPv6 address, for which Neighbour Advertisement
617 messages will be proxied.
618 Proxy NDP (Neighbor Discovery Protocol) is a technique for IPv6 to
619 allow routing of addresses to a different destination when peers expect them
620 to be present on a certain physical link.
621 In this case a router answers Neighbour Advertisement messages intended for
622 another machine by offering its own MAC address as destination.
623 Unlike proxy ARP for IPv4, is not enabled globally, but will only send Neighbour
624 Advertisement messages for addresses in the IPv6 neighbor proxy table,
625 which can also be shown by <command>ip -6 neighbour show proxy</command>
626 This option may be specified more than once. systemd-networkd will control the
627 per-interface `proxy_ndp` switch for each configured interface, depending on whether
628 there are <option>IPv6ProxyNDPAddress=</option> entries configured and add these to
629 the kernels IPv6 neighbor proxy table.
630 Defaults to unset.
631 </para></listitem>
632 </varlistentry>
798d3a52
ZJS
633 <varlistentry>
634 <term><varname>Bridge=</varname></term>
635 <listitem>
9e35b3de
ZJS
636 <para>The name of the bridge to add the link to. See
637 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
638 </para>
798d3a52
ZJS
639 </listitem>
640 </varlistentry>
641 <varlistentry>
642 <term><varname>Bond=</varname></term>
643 <listitem>
9e35b3de
ZJS
644 <para>The name of the bond to add the link to. See
645 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
646 </para>
798d3a52
ZJS
647 </listitem>
648 </varlistentry>
6cb955c6
AR
649 <varlistentry>
650 <term><varname>VRF=</varname></term>
651 <listitem>
9e35b3de
ZJS
652 <para>The name of the VRF to add the link to. See
653 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
654 </para>
6cb955c6
AR
655 </listitem>
656 </varlistentry>
798d3a52
ZJS
657 <varlistentry>
658 <term><varname>VLAN=</varname></term>
659 <listitem>
9e35b3de
ZJS
660 <para>The name of a VLAN to create on the link. See
661 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
662 This option may be specified more than once.</para>
798d3a52
ZJS
663 </listitem>
664 </varlistentry>
665 <varlistentry>
666 <term><varname>MACVLAN=</varname></term>
667 <listitem>
9e35b3de
ZJS
668 <para>The name of a MACVLAN to create on the link. See
669 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
670 This option may be specified more than once.</para>
798d3a52
ZJS
671 </listitem>
672 </varlistentry>
673 <varlistentry>
674 <term><varname>VXLAN=</varname></term>
675 <listitem>
9e35b3de
ZJS
676 <para>The name of a VXLAN to create on the link. See
677 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
678 This option may be specified more than once.</para>
798d3a52
ZJS
679 </listitem>
680 </varlistentry>
681 <varlistentry>
682 <term><varname>Tunnel=</varname></term>
683 <listitem>
9e35b3de
ZJS
684 <para>The name of a Tunnel to create on the link. See
685 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
686 This option may be specified more than once.</para>
798d3a52
ZJS
687 </listitem>
688 </varlistentry>
689 </variablelist>
690
691 </refsect1>
692
693 <refsect1>
694 <title>[Address] Section Options</title>
695
696 <para>An <literal>[Address]</literal> section accepts the
697 following keys. Specify several <literal>[Address]</literal>
698 sections to configure several addresses.</para>
699
700 <variablelist class='network-directives'>
701 <varlistentry>
702 <term><varname>Address=</varname></term>
703 <listitem>
704 <para>As in the <literal>[Network]</literal> section. This
705 key is mandatory.</para>
706 </listitem>
707 </varlistentry>
708 <varlistentry>
709 <term><varname>Peer=</varname></term>
710 <listitem>
711 <para>The peer address in a point-to-point connection.
712 Accepts the same format as the <literal>Address</literal>
713 key.</para>
714 </listitem>
715 </varlistentry>
716 <varlistentry>
717 <term><varname>Broadcast=</varname></term>
718 <listitem>
719 <para>The broadcast address, which must be in the format
720 described in
3ba3a79d 721 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
722 This key only applies to IPv4 addresses. If it is not
723 given, it is derived from the <literal>Address</literal>
724 key.</para>
725 </listitem>
726 </varlistentry>
727 <varlistentry>
728 <term><varname>Label=</varname></term>
729 <listitem>
730 <para>An address label.</para>
731 </listitem>
732 </varlistentry>
b5834a0b
SS
733 <varlistentry>
734 <term><varname>PreferredLifetime=</varname></term>
735 <listitem>
736 <para>Allows the default "preferred lifetime" of the address to be overridden.
737 Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal>
738 which is the default and means that the address never expires, and <literal>0</literal> which means
739 that the address is considered immediately "expired" and will not be used,
740 unless explicitly requested. A setting of PreferredLifetime=0 is useful for
741 addresses which are added to be used only by a specific application,
742 which is then configured to use them explicitly.</para>
743 </listitem>
744 </varlistentry>
e63be084
SS
745 <varlistentry>
746 <term><varname>HomeAddress=</varname></term>
747 <listitem>
748 <para>Takes a boolean argument. Designates this address the "home address" as defined in
749 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>.
750 Supported only on IPv6. Defaults to false.</para>
751 </listitem>
752 </varlistentry>
753 <varlistentry>
754 <term><varname>DuplicateAddressDetection=</varname></term>
755 <listitem>
756 <para>Takes a boolean argument. Do not perform Duplicate Address Detection
757 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink> when adding this address.
758 Supported only on IPv6. Defaults to false.</para>
759 </listitem>
760 </varlistentry>
761 <varlistentry>
762 <term><varname>ManageTemporaryAddress=</varname></term>
763 <listitem>
764 <para>Takes a boolean argument. If true the kernel manage temporary addresses created
765 from this one as template on behalf of Privacy Extensions
766 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become
767 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
768 The given address needs to have a prefix length of 64. This flag allows to use privacy
769 extensions in a manually configured network, just like if stateless auto-configuration
770 was active. Defaults to false. </para>
771 </listitem>
772 </varlistentry>
773 <varlistentry>
774 <term><varname>PrefixRoute=</varname></term>
775 <listitem>
776 <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace
777 application needs a way to suppress adding a prefix route. This is for example relevant
778 together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses,
779 but depending on on-link, no route for the prefix should be added. Defaults to false.</para>
780 </listitem>
781 </varlistentry>
782 <varlistentry>
783 <term><varname>AutoJoin=</varname></term>
784 <listitem>
785 <para>Takes a boolean argument. Joining multicast group on ethernet level via
786 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
787 IGMP snooping since the switch would not replicate multicast packets on ports that did not
788 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
789 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
790 that enables then to do the required join. By extending ip address command with option
791 <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan
792 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
793 Defaults to <literal>no</literal>.</para>
794 </listitem>
795 </varlistentry>
798d3a52
ZJS
796 </variablelist>
797 </refsect1>
798
799 <refsect1>
800 <title>[Route] Section Options</title>
801 <para>The <literal>[Route]</literal> section accepts the
802 following keys. Specify several <literal>[Route]</literal>
803 sections to configure several routes.</para>
804
805 <variablelist class='network-directives'>
806 <varlistentry>
807 <term><varname>Gateway=</varname></term>
808 <listitem>
809 <para>As in the <literal>[Network]</literal> section.</para>
810 </listitem>
811 </varlistentry>
812 <varlistentry>
813 <term><varname>Destination=</varname></term>
814 <listitem>
815 <para>The destination prefix of the route. Possibly
b938cb90 816 followed by a slash and the prefix length. If omitted, a
798d3a52
ZJS
817 full-length host route is assumed.</para>
818 </listitem>
819 </varlistentry>
820 <varlistentry>
821 <term><varname>Source=</varname></term>
822 <listitem>
823 <para>The source prefix of the route. Possibly followed by
b938cb90 824 a slash and the prefix length. If omitted, a full-length
798d3a52
ZJS
825 host route is assumed.</para>
826 </listitem>
827 </varlistentry>
828 <varlistentry>
829 <term><varname>Metric=</varname></term>
830 <listitem>
b938cb90 831 <para>The metric of the route (an unsigned integer).</para>
798d3a52
ZJS
832 </listitem>
833 </varlistentry>
769b56a3
TG
834 <varlistentry>
835 <term><varname>Scope=</varname></term>
836 <listitem>
a8eaaee7 837 <para>The scope of the route, which can be <literal>global</literal>,
769b56a3
TG
838 <literal>link</literal> or <literal>host</literal>. Defaults to
839 <literal>global</literal>.</para>
840 </listitem>
0d07e595
JK
841 </varlistentry>
842 <varlistentry>
843 <term><varname>PreferredSource=</varname></term>
844 <listitem>
845 <para>The preferred source address of the route. The address
846 must be in the format described in
847 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
848 </listitem>
769b56a3 849 </varlistentry>
c953b24c
SS
850 <varlistentry>
851 <term><varname>Table=<replaceable>num</replaceable></varname></term>
852 <listitem>
853 <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset).
854 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
855 </para>
856 </listitem>
857 </varlistentry>
798d3a52
ZJS
858 </variablelist>
859 </refsect1>
860
861 <refsect1>
862 <title>[DHCP] Section Options</title>
ad943783
LP
863 <para>The <literal>[DHCP]</literal> section configures the
864 DHCPv4 and DHCP6 client, if it is enabled with the
865 <varname>DHCP=</varname> setting described above:</para>
798d3a52
ZJS
866
867 <variablelist class='network-directives'>
868 <varlistentry>
869 <term><varname>UseDNS=</varname></term>
870 <listitem>
871 <para>When true (the default), the DNS servers received
872 from the DHCP server will be used and take precedence over
873 any statically configured ones.</para>
e88d8021
ZJS
874
875 <para>This corresponds to the <option>nameserver</option>
ad943783
LP
876 option in <citerefentry
877 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
878 </listitem>
879 </varlistentry>
301f4073
MM
880 <varlistentry>
881 <term><varname>UseNTP=</varname></term>
882 <listitem>
883 <para>When true (the default), the NTP servers received
884 from the DHCP server will be used by systemd-timesyncd
885 and take precedence over any statically configured ones.</para>
886 </listitem>
887 </varlistentry>
798d3a52
ZJS
888 <varlistentry>
889 <term><varname>UseMTU=</varname></term>
890 <listitem>
891 <para>When true, the interface maximum transmission unit
892 from the DHCP server will be used on the current link.
893 Defaults to false.</para>
894 </listitem>
895 </varlistentry>
896 <varlistentry>
897 <term><varname>SendHostname=</varname></term>
898 <listitem>
d59be2cf
ZJS
899 <para>When true (the default), the machine's hostname will
900 be sent to the DHCP server.</para>
798d3a52
ZJS
901 </listitem>
902 </varlistentry>
903 <varlistentry>
904 <term><varname>UseHostname=</varname></term>
905 <listitem>
906 <para>When true (the default), the hostname received from
ad943783 907 the DHCP server will be set as the transient hostname of the system
d59be2cf 908 </para>
798d3a52
ZJS
909 </listitem>
910 </varlistentry>
1adc5d0b
SS
911 <varlistentry>
912 <term><varname>Hostname=</varname></term>
913 <listitem>
d59be2cf
ZJS
914 <para>Use this value for the hostname which is sent to the
915 DHCP server, instead of machine's hostname.</para>
1adc5d0b
SS
916 </listitem>
917 </varlistentry>
798d3a52
ZJS
918 <varlistentry>
919 <term><varname>UseDomains=</varname></term>
920 <listitem>
07ff561c 921 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
b2a81c0b
LP
922 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
923 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
924 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
925 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
926 false.</para>
927
928 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1e7a0e21 929 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
b2a81c0b
LP
930 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
931 single-label names.</para>
932
933 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
934 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
935 </listitem>
936 </varlistentry>
937 <varlistentry>
938 <term><varname>UseRoutes=</varname></term>
939 <listitem>
940 <para>When true (the default), the static routes will be
941 requested from the DHCP server and added to the routing
a8eaaee7 942 table with a metric of 1024.</para>
798d3a52
ZJS
943 </listitem>
944 </varlistentry>
ad943783
LP
945
946 <varlistentry>
947 <term><varname>UseTimezone=</varname></term>
948
949 <listitem><para>When true, the timezone received from the
7f3fdb7f 950 DHCP server will be set as timezone of the local
ad943783
LP
951 system. Defaults to <literal>no</literal>.</para></listitem>
952 </varlistentry>
953
798d3a52
ZJS
954 <varlistentry>
955 <term><varname>CriticalConnection=</varname></term>
956 <listitem>
957 <para>When true, the connection will never be torn down
958 even if the DHCP lease expires. This is contrary to the
959 DHCP specification, but may be the best choice if, say,
960 the root filesystem relies on this connection. Defaults to
961 false.</para>
962 </listitem>
963 </varlistentry>
e2e08e77 964
3e43b2cd
JJ
965 <varlistentry>
966 <term><varname>ClientIdentifier=</varname></term>
967 <listitem>
076ea6f6 968 <para>The DHCPv4 client identifier to use. Either <literal>mac</literal> to use the MAC address of the link
037a3ded 969 or <literal>duid</literal> (the default, see below) to use an RFC4361-compliant Client ID.</para>
3e43b2cd
JJ
970 </listitem>
971 </varlistentry>
e2e08e77 972
798d3a52
ZJS
973 <varlistentry>
974 <term><varname>VendorClassIdentifier=</varname></term>
975 <listitem>
976 <para>The vendor class identifier used to identify vendor
977 type and configuration.</para>
978 </listitem>
979 </varlistentry>
076ea6f6 980
e2e08e77
ZJS
981 <varlistentry>
982 <term><varname>DUIDType=</varname></term>
983 <listitem>
984 <para>Override the global <varname>DUIDType</varname> setting for this network. See
985 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
986 for a description of possible values.</para>
987 </listitem>
988 </varlistentry>
076ea6f6 989
e2e08e77
ZJS
990 <varlistentry>
991 <term><varname>DUIDRawData=</varname></term>
992 <listitem>
993 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
994 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
995 for a description of possible values.</para>
076ea6f6
LP
996 </listitem>
997 </varlistentry>
e2e08e77 998
d05def16
LP
999 <varlistentry>
1000 <term><varname>IAID=</varname></term>
1001 <listitem>
1002 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
1003 </listitem>
1004 </varlistentry>
1005
798d3a52
ZJS
1006 <varlistentry>
1007 <term><varname>RequestBroadcast=</varname></term>
1008 <listitem>
1009 <para>Request the server to use broadcast messages before
1010 the IP address has been configured. This is necessary for
1011 devices that cannot receive RAW packets, or that cannot
1012 receive packets at all before an IP address has been
1013 configured. On the other hand, this must not be enabled on
1014 networks where broadcasts are filtered out.</para>
1015 </listitem>
1016 </varlistentry>
e2e08e77 1017
798d3a52
ZJS
1018 <varlistentry>
1019 <term><varname>RouteMetric=</varname></term>
1020 <listitem>
1021 <para>Set the routing metric for routes specified by the
1022 DHCP server.</para>
1023 </listitem>
1024 </varlistentry>
f594276b
JK
1025
1026 <varlistentry>
1027 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1028 <listitem>
d11e656a 1029 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
f594276b
JK
1030 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1031 </para>
1032 </listitem>
1033 </varlistentry>
9faed222
SS
1034
1035 <varlistentry>
1036 <term><varname>ListenPort=</varname></term>
1037 <listitem>
1038 <para>Allow setting custom port for the DHCP client to listen on.</para>
1039 </listitem>
1040 </varlistentry>
ad943783 1041 </variablelist>
076ea6f6 1042 </refsect1>
413708d1 1043
1e7a0e21 1044 <refsect1>
f921f573
LP
1045 <title>[IPv6AcceptRA] Section Options</title>
1046 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1047 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1e7a0e21
LP
1048 above:</para>
1049
1050 <variablelist class='network-directives'>
1051 <varlistentry>
1052 <term><varname>UseDNS=</varname></term>
1053 <listitem>
1054 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1055 precedence over any statically configured ones.</para>
1056
1057 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1058 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1059 </listitem>
1060 </varlistentry>
1061
1062 <varlistentry>
1063 <term><varname>UseDomains=</varname></term>
1064 <listitem>
1065 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
1066 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1067 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1068 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1069 effect of the <option>Domains=</option> setting when the argument is prefixed with
1070 <literal>~</literal>. Defaults to false.</para>
1071
1072 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1073 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1074 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1075 single-label names.</para>
1076
1077 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1078 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1079 </listitem>
1080 </varlistentry>
2ba31d29
JK
1081
1082 <varlistentry>
1083 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1084 <listitem>
d11e656a
ZJS
1085 <para>The table identifier for the routes received in the Router Advertisement
1086 (a number between 1 and 4294967295, or 0 to unset).
2ba31d29
JK
1087 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1088 </para>
1089 </listitem>
1090 </varlistentry>
1e7a0e21
LP
1091 </variablelist>
1092 </refsect1>
1093
1094
ad943783
LP
1095 <refsect1>
1096 <title>[DHCPServer] Section Options</title>
1097 <para>The <literal>[DHCPServer]</literal> section contains
1098 settings for the DHCP server, if enabled via the
1099 <varname>DHCPServer=</varname> option described above:</para>
1100
1101 <variablelist class='network-directives'>
1102
9b3a67c5
TG
1103 <varlistentry>
1104 <term><varname>PoolOffset=</varname></term>
1105 <term><varname>PoolSize=</varname></term>
1106
1107 <listitem><para>Configures the pool of addresses to hand out. The pool
1108 is a contiguous sequence of IP addresses in the subnet configured for
1109 the server address, which does not include the subnet nor the broadcast
1110 address. <varname>PoolOffset=</varname> takes the offset of the pool
1111 from the start of subnet, or zero to use the default value.
1112 <varname>PoolSize=</varname> takes the number of IP addresses in the
b938cb90 1113 pool or zero to use the default value. By default, the pool starts at
9b3a67c5
TG
1114 the first address after the subnet address and takes up the rest of
1115 the subnet, excluding the broadcast address. If the pool includes
1116 the server address (the default), this is reserved and not handed
1117 out to clients.</para></listitem>
1118 </varlistentry>
1119
ad943783
LP
1120 <varlistentry>
1121 <term><varname>DefaultLeaseTimeSec=</varname></term>
1122 <term><varname>MaxLeaseTimeSec=</varname></term>
1123
1124 <listitem><para>Control the default and maximum DHCP lease
1125 time to pass to clients. These settings take time values in seconds or
1126 another common time unit, depending on the suffix. The default
1127 lease time is used for clients that did not ask for a specific
1128 lease time. If a client asks for a lease time longer than the
b938cb90 1129 maximum lease time, it is automatically shortened to the
ad943783
LP
1130 specified time. The default lease time defaults to 1h, the
1131 maximum lease time to 12h. Shorter lease times are beneficial
1132 if the configuration data in DHCP leases changes frequently
1133 and clients shall learn the new settings with shorter
1134 latencies. Longer lease times reduce the generated DHCP
1135 network traffic.</para></listitem>
1136 </varlistentry>
1137
1138 <varlistentry>
1139 <term><varname>EmitDNS=</varname></term>
1140 <term><varname>DNS=</varname></term>
1141
1142 <listitem><para>Configures whether the DHCP leases handed out
1143 to clients shall contain DNS server information. The
1144 <varname>EmitDNS=</varname> setting takes a boolean argument
1145 and defaults to <literal>yes</literal>. The DNS servers to
1146 pass to clients may be configured with the
1147 <varname>DNS=</varname> option, which takes a list of IPv4
1148 addresses. If the <varname>EmitDNS=</varname> option is
b938cb90 1149 enabled but no servers configured, the servers are
ad943783
LP
1150 automatically propagated from an "uplink" interface that has
1151 appropriate servers set. The "uplink" interface is determined
1152 by the default route of the system with the highest
1153 priority. Note that this information is acquired at the time
1154 the lease is handed out, and does not take uplink interfaces
1155 into account that acquire DNS or NTP server information at a
1156 later point. DNS server propagation does not take
1157 <filename>/etc/resolv.conf</filename> into account. Also, note
a8eaaee7 1158 that the leases are not refreshed if the uplink network
ad943783 1159 configuration changes. To ensure clients regularly acquire the
b938cb90 1160 most current uplink DNS server information, it is thus
ad943783
LP
1161 advisable to shorten the DHCP lease time via
1162 <varname>MaxLeaseTimeSec=</varname> described
1163 above.</para></listitem>
1164 </varlistentry>
1165
1166 <varlistentry>
1167 <term><varname>EmitNTP=</varname></term>
1168 <term><varname>NTP=</varname></term>
1169
1170 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
b938cb90 1171 <varname>DNS=</varname> settings described above, these
ad943783
LP
1172 settings configure whether and what NTP server information
1173 shall be emitted as part of the DHCP lease. The same syntax,
1174 propagation semantics and defaults apply as for
1175 <varname>EmitDNS=</varname> and
1176 <varname>DNS=</varname>.</para></listitem>
1177 </varlistentry>
1178
77ff6022
CG
1179 <varlistentry>
1180 <term><varname>EmitRouter=</varname></term>
1181
1182 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1183 setting described above, this setting configures whether the
1184 DHCP lease should contain the router option. The same syntax,
1185 propagation semantics and defaults apply as for
1186 <varname>EmitDNS=</varname>.</para></listitem>
1187 </varlistentry>
1188
ad943783
LP
1189 <varlistentry>
1190 <term><varname>EmitTimezone=</varname></term>
1191 <term><varname>Timezone=</varname></term>
1192
1193 <listitem><para>Configures whether the DHCP leases handed out
1194 to clients shall contain timezone information. The
1195 <varname>EmitTimezone=</varname> setting takes a boolean
1196 argument and defaults to <literal>yes</literal>. The
1197 <varname>Timezone=</varname> setting takes a timezone string
1198 (such as <literal>Europe/Berlin</literal> or
1199 <literal>UTC</literal>) to pass to clients. If no explicit
b938cb90 1200 timezone is set, the system timezone of the local host is
ad943783
LP
1201 propagated, as determined by the
1202 <filename>/etc/localtime</filename> symlink.</para></listitem>
1203 </varlistentry>
1204
1205 </variablelist>
1206 </refsect1>
1207
798d3a52
ZJS
1208 <refsect1>
1209 <title>[Bridge] Section Options</title>
1210 <para>The <literal>[Bridge]</literal> section accepts the
1211 following keys.</para>
1212 <variablelist class='network-directives'>
165c41a9
SS
1213 <varlistentry>
1214 <term><varname>UnicastFlood=</varname></term>
1215 <listitem>
072f9e4a
ZJS
1216 <para>A boolean. Controls whether the bridge should flood
1217 traffic for which an FDB entry is missing and the destination
1218 is unknown through this port. Defaults to on.
47c7dfe2 1219 </para>
165c41a9
SS
1220 </listitem>
1221 </varlistentry>
1222 <varlistentry>
1223 <term><varname>HairPin=</varname></term>
1224 <listitem>
47c7dfe2
ZJS
1225 <para>A boolean. Configures whether traffic may be sent back
1226 out of the port on which it was received. By default, this
1227 flag is false, and the bridge will not forward traffic back
1228 out of the receiving port.</para>
165c41a9
SS
1229 </listitem>
1230 </varlistentry>
1231 <varlistentry>
84c34096 1232 <term><varname>UseBPDU=</varname></term>
165c41a9 1233 <listitem>
47c7dfe2 1234 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
84c34096 1235 processed by the bridge port. Defaults to yes.</para>
165c41a9
SS
1236 </listitem>
1237 </varlistentry>
1238 <varlistentry>
1239 <term><varname>FastLeave=</varname></term>
1240 <listitem>
47c7dfe2 1241 <para>A boolean. This flag allows the bridge to immediately stop multicast
a8eaaee7 1242 traffic on a port that receives an IGMP Leave message. It is only used with
47c7dfe2 1243 IGMP snooping if enabled on the bridge. Defaults to off.</para>
165c41a9
SS
1244 </listitem>
1245 </varlistentry>
1246 <varlistentry>
23da66bb 1247 <term><varname>AllowPortToBeRoot=</varname></term>
165c41a9 1248 <listitem>
47c7dfe2
ZJS
1249 <para>A boolean. Configures whether a given port is allowed to
1250 become a root port. Only used when STP is enabled on the bridge.
23da66bb 1251 Defaults to on.</para>
165c41a9
SS
1252 </listitem>
1253 </varlistentry>
798d3a52
ZJS
1254 <varlistentry>
1255 <term><varname>Cost=</varname></term>
1256 <listitem>
47c7dfe2 1257 <para>Sets the "cost" of sending packets of this interface.
a8eaaee7 1258 Each port in a bridge may have a different speed and the cost
798d3a52 1259 is used to decide which link to use. Faster interfaces
47c7dfe2 1260 should have lower costs.</para>
798d3a52
ZJS
1261 </listitem>
1262 </varlistentry>
1263 </variablelist>
1264 </refsect1>
798d3a52
ZJS
1265 <refsect1>
1266 <title>[BridgeFDB] Section Options</title>
1267 <para>The <literal>[BridgeFDB]</literal> section manages the
1268 forwarding database table of a port and accepts the following
1269 keys. Specify several <literal>[BridgeFDB]</literal> sections to
1270 configure several static MAC table entries.</para>
1271
1272 <variablelist class='network-directives'>
1273 <varlistentry>
1274 <term><varname>MACAddress=</varname></term>
1275 <listitem>
1276 <para>As in the <literal>[Network]</literal> section. This
1277 key is mandatory.</para>
1278 </listitem>
1279 </varlistentry>
1280 <varlistentry>
1281 <term><varname>VLANId=</varname></term>
1282 <listitem>
a8eaaee7
JE
1283 <para>The VLAN ID for the new static MAC table entry. If
1284 omitted, no VLAN ID info is appended to the new static MAC
798d3a52
ZJS
1285 table entry.</para>
1286 </listitem>
1287 </varlistentry>
1288 </variablelist>
1289 </refsect1>
13b498f9
TJ
1290 <refsect1>
1291 <title>[BridgeVLAN] Section Options</title>
1292 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
1293 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
1294 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
1295 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1296
1297 <variablelist class='network-directives'>
1298 <varlistentry>
1299 <term><varname>VLAN=</varname></term>
1300 <listitem>
1301 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1302 from 1 to 4094.</para>
1303 </listitem>
1304 </varlistentry>
1305 <varlistentry>
1306 <term><varname>EgressUntagged=</varname></term>
1307 <listitem>
1308 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1309 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
1310 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
1311 </listitem>
1312 </varlistentry>
1313 <varlistentry>
1314 <term><varname>PVID=</varname></term>
1315 <listitem>
1316 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1317 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
1318 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
1319 </listitem>
1320 </varlistentry>
1321 </variablelist>
1322 </refsect1>
798d3a52
ZJS
1323
1324 <refsect1>
9e35b3de 1325 <title>Examples</title>
798d3a52 1326 <example>
9e35b3de 1327 <title>Static network configuration</title>
798d3a52 1328
9e35b3de
ZJS
1329 <programlisting># /etc/systemd/network/50-static.network
1330[Match]
eac684ef
TG
1331Name=enp2s0
1332
1333[Network]
1334Address=192.168.0.15/24
1335Gateway=192.168.0.1</programlisting>
9e35b3de
ZJS
1336
1337 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
1338 specified gateway will be used for a default route.</para>
798d3a52 1339 </example>
eac684ef 1340
798d3a52 1341 <example>
9e35b3de 1342 <title>DHCP on ethernet links</title>
eac684ef 1343
9e35b3de
ZJS
1344 <programlisting># /etc/systemd/network/80-dhcp.network
1345[Match]
eac684ef
TG
1346Name=en*
1347
1348[Network]
9c8ca3f7 1349DHCP=yes</programlisting>
9e35b3de
ZJS
1350
1351 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
1352 <literal>en</literal> (i.e. ethernet interfaces).</para>
798d3a52 1353 </example>
eac684ef 1354
798d3a52 1355 <example>
9e35b3de 1356 <title>A bridge with two enslaved links</title>
f47c5c47 1357
9e35b3de
ZJS
1358 <programlisting># /etc/systemd/network/25-bridge-static.network
1359[Match]
f47c5c47 1360Name=bridge0
1361
1362[Network]
1363Address=192.168.0.15/24
1364Gateway=192.168.0.1
1365DNS=192.168.0.1</programlisting>
f47c5c47 1366
9e35b3de
ZJS
1367 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
1368[Match]
f47c5c47 1369Name=enp2s0
1370
1371[Network]
1372Bridge=bridge0</programlisting>
9e35b3de
ZJS
1373
1374 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
1375[Match]
1376Name=wlp3s0
1377
1378[Network]
1379Bridge=bridge0</programlisting>
1380
1381 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
1382 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
1383 and network assigned, and a default route via the specified gateway will be
1384 added. The specified DNS server will be added to the global list of DNS resolvers.
1385 </para>
13b498f9 1386 </example>
9e35b3de 1387
13b498f9 1388 <example>
9e35b3de 1389 <title></title>
13b498f9 1390
9e35b3de
ZJS
1391 <programlisting>
1392# /etc/systemd/network/20-bridge-slave-interface-vlan.network
1393[Match]
13b498f9
TJ
1394Name=enp2s0
1395
1396[Network]
1397Bridge=bridge0
1398
1399[BridgeVLAN]
1400VLAN=1-32
1401PVID=42
1402EgressUntagged=42
1403
1404[BridgeVLAN]
1405VLAN=100-200
1406
1407[BridgeVLAN]
1408EgressUntagged=300-400</programlisting>
0a8a0fad 1409
9e35b3de
ZJS
1410 <para>This overrides the configuration specified in the previous example for the
1411 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
1412 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
1413 untagged when they leave on this interface. Untagged packets which arrive on this
1414 interface will be assigned VLAN ID 42.</para>
798d3a52 1415 </example>
0a8a0fad 1416
798d3a52 1417 <example>
9e35b3de 1418 <title>Various tunnels</title>
0a8a0fad 1419
9e35b3de
ZJS
1420 <programlisting>/etc/systemd/network/25-tunnels.network
1421[Match]
1422Name=ens1
0a8a0fad
TG
1423
1424[Network]
9e35b3de
ZJS
1425Tunnel=ipip-tun
1426Tunnel=sit-tun
1427Tunnel=gre-tun
1428Tunnel=vti-tun
1429 </programlisting>
1430
1431 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
1432[NetDev]
1433Name=ipip-tun
1434Kind=ipip
1435 </programlisting>
1436
1437 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
1438[NetDev]
1439Name=sit-tun
1440Kind=sit
1441 </programlisting>
1442
1443 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
1444[NetDev]
1445Name=gre-tun
1446Kind=gre
1447 </programlisting>
1448
1449 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
1450[NetDev]
1451Name=vti-tun
1452Kind=vti
1453 </programlisting>
1454
1455 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
1456 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
798d3a52 1457 </example>
0a8a0fad 1458
798d3a52 1459 <example>
9e35b3de 1460 <title>A bond device</title>
0a8a0fad 1461
9e35b3de
ZJS
1462 <programlisting># /etc/systemd/network/30-bond1.network
1463[Match]
1464Name=bond1
0a8a0fad
TG
1465
1466[Network]
9e35b3de
ZJS
1467DHCP=ipv6
1468</programlisting>
0a8a0fad 1469
9e35b3de
ZJS
1470 <programlisting># /etc/systemd/network/30-bond1.netdev
1471[NetDev]
1472Name=bond1
1473Kind=bond
1474</programlisting>
0a8a0fad 1475
301a21a8 1476 <programlisting># /etc/systemd/network/30-bond1-dev1.network
9e35b3de
ZJS
1477[Match]
1478MACAddress=52:54:00:e9:64:41
0a8a0fad
TG
1479
1480[Network]
9e35b3de
ZJS
1481Bond=bond1
1482</programlisting>
d94facdc 1483
301a21a8 1484 <programlisting># /etc/systemd/network/30-bond1-dev2.network
9e35b3de
ZJS
1485[Match]
1486MACAddress=52:54:00:e9:64:42
d94facdc
MH
1487
1488[Network]
9e35b3de 1489Bond=bond1
6cb955c6 1490</programlisting>
9e35b3de
ZJS
1491
1492 <para>This will create a bond device <literal>bond1</literal> and enslave the two
1493 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
1494 will be used to acquire an address.</para>
6cb955c6
AR
1495 </example>
1496
1497 <example>
9e35b3de
ZJS
1498 <title>Virtual Routing and Forwarding (VRF)</title>
1499 <para>Add the <literal>bond1</literal> interface to the VRF master interface
1500 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
1501 within the routing table defined during VRF creation. Traffic won't be redirected
1502 towards the VRFs routing table unless specific ip-rules are added.</para>
1503 <programlisting># /etc/systemd/network/25-vrf.network
1504[Match]
6cb955c6
AR
1505Name=bond1
1506
1507[Network]
9e35b3de 1508VRF=vrf1
d94facdc
MH
1509</programlisting>
1510 </example>
1511
42125eda
SS
1512 <example>
1513 <title>MacVTap</title>
1514 <para>This brings up a network interface <literal>macvtap-test</literal>
1515 and attaches it to <literal>enp0s25</literal>.</para>
1516 <programlisting># /lib/systemd/network/25-macvtap.network
1517[Match]
1518Name=enp0s25
1519
1520[Network]
1521MACVTAP=macvtap-test
1522</programlisting>
1523 </example>
798d3a52
ZJS
1524 </refsect1>
1525
1526 <refsect1>
1527 <title>See Also</title>
1528 <para>
1529 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
f41b446a 1530 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 1531 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
aaa297d4
LP
1532 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1533 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
1534 </para>
1535 </refsect1>
eac684ef
TG
1536
1537</refentry>