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