]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.network.xml
util: add parse_uid_range() helper function
[thirdparty/systemd.git] / man / systemd.network.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
eac684ef 5
d9b20454
ZJS
6<refentry id="systemd.network" conditional='ENABLE_NETWORKD'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
eac684ef 8
798d3a52
ZJS
9 <refentryinfo>
10 <title>systemd.network</title>
11 <productname>systemd</productname>
798d3a52
ZJS
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd.network</refentrytitle>
16 <manvolnum>5</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd.network</refname>
21 <refpurpose>Network configuration</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename><replaceable>network</replaceable>.network</filename></para>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>Network setup is performed by
32 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
33 </para>
34
bac150e9
ZJS
35 <para>The main network file must have the extension <filename>.network</filename>; other
36 extensions are ignored. Networks are applied to links whenever the links appear.</para>
37
dc0d4078
ZJS
38 <para>The <filename>.network</filename> files are read from the files located in the system network
39 directories <filename>/usr/lib/systemd/network</filename> and
40 <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
41 <filename>/run/systemd/network</filename> and the local administration network directory
42 <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and processed
43 in lexical order, regardless of the directories in which they live. However, files with identical
44 filenames replace each other. Files in <filename>/etc</filename> have the highest priority, files in
45 <filename>/run</filename> take precedence over files with the same name under
46 <filename>/usr</filename>. This can be used to override a system-supplied configuration file with a local
47 file if needed. As a special case, an empty file (file size 0) or symlink with the same name pointing to
48 <filename>/dev/null</filename> disables the configuration file entirely (it is "masked").</para>
bac150e9
ZJS
49
50 <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory
51 <filename>foo.network.d/</filename> may exist. All files with the suffix
52 <literal>.conf</literal> from this directory will be parsed after the file itself is
53 parsed. This is useful to alter or add configuration settings, without having to modify the main
54 configuration file. Each drop-in file must have appropriate section headers.</para>
55
56 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
57 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
58 <filename>/run/systemd/network</filename> directories. Drop-in files in
59 <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn
60 take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these
b1e91af8 61 directories take precedence over the main network file wherever located.</para>
bac150e9
ZJS
62
63 <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
64 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
65 disabled for that interface by writing "1" to
66 <filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>.
82ecb4c3 67 </para>
798d3a52
ZJS
68 </refsect1>
69
70 <refsect1>
71 <title>[Match] Section Options</title>
72
73 <para>The network file contains a <literal>[Match]</literal>
74 section, which determines if a given network file may be applied
75 to a given device; and a <literal>[Network]</literal> section
76 specifying how the device should be configured. The first (in
77 lexical order) of the network files that matches a given device
a22e1850
LP
78 is applied, all later files are ignored, even if they match as
79 well.</para>
798d3a52 80
84ea567e
YW
81 <para>A network file is said to match a network interface if all matches specified by the
82 <literal>[Match]</literal> section are satisfied. When a network file does not contain valid
83 settings in <literal>[Match]</literal> section, then the file will match all interfaces and
84 <command>systemd-networkd</command> warns about that. Hint: to avoid the warning and to make it
85 clear that all interfaces shall be matched, add the following:
86 <programlisting>Name=*</programlisting>
87 The following keys are accepted:</para>
798d3a52
ZJS
88
89 <variablelist class='network-directives'>
d9b20454
ZJS
90 <xi:include href="systemd.link.xml" xpointer="mac-address" />
91 <xi:include href="systemd.link.xml" xpointer="permanent-mac-address" />
92 <xi:include href="systemd.link.xml" xpointer="path" />
93 <xi:include href="systemd.link.xml" xpointer="driver" />
94 <xi:include href="systemd.link.xml" xpointer="type" />
95 <xi:include href="systemd.link.xml" xpointer="property" />
9310bf4b 96
798d3a52
ZJS
97 <varlistentry>
98 <term><varname>Name=</varname></term>
99 <listitem>
572b21d9
YW
100 <para>A whitespace-separated list of shell-style globs matching the device name, as exposed
101 by the udev property <literal>INTERFACE</literal>, or device's alternative names. If the
102 list is prefixed with a "!", the test is inverted.</para>
798d3a52
ZJS
103 </listitem>
104 </varlistentry>
44005bfb 105
78404d22 106 <varlistentry>
1bcefad9 107 <term><varname>WLANInterfaceType=</varname></term>
78404d22
YW
108 <listitem>
109 <para>A whitespace-separated list of wireless network type. Supported values are
110 <literal>ad-hoc</literal>, <literal>station</literal>, <literal>ap</literal>,
111 <literal>ap-vlan</literal>, <literal>wds</literal>, <literal>monitor</literal>,
112 <literal>mesh-point</literal>, <literal>p2p-client</literal>, <literal>p2p-go</literal>,
113 <literal>p2p-device</literal>, <literal>ocb</literal>, and <literal>nan</literal>. If the
114 list is prefixed with a "!", the test is inverted.
115 </para>
116 </listitem>
117 </varlistentry>
d9b20454 118
8d968fdd
YW
119 <varlistentry>
120 <term><varname>SSID=</varname></term>
121 <listitem>
122 <para>A whitespace-separated list of shell-style globs matching the SSID of the currently
123 connected wireless LAN. If the list is prefixed with a "!", the test is inverted.
124 </para>
125 </listitem>
126 </varlistentry>
d9b20454 127
277ba8d1
YW
128 <varlistentry>
129 <term><varname>BSSID=</varname></term>
130 <listitem>
131 <para>A whitespace-separated list of hardware address of the currently connected wireless
132 LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example in
133 <varname>MACAddress=</varname>. This option may appear more than one, in which case the
134 lists are merged. If the empty string is assigned to this option, the list of BSSID defined
135 prior to this is reset.</para>
136 </listitem>
137 </varlistentry>
d9b20454
ZJS
138
139 <xi:include href="systemd.link.xml" xpointer="host" />
140 <xi:include href="systemd.link.xml" xpointer="virtualization" />
141 <xi:include href="systemd.link.xml" xpointer="kernel-command-line" />
142 <xi:include href="systemd.link.xml" xpointer="kernel-version" />
143 <xi:include href="systemd.link.xml" xpointer="architecture" />
798d3a52
ZJS
144 </variablelist>
145
146 </refsect1>
147
148 <refsect1>
149 <title>[Link] Section Options</title>
150
151 <para> The <literal>[Link]</literal> section accepts the following keys:</para>
152
153 <variablelist class='network-directives'>
154 <varlistentry>
155 <term><varname>MACAddress=</varname></term>
156 <listitem>
de25aae1 157 <para>The hardware address to set for the device.</para>
798d3a52
ZJS
158 </listitem>
159 </varlistentry>
160 <varlistentry>
161 <term><varname>MTUBytes=</varname></term>
162 <listitem>
163 <para>The maximum transmission unit in bytes to set for the
164 device. The usual suffixes K, M, G, are supported and are
165 understood to the base of 1024.</para>
439689c6
SS
166 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
167 below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para>
798d3a52
ZJS
168 </listitem>
169 </varlistentry>
99d2baa2
SS
170 <varlistentry>
171 <term><varname>ARP=</varname></term>
172 <listitem>
9b6ffef3
YW
173 <para>Takes a boolean. If set to true, the ARP (low-level Address Resolution Protocol)
174 for this interface is enabled. When unset, the kernel's default will be used.</para>
99d2baa2
SS
175 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
176 interfaces atop a single lower-level physical interface, which will then only serve as a
177 link/"bridge" device aggregating traffic to the same physical link and not participate in
178 the network otherwise.</para>
179 </listitem>
180 </varlistentry>
e6ebebbe
SS
181 <varlistentry>
182 <term><varname>Multicast=</varname></term>
183 <listitem>
9b6ffef3 184 <para>Takes a boolean. If set to true, the multicast flag on the device is enabled.</para>
866e6b7a
SS
185 </listitem>
186 </varlistentry>
187 <varlistentry>
188 <term><varname>AllMulticast=</varname></term>
189 <listitem>
9b6ffef3 190 <para>Takes a boolean. If set to true, the driver retrieves all multicast packets from the network.
866e6b7a 191 This happens when multicast routing is enabled.</para>
e6ebebbe
SS
192 </listitem>
193 </varlistentry>
a09dc546
DM
194 <varlistentry>
195 <term><varname>Unmanaged=</varname></term>
196 <listitem>
9b6ffef3 197 <para>Takes a boolean. When <literal>yes</literal>, no attempts are
a09dc546
DM
198 made to bring up or configure matching links, equivalent to
199 when there are no matching network files. Defaults to
200 <literal>no</literal>.</para>
201 <para>This is useful for preventing later matching network
202 files from interfering with certain interfaces that are fully
203 controlled by other applications.</para>
204 </listitem>
205 </varlistentry>
c1a38904
MTL
206 <varlistentry>
207 <term><varname>RequiredForOnline=</varname></term>
208 <listitem>
8d6082e4
YW
209 <para>Takes a boolean or operational state. Please see
210 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
211 for possible operational states. When <literal>yes</literal>, the network is deemed required when
212 determining whether the system is online when running
213 <command>systemd-networkd-wait-online</command>. When <literal>no</literal>, the network is ignored
214 when checking for online state. When an operational state is set, <literal>yes</literal> is implied,
215 and this controls the operational state required for the network interface to be considered online.
216 Defaults to <literal>yes</literal>.</para>
217
c1a38904
MTL
218 <para>The network will be brought up normally in all cases, but in
219 the event that there is no address being assigned by DHCP or the
220 cable is not plugged in, the link will simply remain offline and be
8d6082e4 221 skipped automatically by <command>systemd-networkd-wait-online</command>
ca92fe36 222 if <literal>RequiredForOnline=no</literal>.</para>
c1a38904
MTL
223 </listitem>
224 </varlistentry>
798d3a52
ZJS
225 </variablelist>
226 </refsect1>
227
228 <refsect1>
229 <title>[Network] Section Options</title>
230
231 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
232
233 <variablelist class='network-directives'>
234 <varlistentry>
235 <term><varname>Description=</varname></term>
236 <listitem>
237 <para>A description of the device. This is only used for
238 presentation purposes.</para>
239 </listitem>
240 </varlistentry>
241 <varlistentry>
242 <term><varname>DHCP=</varname></term>
243 <listitem>
ad943783 244 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
798d3a52 245 <literal>yes</literal>, <literal>no</literal>,
c702bd3b
LY
246 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults
247 to <literal>no</literal>.</para>
e88d8021 248
f5a8c43f 249 <para>Note that DHCPv6 will by default be triggered by Router
7f3fdb7f 250 Advertisement, if that is enabled, regardless of this parameter.
f5a8c43f
TG
251 By enabling DHCPv6 support explicitly, the DHCPv6 client will
252 be started regardless of the presence of routers on the link,
253 or what flags the routers pass. See
f921f573 254 <literal>IPv6AcceptRA=</literal>.</para>
f5a8c43f
TG
255
256 <para>Furthermore, note that by default the domain name
e88d8021
ZJS
257 specified through DHCP is not used for name resolution.
258 See option <option>UseDomains=</option> below.</para>
2ef322fc 259
4f7331a8
YW
260 <para>See the <literal>[DHCPv4]</literal> or <literal>[DHCPv6]</literal> section below for
261 further configuration options for the DHCP client support.</para>
798d3a52
ZJS
262 </listitem>
263 </varlistentry>
264 <varlistentry>
265 <term><varname>DHCPServer=</varname></term>
266 <listitem>
68b7f7ac 267 <para>Takes a boolean. If set to <literal>yes</literal>, DHCPv4 server will be started. Defaults
ad943783
LP
268 to <literal>no</literal>. Further settings for the DHCP
269 server may be set in the <literal>[DHCPServer]</literal>
270 section described below.</para>
798d3a52
ZJS
271 </listitem>
272 </varlistentry>
273 <varlistentry>
56fd6bf7 274 <term><varname>LinkLocalAddressing=</varname></term>
798d3a52 275 <listitem>
85fc09c9 276 <para>Enables link-local address autoconfiguration. Accepts <literal>yes</literal>,
8bc17bb3
SS
277 <literal>no</literal>, <literal>ipv4</literal>, <literal>ipv6</literal>,
278 <literal>fallback</literal>, or <literal>ipv4-fallback</literal>. If
279 <literal>fallback</literal> or <literal>ipv4-fallback</literal> is specified, then an IPv4
280 link-local address is configured only when DHCPv4 fails. If <literal>fallback</literal>,
281 an IPv6 link-local address is always configured, and if <literal>ipv4-fallback</literal>,
282 the address is not configured. Note that, the fallback mechanism works only when DHCPv4
283 client is enabled, that is, it requires <literal>DHCP=yes</literal> or
284 <literal>DHCP=ipv4</literal>. If <varname>Bridge=</varname> is set, defaults to
285 <literal>no</literal>, and if not, defaults to <literal>ipv6</literal>.
286 </para>
798d3a52
ZJS
287 </listitem>
288 </varlistentry>
289 <varlistentry>
290 <term><varname>IPv4LLRoute=</varname></term>
291 <listitem>
9b6ffef3 292 <para>Takes a boolean. If set to true, sets up the route needed for
798d3a52
ZJS
293 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
294 to false.
295 </para>
296 </listitem>
297 </varlistentry>
5d5003ab
YW
298 <varlistentry>
299 <term><varname>DefaultRouteOnDevice=</varname></term>
300 <listitem>
301 <para>Takes a boolean. If set to true, sets up the default route bound to the interface.
302 Defaults to false. This is useful when creating routes on point-to-point interfaces.
303 This is equivalent to e.g. the following.
304 <programlisting>ip route add default dev veth99</programlisting></para>
305 </listitem>
306 </varlistentry>
798d3a52 307 <varlistentry>
113bfde1
TG
308 <term><varname>IPv6Token=</varname></term>
309 <listitem>
310 <para>An IPv6 address with the top 64 bits unset. When set, indicates the
eb142d8e
TG
311 64-bit interface part of SLAAC IPv6 addresses for this link. Note that
312 the token is only ever used for SLAAC, and not for DHCPv6 addresses, even
3708bd46 313 in the case DHCP is requested by router advertisement. By default, the
eb142d8e 314 token is autogenerated.</para>
113bfde1
TG
315 </listitem>
316 </varlistentry>
317 <varlistentry>
798d3a52
ZJS
318 <term><varname>LLMNR=</varname></term>
319 <listitem>
9b6ffef3 320 <para>Takes a boolean or <literal>resolve</literal>. When true,
aaa297d4
LP
321 enables <ulink
322 url="https://tools.ietf.org/html/rfc4795">Link-Local
323 Multicast Name Resolution</ulink> on the link. When set to
324 <literal>resolve</literal>, only resolution is enabled,
325 but not host registration and announcement. Defaults to
326 true. This setting is read by
327 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
328 </listitem>
329 </varlistentry>
330 <varlistentry>
331 <term><varname>MulticastDNS=</varname></term>
332 <listitem>
9b6ffef3 333 <para>Takes a boolean or <literal>resolve</literal>. When true,
aaa297d4
LP
334 enables <ulink
335 url="https://tools.ietf.org/html/rfc6762">Multicast
336 DNS</ulink> support on the link. When set to
337 <literal>resolve</literal>, only resolution is enabled,
338 but not host or service registration and
339 announcement. Defaults to false. This setting is read by
340 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
341 </listitem>
342 </varlistentry>
30e59c84 343 <varlistentry>
c9299be2 344 <term><varname>DNSOverTLS=</varname></term>
30e59c84 345 <listitem>
4310bfc2
IT
346 <para>Takes a boolean or <literal>opportunistic</literal>.
347 When true, enables
30e59c84
IT
348 <ulink
349 url="https://tools.ietf.org/html/rfc7858">DNS-over-TLS</ulink>
4310bfc2
IT
350 support on the link.
351 When set to <literal>opportunistic</literal>, compatibility with
352 non-DNS-over-TLS servers is increased, by automatically
353 turning off DNS-over-TLS servers in this case.
354 This option defines a per-interface setting for
30e59c84 355 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
c9299be2 356 global <varname>DNSOverTLS=</varname> option. Defaults to
30e59c84
IT
357 false. This setting is read by
358 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
359 </listitem>
360 </varlistentry>
ad6c0475
LP
361 <varlistentry>
362 <term><varname>DNSSEC=</varname></term>
363 <listitem>
9b6ffef3 364 <para>Takes a boolean. or
ad6c0475
LP
365 <literal>allow-downgrade</literal>. When true, enables
366 <ulink
367 url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink>
368 DNS validation support on the link. When set to
369 <literal>allow-downgrade</literal>, compatibility with
370 non-DNSSEC capable networks is increased, by automatically
785889e5 371 turning off DNSSEC in this case. This option defines a
ad6c0475
LP
372 per-interface setting for
373 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
374 global <varname>DNSSEC=</varname> option. Defaults to
375 false. This setting is read by
376 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
377 </listitem>
378 </varlistentry>
8a516214
LP
379 <varlistentry>
380 <term><varname>DNSSECNegativeTrustAnchors=</varname></term>
381 <listitem><para>A space-separated list of DNSSEC negative
382 trust anchor domains. If specified and DNSSEC is enabled,
383 look-ups done via the interface's DNS server will be subject
384 to the list of negative trust anchors, and not require
385 authentication for the specified domains, or anything below
386 it. Use this to disable DNSSEC authentication for specific
387 private domains, that cannot be proven valid using the
388 Internet DNS hierarchy. Defaults to the empty list. This
389 setting is read by
390 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
391 </listitem>
392 </varlistentry>
798d3a52
ZJS
393 <varlistentry>
394 <term><varname>LLDP=</varname></term>
395 <listitem>
da6c766d
LP
396 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
397 implemented on professional routers and bridges which announces which physical port a system is connected
398 to, as well as other related data. Accepts a boolean or the special value
34437b4f
LP
399 <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
400 neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers
401 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
7cececb2 402 others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
34437b4f 403 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
da6c766d
LP
404 collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below
405 for enabling LLDP packet emission from the local system.
798d3a52
ZJS
406 </para>
407 </listitem>
408 </varlistentry>
da6c766d
LP
409 <varlistentry>
410 <term><varname>EmitLLDP=</varname></term>
411 <listitem>
7272b25e
LP
412 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
413 <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and
414 <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
415 a short LLDP packet with information about the local system is sent out in regular intervals on the
416 link. The LLDP packet will contain information about the local host name, the local machine ID (as stored
417 in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
da6c766d
LP
418 local interface name, as well as the pretty hostname of the system (as set in
419 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
7272b25e
LP
420 emission is only available on Ethernet links. Note that this setting passes data suitable for
421 identification of host to the network and should thus not be enabled on untrusted networks, where such
422 identification data should not be made available. Use this option to permit other systems to identify on
423 which interfaces they are connected to this system. The three special values control propagation of the
424 LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest
425 connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but
426 not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge
427 is reached. For details about these concepts, see <ulink
6a1bae83 428 url="https://standards.ieee.org/findstds/standard/802.1AB-2016.html">IEEE 802.1AB-2016</ulink>. Note that
7272b25e
LP
429 configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and
430 most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP
431 reception.</para>
da6c766d
LP
432 </listitem>
433 </varlistentry>
0d4ad91d
AR
434 <varlistentry>
435 <term><varname>BindCarrier=</varname></term>
436 <listitem>
2ae7505f
TG
437 <para>A link name or a list of link names. When set, controls the behavior of the current
438 link. When all links in the list are in an operational down state, the current link is brought
439 down. When at least one link has carrier, the current interface is brought up.
0d4ad91d
AR
440 </para>
441 </listitem>
442 </varlistentry>
798d3a52
ZJS
443 <varlistentry>
444 <term><varname>Address=</varname></term>
445 <listitem>
446 <para>A static IPv4 or IPv6 address and its prefix length,
447 separated by a <literal>/</literal> character. Specify
448 this key more than once to configure several addresses.
449 The format of the address must be as described in
3ba3a79d 450 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
451 This is a short-hand for an [Address] section only
452 containing an Address key (see below). This option may be
453 specified more than once.
454 </para>
455
e6ef3a13
YW
456 <para>If the specified address is <literal>0.0.0.0</literal> (for IPv4) or <literal>::</literal>
457 (for IPv6), a new address range of the requested size is automatically allocated from a
458 system-wide pool of unused ranges. Note that the prefix length must be equal or larger than 8 for
459 IPv4, and 64 for IPv6. The allocated range is checked against all current network interfaces and
460 all known network configuration files to avoid address range conflicts. The default system-wide
461 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.
462 This functionality is useful to manage a large number of dynamically created network interfaces
463 with the same network configuration and automatic address range assignment.</para>
798d3a52
ZJS
464
465 </listitem>
466 </varlistentry>
467 <varlistentry>
468 <term><varname>Gateway=</varname></term>
469 <listitem>
470 <para>The gateway address, which must be in the format
471 described in
3ba3a79d 472 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
473 This is a short-hand for a [Route] section only containing
474 a Gateway key. This option may be specified more than
475 once.</para>
476 </listitem>
477 </varlistentry>
478 <varlistentry>
479 <term><varname>DNS=</varname></term>
480 <listitem>
481 <para>A DNS server address, which must be in the format
482 described in
3ba3a79d 483 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
f41b446a 484 This option may be specified more than once. This setting is read by
3df9bec5 485 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
486 </listitem>
487 </varlistentry>
488 <varlistentry>
489 <term><varname>Domains=</varname></term>
490 <listitem>
2df22529
ZJS
491 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
492 should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the
493 prefix are called "routing-only domains". The domains without the prefix are called "search domains" and
494 are first used as search suffixes for extending single-label host names (host names containing no dots) to
495 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
496 each of the specified search domains are appended to it in turn, converting it into a fully qualified
497 domain name, until one of them may be successfully resolved.</para>
498
499 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names
500 ending in those domains (hence also single label names, if any "search domains" are listed), are routed to
501 the DNS servers configured for this interface. The domain routing logic is particularly useful on
502 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para>
503
504 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain,
505 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
506 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
507 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
508 if a link on which they are connected is available.</para>
3df9bec5
LP
509
510 <para>This setting is read by
2df22529
ZJS
511 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
512 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in
98e9d710 513 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
2df22529
ZJS
514 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
515 name servers limited to a specific link.</para>
798d3a52
ZJS
516 </listitem>
517 </varlistentry>
7ece6f58
LP
518 <varlistentry>
519 <term><varname>DNSDefaultRoute=</varname></term>
520 <listitem>
521 <para>Takes a boolean argument. If true, this link's configured DNS servers are used for resolving domain
522 names that do not match any link's configured <varname>Domains=</varname> setting. If false, this link's
523 configured DNS servers are never used for such domains, and are exclusively used for resolving names that
524 match at least one of the domains configured on this link. If not specified defaults to an automatic mode:
525 queries not matching any link's configured domains will be routed to this link if it has no routing-only
526 domains configured.</para>
527 </listitem>
528 </varlistentry>
798d3a52
ZJS
529 <varlistentry>
530 <term><varname>NTP=</varname></term>
531 <listitem>
f41b446a 532 <para>An NTP server address. This option may be specified more than once. This setting is read by
3df9bec5 533 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
534 </listitem>
535 </varlistentry>
536 <varlistentry>
537 <term><varname>IPForward=</varname></term>
765afd5c
LP
538 <listitem><para>Configures IP packet forwarding for the
539 system. If enabled, incoming packets on any network
540 interface will be forwarded to any other interfaces
9b6ffef3
YW
541 according to the routing table. Takes a boolean,
542 or the values <literal>ipv4</literal> or
765afd5c
LP
543 <literal>ipv6</literal>, which only enable IP packet
544 forwarding for the specified address family. This controls
545 the <filename>net.ipv4.ip_forward</filename> and
546 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
547 options of the network interface (see <ulink
4046d836
LP
548 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
549 for details about sysctl options). Defaults to
550 <literal>no</literal>.</para>
551
765afd5c
LP
552 <para>Note: this setting controls a global kernel option,
553 and does so one way only: if a network that has this setting
554 enabled is set up the global setting is turned on. However,
555 it is never turned off again, even after all networks with
556 this setting enabled are shut down again.</para>
557
558 <para>To allow IP packet forwarding only between specific
559 network interfaces use a firewall.</para>
4046d836 560 </listitem>
798d3a52
ZJS
561 </varlistentry>
562 <varlistentry>
563 <term><varname>IPMasquerade=</varname></term>
564 <listitem><para>Configures IP masquerading for the network
b938cb90 565 interface. If enabled, packets forwarded from the network
798d3a52
ZJS
566 interface will be appear as coming from the local host.
567 Takes a boolean argument. Implies
5c82dd13 568 <varname>IPForward=ipv4</varname>. Defaults to
4046d836 569 <literal>no</literal>.</para></listitem>
798d3a52 570 </varlistentry>
a46e37cb
SS
571 <varlistentry>
572 <term><varname>IPv6PrivacyExtensions=</varname></term>
1f0d9695
LP
573 <listitem><para>Configures use of stateless temporary
574 addresses that change over time (see <ulink
575 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
576 Privacy Extensions for Stateless Address Autoconfiguration
577 in IPv6). Takes a boolean or the special values
578 <literal>prefer-public</literal> and
b938cb90 579 <literal>kernel</literal>. When true, enables the privacy
1f0d9695 580 extensions and prefers temporary addresses over public
b938cb90 581 addresses. When <literal>prefer-public</literal>, enables the
1f0d9695
LP
582 privacy extensions, but prefers public addresses over
583 temporary addresses. When false, the privacy extensions
b938cb90 584 remain disabled. When <literal>kernel</literal>, the kernel's
1f0d9695 585 default setting will be left in place. Defaults to
a46e37cb
SS
586 <literal>no</literal>.</para></listitem>
587 </varlistentry>
941d0aa8 588 <varlistentry>
f921f573 589 <term><varname>IPv6AcceptRA=</varname></term>
b3454e1e
YW
590 <listitem><para>Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support
591 for the interface. If true, RAs are accepted; if false, RAs are ignored, independently of the
592 local forwarding state. When RAs are accepted, they may trigger the start of the DHCPv6
593 client if the relevant flags are set in the RA data, or if no routers are found on the link.</para>
1e7a0e21
LP
594
595 <para>Further settings for the IPv6 RA support may be configured in the
f921f573 596 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
1e7a0e21
LP
597
598 <para>Also see <ulink
599 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
600 documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of
601 <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para>
c4a05aa1 602
b3454e1e
YW
603 <para>Note that kernel's implementation of the IPv6 RA protocol is always disabled,
604 regardless of this setting. If this option is enabled, a userspace implementation of the IPv6
605 RA protocol is used, and the kernel's own implementation remains disabled, since
606 <command>systemd-networkd</command> needs to know all details supplied in the advertisements,
607 and these are not available from the kernel if the kernel's own implementation is used.</para>
ebf98081 608 </listitem>
941d0aa8 609 </varlistentry>
44de7fb1
SS
610 <varlistentry>
611 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
a8eaaee7 612 <listitem><para>Configures the amount of IPv6 Duplicate
025314d9 613 Address Detection (DAD) probes to send. When unset, the kernel's default will be used.
44de7fb1
SS
614 </para></listitem>
615 </varlistentry>
a86cba89
SS
616 <varlistentry>
617 <term><varname>IPv6HopLimit=</varname></term>
618 <listitem><para>Configures IPv6 Hop Limit. For each router that
619 forwards the packet, the hop limit is decremented by 1. When the
620 hop limit field reaches zero, the packet is discarded.
025314d9 621 When unset, the kernel's default will be used.
a86cba89
SS
622 </para></listitem>
623 </varlistentry>
23d8b221 624 <varlistentry>
8f9a206b 625 <term><varname>IPv4ProxyARP=</varname></term>
9b6ffef3 626 <listitem><para>Takes a boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
23d8b221
SS
627 usually a router, answers ARP requests intended for another machine. By "faking" its identity,
628 the router accepts responsibility for routing packets to the "real" destination. (see <ulink
629 url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>.
025314d9 630 When unset, the kernel's default will be used.
23d8b221
SS
631 </para></listitem>
632 </varlistentry>
a0e5c15d 633 <varlistentry>
465dfe59 634 <term><varname>IPv6ProxyNDP=</varname></term>
9b6ffef3 635 <listitem><para>Takes a boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery
465dfe59
HV
636 Protocol) is a technique for IPv6 to allow routing of addresses to a different
637 destination when peers expect them to be present on a certain physical link.
a0e5c15d
FK
638 In this case a router answers Neighbour Advertisement messages intended for
639 another machine by offering its own MAC address as destination.
465dfe59 640 Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour
a0e5c15d 641 Advertisement messages for addresses in the IPv6 neighbor proxy table,
465dfe59
HV
642 which can also be shown by <command>ip -6 neighbour show proxy</command>.
643 systemd-networkd will control the per-interface `proxy_ndp` switch for each configured
644 interface depending on this option.
025314d9 645 When unset, the kernel's default will be used.
465dfe59
HV
646 </para></listitem>
647 </varlistentry>
648 <varlistentry>
649 <term><varname>IPv6ProxyNDPAddress=</varname></term>
650 <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be
651 proxied. This option may be specified more than once. systemd-networkd will add the
652 <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table.
964c4eda 653 This option implies <option>IPv6ProxyNDP=yes</option> but has no effect if
025314d9 654 <option>IPv6ProxyNDP</option> has been set to false. When unset, the kernel's default will be used.
a0e5c15d
FK
655 </para></listitem>
656 </varlistentry>
3f9e0236
PF
657 <varlistentry>
658 <term><varname>IPv6PrefixDelegation=</varname></term>
659 <listitem><para>Whether to enable or disable Router Advertisement sending on a link.
982be97c
PF
660 Allowed values are <literal>static</literal> which distributes prefixes as defined in
661 the <literal>[IPv6PrefixDelegation]</literal> and any <literal>[IPv6Prefix]</literal>
662 sections, <literal>dhcpv6</literal> which requests prefixes using a DHCPv6 client
663 configured for another link and any values configured in the
664 <literal>[IPv6PrefixDelegation]</literal> section while ignoring all static prefix
665 configuration sections, <literal>yes</literal> which uses both static configuration
666 and DHCPv6, and <literal>false</literal> which turns off IPv6 prefix delegation
667 altogether. Defaults to <literal>false</literal>. See the
668 <literal>[IPv6PrefixDelegation]</literal> and the <literal>[IPv6Prefix]</literal>
669 sections for more configuration options.
3f9e0236
PF
670 </para></listitem>
671 </varlistentry>
11102cba
SS
672 <varlistentry>
673 <term><varname>IPv6MTUBytes=</varname></term>
674 <listitem><para>Configures IPv6 maximum transmission unit (MTU).
025314d9 675 An integer greater than or equal to 1280 bytes. When unset, the kernel's default will be used.
11102cba
SS
676 </para></listitem>
677 </varlistentry>
798d3a52
ZJS
678 <varlistentry>
679 <term><varname>Bridge=</varname></term>
680 <listitem>
9e35b3de
ZJS
681 <para>The name of the bridge to add the link to. See
682 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
683 </para>
798d3a52
ZJS
684 </listitem>
685 </varlistentry>
686 <varlistentry>
687 <term><varname>Bond=</varname></term>
688 <listitem>
9e35b3de
ZJS
689 <para>The name of the bond to add the link to. See
690 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
691 </para>
798d3a52
ZJS
692 </listitem>
693 </varlistentry>
6cb955c6
AR
694 <varlistentry>
695 <term><varname>VRF=</varname></term>
696 <listitem>
9e35b3de
ZJS
697 <para>The name of the VRF to add the link to. See
698 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
699 </para>
6cb955c6
AR
700 </listitem>
701 </varlistentry>
798d3a52
ZJS
702 <varlistentry>
703 <term><varname>VLAN=</varname></term>
704 <listitem>
9e35b3de
ZJS
705 <para>The name of a VLAN to create on the link. See
706 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
707 This option may be specified more than once.</para>
798d3a52
ZJS
708 </listitem>
709 </varlistentry>
2479c4fe 710 <varlistentry>
711 <term><varname>IPVLAN=</varname></term>
712 <listitem>
713 <para>The name of a IPVLAN to create on the link. See
714 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
715 This option may be specified more than once.</para>
716 </listitem>
717 </varlistentry>
798d3a52
ZJS
718 <varlistentry>
719 <term><varname>MACVLAN=</varname></term>
720 <listitem>
9e35b3de
ZJS
721 <para>The name of a MACVLAN to create on the link. See
722 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
723 This option may be specified more than once.</para>
798d3a52
ZJS
724 </listitem>
725 </varlistentry>
726 <varlistentry>
727 <term><varname>VXLAN=</varname></term>
728 <listitem>
9e35b3de
ZJS
729 <para>The name of a VXLAN to create on the link. See
730 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
731 This option may be specified more than once.</para>
798d3a52
ZJS
732 </listitem>
733 </varlistentry>
734 <varlistentry>
735 <term><varname>Tunnel=</varname></term>
736 <listitem>
9e35b3de
ZJS
737 <para>The name of a Tunnel to create on the link. See
738 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
739 This option may be specified more than once.</para>
798d3a52
ZJS
740 </listitem>
741 </varlistentry>
81962db7
SS
742 <varlistentry>
743 <term><varname>MACsec=</varname></term>
744 <listitem>
745 <para>The name of a MACsec device to create on the link. See
746 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
747 This option may be specified more than once.</para>
748 </listitem>
749 </varlistentry>
dd5f3175
SS
750 <varlistentry>
751 <term><varname>ActiveSlave=</varname></term>
752 <listitem>
9b6ffef3 753 <para>Takes a boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal>
dd5f3175
SS
754 option is only valid for following modes:
755 <literal>active-backup</literal>,
756 <literal>balance-alb</literal> and
757 <literal>balance-tlb</literal>. Defaults to false.
758 </para>
759 </listitem>
760 </varlistentry>
761 <varlistentry>
762 <term><varname>PrimarySlave=</varname></term>
763 <listitem>
9b6ffef3 764 <para>Takes a boolean. Specifies which slave is the primary device. The specified
dd5f3175
SS
765 device will always be the active slave while it is available. Only when the
766 primary is off-line will alternate devices be used. This is useful when
767 one slave is preferred over another, e.g. when one slave has higher throughput
768 than another. The <literal>PrimarySlave=</literal> option is only valid for
769 following modes:
770 <literal>active-backup</literal>,
771 <literal>balance-alb</literal> and
772 <literal>balance-tlb</literal>. Defaults to false.
773 </para>
774 </listitem>
775 </varlistentry>
dad2d78e
SS
776 <varlistentry>
777 <term><varname>ConfigureWithoutCarrier=</varname></term>
778 <listitem>
9b6ffef3 779 <para>Takes a boolean. Allows networkd to configure a specific link even if it has no carrier.
dad2d78e
SS
780 Defaults to false.
781 </para>
782 </listitem>
783 </varlistentry>
93b4dab5
SS
784 <varlistentry>
785 <term><varname>IgnoreCarrierLoss=</varname></term>
786 <listitem>
787 <para>A boolean. Allows networkd to retain both the static and dynamic configuration of the
788 interface even if its carrier is lost. Defaults to false.
789 </para>
790 </listitem>
791 </varlistentry>
98d20a17 792 <varlistentry>
793 <term><varname>Xfrm=</varname></term>
794 <listitem>
795 <para>The name of the xfrm to create on the link. See
796 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
797 This option may be specified more than once.</para>
798 </listitem>
799 </varlistentry>
c98d78d3
YW
800 <varlistentry>
801 <term><varname>KeepConfiguration=</varname></term>
802 <listitem>
803 <para>Takes a boolean or one of <literal>static</literal>, <literal>dhcp-on-stop</literal>,
804 <literal>dhcp</literal>. When <literal>static</literal>, <command>systemd-networkd</command>
805 will not drop static addresses and routes on starting up process. When set to
806 <literal>dhcp-on-stop</literal>, <command>systemd-networkd</command> will not drop addresses
807 and routes on stopping the daemon. When <literal>dhcp</literal>,
808 the addresses and routes provided by a DHCP server will never be dropped even if the DHCP
809 lease expires. This is contrary to the DHCP specification, but may be the best choice if,
810 e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal>
811 implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies
80060352
ZJS
812 <literal>dhcp</literal> and <literal>static</literal>. Defaults to <literal>no</literal>.
813 </para>
c98d78d3
YW
814 </listitem>
815 </varlistentry>
93b4dab5 816
798d3a52
ZJS
817 </variablelist>
818
819 </refsect1>
820
821 <refsect1>
822 <title>[Address] Section Options</title>
823
824 <para>An <literal>[Address]</literal> section accepts the
825 following keys. Specify several <literal>[Address]</literal>
826 sections to configure several addresses.</para>
827
828 <variablelist class='network-directives'>
829 <varlistentry>
830 <term><varname>Address=</varname></term>
831 <listitem>
4e68898e
YW
832 <para>As in the <literal>[Network]</literal> section. This key is mandatory. Each
833 <literal>[Address]</literal> section can contain one <varname>Address=</varname> setting.</para>
798d3a52
ZJS
834 </listitem>
835 </varlistentry>
836 <varlistentry>
837 <term><varname>Peer=</varname></term>
838 <listitem>
839 <para>The peer address in a point-to-point connection.
4e68898e 840 Accepts the same format as the <varname>Address=</varname>
798d3a52
ZJS
841 key.</para>
842 </listitem>
843 </varlistentry>
844 <varlistentry>
845 <term><varname>Broadcast=</varname></term>
846 <listitem>
847 <para>The broadcast address, which must be in the format
848 described in
3ba3a79d 849 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52 850 This key only applies to IPv4 addresses. If it is not
4e68898e 851 given, it is derived from the <varname>Address=</varname>
798d3a52
ZJS
852 key.</para>
853 </listitem>
854 </varlistentry>
855 <varlistentry>
856 <term><varname>Label=</varname></term>
857 <listitem>
858 <para>An address label.</para>
859 </listitem>
860 </varlistentry>
b5834a0b
SS
861 <varlistentry>
862 <term><varname>PreferredLifetime=</varname></term>
863 <listitem>
864 <para>Allows the default "preferred lifetime" of the address to be overridden.
865 Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal>
866 which is the default and means that the address never expires, and <literal>0</literal> which means
867 that the address is considered immediately "expired" and will not be used,
868 unless explicitly requested. A setting of PreferredLifetime=0 is useful for
869 addresses which are added to be used only by a specific application,
870 which is then configured to use them explicitly.</para>
871 </listitem>
872 </varlistentry>
2959fb07
SS
873 <varlistentry>
874 <term><varname>Scope=</varname></term>
875 <listitem>
876 <para>The scope of the address, which can be <literal>global</literal>,
877 <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255.
878 Defaults to <literal>global</literal>.</para>
879 </listitem>
880 </varlistentry>
e63be084
SS
881 <varlistentry>
882 <term><varname>HomeAddress=</varname></term>
883 <listitem>
9b6ffef3 884 <para>Takes a boolean. Designates this address the "home address" as defined in
e63be084
SS
885 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>.
886 Supported only on IPv6. Defaults to false.</para>
887 </listitem>
888 </varlistentry>
889 <varlistentry>
890 <term><varname>DuplicateAddressDetection=</varname></term>
891 <listitem>
051e77ca
SS
892 <para>Takes one of <literal>ipv4</literal>, <literal>ipv6</literal>,
893 <literal>both</literal>, <literal>none</literal>. When <literal>ipv4</literal>,
894 performs IPv4 Duplicate Address Detection. See
895 <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5224</ulink>.
896 When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See
897 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>.
898 Defaults to <literal>ipv6</literal>.</para>
e63be084
SS
899 </listitem>
900 </varlistentry>
901 <varlistentry>
902 <term><varname>ManageTemporaryAddress=</varname></term>
903 <listitem>
9b6ffef3 904 <para>Takes a boolean. If true the kernel manage temporary addresses created
e63be084
SS
905 from this one as template on behalf of Privacy Extensions
906 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become
907 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
11fcfc53 908 The given address needs to have a prefix length of 64. This flag allows using privacy
e63be084
SS
909 extensions in a manually configured network, just like if stateless auto-configuration
910 was active. Defaults to false. </para>
911 </listitem>
912 </varlistentry>
913 <varlistentry>
de697db0 914 <term><varname>AddPrefixRoute=</varname></term>
e63be084 915 <listitem>
de697db0
YW
916 <para>Takes a boolean. When true, the prefix route for the address is automatically added.
917 Defaults to true.</para>
e63be084
SS
918 </listitem>
919 </varlistentry>
920 <varlistentry>
921 <term><varname>AutoJoin=</varname></term>
922 <listitem>
9b6ffef3 923 <para>Takes a boolean. Joining multicast group on ethernet level via
e63be084
SS
924 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
925 IGMP snooping since the switch would not replicate multicast packets on ports that did not
926 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
927 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
928 that enables then to do the required join. By extending ip address command with option
929 <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan
930 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
931 Defaults to <literal>no</literal>.</para>
932 </listitem>
933 </varlistentry>
798d3a52
ZJS
934 </variablelist>
935 </refsect1>
936
e4a71bf3
WKI
937 <refsect1>
938 <title>[Neighbor] Section Options</title>
939 <para>A <literal>[Neighbor]</literal> section accepts the
940 following keys. The neighbor section adds a permanent, static
941 entry to the neighbor table (IPv6) or ARP table (IPv4) for
942 the given hardware address on the links matched for the network.
943 Specify several <literal>[Neighbor]</literal> sections to configure
944 several static neighbors.</para>
945
946 <variablelist class='network-directives'>
947 <varlistentry>
948 <term><varname>Address=</varname></term>
949 <listitem>
950 <para>The IP address of the neighbor.</para>
951 </listitem>
952 </varlistentry>
953 <varlistentry>
b956364d 954 <term><varname>LinkLayerAddress=</varname></term>
e4a71bf3 955 <listitem>
b956364d 956 <para>The link layer address (MAC address or IP address) of the neighbor.</para>
e4a71bf3
WKI
957 </listitem>
958 </varlistentry>
959 </variablelist>
960 </refsect1>
961
95b74ef6
SS
962 <refsect1>
963 <title>[IPv6AddressLabel] Section Options</title>
964
965 <para>An <literal>[IPv6AddressLabel]</literal> section accepts the
966 following keys. Specify several <literal>[IPv6AddressLabel]</literal>
785889e5 967 sections to configure several address labels. IPv6 address labels are
95b74ef6
SS
968 used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>.
969 Precedence is managed by userspace, and only the label itself is stored in the kernel</para>
970
971 <variablelist class='network-directives'>
972 <varlistentry>
973 <term><varname>Label=</varname></term>
974 <listitem>
975 <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294.
976 0xffffffff is reserved. This key is mandatory.</para>
977 </listitem>
978 </varlistentry>
979 <varlistentry>
980 <term><varname>Prefix=</varname></term>
981 <listitem>
982 <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character.
983 This key is mandatory. </para>
984 </listitem>
985 </varlistentry>
986 </variablelist>
987 </refsect1>
988
bce67bbe
SS
989 <refsect1>
990 <title>[RoutingPolicyRule] Section Options</title>
991
992 <para>An <literal>[RoutingPolicyRule]</literal> section accepts the
993 following keys. Specify several <literal>[RoutingPolicyRule]</literal>
994 sections to configure several rules.</para>
995
996 <variablelist class='network-directives'>
997 <varlistentry>
998 <term><varname>TypeOfService=</varname></term>
999 <listitem>
1000 <para>Specifies the type of service to match a number between 0 to 255.</para>
1001 </listitem>
1002 </varlistentry>
1003 <varlistentry>
1004 <term><varname>From=</varname></term>
1005 <listitem>
1006 <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para>
1007 </listitem>
1008 </varlistentry>
1009 <varlistentry>
1010 <term><varname>To=</varname></term>
1011 <listitem>
1012 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para>
1013 </listitem>
1014 </varlistentry>
1015 <varlistentry>
1016 <term><varname>FirewallMark=</varname></term>
1017 <listitem>
1018 <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para>
1019 </listitem>
1020 </varlistentry>
1021 <varlistentry>
1022 <term><varname>Table=</varname></term>
1023 <listitem>
41b90a1e
YW
1024 <para>Specifies the routing table identifier to lookup if the rule selector matches. Takes
1025 one of <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>,
1026 or a number between 1 and 4294967295. Defaults to <literal>main</literal>.</para>
bce67bbe
SS
1027 </listitem>
1028 </varlistentry>
1029 <varlistentry>
1030 <term><varname>Priority=</varname></term>
1031 <listitem>
1032 <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned
1033 integer. Higher number means lower priority, and rules get processed in order of increasing number.</para>
1034 </listitem>
1035 </varlistentry>
762e2659
SS
1036 <varlistentry>
1037 <term><varname>IncomingInterface=</varname></term>
1038 <listitem>
1039 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para>
1040 </listitem>
1041 </varlistentry>
1042 <varlistentry>
1043 <term><varname>OutgoingInterface=</varname></term>
1044 <listitem>
1045 <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>
1046 </listitem>
1047 </varlistentry>
926062f0
SS
1048 <varlistentry>
1049 <term><varname>SourcePort=</varname></term>
1050 <listitem>
1051 <para>Specifies the source IP port or IP port range match in forwarding information base (FIB) rules.
1052 A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para>
1053 </listitem>
1054 </varlistentry>
1055 <varlistentry>
1056 <term><varname>DestinationPort=</varname></term>
1057 <listitem>
1058 <para>Specifies the destination IP port or IP port range match in forwarding information base (FIB) rules.
1059 A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para>
1060 </listitem>
1061 </varlistentry>
1062 <varlistentry>
97f9df9e 1063 <term><varname>IPProtocol=</varname></term>
926062f0 1064 <listitem>
3a269dcf
YW
1065 <para>Specifies the IP protocol to match in forwarding information base (FIB) rules. Takes IP protocol name such as <literal>tcp</literal>,
1066 <literal>udp</literal> or <literal>sctp</literal>, or IP protocol number such as <literal>6</literal> for <literal>tcp</literal> or
1067 <literal>17</literal> for <literal>udp</literal>.
926062f0
SS
1068 Defaults to unset.</para>
1069 </listitem>
1070 </varlistentry>
8b220643
SS
1071 <varlistentry>
1072 <term><varname>InvertRule=</varname></term>
1073 <listitem>
5238e957 1074 <para>A boolean. Specifies whether the rule to be inverted. Defaults to false.</para>
8b220643
SS
1075 </listitem>
1076 </varlistentry>
f6c6ff97
YW
1077 <varlistentry>
1078 <term><varname>Family=</varname></term>
1079 <listitem>
1080 <para>Takes a special value <literal>ipv4</literal>, <literal>ipv6</literal>, or
1081 <literal>both</literal>. By default, the address family is determined by the address
1082 specified in <varname>To=</varname> or <varname>From=</varname>. If neither
1083 <varname>To=</varname> nor <varname>From=</varname> are specified, then defaults to
1084 <literal>ipv4</literal>.</para>
1085 </listitem>
1086 </varlistentry>
bce67bbe 1087 </variablelist>
c16c7808
SS
1088 </refsect1>
1089
1090 <refsect1>
1091 <title>[NextHop] Section Options</title>
1092 <para>The <literal>[NextHop]</literal> section accepts the
1093 following keys. Specify several <literal>[NextHop]</literal>
1094 sections to configure several nexthop. Nexthop is used to manipulate entries in the kernel's nexthop
1095 tables.</para>
1096
1097 <variablelist class='network-directives'>
1098 <varlistentry>
1099 <term><varname>Gateway=</varname></term>
1100 <listitem>
1101 <para>As in the <literal>[Network]</literal> section. This is mandatory.</para>
1102 </listitem>
1103 </varlistentry>
1104 <varlistentry>
1105 <term><varname>Id=</varname></term>
1106 <listitem>
1107 <para>The id of the nexthop (an unsigned integer). If unspecified or '0' then automatically chosen by kernel.</para>
1108 </listitem>
1109 </varlistentry>
1110 </variablelist>
bce67bbe
SS
1111 </refsect1>
1112
798d3a52
ZJS
1113 <refsect1>
1114 <title>[Route] Section Options</title>
1115 <para>The <literal>[Route]</literal> section accepts the
1116 following keys. Specify several <literal>[Route]</literal>
1117 sections to configure several routes.</para>
1118
1119 <variablelist class='network-directives'>
1120 <varlistentry>
1121 <term><varname>Gateway=</varname></term>
1122 <listitem>
1985c54f
YW
1123 <para>Takes the gateway address or special value <literal>dhcp</literal>. If
1124 <literal>dhcp</literal>, then the gateway address provided by DHCP (or in the IPv6 case,
1125 provided by IPv6 RA) is used.</para>
798d3a52
ZJS
1126 </listitem>
1127 </varlistentry>
28959f7d 1128 <varlistentry>
9cb8c559 1129 <term><varname>GatewayOnLink=</varname></term>
28959f7d 1130 <listitem>
9b6ffef3 1131 <para>Takes a boolean. If set to true, the kernel does not have
28959f7d
SS
1132 to check if the gateway is reachable directly by the current machine (i.e., the kernel does
1133 not need to check if the gateway is attached to the local network), so that we can insert the
9b6ffef3 1134 route in the kernel table without it being complained about. Defaults to <literal>no</literal>.
28959f7d
SS
1135 </para>
1136 </listitem>
1137 </varlistentry>
798d3a52
ZJS
1138 <varlistentry>
1139 <term><varname>Destination=</varname></term>
1140 <listitem>
1141 <para>The destination prefix of the route. Possibly
b938cb90 1142 followed by a slash and the prefix length. If omitted, a
798d3a52
ZJS
1143 full-length host route is assumed.</para>
1144 </listitem>
1145 </varlistentry>
1146 <varlistentry>
1147 <term><varname>Source=</varname></term>
1148 <listitem>
1149 <para>The source prefix of the route. Possibly followed by
b938cb90 1150 a slash and the prefix length. If omitted, a full-length
798d3a52
ZJS
1151 host route is assumed.</para>
1152 </listitem>
1153 </varlistentry>
1154 <varlistentry>
1155 <term><varname>Metric=</varname></term>
1156 <listitem>
b938cb90 1157 <para>The metric of the route (an unsigned integer).</para>
798d3a52
ZJS
1158 </listitem>
1159 </varlistentry>
b5bf6f64
SS
1160 <varlistentry>
1161 <term><varname>IPv6Preference=</varname></term>
1162 <listitem>
1163 <para>Specifies the route preference as defined in <ulink
1164 url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages.
1165 Which can be one of <literal>low</literal> the route has a lowest priority,
1166 <literal>medium</literal> the route has a default priority or
1167 <literal>high</literal> the route has a highest priority.</para>
1168 </listitem>
1169 </varlistentry>
769b56a3
TG
1170 <varlistentry>
1171 <term><varname>Scope=</varname></term>
1172 <listitem>
f5c38922
YW
1173 <para>The scope of the route, which can be <literal>global</literal>, <literal>site</literal>,
1174 <literal>link</literal>, <literal>host</literal>, or <literal>nowhere</literal>. For IPv4 route,
1175 defaults to <literal>host</literal> if <varname>Type=</varname> is <literal>local</literal>
1176 or <literal>nat</literal>, and <literal>link</literal> if <varname>Type=</varname> is
1177 <literal>broadcast</literal>, <literal>multicast</literal>, or <literal>anycast</literal>.
1178 In other cases, defaults to <literal>global</literal>.</para>
769b56a3 1179 </listitem>
0d07e595
JK
1180 </varlistentry>
1181 <varlistentry>
1182 <term><varname>PreferredSource=</varname></term>
1183 <listitem>
1184 <para>The preferred source address of the route. The address
1185 must be in the format described in
1186 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
1187 </listitem>
769b56a3 1188 </varlistentry>
c953b24c 1189 <varlistentry>
f5c38922 1190 <term><varname>Table=</varname></term>
c953b24c 1191 <listitem>
f5c38922
YW
1192 <para>The table identifier for the route. Takes <literal>default</literal>,
1193 <literal>main</literal>, <literal>local</literal> or a number between 1 and 4294967295.
1194 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1195 If unset and <varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>,
1196 <literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used.
1197 In other cases, defaults to <literal>main</literal>.
c953b24c
SS
1198 </para>
1199 </listitem>
1200 </varlistentry>
c83ecc04
SS
1201 <varlistentry>
1202 <term><varname>Protocol=</varname></term>
1203 <listitem>
88925d2f 1204 <para>The protocol identifier for the route. Takes a number between 0 and 255 or the special values
ca420b62
YW
1205 <literal>kernel</literal>, <literal>boot</literal>, <literal>static</literal>,
1206 <literal>ra</literal> and <literal>dhcp</literal>. Defaults to <literal>static</literal>.
c83ecc04
SS
1207 </para>
1208 </listitem>
1209 </varlistentry>
983226f3
SS
1210 <varlistentry>
1211 <term><varname>Type=</varname></term>
1212 <listitem>
94d6e299
YW
1213 <para>Specifies the type for the route. Takes one of <literal>unicast</literal>,
1214 <literal>local</literal>, <literal>broadcast</literal>, <literal>anycast</literal>,
1215 <literal>multicast</literal>, <literal>blackhole</literal>, <literal>unreachable</literal>,
1216 <literal>prohibit</literal>, <literal>throw</literal>, <literal>nat</literal>, and
1217 <literal>xresolve</literal>. If <literal>unicast</literal>, a regular route is defined, i.e. a
66d7235e
LP
1218 route indicating the path to take to a destination network address. If <literal>blackhole</literal>, packets
1219 to the defined route are discarded silently. If <literal>unreachable</literal>, packets to the defined route
1220 are discarded and the ICMP message "Host Unreachable" is generated. If <literal>prohibit</literal>, packets
1221 to the defined route are discarded and the ICMP message "Communication Administratively Prohibited" is
1222 generated. If <literal>throw</literal>, route lookup in the current routing table will fail and the route
1223 selection process will return to Routing Policy Database (RPDB). Defaults to <literal>unicast</literal>.
983226f3
SS
1224 </para>
1225 </listitem>
1226 </varlistentry>
323d9329
SS
1227 <varlistentry>
1228 <term><varname>InitialCongestionWindow=</varname></term>
1229 <listitem>
6b21ad33
SS
1230 <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP
1231 session, when a client requests a resource, the server's initial congestion window determines how many data bytes
1232 will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual
025314d9 1233 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
1234 </para>
1235 </listitem>
1236 </varlistentry>
1237 <varlistentry>
1238 <term><varname>InitialAdvertisedReceiveWindow=</varname></term>
1239 <listitem>
5238e957 1240 <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initially be buffered at one time
6b21ad33
SS
1241 on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update
1242 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 1243 and are understood to the base of 1024. When unset, the kernel's default will be used.
323d9329
SS
1244 </para>
1245 </listitem>
1246 </varlistentry>
09f5dfad
SS
1247 <varlistentry>
1248 <term><varname>QuickAck=</varname></term>
1249 <listitem>
9b6ffef3 1250 <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
1251 </para>
1252 </listitem>
1253 </varlistentry>
633c7258
SS
1254 <varlistentry>
1255 <term><varname>FastOpenNoCookie=</varname></term>
1256 <listitem>
1257 <para>Takes a boolean. When true enables TCP fastopen without a cookie on a per-route basis.
1258 When unset, the kernel's default will be used.
1259 </para>
1260 </listitem>
09f5dfad 1261 </varlistentry>
9b88f20a
SS
1262 <varlistentry>
1263 <term><varname>TTLPropagate=</varname></term>
1264 <listitem>
1265 <para>Takes a boolean. When true enables TTL propagation at Label Switched Path (LSP) egress.
1266 When unset, the kernel's default will be used.
1267 </para>
1268 </listitem>
1269 </varlistentry>
cea79e66
SS
1270 <varlistentry>
1271 <term><varname>MTUBytes=</varname></term>
1272 <listitem>
1273 <para>The maximum transmission unit in bytes to set for the
1274 route. The usual suffixes K, M, G, are supported and are
1275 understood to the base of 1024.</para>
1276 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
1277 below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para>
1278 </listitem>
afe42aef
SC
1279 </varlistentry>
1280 <varlistentry>
1281 <term><varname>IPServiceType=</varname></term>
1282 <listitem>
e681a2ee
YW
1283 <para>Takes string; <literal>CS6</literal> or <literal>CS4</literal>. Used to set IP
1284 service type to CS6 (network control) or CS4 (Realtime). Defaults to CS6.</para>
afe42aef
SC
1285 </listitem>
1286 </varlistentry>
6ff5cc6b
YW
1287 <varlistentry>
1288 <term><varname>MultiPathRoute=<replaceable>address</replaceable>[@<replaceable>name</replaceable>] [<replaceable>weight</replaceable>]</varname></term>
1289 <listitem>
1290 <para>Configures multipath route. Multipath routing is the technique of using multiple
1291 alternative paths through a network. Takes gateway address. Optionally, takes a network
1292 interface name or index separated with <literal>@</literal>, and a weight in 1..256 for
1293 this multipath route separated with whitespace. This setting can be specified multiple
1294 times. If an empty string is assigned, then the all previous assignments are cleared.</para>
1295 </listitem>
1296 </varlistentry>
798d3a52
ZJS
1297 </variablelist>
1298 </refsect1>
1299
1300 <refsect1>
4f7331a8
YW
1301 <title>[DHCPv4] Section Options</title>
1302 <para>The <literal>[DHCPv4]</literal> section configures the
caa8ca42 1303 DHCPv4 client, if it is enabled with the
ad943783 1304 <varname>DHCP=</varname> setting described above:</para>
798d3a52
ZJS
1305
1306 <variablelist class='network-directives'>
1307 <varlistentry>
1308 <term><varname>UseDNS=</varname></term>
1309 <listitem>
1310 <para>When true (the default), the DNS servers received
1311 from the DHCP server will be used and take precedence over
1312 any statically configured ones.</para>
e88d8021
ZJS
1313
1314 <para>This corresponds to the <option>nameserver</option>
ad943783
LP
1315 option in <citerefentry
1316 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
1317 </listitem>
1318 </varlistentry>
a24e12f0
YW
1319 <varlistentry>
1320 <term><varname>RoutesToDNS=</varname></term>
1321 <listitem>
1322 <para>When true, the routes to the DNS servers received from the DHCP server will be
1323 configured. When <varname>UseDNS=</varname> is disabled, this setting is ignored.
f7e7bb65 1324 Defaults to false.</para>
a24e12f0
YW
1325 </listitem>
1326 </varlistentry>
301f4073
MM
1327 <varlistentry>
1328 <term><varname>UseNTP=</varname></term>
1329 <listitem>
1330 <para>When true (the default), the NTP servers received
1331 from the DHCP server will be used by systemd-timesyncd
1332 and take precedence over any statically configured ones.</para>
1333 </listitem>
1334 </varlistentry>
299d578f
SS
1335 <varlistentry>
1336 <term><varname>UseSIP=</varname></term>
1337 <listitem>
1338 <para>When true (the default), the SIP servers received
1339 from the DHCP server will be saved at the state files and can be
1340 read via <function>sd_network_link_get_sip_servers()</function> function.</para>
1341 </listitem>
1342 </varlistentry>
798d3a52
ZJS
1343 <varlistentry>
1344 <term><varname>UseMTU=</varname></term>
1345 <listitem>
1346 <para>When true, the interface maximum transmission unit
1347 from the DHCP server will be used on the current link.
7169cdc8 1348 If <varname>MTUBytes=</varname> is set, then this setting is ignored.
95ab9eff 1349 Defaults to false.</para>
798d3a52
ZJS
1350 </listitem>
1351 </varlistentry>
7585baa0 1352 <varlistentry>
1353 <term><varname>Anonymize=</varname></term>
1354 <listitem>
9b6ffef3 1355 <para>Takes a boolean. When true, the options sent to the DHCP server will
7585baa0 1356 follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
1357 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1358 Defaults to false.</para>
1359
1360 <para>This option should only be set to true when
1361 <varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
1362 (see <citerefentry
1363 project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
1364
1365 <para>Note that this configuration will overwrite others.
1366 In concrete, the following variables will be ignored:
1367 <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
da2076a1
TK
1368 <varname>UseRoutes=</varname>, <varname>UseMTU=</varname>,
1369 <varname>VendorClassIdentifier=</varname>, <varname>UseTimezone=</varname>.</para>
fba10579
LP
1370
1371 <para>With this option enabled DHCP requests will mimic those generated by Microsoft Windows, in
1372 order to reduce the ability to fingerprint and recognize installations. This means DHCP request
1373 sizes will grow and lease data will be more comprehensive than normally, though most of the
1374 requested data is not actually used.</para>
7585baa0 1375 </listitem>
1376 </varlistentry>
798d3a52
ZJS
1377 <varlistentry>
1378 <term><varname>SendHostname=</varname></term>
1379 <listitem>
31ee3973
YW
1380 <para>When true (the default), the machine's hostname will be sent to the DHCP server.
1381 Note that the machine's hostname must consist only of 7-bit ASCII lower-case characters and
1382 no spaces or dots, and be formatted as a valid DNS domain name. Otherwise, the hostname is not
cad8d671 1383 sent even if this is set to true.</para>
798d3a52
ZJS
1384 </listitem>
1385 </varlistentry>
1386 <varlistentry>
1387 <term><varname>UseHostname=</varname></term>
1388 <listitem>
1389 <para>When true (the default), the hostname received from
31ee3973 1390 the DHCP server will be set as the transient hostname of the system.
d59be2cf 1391 </para>
798d3a52
ZJS
1392 </listitem>
1393 </varlistentry>
1adc5d0b 1394 <varlistentry>
31ee3973
YW
1395 <term><varname>Hostname=</varname></term>
1396 <listitem>
1397 <para>Use this value for the hostname which is sent to the DHCP server, instead of machine's hostname.
1398 Note that the specified hostname must consist only of 7-bit ASCII lower-case characters and
1399 no spaces or dots, and be formatted as a valid DNS domain name.</para>
1400 </listitem>
1401 </varlistentry>
798d3a52
ZJS
1402 <varlistentry>
1403 <term><varname>UseDomains=</varname></term>
1404 <listitem>
9b6ffef3 1405 <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name
b2a81c0b
LP
1406 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1407 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
1408 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1409 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
1410 false.</para>
1411
1412 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1e7a0e21 1413 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
b2a81c0b
LP
1414 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1415 single-label names.</para>
1416
1417 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1418 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
1419 </listitem>
1420 </varlistentry>
1421 <varlistentry>
1422 <term><varname>UseRoutes=</varname></term>
1423 <listitem>
d6eac9bd
DW
1424 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1425 routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's
1426 destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the
1427 link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a
1428 "link" scope will be used. For anything else, scope defaults to "global".</para>
798d3a52
ZJS
1429 </listitem>
1430 </varlistentry>
ad943783
LP
1431
1432 <varlistentry>
1433 <term><varname>UseTimezone=</varname></term>
1434
1435 <listitem><para>When true, the timezone received from the
7f3fdb7f 1436 DHCP server will be set as timezone of the local
ad943783
LP
1437 system. Defaults to <literal>no</literal>.</para></listitem>
1438 </varlistentry>
1439
3e43b2cd
JJ
1440 <varlistentry>
1441 <term><varname>ClientIdentifier=</varname></term>
1442 <listitem>
dace710c
YW
1443 <para>The DHCPv4 client identifier to use. Takes one of <literal>mac</literal>, <literal>duid</literal> or <literal>duid-only</literal>.
1444 If set to <literal>mac</literal>, the MAC address of the link is used.
1445 If set to <literal>duid</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used.
1446 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.
1447 Defaults to <literal>duid</literal>.</para>
3e43b2cd
JJ
1448 </listitem>
1449 </varlistentry>
e2e08e77 1450
798d3a52
ZJS
1451 <varlistentry>
1452 <term><varname>VendorClassIdentifier=</varname></term>
1453 <listitem>
1454 <para>The vendor class identifier used to identify vendor
1455 type and configuration.</para>
1456 </listitem>
1457 </varlistentry>
076ea6f6 1458
af1c0de0
SS
1459 <varlistentry>
1460 <term><varname>UserClass=</varname></term>
1461 <listitem>
1462 <para>A DHCPv4 client can use UserClass option to identify the type or category of user or applications
1463 it represents. The information contained in this option is a string that represents the user class of which
1464 the client is a member. Each class sets an identifying string of information to be used by the DHCP
1465 service to classify clients. Takes a whitespace-separated list of strings.</para>
1466 </listitem>
1467 </varlistentry>
1468
715cedfb
SS
1469 <varlistentry>
1470 <term><varname>MaxAttempts=</varname></term>
1471 <listitem>
1472 <para>Specifies how many times the DHCPv4 client configuration should be attempted. Takes a
1473 number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>.
1474 Note that the time between retries is increased exponentially, so the network will not be
1475 overloaded even if this number is high.</para>
1476 </listitem>
1477 </varlistentry>
1478
e2e08e77
ZJS
1479 <varlistentry>
1480 <term><varname>DUIDType=</varname></term>
1481 <listitem>
1482 <para>Override the global <varname>DUIDType</varname> setting for this network. See
1483 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1484 for a description of possible values.</para>
1485 </listitem>
1486 </varlistentry>
076ea6f6 1487
e2e08e77
ZJS
1488 <varlistentry>
1489 <term><varname>DUIDRawData=</varname></term>
1490 <listitem>
1491 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
1492 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1493 for a description of possible values.</para>
076ea6f6
LP
1494 </listitem>
1495 </varlistentry>
e2e08e77 1496
d05def16
LP
1497 <varlistentry>
1498 <term><varname>IAID=</varname></term>
1499 <listitem>
1500 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
1501 </listitem>
1502 </varlistentry>
1503
798d3a52
ZJS
1504 <varlistentry>
1505 <term><varname>RequestBroadcast=</varname></term>
1506 <listitem>
1507 <para>Request the server to use broadcast messages before
1508 the IP address has been configured. This is necessary for
1509 devices that cannot receive RAW packets, or that cannot
1510 receive packets at all before an IP address has been
1511 configured. On the other hand, this must not be enabled on
1512 networks where broadcasts are filtered out.</para>
1513 </listitem>
1514 </varlistentry>
e2e08e77 1515
798d3a52
ZJS
1516 <varlistentry>
1517 <term><varname>RouteMetric=</varname></term>
1518 <listitem>
1519 <para>Set the routing metric for routes specified by the
1520 DHCP server.</para>
1521 </listitem>
1522 </varlistentry>
f594276b
JK
1523
1524 <varlistentry>
1525 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1526 <listitem>
d11e656a 1527 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
f594276b
JK
1528 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1529 </para>
917b2260
AR
1530 <para>When used in combination with <varname>VRF=</varname> the
1531 VRF's routing table is used unless this parameter is specified.
1532 </para>
f594276b
JK
1533 </listitem>
1534 </varlistentry>
9faed222 1535
c695dcf9
SS
1536 <varlistentry>
1537 <term><varname>RouteMTUBytes=</varname></term>
1538 <listitem>
1539 <para>Specifies the MTU for the DHCP routes. Please see the [Route] section for further details.</para>
1540 </listitem>
1541 </varlistentry>
1542
9faed222
SS
1543 <varlistentry>
1544 <term><varname>ListenPort=</varname></term>
1545 <listitem>
1546 <para>Allow setting custom port for the DHCP client to listen on.</para>
1547 </listitem>
1548 </varlistentry>
fb5c8216 1549
1501b429
SS
1550 <varlistentry>
1551 <term><varname>SendRelease=</varname></term>
1552 <listitem>
1553 <para>When true, the DHCPv4 client sends a DHCP release packet when it stops.
5f3b5f19 1554 Defaults to true.</para>
1501b429
SS
1555 </listitem>
1556 </varlistentry>
1557
0f3ff4ea
SS
1558 <varlistentry>
1559 <term><varname>SendDecline=</varname></term>
1560 <listitem>
1561 <para>A boolen. When <literal>true</literal>, DHCPv4 clients receives IP address from DHCP server.
1562 After new IP is received, DHCPv4 performs IPv4 Duplicate Address Detection. If duplicate use of IP is detected
1563 the DHCPv4 client rejects the IP by sending a DHCPDECLINE packet DHCP clients try to obtain an IP address again.
1564 See <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5224</ulink>.
1565 Defaults to <literal>unset</literal>.</para>
1566 </listitem>
1567 </varlistentry>
1568
caa8ca42 1569 <varlistentry>
5bc945be
SS
1570 <term><varname>BlackList=</varname></term>
1571 <listitem>
1572 <para>A whitespace-separated list of IPv4 addresses. DHCP offers from servers in the list are rejected.</para>
1573 </listitem>
1574 </varlistentry>
1575
1576 <varlistentry>
1577 <term><varname>RequestOptions=</varname></term>
caa8ca42 1578 <listitem>
5bc945be 1579 <para>A whitespace-separated list of integers in the range 1–254.</para>
caa8ca42
SS
1580 </listitem>
1581 </varlistentry>
1582
cb29c156 1583 <varlistentry>
864edb39 1584 <term><varname>SendOption=</varname></term>
cb29c156 1585 <listitem>
586ec936 1586 <para>Send an arbitrary option in the DHCPv4 request. Takes a DHCP option number, data type
d8b736bd
YW
1587 and data separated with a colon
1588 (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
11fcfc53 1589 The option number must be an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
d8b736bd
YW
1590 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
1591 <literal>string</literal>. Special characters in the data string may be escaped using
a2cc708a 1592 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
d8b736bd 1593 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
a2cc708a 1594 then all options specified earlier are cleared. Defaults to unset.</para>
cb29c156
SS
1595 </listitem>
1596 </varlistentry>
caa8ca42
SS
1597 </variablelist>
1598 </refsect1>
1599
1600 <refsect1>
1601 <title>[DHCPv6] Section Options</title>
1602 <para>The <literal>[DHCPv6]</literal> section configures the DHCPv6 client, if it is enabled with the
4f7331a8 1603 <varname>DHCP=</varname> setting described above, or invoked by the IPv6 Router Advertisement:</para>
caa8ca42
SS
1604
1605 <variablelist class='network-directives'>
1606 <varlistentry>
1607 <term><varname>UseDNS=</varname></term>
1608 <term><varname>UseNTP=</varname></term>
1609 <listitem>
9fdae8d5 1610 <para>As in the <literal>[DHCPv4]</literal> section.</para>
caa8ca42
SS
1611 </listitem>
1612 </varlistentry>
1613
fb5c8216
SS
1614 <varlistentry>
1615 <term><varname>RapidCommit=</varname></term>
1616 <listitem>
9b6ffef3 1617 <para>Takes a boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through
fb5c8216
SS
1618 a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both
1619 the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default
1620 four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides
1621 faster client configuration and is beneficial in environments in which networks are under a heavy load.
1622 See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details.
1623 Defaults to true.</para>
1624 </listitem>
1625 </varlistentry>
1626
125f20b4
PF
1627 <varlistentry>
1628 <term><varname>ForceDHCPv6PDOtherInformation=</varname></term>
1629 <listitem>
9b6ffef3 1630 <para>Takes a boolean that enforces DHCPv6 stateful mode when the 'Other information' bit is set in
125f20b4
PF
1631 Router Advertisement messages. By default setting only the 'O' bit in Router Advertisements
1632 makes DHCPv6 request network information in a stateless manner using a two-message Information
1633 Request and Information Reply message exchange.
1634 <ulink url="https://tools.ietf.org/html/rfc7084">RFC 7084</ulink>, requirement WPD-4, updates
1635 this behavior for a Customer Edge router so that stateful DHCPv6 Prefix Delegation is also
1636 requested when only the 'O' bit is set in Router Advertisements. This option enables such a CE
1637 behavior as it is impossible to automatically distinguish the intention of the 'O' bit otherwise.
1638 By default this option is set to 'false', enable it if no prefixes are delegated when the device
1639 should be acting as a CE router.</para>
1640 </listitem>
1641 </varlistentry>
1642
2805536b
SS
1643 <varlistentry>
1644 <term><varname>PrefixDelegationHint=</varname></term>
1645 <listitem>
48daf510 1646 <para>Takes an IPv6 address with prefix length as <varname>Address=</varname> in
2805536b
SS
1647 the "[Network]" section. Specifies the DHCPv6 client for the requesting router to include
1648 a prefix-hint in the DHCPv6 solicitation. Prefix ranges 1-128. Defaults to unset.</para>
1649 </listitem>
1650 </varlistentry>
ad943783 1651 </variablelist>
caa8ca42 1652 </refsect1>
413708d1 1653
1e7a0e21 1654 <refsect1>
f921f573
LP
1655 <title>[IPv6AcceptRA] Section Options</title>
1656 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1657 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1e7a0e21
LP
1658 above:</para>
1659
1660 <variablelist class='network-directives'>
1661 <varlistentry>
1662 <term><varname>UseDNS=</varname></term>
1663 <listitem>
1664 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1665 precedence over any statically configured ones.</para>
1666
1667 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1668 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1669 </listitem>
1670 </varlistentry>
1671
1672 <varlistentry>
1673 <term><varname>UseDomains=</varname></term>
1674 <listitem>
9b6ffef3 1675 <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name
1e7a0e21
LP
1676 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1677 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1678 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1679 effect of the <option>Domains=</option> setting when the argument is prefixed with
1680 <literal>~</literal>. Defaults to false.</para>
1681
1682 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1683 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1684 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1685 single-label names.</para>
1686
1687 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1688 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1689 </listitem>
1690 </varlistentry>
2ba31d29
JK
1691
1692 <varlistentry>
1693 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1694 <listitem>
d11e656a
ZJS
1695 <para>The table identifier for the routes received in the Router Advertisement
1696 (a number between 1 and 4294967295, or 0 to unset).
2ba31d29
JK
1697 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1698 </para>
1699 </listitem>
1700 </varlistentry>
062c2eea
SS
1701
1702 <varlistentry>
1703 <term><varname>UseAutonomousPrefix=</varname></term>
1704 <listitem>
1705 <para>When true (the default), the autonomous prefix received in the Router Advertisement will be used and take
1706 precedence over any statically configured ones.</para>
1707 </listitem>
1708 </varlistentry>
1709
1710 <varlistentry>
1711 <term><varname>UseOnLinkPrefix=</varname></term>
1712 <listitem>
1713 <para>When true (the default), the onlink prefix received in the Router Advertisement will be used and take
1714 precedence over any statically configured ones.</para>
1715 </listitem>
1716 </varlistentry>
1717
e520ce64
SS
1718 <varlistentry>
1719 <term><varname>BlackList=</varname></term>
1720 <listitem>
1721 <para>A whitespace-separated list of IPv6 prefixes. IPv6 prefixes supplied via router advertisements in the list are ignored.</para>
1722 </listitem>
1723 </varlistentry>
1724
1e7a0e21
LP
1725 </variablelist>
1726 </refsect1>
1727
ad943783
LP
1728 <refsect1>
1729 <title>[DHCPServer] Section Options</title>
1730 <para>The <literal>[DHCPServer]</literal> section contains
1731 settings for the DHCP server, if enabled via the
1732 <varname>DHCPServer=</varname> option described above:</para>
1733
1734 <variablelist class='network-directives'>
1735
9b3a67c5
TG
1736 <varlistentry>
1737 <term><varname>PoolOffset=</varname></term>
1738 <term><varname>PoolSize=</varname></term>
1739
1740 <listitem><para>Configures the pool of addresses to hand out. The pool
1741 is a contiguous sequence of IP addresses in the subnet configured for
1742 the server address, which does not include the subnet nor the broadcast
1743 address. <varname>PoolOffset=</varname> takes the offset of the pool
1744 from the start of subnet, or zero to use the default value.
1745 <varname>PoolSize=</varname> takes the number of IP addresses in the
b938cb90 1746 pool or zero to use the default value. By default, the pool starts at
9b3a67c5
TG
1747 the first address after the subnet address and takes up the rest of
1748 the subnet, excluding the broadcast address. If the pool includes
1749 the server address (the default), this is reserved and not handed
1750 out to clients.</para></listitem>
1751 </varlistentry>
1752
ad943783
LP
1753 <varlistentry>
1754 <term><varname>DefaultLeaseTimeSec=</varname></term>
1755 <term><varname>MaxLeaseTimeSec=</varname></term>
1756
1757 <listitem><para>Control the default and maximum DHCP lease
1758 time to pass to clients. These settings take time values in seconds or
1759 another common time unit, depending on the suffix. The default
1760 lease time is used for clients that did not ask for a specific
1761 lease time. If a client asks for a lease time longer than the
b938cb90 1762 maximum lease time, it is automatically shortened to the
ad943783
LP
1763 specified time. The default lease time defaults to 1h, the
1764 maximum lease time to 12h. Shorter lease times are beneficial
1765 if the configuration data in DHCP leases changes frequently
1766 and clients shall learn the new settings with shorter
1767 latencies. Longer lease times reduce the generated DHCP
1768 network traffic.</para></listitem>
1769 </varlistentry>
1770
1771 <varlistentry>
1772 <term><varname>EmitDNS=</varname></term>
1773 <term><varname>DNS=</varname></term>
1774
9b6ffef3
YW
1775 <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out
1776 to clients shall contain DNS server information. Defaults to <literal>yes</literal>.
1777 The DNS servers to pass to clients may be configured with the
ad943783
LP
1778 <varname>DNS=</varname> option, which takes a list of IPv4
1779 addresses. If the <varname>EmitDNS=</varname> option is
b938cb90 1780 enabled but no servers configured, the servers are
ad943783
LP
1781 automatically propagated from an "uplink" interface that has
1782 appropriate servers set. The "uplink" interface is determined
1783 by the default route of the system with the highest
1784 priority. Note that this information is acquired at the time
1785 the lease is handed out, and does not take uplink interfaces
1786 into account that acquire DNS or NTP server information at a
1787 later point. DNS server propagation does not take
1788 <filename>/etc/resolv.conf</filename> into account. Also, note
a8eaaee7 1789 that the leases are not refreshed if the uplink network
ad943783 1790 configuration changes. To ensure clients regularly acquire the
b938cb90 1791 most current uplink DNS server information, it is thus
ad943783
LP
1792 advisable to shorten the DHCP lease time via
1793 <varname>MaxLeaseTimeSec=</varname> described
1794 above.</para></listitem>
1795 </varlistentry>
1796
1797 <varlistentry>
1798 <term><varname>EmitNTP=</varname></term>
1799 <term><varname>NTP=</varname></term>
1800
1801 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
b938cb90 1802 <varname>DNS=</varname> settings described above, these
ad943783
LP
1803 settings configure whether and what NTP server information
1804 shall be emitted as part of the DHCP lease. The same syntax,
1805 propagation semantics and defaults apply as for
1806 <varname>EmitDNS=</varname> and
1807 <varname>DNS=</varname>.</para></listitem>
1808 </varlistentry>
1809
299d578f
SS
1810 <varlistentry>
1811 <term><varname>EmitSIP=</varname></term>
1812 <term><varname>SIP=</varname></term>
1813
1814 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
1815 <varname>DNS=</varname> settings described above, these
1816 settings configure whether and what SIP server information
1817 shall be emitted as part of the DHCP lease. The same syntax,
1818 propagation semantics and defaults apply as for
1819 <varname>EmitDNS=</varname> and
1820 <varname>DNS=</varname>.</para></listitem>
1821 </varlistentry>
1822
77ff6022
CG
1823 <varlistentry>
1824 <term><varname>EmitRouter=</varname></term>
1825
1826 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1827 setting described above, this setting configures whether the
1828 DHCP lease should contain the router option. The same syntax,
1829 propagation semantics and defaults apply as for
1830 <varname>EmitDNS=</varname>.</para></listitem>
1831 </varlistentry>
1832
ad943783
LP
1833 <varlistentry>
1834 <term><varname>EmitTimezone=</varname></term>
1835 <term><varname>Timezone=</varname></term>
1836
9b6ffef3
YW
1837 <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out
1838 to clients shall contain timezone information. Defaults to <literal>yes</literal>. The
ad943783
LP
1839 <varname>Timezone=</varname> setting takes a timezone string
1840 (such as <literal>Europe/Berlin</literal> or
1841 <literal>UTC</literal>) to pass to clients. If no explicit
b938cb90 1842 timezone is set, the system timezone of the local host is
ad943783
LP
1843 propagated, as determined by the
1844 <filename>/etc/localtime</filename> symlink.</para></listitem>
1845 </varlistentry>
1846
564ca984 1847 <varlistentry>
d8b736bd
YW
1848 <term><varname>SendOption=</varname></term>
1849 <listitem>
1850 <para>Send a raw option with value via DHCPv4 server. Takes a DHCP option number, data type
1851 and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1852 The option number is an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
1853 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
1854 <literal>string</literal>. Special characters in the data string may be escaped using
1855 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1856 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
1857 then all options specified earlier are cleared. Defaults to unset.</para>
1858 </listitem>
564ca984
SS
1859 </varlistentry>
1860
ad943783
LP
1861 </variablelist>
1862 </refsect1>
1863
798d3a52 1864 <refsect1>
3f9e0236
PF
1865 <title>[IPv6PrefixDelegation] Section Options</title>
1866 <para>The <literal>[IPv6PrefixDelegation]</literal> section contains
1867 settings for sending IPv6 Router Advertisements and whether to act as
1868 a router, if enabled via the <varname>IPv6PrefixDelegation=</varname>
1869 option described above. IPv6 network prefixes are defined with one or
1870 more <literal>[IPv6Prefix]</literal> sections.</para>
1871
1872 <variablelist class='network-directives'>
1873
1874 <varlistentry>
1875 <term><varname>Managed=</varname></term>
1876 <term><varname>OtherInformation=</varname></term>
1877
9b6ffef3
YW
1878 <listitem><para>Takes a boolean. Controls whether a DHCPv6 server is used to acquire IPv6
1879 addresses on the network link when <varname>Managed=</varname>
3f9e0236
PF
1880 is set to <literal>true</literal> or if only additional network
1881 information can be obtained via DHCPv6 for the network link when
9b6ffef3 1882 <varname>OtherInformation=</varname> is set to
3f9e0236
PF
1883 <literal>true</literal>. Both settings default to
1884 <literal>false</literal>, which means that a DHCPv6 server is not being
1885 used.</para></listitem>
1886 </varlistentry>
1887
1888 <varlistentry>
1889 <term><varname>RouterLifetimeSec=</varname></term>
1890
9b6ffef3 1891 <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. If set,
3f9e0236 1892 this host also announces itself in Router Advertisements as an IPv6
025314d9 1893 router for the network link. When unset, the host is not acting as a router.</para>
3f9e0236
PF
1894 </listitem>
1895 </varlistentry>
1896
1897 <varlistentry>
1898 <term><varname>RouterPreference=</varname></term>
1899
1900 <listitem><para>Configures IPv6 router preference if
1901 <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are
1902 <literal>high</literal>, <literal>medium</literal> and
1903 <literal>low</literal>, with <literal>normal</literal> and
1904 <literal>default</literal> added as synonyms for
1905 <literal>medium</literal> just to make configuration easier. See
1906 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
1907 for details. Defaults to <literal>medium</literal>.</para></listitem>
1908 </varlistentry>
1909
1910 <varlistentry>
4cb8478c 1911 <term><varname>EmitDNS=</varname></term>
3f9e0236
PF
1912 <term><varname>DNS=</varname></term>
1913
4cb8478c
PF
1914 <listitem><para><varname>DNS=</varname> specifies a list of recursive
1915 DNS server IPv6 addresses that distributed via Router Advertisement
1916 messages when <varname>EmitDNS=</varname> is true. If <varname>DNS=
1917 </varname> is empty, DNS servers are read from the
1918 <literal>[Network]</literal> section. If the
1919 <literal>[Network]</literal> section does not contain any DNS servers
1920 either, DNS servers from the uplink with the highest priority default
1921 route are used. When <varname>EmitDNS=</varname> is false, no DNS server
1922 information is sent in Router Advertisement messages.
1923 <varname>EmitDNS=</varname> defaults to true.
3f9e0236
PF
1924 </para></listitem>
1925 </varlistentry>
1926
760021c0 1927 <varlistentry>
4cb8478c 1928 <term><varname>EmitDomains=</varname></term>
760021c0
PF
1929 <term><varname>Domains=</varname></term>
1930
4cb8478c
PF
1931 <listitem><para>A list of DNS search domains distributed via Router
1932 Advertisement messages when <varname>EmitDomains=</varname> is true. If
1933 <varname>Domains=</varname> is empty, DNS search domains are read from the
1934 <literal>[Network]</literal> section. If the <literal>[Network]</literal>
1935 section does not contain any DNS search domains either, DNS search
1936 domains from the uplink with the highest priority default route are
1937 used. When <varname>EmitDomains=</varname> is false, no DNS search domain
1938 information is sent in Router Advertisement messages.
1939 <varname>EmitDomains=</varname> defaults to true.
1940 </para></listitem>
760021c0
PF
1941 </varlistentry>
1942
3f9e0236
PF
1943 <varlistentry>
1944 <term><varname>DNSLifetimeSec=</varname></term>
1945
1946 <listitem><para>Lifetime in seconds for the DNS server addresses listed
760021c0
PF
1947 in <varname>DNS=</varname> and search domains listed in
1948 <varname>Domains=</varname>.</para></listitem>
3f9e0236
PF
1949 </varlistentry>
1950
1951 </variablelist>
1952 </refsect1>
1953
203d4df5 1954 <refsect1>
3f9e0236
PF
1955 <title>[IPv6Prefix] Section Options</title>
1956 <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6
1957 prefixes that are announced via Router Advertisements. See
1958 <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink>
1959 for further details.</para>
1960
1961 <variablelist class='network-directives'>
1962
1963 <varlistentry>
1964 <term><varname>AddressAutoconfiguration=</varname></term>
1965 <term><varname>OnLink=</varname></term>
1966
9b6ffef3 1967 <listitem><para>Takes a boolean to specify whether IPv6 addresses can be
3f9e0236
PF
1968 autoconfigured with this prefix and whether the prefix can be used for
1969 onlink determination. Both settings default to <literal>true</literal>
1970 in order to ease configuration.
1971 </para></listitem>
1972 </varlistentry>
1973
1974 <varlistentry>
1975 <term><varname>Prefix=</varname></term>
1976
1977 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
1978 Similarly to configuring static IPv6 addresses, the setting is
1979 configured as an IPv6 prefix and its prefix length, separated by a
1980 <literal>/</literal> character. Use multiple
1981 <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6
1982 prefixes since prefix lifetimes, address autoconfiguration and onlink
1983 status may differ from one prefix to another.</para></listitem>
1984 </varlistentry>
1985
1986 <varlistentry>
1987 <term><varname>PreferredLifetimeSec=</varname></term>
1988 <term><varname>ValidLifetimeSec=</varname></term>
1989
1990 <listitem><para>Preferred and valid lifetimes for the prefix measured in
1991 seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800
1992 seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults
1993 to 2592000 seconds (30 days).</para></listitem>
203d4df5
SS
1994 </varlistentry>
1995
1996 </variablelist>
1997 </refsect1>
1998
1999 <refsect1>
2000 <title>[IPv6RoutePrefix] Section Options</title>
2001 <para>One or more <literal>[IPv6RoutePrefix]</literal> sections contain the IPv6
2002 prefix routes that are announced via Router Advertisements. See
2003 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
2004 for further details.</para>
2005
2006 <variablelist class='network-directives'>
2007
2008 <varlistentry>
2009 <term><varname>Route=</varname></term>
2010
2011 <listitem><para>The IPv6 route that is to be distributed to hosts.
2012 Similarly to configuring static IPv6 routes, the setting is
2013 configured as an IPv6 prefix routes and its prefix route length,
2014 separated by a<literal>/</literal> character. Use multiple
2015 <literal>[IPv6PrefixRoutes]</literal> sections to configure multiple IPv6
2016 prefix routes.</para></listitem>
2017 </varlistentry>
2018
2019 <varlistentry>
2020 <term><varname>LifetimeSec=</varname></term>
2021
2022 <listitem><para>Lifetime for the route prefix measured in
2023 seconds. <varname>LifetimeSec=</varname> defaults to 604800 seconds (one week).
2024 </para></listitem>
3f9e0236
PF
2025 </varlistentry>
2026
2027 </variablelist>
2028 </refsect1>
2029
2030 <refsect1>
798d3a52
ZJS
2031 <title>[Bridge] Section Options</title>
2032 <para>The <literal>[Bridge]</literal> section accepts the
2033 following keys.</para>
2034 <variablelist class='network-directives'>
165c41a9
SS
2035 <varlistentry>
2036 <term><varname>UnicastFlood=</varname></term>
2037 <listitem>
9b6ffef3 2038 <para>Takes a boolean. Controls whether the bridge should flood
072f9e4a 2039 traffic for which an FDB entry is missing and the destination
025314d9 2040 is unknown through this port. When unset, the kernel's default will be used.
47c7dfe2 2041 </para>
165c41a9
SS
2042 </listitem>
2043 </varlistentry>
7f15b714
TJ
2044 <varlistentry>
2045 <term><varname>MulticastFlood=</varname></term>
2046 <listitem>
2047 <para>Takes a boolean. Controls whether the bridge should flood
2048 traffic for which an MDB entry is missing and the destination
2049 is unknown through this port. When unset, the kernel's default will be used.
2050 </para>
2051 </listitem>
2052 </varlistentry>
d3aa8b49
SS
2053 <varlistentry>
2054 <term><varname>MulticastToUnicast=</varname></term>
2055 <listitem>
2056 <para>Takes a boolean. Multicast to unicast works on top of the multicast snooping feature of
2057 the bridge. Which means unicast copies are only delivered to hosts which are interested in it.
2058 When unset, the kernel's default will be used.
2059 </para>
2060 </listitem>
2061 </varlistentry>
7f15b714
TJ
2062 <varlistentry>
2063 <term><varname>NeighborSuppression=</varname></term>
2064 <listitem>
2065 <para>Takes a boolean. Configures whether ARP and ND neighbor suppression is enabled for
2066 this port. When unset, the kernel's default will be used.
2067 </para>
2068 </listitem>
2069 </varlistentry>
2070 <varlistentry>
2071 <term><varname>Learning=</varname></term>
2072 <listitem>
2073 <para>Takes a boolean. Configures whether MAC address learning is enabled for
2074 this port. When unset, the kernel's default will be used.
2075 </para>
2076 </listitem>
2077 </varlistentry>
165c41a9
SS
2078 <varlistentry>
2079 <term><varname>HairPin=</varname></term>
2080 <listitem>
9b6ffef3 2081 <para>Takes a boolean. Configures whether traffic may be sent back
025314d9
YW
2082 out of the port on which it was received. When this flag is false, and the bridge
2083 will not forward traffic back out of the receiving port.
2084 When unset, the kernel's default will be used.</para>
165c41a9
SS
2085 </listitem>
2086 </varlistentry>
2087 <varlistentry>
84c34096 2088 <term><varname>UseBPDU=</varname></term>
165c41a9 2089 <listitem>
9b6ffef3 2090 <para>Takes a boolean. Configures whether STP Bridge Protocol Data Units will be
025314d9 2091 processed by the bridge port. When unset, the kernel's default will be used.</para>
165c41a9
SS
2092 </listitem>
2093 </varlistentry>
2094 <varlistentry>
2095 <term><varname>FastLeave=</varname></term>
2096 <listitem>
9b6ffef3 2097 <para>Takes a boolean. This flag allows the bridge to immediately stop multicast
a8eaaee7 2098 traffic on a port that receives an IGMP Leave message. It is only used with
025314d9 2099 IGMP snooping if enabled on the bridge. When unset, the kernel's default will be used.</para>
165c41a9
SS
2100 </listitem>
2101 </varlistentry>
2102 <varlistentry>
23da66bb 2103 <term><varname>AllowPortToBeRoot=</varname></term>
165c41a9 2104 <listitem>
9b6ffef3 2105 <para>Takes a boolean. Configures whether a given port is allowed to
47c7dfe2 2106 become a root port. Only used when STP is enabled on the bridge.
025314d9 2107 When unset, the kernel's default will be used.</para>
165c41a9
SS
2108 </listitem>
2109 </varlistentry>
1087623b
SS
2110 <varlistentry>
2111 <term><varname>ProxyARP=</varname></term>
2112 <listitem>
2113 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port.
2114 When unset, the kernel's default will be used.</para>
2115 </listitem>
2116 </varlistentry>
2117 <varlistentry>
2118 <term><varname>ProxyARPWiFi=</varname></term>
2119 <listitem>
2120 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port
2121 which meets extended requirements by IEEE 802.11 and Hotspot 2.0 specifications.
2122 When unset, the kernel's default will be used.</para>
2123 </listitem>
2124 </varlistentry>
0fadb2a4
SS
2125 <varlistentry>
2126 <term><varname>MulticastRouter=</varname></term>
2127 <listitem>
2128 <para>Configures this port for having multicast routers attached. A port with a multicast
2129 router will receive all multicast traffic. Takes one of <literal>no</literal>
2130 to disable multicast routers on this port, <literal>query</literal> to let the system detect
2131 the presence of routers, <literal>permanent</literal> to permanently enable multicast traffic
2132 forwarding on this port, or <literal>temporary</literal> to enable multicast routers temporarily
2133 on this port, not depending on incoming queries. When unset, the kernel's default will be used.</para>
2134 </listitem>
2135 </varlistentry>
798d3a52
ZJS
2136 <varlistentry>
2137 <term><varname>Cost=</varname></term>
2138 <listitem>
47c7dfe2 2139 <para>Sets the "cost" of sending packets of this interface.
a8eaaee7 2140 Each port in a bridge may have a different speed and the cost
798d3a52 2141 is used to decide which link to use. Faster interfaces
785889e5 2142 should have lower costs. It is an integer value between 1 and
b56be296
DJL
2143 65535.</para>
2144 </listitem>
2145 </varlistentry>
2146 <varlistentry>
2147 <term><varname>Priority=</varname></term>
2148 <listitem>
2149 <para>Sets the "priority" of sending packets on this interface.
2150 Each port in a bridge may have a different priority which is used
2151 to decide which link to use. Lower value means higher priority.
785889e5 2152 It is an integer value between 0 to 63. Networkd does not set any
b56be296 2153 default, meaning the kernel default value of 32 is used.</para>
798d3a52
ZJS
2154 </listitem>
2155 </varlistentry>
2156 </variablelist>
2157 </refsect1>
798d3a52
ZJS
2158 <refsect1>
2159 <title>[BridgeFDB] Section Options</title>
2160 <para>The <literal>[BridgeFDB]</literal> section manages the
2161 forwarding database table of a port and accepts the following
2162 keys. Specify several <literal>[BridgeFDB]</literal> sections to
2163 configure several static MAC table entries.</para>
2164
2165 <variablelist class='network-directives'>
2166 <varlistentry>
2167 <term><varname>MACAddress=</varname></term>
2168 <listitem>
2169 <para>As in the <literal>[Network]</literal> section. This
2170 key is mandatory.</para>
2171 </listitem>
2172 </varlistentry>
c2c2793f
SS
2173 <varlistentry>
2174 <term><varname>Destination=</varname></term>
2175 <listitem>
2176 <para>Takes an IP address of the destination VXLAN tunnel endpoint.</para>
2177 </listitem>
2178 </varlistentry>
798d3a52
ZJS
2179 <varlistentry>
2180 <term><varname>VLANId=</varname></term>
2181 <listitem>
a8eaaee7 2182 <para>The VLAN ID for the new static MAC table entry. If
db9b9fb9 2183 omitted, no VLAN ID information is appended to the new static MAC
798d3a52
ZJS
2184 table entry.</para>
2185 </listitem>
2186 </varlistentry>
61b824c5
SS
2187 <varlistentry>
2188 <term><varname>VNI=</varname></term>
2189 <listitem>
2190 <para>The VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to
2191 the remote VXLAN tunnel endpoint. Takes a number in the range 1-16777215.
2192 Defaults to unset.</para>
2193 </listitem>
2194 </varlistentry>
bdb397ed
SS
2195 <varlistentry>
2196 <term><varname>AssociatedWith=</varname></term>
2197 <listitem>
2198 <para>Specifies where the address is associated with. Takes one of <literal>use</literal>,
2199 <literal>self</literal>, <literal>master</literal> or <literal>router</literal>.
2200 <literal>use</literal> means the address is in use. User space can use this option to
2201 indicate to the kernel that the fdb entry is in use. <literal>self</literal> means
2202 the address is associated with the port drivers fdb. Usually hardware. <literal>master</literal>
2203 means the address is associated with master devices fdb. <literal>router</literal> means
2204 the destination address is associated with a router. Note that it's valid if the referenced
2205 device is a VXLAN type device and has route shortcircuit enabled. Defaults to <literal>self</literal>.</para>
2206 </listitem>
2207 </varlistentry>
798d3a52
ZJS
2208 </variablelist>
2209 </refsect1>
06828bb6
HP
2210
2211 <refsect1>
2212 <title>[CAN] Section Options</title>
2213 <para>The <literal>[CAN]</literal> section manages the Controller Area Network (CAN bus) and accepts the
2214 following keys.</para>
2215 <variablelist class='network-directives'>
2216 <varlistentry>
2217 <term><varname>BitRate=</varname></term>
2218 <listitem>
2219 <para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can
2220 be used here.</para>
2221 </listitem>
2222 </varlistentry>
2223 <varlistentry>
2224 <term><varname>SamplePoint=</varname></term>
2225 <listitem>
2226 <para>Optional sample point in percent with one decimal (e.g. <literal>75%</literal>,
2227 <literal>87.5%</literal>) or permille (e.g. <literal>875‰</literal>).</para>
2228 </listitem>
2229 </varlistentry>
2230 <varlistentry>
2231 <term><varname>RestartSec=</varname></term>
2232 <listitem>
2233 <para>Automatic restart delay time. If set to a non-zero value, a restart of the CAN controller will be
2234 triggered automatically in case of a bus-off condition after the specified delay time. Subsecond delays can
2235 be specified using decimals (e.g. <literal>0.1s</literal>) or a <literal>ms</literal> or
2236 <literal>us</literal> postfix. Using <literal>infinity</literal> or <literal>0</literal> will turn the
2237 automatic restart off. By default automatic restart is disabled.</para>
2238 </listitem>
2239 </varlistentry>
c423be28
CG
2240 <varlistentry>
2241 <term><varname>TripleSampling=</varname></term>
2242 <listitem>
2243 <para>Takes a boolean. When <literal>yes</literal>, three samples (instead of one) are used to determine
2244 the value of a received bit by majority rule. When unset, the kernel's default will be used.</para>
2245 </listitem>
2246 </varlistentry>
06828bb6
HP
2247 </variablelist>
2248 </refsect1>
2249
0f5bd7fe
SS
2250 <refsect1>
2251 <title>[TrafficControlQueueingDiscipline] Section Options</title>
2252 <para>The <literal>[TrafficControlQueueingDiscipline]</literal> section manages the Traffic control. It can be used
2253 to configure the kernel packet scheduler and simulate packet delay and loss for UDP or TCP applications,
2254 or limit the bandwidth usage of a particular service to simulate internet connections.</para>
2255
2256 <variablelist class='network-directives'>
2257 <varlistentry>
2258 <term><varname>Parent=</varname></term>
2259 <listitem>
d8081020
SS
2260 <para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
2261 <literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
0f5bd7fe
SS
2262 </listitem>
2263 </varlistentry>
2264
2265 <varlistentry>
2266 <term><varname>NetworkEmulatorDelaySec=</varname></term>
2267 <listitem>
2268 <para>Specifies the fixed amount of delay to be added to all packets going out of the
2269 interface. Defaults to unset.</para>
2270 </listitem>
2271 </varlistentry>
2272
2273 <varlistentry>
2274 <term><varname>NetworkEmulatorDelayJitterSec=</varname></term>
2275 <listitem>
2276 <para>Specifies the chosen delay to be added to the packets outgoing to the network
2277 interface. Defaults to unset.</para>
2278 </listitem>
2279 </varlistentry>
2280
2281 <varlistentry>
2282 <term><varname>NetworkEmulatorPacketLimit=</varname></term>
2283 <listitem>
2284 <para>Specifies the maximum number of packets the qdisc may hold queued at a time.
2285 An unsigned integer ranges 0 to 4294967294. Defaults to 1000.</para>
2286 </listitem>
2287 </varlistentry>
2288
2289 <varlistentry>
2290 <term><varname>NetworkEmulatorLossRate=</varname></term>
2291 <listitem>
2292 <para>Specifies an independent loss probability to be added to the packets outgoing from the
2293 network interface. Takes a percentage value, suffixed with "%". Defaults to unset.</para>
2294 </listitem>
2295 </varlistentry>
2296
b9c5aa3c
SS
2297 <varlistentry>
2298 <term><varname>NetworkEmulatorDuplicateRate=</varname></term>
2299 <listitem>
2300 <para>Specifies that the chosen percent of packets is duplicated before queuing them.
2301 Takes a percentage value, suffixed with "%". Defaults to unset.</para>
2302 </listitem>
2303 </varlistentry>
2304
ba5841b5
SS
2305 <varlistentry>
2306 <term><varname>TokenBufferFilterLatencySec=</varname></term>
2307 <listitem>
2308 <para>Specifies the latency parameter, which specifies the maximum amount of time a
2309 packet can sit in the Token Buffer Filter (TBF). Defaults to unset.</para>
2310 </listitem>
2311 </varlistentry>
2312
dcfc23ae
YW
2313 <varlistentry>
2314 <term><varname>TokenBufferFilterLimitSize=</varname></term>
2315 <listitem>
2316 <para>Takes the number of bytes that can be queued waiting for tokens to become available.
2317 When the size is suffixed with K, M, or G, it is parsed as Kilobytes, Megabytes, or Gigabytes,
2318 respectively, to the base of 1000. Defaults to unset.</para>
2319 </listitem>
2320 </varlistentry>
2321
ba5841b5
SS
2322 <varlistentry>
2323 <term><varname>TokenBufferFilterBurst=</varname></term>
2324 <listitem>
2325 <para>Specifies the size of the bucket. This is the maximum amount of bytes that tokens
2326 can be available for instantaneous transfer. When the size is suffixed with K, M, or G, it is
2327 parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to
2328 unset.</para>
2329 </listitem>
2330 </varlistentry>
2331
2332 <varlistentry>
2333 <term><varname>TokenBufferFilterRate=</varname></term>
2334 <listitem>
2335 <para>Specifies the device specific bandwidth. When suffixed with K, M, or G, the specified
6b8fe4c3 2336 bandwidth is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000.
ba5841b5
SS
2337 Defaults to unset.</para>
2338 </listitem>
2339 </varlistentry>
2340
dcfc23ae
YW
2341 <varlistentry>
2342 <term><varname>TokenBufferFilterMPUBytes=</varname></term>
2343 <listitem>
2344 <para>The Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes)
2345 for a packet. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
2346 Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to zero.</para>
2347 </listitem>
2348 </varlistentry>
2349
2350 <varlistentry>
2351 <term><varname>TokenBufferFilterPeakRate=</varname></term>
2352 <listitem>
2353 <para>Takes the maximum depletion rate of the bucket. When suffixed with K, M, or G, the
6b8fe4c3 2354 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
dcfc23ae
YW
2355 1000. Defaults to unset.</para>
2356 </listitem>
2357 </varlistentry>
2358
2359 <varlistentry>
2360 <term><varname>TokenBufferFilterMTUBytes=</varname></term>
2361 <listitem>
2362 <para>Specifies the size of the peakrate bucket. When suffixed with K, M, or G, the specified
2363 size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000.
2364 Defaults to unset.</para>
2365 </listitem>
2366 </varlistentry>
2367
9942b710
SS
2368 <varlistentry>
2369 <term><varname>StochasticFairnessQueueingPerturbPeriodSec=</varname></term>
2370 <listitem>
2371 <para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para>
2372 </listitem>
2373 </varlistentry>
2374
a9a5d632
SS
2375 <varlistentry>
2376 <term><varname>ControlledDelayPacketLimit=</varname></term>
2377 <listitem>
2378 <para>Specifies the hard lmit on the queue size in number of packets. When this limit is reached, incoming packets are
2379 dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
2380 </listitem>
2381 </varlistentry>
2382
b078e528
YW
2383 <varlistentry>
2384 <term><varname>ControlledDelayTargetSec=</varname></term>
2385 <listitem>
2386 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
2387 Defaults to unset and kernel's default is used.</para>
2388 </listitem>
2389 </varlistentry>
2390
2391 <varlistentry>
2392 <term><varname>ControlledDelayIntervalSec=</varname></term>
2393 <listitem>
2394 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
2395 become too stale. Defaults to unset and kernel's default is used.</para>
2396 </listitem>
2397 </varlistentry>
2398
2399 <varlistentry>
2400 <term><varname>ControlledDelayECN=</varname></term>
2401 <listitem>
2402 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
2403 unset and kernel's default is used.</para>
2404 </listitem>
2405 </varlistentry>
2406
2407 <varlistentry>
2408 <term><varname>ControlledDelayCEThresholdSec=</varname></term>
2409 <listitem>
2410 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
2411 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
2412 </listitem>
2413 </varlistentry>
2414
4e5ef149
SS
2415 <varlistentry>
2416 <term><varname>FairQueuingControlledDelayPacketLimit=</varname></term>
2417 <listitem>
2418 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
2419 dropped. Defaults to unset and kernel's default is used.</para>
2420 </listitem>
2421 </varlistentry>
2422
ac810b75
YW
2423 <varlistentry>
2424 <term><varname>FairQueuingControlledDelayMemoryLimit=</varname></term>
2425 <listitem>
2426 <para>Specifies the limit on the total number of bytes that can be queued in this FQ-CoDel instance.
2427 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
2428 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
2429 </listitem>
2430 </varlistentry>
2431
2432 <varlistentry>
2433 <term><varname>FairQueuingControlledDelayFlows=</varname></term>
2434 <listitem>
2435 <para>Specifies the number of flows into which the incoming packets are classified.
2436 Defaults to unset and kernel's default is used.</para>
2437 </listitem>
2438 </varlistentry>
2439
2440 <varlistentry>
2441 <term><varname>FairQueuingControlledDelayTargetSec=</varname></term>
2442 <listitem>
2443 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
2444 Defaults to unset and kernel's default is used.</para>
2445 </listitem>
2446 </varlistentry>
2447
2448 <varlistentry>
2449 <term><varname>FairQueuingControlledDelayIntervalSec=</varname></term>
2450 <listitem>
2451 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
2452 become too stale. Defaults to unset and kernel's default is used.</para>
2453 </listitem>
2454 </varlistentry>
2455
2456 <varlistentry>
2457 <term><varname>FairQueuingControlledDelayQuantum=</varname></term>
2458 <listitem>
2459 <para>Specifies the number of bytes used as 'deficit' in the fair queuing algorithmtimespan.
2460 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
2461 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
2462 </listitem>
2463 </varlistentry>
2464
2465 <varlistentry>
2466 <term><varname>FairQueuingControlledDelayECN=</varname></term>
2467 <listitem>
2468 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
2469 unset and kernel's default is used.</para>
2470 </listitem>
2471 </varlistentry>
2472
2473 <varlistentry>
2474 <term><varname>FairQueuingControlledDelayCEThresholdSec=</varname></term>
2475 <listitem>
2476 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
2477 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
2478 </listitem>
2479 </varlistentry>
2480
7234b915
SS
2481 <varlistentry>
2482 <term><varname>FairQueueTrafficPolicingPacketLimit=</varname></term>
2483 <listitem>
2484 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
2485 dropped. Defaults to unset and kernel's default is used.</para>
2486 </listitem>
2487 </varlistentry>
2488
e83562e5
YW
2489 <varlistentry>
2490 <term><varname>FairQueueTrafficPolicingFlowLimit=</varname></term>
2491 <listitem>
2492 <para>Specifies the hard limit on the maximum number of packets queued per flow. Defaults to
2493 unset and kernel's default is used.</para>
2494 </listitem>
2495 </varlistentry>
2496
2497 <varlistentry>
2498 <term><varname>FairQueueTrafficPolicingQuantum=</varname></term>
2499 <listitem>
2500 <para>Specifies the credit per dequeue RR round, i.e. the amount of bytes a flow is allowed
2501 to dequeue at once. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
2502 Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and kernel's
2503 default is used.</para>
2504 </listitem>
2505 </varlistentry>
2506
2507 <varlistentry>
2508 <term><varname>FairQueueTrafficPolicingInitialQuantum=</varname></term>
2509 <listitem>
2510 <para>Specifies the initial sending rate credit, i.e. the amount of bytes a new flow is
2511 allowed to dequeue initially. When suffixed with K, M, or G, the specified size is parsed as
2512 Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and
2513 kernel's default is used.</para>
2514 </listitem>
2515 </varlistentry>
2516
2517 <varlistentry>
2518 <term><varname>FairQueueTrafficPolicingMaximumRate=</varname></term>
2519 <listitem>
2520 <para>Specifies the maximum sending rate of a flow. When suffixed with K, M, or G, the
6b8fe4c3 2521 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
e83562e5
YW
2522 1000. Defaults to unset and kernel's default is used.</para>
2523 </listitem>
2524 </varlistentry>
2525
2526 <varlistentry>
2527 <term><varname>FairQueueTrafficPolicingBuckets=</varname></term>
2528 <listitem>
2529 <para>Specifies the size of the hash table used for flow lookups. Defaults to unset and
2530 kernel's default is used.</para>
2531 </listitem>
2532 </varlistentry>
2533
2534 <varlistentry>
2535 <term><varname>FairQueueTrafficPolicingOrphanMask=</varname></term>
2536 <listitem>
2537 <para>Takes an unsigned integer. For packets not owned by a socket, fq is able to mask a part
2538 of hash and reduce number of buckets associated with the traffic. Defaults to unset and
2539 kernel's default is used.</para>
2540 </listitem>
2541 </varlistentry>
2542
2543 <varlistentry>
2544 <term><varname>FairQueueTrafficPolicingPacing=</varname></term>
2545 <listitem>
2546 <para>Takes a boolean, and enables or disables flow pacing. Defaults to unset and kernel's
2547 default is used.</para>
2548 </listitem>
2549 </varlistentry>
2550
2551 <varlistentry>
2552 <term><varname>FairQueueTrafficPolicingCEThresholdSec=</varname></term>
2553 <listitem>
2554 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
2555 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
2556 </listitem>
2557 </varlistentry>
2558
0f5bd7fe
SS
2559 </variablelist>
2560 </refsect1>
2561
13b498f9
TJ
2562 <refsect1>
2563 <title>[BridgeVLAN] Section Options</title>
2564 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
2565 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
2566 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
2567 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
2568
2569 <variablelist class='network-directives'>
2570 <varlistentry>
2571 <term><varname>VLAN=</varname></term>
2572 <listitem>
2573 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
2574 from 1 to 4094.</para>
2575 </listitem>
2576 </varlistentry>
2577 <varlistentry>
2578 <term><varname>EgressUntagged=</varname></term>
2579 <listitem>
2580 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
2581 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
2582 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
2583 </listitem>
2584 </varlistentry>
2585 <varlistentry>
2586 <term><varname>PVID=</varname></term>
2587 <listitem>
2588 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
2589 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
2590 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
2591 </listitem>
2592 </varlistentry>
2593 </variablelist>
2594 </refsect1>
798d3a52
ZJS
2595
2596 <refsect1>
9e35b3de 2597 <title>Examples</title>
798d3a52 2598 <example>
9e35b3de 2599 <title>Static network configuration</title>
798d3a52 2600
9e35b3de
ZJS
2601 <programlisting># /etc/systemd/network/50-static.network
2602[Match]
eac684ef
TG
2603Name=enp2s0
2604
2605[Network]
2606Address=192.168.0.15/24
2607Gateway=192.168.0.1</programlisting>
9e35b3de
ZJS
2608
2609 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
2610 specified gateway will be used for a default route.</para>
798d3a52 2611 </example>
eac684ef 2612
798d3a52 2613 <example>
9e35b3de 2614 <title>DHCP on ethernet links</title>
eac684ef 2615
9e35b3de
ZJS
2616 <programlisting># /etc/systemd/network/80-dhcp.network
2617[Match]
eac684ef
TG
2618Name=en*
2619
2620[Network]
9c8ca3f7 2621DHCP=yes</programlisting>
9e35b3de
ZJS
2622
2623 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
2624 <literal>en</literal> (i.e. ethernet interfaces).</para>
798d3a52 2625 </example>
eac684ef 2626
4c94a4c2 2627 <example>
2628 <title>IPv6 Prefix Delegation</title>
2629
2630 <programlisting># /etc/systemd/network/55-ipv6-pd-upstream.network
2631[Match]
2632Name=enp1s0
2633
2634[Network]
2635DHCP=ipv6</programlisting>
2636
2637 <programlisting># /etc/systemd/network/56-ipv6-pd-downstream.network
2638[Match]
2639Name=enp2s0
2640
2641[Network]
2642IPv6PrefixDelegation=dhcpv6</programlisting>
2643
2644 <para>This will enable IPv6 PD on the interface enp1s0 as an upstream interface where the
2645 DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.</para>
2646 </example>
2647
798d3a52 2648 <example>
9e35b3de 2649 <title>A bridge with two enslaved links</title>
f47c5c47 2650
9e35b3de
ZJS
2651 <programlisting># /etc/systemd/network/25-bridge-static.network
2652[Match]
f47c5c47 2653Name=bridge0
2654
2655[Network]
2656Address=192.168.0.15/24
2657Gateway=192.168.0.1
2658DNS=192.168.0.1</programlisting>
f47c5c47 2659
9e35b3de
ZJS
2660 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
2661[Match]
f47c5c47 2662Name=enp2s0
2663
2664[Network]
2665Bridge=bridge0</programlisting>
9e35b3de
ZJS
2666
2667 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
2668[Match]
2669Name=wlp3s0
2670
2671[Network]
2672Bridge=bridge0</programlisting>
2673
2674 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
2675 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
2676 and network assigned, and a default route via the specified gateway will be
2677 added. The specified DNS server will be added to the global list of DNS resolvers.
2678 </para>
13b498f9 2679 </example>
9e35b3de 2680
13b498f9 2681 <example>
9e35b3de 2682 <title></title>
13b498f9 2683
9e35b3de
ZJS
2684 <programlisting>
2685# /etc/systemd/network/20-bridge-slave-interface-vlan.network
2686[Match]
13b498f9
TJ
2687Name=enp2s0
2688
2689[Network]
2690Bridge=bridge0
2691
2692[BridgeVLAN]
2693VLAN=1-32
2694PVID=42
2695EgressUntagged=42
2696
2697[BridgeVLAN]
2698VLAN=100-200
2699
2700[BridgeVLAN]
2701EgressUntagged=300-400</programlisting>
0a8a0fad 2702
9e35b3de
ZJS
2703 <para>This overrides the configuration specified in the previous example for the
2704 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
2705 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
2706 untagged when they leave on this interface. Untagged packets which arrive on this
2707 interface will be assigned VLAN ID 42.</para>
798d3a52 2708 </example>
0a8a0fad 2709
798d3a52 2710 <example>
9e35b3de 2711 <title>Various tunnels</title>
0a8a0fad 2712
9e35b3de
ZJS
2713 <programlisting>/etc/systemd/network/25-tunnels.network
2714[Match]
2715Name=ens1
0a8a0fad
TG
2716
2717[Network]
9e35b3de
ZJS
2718Tunnel=ipip-tun
2719Tunnel=sit-tun
2720Tunnel=gre-tun
2721Tunnel=vti-tun
2722 </programlisting>
2723
2724 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
2725[NetDev]
2726Name=ipip-tun
2727Kind=ipip
2728 </programlisting>
2729
2730 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
2731[NetDev]
2732Name=sit-tun
2733Kind=sit
2734 </programlisting>
2735
2736 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
2737[NetDev]
2738Name=gre-tun
2739Kind=gre
2740 </programlisting>
2741
2742 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
2743[NetDev]
2744Name=vti-tun
2745Kind=vti
2746 </programlisting>
2747
2748 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
2749 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
798d3a52 2750 </example>
0a8a0fad 2751
798d3a52 2752 <example>
9e35b3de 2753 <title>A bond device</title>
0a8a0fad 2754
9e35b3de
ZJS
2755 <programlisting># /etc/systemd/network/30-bond1.network
2756[Match]
2757Name=bond1
0a8a0fad
TG
2758
2759[Network]
9e35b3de
ZJS
2760DHCP=ipv6
2761</programlisting>
0a8a0fad 2762
9e35b3de
ZJS
2763 <programlisting># /etc/systemd/network/30-bond1.netdev
2764[NetDev]
2765Name=bond1
2766Kind=bond
2767</programlisting>
0a8a0fad 2768
301a21a8 2769 <programlisting># /etc/systemd/network/30-bond1-dev1.network
9e35b3de
ZJS
2770[Match]
2771MACAddress=52:54:00:e9:64:41
0a8a0fad
TG
2772
2773[Network]
9e35b3de
ZJS
2774Bond=bond1
2775</programlisting>
d94facdc 2776
301a21a8 2777 <programlisting># /etc/systemd/network/30-bond1-dev2.network
9e35b3de
ZJS
2778[Match]
2779MACAddress=52:54:00:e9:64:42
d94facdc
MH
2780
2781[Network]
9e35b3de 2782Bond=bond1
6cb955c6 2783</programlisting>
9e35b3de
ZJS
2784
2785 <para>This will create a bond device <literal>bond1</literal> and enslave the two
2786 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
2787 will be used to acquire an address.</para>
6cb955c6
AR
2788 </example>
2789
2790 <example>
9e35b3de
ZJS
2791 <title>Virtual Routing and Forwarding (VRF)</title>
2792 <para>Add the <literal>bond1</literal> interface to the VRF master interface
2793 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
11d38b90
AR
2794 within the routing table defined during VRF creation. For kernels before 4.8 traffic
2795 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
2796 </para>
9e35b3de
ZJS
2797 <programlisting># /etc/systemd/network/25-vrf.network
2798[Match]
6cb955c6
AR
2799Name=bond1
2800
2801[Network]
9e35b3de 2802VRF=vrf1
d94facdc
MH
2803</programlisting>
2804 </example>
2805
42125eda
SS
2806 <example>
2807 <title>MacVTap</title>
2808 <para>This brings up a network interface <literal>macvtap-test</literal>
2809 and attaches it to <literal>enp0s25</literal>.</para>
83ddf5d3 2810 <programlisting># /usr/lib/systemd/network/25-macvtap.network
42125eda
SS
2811[Match]
2812Name=enp0s25
2813
2814[Network]
2815MACVTAP=macvtap-test
2816</programlisting>
2817 </example>
98d20a17 2818
2819 <example>
2820 <title>A Xfrm interface with physical underlying device.</title>
2821
2822 <programlisting># /etc/systemd/network/27-xfrm.netdev
2823[NetDev]
2824Name=xfrm0
2825
2826[Xfrm]
2827InterfaceId=7</programlisting>
2828
2829 <programlisting># /etc/systemd/network/27-eth0.network
2830[Match]
2831Name=eth0
2832
2833[Network]
2834Xfrm=xfrm0</programlisting>
2835
2836 <para>This creates a <literal>xfrm0</literal> interface and binds it to the <literal>eth0</literal> device.
2837 This allows hardware based ipsec offloading to the <literal>eth0</literal> nic.
2838 If offloading is not needed, xfrm interfaces can be assigned to the <literal>lo</literal> device.
2839 </para>
2840 </example>
798d3a52
ZJS
2841 </refsect1>
2842
2843 <refsect1>
2844 <title>See Also</title>
2845 <para>
2846 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
f41b446a 2847 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 2848 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
aaa297d4
LP
2849 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2850 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
2851 </para>
2852 </refsect1>
eac684ef
TG
2853
2854</refentry>