]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.network.xml
76a924cec73d2dc1facf55c037179d9955f29a5f
[thirdparty/systemd.git] / man / systemd.network.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="systemd.network" conditional='ENABLE_NETWORKD'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd.network</title>
11 <productname>systemd</productname>
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>A plain ini-style text file that encodes network configuration for matching network
32 interfaces, used by
33 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
34 See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
35 for a general description of the syntax.</para>
36
37 <para>The main network file must have the extension <filename>.network</filename>; other
38 extensions are ignored. Networks are applied to links whenever the links appear.</para>
39
40 <para>The <filename>.network</filename> files are read from the files located in the system network
41 directories <filename>/usr/lib/systemd/network</filename> and
42 <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
43 <filename>/run/systemd/network</filename> and the local administration network directory
44 <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
45 processed in alphanumeric order, regardless of the directories in which they live. However, files
46 with identical filenames replace each other. It is recommended that each filename is prefixed with
47 a number (e.g. <filename>10-eth0.network</filename>). Otherwise, the default
48 <filename>.network</filename> files or those generated by
49 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
50 may take precedence over user configured files. Files in <filename>/etc/</filename> have the highest
51 priority, files in <filename>/run/</filename> take precedence over files with the same name under
52 <filename>/usr/</filename>. This can be used to override a system-supplied configuration file with
53 a local file if needed. As a special case, an empty file (file size 0) or symlink with the same
54 name pointing to <filename>/dev/null</filename> disables the configuration file entirely (it is
55 "masked").</para>
56
57 <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory
58 <filename>foo.network.d/</filename> may exist. All files with the suffix
59 <literal>.conf</literal> from this directory will be merged in the alphanumeric order and parsed
60 after the main file itself has been parsed. This is useful to alter or add configuration settings,
61 without having to modify the main configuration file. Each drop-in file must have appropriate
62 section headers.</para>
63
64 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
65 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
66 <filename>/run/systemd/network</filename> directories. Drop-in files in
67 <filename>/etc/</filename> take precedence over those in <filename>/run/</filename> which in turn
68 take precedence over those in <filename>/usr/lib/</filename>. Drop-in files under any of these
69 directories take precedence over the main network file wherever located.</para>
70 </refsect1>
71
72 <refsect1>
73 <title>[Match] Section Options</title>
74
75 <para>The network file contains a [Match] section, which determines if a given network file may
76 be applied to a given interface; and a [Network] section specifying how the interface should be
77 configured. The first (in alphanumeric order) of the network files that matches a given interface
78 is applied, all later files are ignored, even if they match as well.</para>
79
80 <para>A network file is said to match a network interface if all matches specified by the [Match]
81 section are satisfied. When a network file does not contain valid settings in [Match] section, then
82 the file will match all interfaces and <command>systemd-networkd</command> warns about that. Hint:
83 to avoid the warning and to make it clear that all interfaces shall be matched, add the following:
84 <programlisting>Name=*</programlisting> The following keys are accepted:</para>
85
86 <variablelist class='network-directives'>
87 <xi:include href="systemd.link.xml" xpointer="mac-address" />
88 <xi:include href="systemd.link.xml" xpointer="permanent-mac-address" />
89 <xi:include href="systemd.link.xml" xpointer="path" />
90 <xi:include href="systemd.link.xml" xpointer="driver" />
91 <xi:include href="systemd.link.xml" xpointer="type" />
92 <xi:include href="systemd.link.xml" xpointer="kind" />
93 <xi:include href="systemd.link.xml" xpointer="property" />
94
95 <varlistentry>
96 <term><varname>Name=</varname></term>
97 <listitem>
98 <para>A whitespace-separated list of shell-style globs matching the device name, as exposed
99 by the udev property <literal>INTERFACE</literal>, or device's alternative names. If the
100 list is prefixed with a "!", the test is inverted.</para>
101 </listitem>
102 </varlistentry>
103
104 <varlistentry>
105 <term><varname>WLANInterfaceType=</varname></term>
106 <listitem>
107 <para>A whitespace-separated list of wireless network type. Supported values are
108 <literal>ad-hoc</literal>, <literal>station</literal>, <literal>ap</literal>,
109 <literal>ap-vlan</literal>, <literal>wds</literal>, <literal>monitor</literal>,
110 <literal>mesh-point</literal>, <literal>p2p-client</literal>, <literal>p2p-go</literal>,
111 <literal>p2p-device</literal>, <literal>ocb</literal>, and <literal>nan</literal>. If the
112 list is prefixed with a "!", the test is inverted. </para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term><varname>SSID=</varname></term>
118 <listitem>
119 <para>A whitespace-separated list of shell-style globs matching the SSID of the currently
120 connected wireless LAN. If the list is prefixed with a "!", the test is inverted.</para>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry>
125 <term><varname>BSSID=</varname></term>
126 <listitem>
127 <para>A whitespace-separated list of hardware address of the currently connected wireless
128 LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example in
129 <varname>MACAddress=</varname>. This option may appear more than once, in which case the
130 lists are merged. If the empty string is assigned to this option, the list is reset.</para>
131 </listitem>
132 </varlistentry>
133
134 <xi:include href="systemd.link.xml" xpointer="host" />
135 <xi:include href="systemd.link.xml" xpointer="virtualization" />
136 <xi:include href="systemd.link.xml" xpointer="kernel-command-line" />
137 <xi:include href="systemd.link.xml" xpointer="kernel-version" />
138 <xi:include href="systemd.link.xml" xpointer="credential" />
139 <xi:include href="systemd.link.xml" xpointer="architecture" />
140 <xi:include href="systemd.link.xml" xpointer="firmware" />
141 </variablelist>
142 </refsect1>
143
144 <refsect1>
145 <title>[Link] Section Options</title>
146
147 <para>The [Link] section accepts the following keys:</para>
148
149 <variablelist class='network-directives'>
150 <varlistentry>
151 <term><varname>MACAddress=</varname></term>
152 <listitem>
153 <para>The hardware address to set for the device.</para>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry>
158 <term><varname>MTUBytes=</varname></term>
159 <listitem>
160 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M,
161 G, are supported and are understood to the base of 1024.</para>
162 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen below 1280 (the
163 minimum MTU for IPv6) it will automatically be increased to this value.</para>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry>
168 <term><varname>ARP=</varname></term>
169 <listitem>
170 <para>Takes a boolean. If set to true, the ARP (low-level Address Resolution Protocol)
171 for this interface is enabled. When unset, the kernel's default will be used.</para>
172 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
173 interfaces atop a single lower-level physical interface, which will then only serve as a
174 link/"bridge" device aggregating traffic to the same physical link and not participate in
175 the network otherwise. Defaults to unset.</para>
176 </listitem>
177 </varlistentry>
178
179 <varlistentry>
180 <term><varname>Multicast=</varname></term>
181 <listitem>
182 <para>Takes a boolean. If set to true, the multicast flag on the device is enabled. Defaults
183 to unset.</para>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><varname>AllMulticast=</varname></term>
189 <listitem>
190 <para>Takes a boolean. If set to true, the driver retrieves all multicast packets from the
191 network. This happens when multicast routing is enabled. Defaults to unset.</para>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry>
196 <term><varname>Promiscuous=</varname></term>
197 <listitem>
198 <para>Takes a boolean. If set to true, promiscuous mode of the interface is enabled. Defaults
199 to unset.</para>
200 <para>If this is set to false for the underlying link of a <literal>passthru</literal> mode
201 MACVLAN/MACVTAP, the virtual interface will be created with the <literal>nopromisc</literal>
202 flag set.</para>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry>
207 <term><varname>Unmanaged=</varname></term>
208 <listitem>
209 <para>Takes a boolean. When <literal>yes</literal>, no attempts are made to bring up or
210 configure matching links, equivalent to when there are no matching network files. Defaults to
211 <literal>no</literal>.</para>
212 <para>This is useful for preventing later matching network files from interfering with
213 certain interfaces that are fully controlled by other applications.</para>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry>
218 <term><varname>Group=</varname></term>
219 <listitem>
220 <para>Link groups are similar to port ranges found in managed switches. When network
221 interfaces are added to a numbered group, operations on all the interfaces from that group
222 can be performed at once. Takes an unsigned integer in the range 02147483647. Defaults to
223 unset.</para>
224 </listitem>
225 </varlistentry>
226
227 <varlistentry>
228 <term><varname>RequiredForOnline=</varname></term>
229 <listitem>
230 <para>Takes a boolean or a minimum operational state and an optional maximum operational
231 state. Please see
232 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
233 for possible operational states. When <literal>yes</literal>, the network is deemed required
234 when determining whether the system is online (including when running
235 <command>systemd-networkd-wait-online</command>). When <literal>no</literal>, the network is
236 ignored when determining the online state. When a minimum operational state and an optional
237 maximum operational state are set, <literal>yes</literal> is implied, and this controls the
238 minimum and maximum operational state required for the network interface to be considered
239 online.</para>
240
241 <para>Defaults to <literal>yes</literal> when <varname>ActivationPolicy=</varname> is not
242 set, or set to <literal>up</literal>, <literal>always-up</literal>, or
243 <literal>bound</literal>. Defaults to <literal>no</literal> when
244 <varname>ActivationPolicy=</varname> is set to <literal>manual</literal> or
245 <literal>down</literal>. This is forced to <literal>no</literal> when
246 <varname>ActivationPolicy=</varname> is set to <literal>always-down</literal>.</para>
247
248 <para>The network will be brought up normally (as configured by
249 <varname>ActivationPolicy=</varname>), but in the event that there is no address being
250 assigned by DHCP or the cable is not plugged in, the link will simply remain offline and be
251 skipped automatically by <command>systemd-networkd-wait-online</command> if
252 <literal>RequiredForOnline=no</literal>.</para>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry>
257 <term><varname>RequiredFamilyForOnline=</varname></term>
258 <listitem>
259 <para>Takes an address family. When specified, an IP address in the given family is deemed
260 required when determining whether the link is online (including when running
261 <command>systemd-networkd-wait-online</command>). Takes one of <literal>ipv4</literal>,
262 <literal>ipv6</literal>, <literal>both</literal>, or <literal>any</literal>. Defaults to
263 <literal>any</literal>. Note that this option has no effect if
264 <literal>RequiredForOnline=no</literal>, or if <literal>RequiredForOnline=</literal>
265 specifies a minimum operational state below <literal>degraded</literal>.</para>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry>
270 <term><varname>ActivationPolicy=</varname></term>
271 <listitem>
272 <para>Specifies the policy for <command>systemd-networkd</command> managing the link
273 administrative state. Specifically, this controls how <command>systemd-networkd</command>
274 changes the network device's <literal>IFF_UP</literal> flag, which is sometimes
275 controlled by system administrators by running e.g.,
276 <command>ip link set dev eth0 up</command> or <command>ip link set dev eth0 down</command>,
277 and can also be changed with <command>networkctl up eth0</command> or
278 <command>networkctl down eth0</command>.</para>
279
280 <para>Takes one of <literal>up</literal>, <literal>always-up</literal>,
281 <literal>manual</literal>, <literal>always-down</literal>, <literal>down</literal>,
282 or <literal>bound</literal>. When <literal>manual</literal>,
283 <command>systemd-networkd</command> will not change the link's admin state automatically;
284 the system administrator must bring the interface up or down manually, as desired. When
285 <literal>up</literal> (the default) or <literal>always-up</literal>, or
286 <literal>down</literal> or <literal>always-down</literal>,
287 <command>systemd-networkd</command> will set the link up or down, respectively, when the
288 interface is (re)configured. When <literal>always-up</literal> or
289 <literal>always-down</literal>, <command>systemd-networkd</command> will set the link up or
290 down, respectively, any time <command>systemd-networkd</command> detects a change in the
291 administrative state. When <varname>BindCarrier=</varname> is also set, this is automatically
292 set to <literal>bound</literal> and any other value is ignored.</para>
293
294 <para>When the policy is set to <literal>down</literal> or <literal>manual</literal>, the
295 default value of <varname>RequiredForOnline=</varname> is <literal>no</literal>. When the
296 policy is set to <literal>always-down</literal>, the value of
297 <varname>RequiredForOnline=</varname> forced to <literal>no</literal>.</para>
298
299 <para>The administrative state is not the same as the carrier state, so using
300 <literal>always-up</literal> does not mean the link will never lose carrier. The link carrier
301 depends on both the administrative state as well as the network device's physical connection.
302 However, to avoid reconfiguration failures, when using <literal>always-up</literal>,
303 <varname>IgnoreCarrierLoss=</varname> is forced to true.</para>
304 </listitem>
305 </varlistentry>
306 </variablelist>
307 </refsect1>
308
309 <xi:include href="systemd.link.xml" xpointer="sr-iov" />
310
311 <refsect1>
312 <title>[Network] Section Options</title>
313
314 <para>The [Network] section accepts the following keys:</para>
315
316 <variablelist class='network-directives'>
317 <varlistentry>
318 <term><varname>Description=</varname></term>
319 <listitem>
320 <para>A description of the device. This is only used for presentation purposes.</para>
321 </listitem>
322 </varlistentry>
323
324 <varlistentry>
325 <term><varname>DHCP=</varname></term>
326 <listitem>
327 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts <literal>yes</literal>,
328 <literal>no</literal>, <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to
329 <literal>no</literal>.</para>
330
331 <para>Note that DHCPv6 will by default be triggered by Router Advertisements, if reception is
332 enabled, regardless of this parameter. By explicitly enabling DHCPv6 support here, the DHCPv6
333 client will be started in the mode specified by the <varname>WithoutRA=</varname> setting in the
334 [DHCPv6] section, regardless of the presence of routers on the link, or what flags the routers
335 pass. See <varname>IPv6AcceptRA=</varname>.</para>
336
337 <para>Furthermore, note that by default the domain name specified through DHCP is not used
338 for name resolution. See option <option>UseDomains=</option> below.</para>
339
340 <para>See the [DHCPv4] or [DHCPv6] sections below for further configuration options for the
341 DHCP client support.</para>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry>
346 <term><varname>DHCPServer=</varname></term>
347 <listitem>
348 <para>Takes a boolean. If set to <literal>yes</literal>, DHCPv4 server will be started.
349 Defaults to <literal>no</literal>. Further settings for the DHCP server may be set in the
350 [DHCPServer] section described below.</para>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry>
355 <term><varname>LinkLocalAddressing=</varname></term>
356 <listitem>
357 <para>Enables link-local address autoconfiguration. Accepts <option>yes</option>,
358 <option>no</option>, <option>ipv4</option>, and <option>ipv6</option>. An IPv6 link-local
359 address is configured when <option>yes</option> or <option>ipv6</option>. An IPv4 link-local
360 address is configured when <option>yes</option> or <option>ipv4</option> and when DHCPv4
361 autoconfiguration has been unsuccessful for some time. (IPv4 link-local address
362 autoconfiguration will usually happen in parallel with repeated attempts to acquire a DHCPv4
363 lease).</para>
364
365 <para>Defaults to <option>no</option> when <varname>KeepMaster=</varname> or
366 <varname>Bridge=</varname> is set or when the specified
367 <varname>MACVLAN=</varname>/<varname>MACVTAP=</varname> has <varname>Mode=passthru</varname>,
368 or <option>ipv6</option> otherwise.</para>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry>
373 <term><varname>IPv6LinkLocalAddressGenerationMode=</varname></term>
374 <listitem>
375 <para>Specifies how IPv6 link-local address is generated. Takes one of
376 <literal>eui64</literal>, <literal>none</literal>, <literal>stable-privacy</literal> and
377 <literal>random</literal>. When unset, <literal>stable-privacy</literal> is used if
378 <varname>IPv6StableSecretAddress=</varname> is specified, and if not,
379 <literal>eui64</literal> is used. Note that if <varname>LinkLocalAddressing=</varname> is
380 <literal>no</literal> or <literal>ipv4</literal>, then
381 <varname>IPv6LinkLocalAddressGenerationMode=</varname> will be ignored. Also, even if
382 <varname>LinkLocalAddressing=</varname> is <literal>yes</literal> or <literal>ipv6</literal>,
383 setting <varname>IPv6LinkLocalAddressGenerationMode=none</varname>
384 disables to configure an IPv6 link-local address.</para>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry>
389 <term><varname>IPv6StableSecretAddress=</varname></term>
390 <listitem>
391 <para>Takes an IPv6 address. The specified address will be used as a stable secret for
392 generating IPv6 link-local address. If this setting is specified, and
393 <varname>IPv6LinkLocalAddressGenerationMode=</varname> is unset, then
394 <varname>IPv6LinkLocalAddressGenerationMode=stable-privacy</varname> is implied.
395 If this setting is not specified, and <literal>stable-privacy</literal> is set to
396 <varname>IPv6LinkLocalAddressGenerationMode=</varname>,
397 then a stable secret address will be generated from the local machine ID and the interface
398 name.</para>
399 </listitem>
400 </varlistentry>
401
402 <varlistentry>
403 <term><varname>IPv4LLStartAddress=</varname></term>
404 <listitem>
405 <para>Specifies the first IPv4 link-local address to try. Takes an IPv4 address for example
406 169.254.1.2, from the link-local address range: 169.254.0.0/16 except for 169.254.0.0/24 and
407 169.254.255.0/24. This setting may be useful if the device should always have the same address
408 as long as there is no address conflict. When unset, a random address will be automatically
409 selected. Defaults to unset.</para>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry>
414 <term><varname>IPv4LLRoute=</varname></term>
415 <listitem>
416 <para>Takes a boolean. If set to true, sets up the route needed for non-IPv4LL hosts to
417 communicate with IPv4LL-only hosts. Defaults to false.</para>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry>
422 <term><varname>DefaultRouteOnDevice=</varname></term>
423 <listitem>
424 <para>Takes a boolean. If set to true, sets up the default route bound to the interface.
425 Defaults to false. This is useful when creating routes on point-to-point interfaces. This is
426 equivalent to e.g. the following,
427 <programlisting>ip route add default dev veth99</programlisting>
428 or,
429 <programlisting>[Route]
430 Gateway=0.0.0.0</programlisting></para>
431 <para>Currently, there are no way to specify e.g., the table for the route configured by this
432 setting. To configure the default route with such an additional property, please use the
433 following instead:
434 <programlisting>[Route]
435 Gateway=0.0.0.0
436 Table=1234</programlisting></para>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry>
441 <term><varname>LLMNR=</varname></term>
442 <listitem>
443 <para>Takes a boolean or <literal>resolve</literal>. When true, enables
444 <ulink url="https://tools.ietf.org/html/rfc4795">Link-Local Multicast Name Resolution</ulink>
445 on the link. When set to <literal>resolve</literal>, only resolution is enabled, but not host
446 registration and announcement. Defaults to true. This setting is read by
447 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
448 </para>
449 </listitem>
450 </varlistentry>
451
452 <varlistentry>
453 <term><varname>MulticastDNS=</varname></term>
454 <listitem>
455 <para>Takes a boolean or <literal>resolve</literal>. When true, enables
456 <ulink url="https://tools.ietf.org/html/rfc6762">Multicast DNS</ulink> support on the link.
457 When set to <literal>resolve</literal>, only resolution is enabled, but not host or service
458 registration and announcement. Defaults to false. This setting is read by
459 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
460 </para>
461 </listitem>
462 </varlistentry>
463
464 <varlistentry>
465 <term><varname>DNSOverTLS=</varname></term>
466 <listitem>
467 <para>Takes a boolean or <literal>opportunistic</literal>. When true, enables
468 <ulink url="https://tools.ietf.org/html/rfc7858">DNS-over-TLS</ulink> support on the link.
469 When set to <literal>opportunistic</literal>, compatibility with non-DNS-over-TLS servers is
470 increased, by automatically turning off DNS-over-TLS servers in this case. This option
471 defines a per-interface setting for
472 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
473 global <varname>DNSOverTLS=</varname> option. Defaults to unset, and the global setting will
474 be used. This setting is read by
475 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
476 </para>
477 </listitem>
478 </varlistentry>
479
480 <varlistentry>
481 <term><varname>DNSSEC=</varname></term>
482 <listitem>
483 <para>Takes a boolean or <literal>allow-downgrade</literal>. When true, enables
484 <ulink url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink> DNS validation support on the
485 link. When set to <literal>allow-downgrade</literal>, compatibility with non-DNSSEC capable
486 networks is increased, by automatically turning off DNSSEC in this case. This option defines
487 a per-interface setting for
488 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
489 global <varname>DNSSEC=</varname> option. Defaults to unset, and the global setting will be
490 used. This setting is read by
491 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
492 </para>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry>
497 <term><varname>DNSSECNegativeTrustAnchors=</varname></term>
498 <listitem>
499 <para>A space-separated list of DNSSEC negative trust anchor domains. If specified and DNSSEC
500 is enabled, look-ups done via the interface's DNS server will be subject to the list of
501 negative trust anchors, and not require authentication for the specified domains, or anything
502 below it. Use this to disable DNSSEC authentication for specific private domains, that cannot
503 be proven valid using the Internet DNS hierarchy. Defaults to the empty list. This setting is
504 read by
505 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
506 </para>
507 </listitem>
508 </varlistentry>
509
510 <varlistentry>
511 <term><varname>LLDP=</varname></term>
512 <listitem>
513 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol
514 commonly implemented on professional routers and bridges which announces which physical port
515 a system is connected to, as well as other related data. Accepts a boolean or the special
516 value <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a
517 database of all LLDP neighbors maintained. If <literal>routers-only</literal> is set only
518 LLDP data of various types of routers is collected and LLDP data about other types of devices
519 ignored (such as stations, telephones and others). If false, LLDP reception is disabled.
520 Defaults to <literal>routers-only</literal>. Use
521 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
522 to query the collected neighbor data. LLDP is only available on Ethernet links. See
523 <varname>EmitLLDP=</varname> below for enabling LLDP packet emission from the local system.
524 </para>
525 </listitem>
526 </varlistentry>
527
528 <varlistentry>
529 <term><varname>EmitLLDP=</varname></term>
530 <listitem>
531 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the
532 special values <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and
533 <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission.
534 If not false, a short LLDP packet with information about the local system is sent out in
535 regular intervals on the link. The LLDP packet will contain information about the local
536 hostname, the local machine ID (as stored in
537 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
538 and the local interface name, as well as the pretty hostname of the system (as set in
539 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
540 LLDP emission is only available on Ethernet links. Note that this setting passes data
541 suitable for identification of host to the network and should thus not be enabled on
542 untrusted networks, where such identification data should not be made available. Use this
543 option to permit other systems to identify on which interfaces they are connected to this
544 system. The three special values control propagation of the LLDP packets. The
545 <literal>nearest-bridge</literal> setting permits propagation only to the nearest connected
546 bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays,
547 but not any other bridges, and <literal>customer-bridge</literal> permits propagation until
548 a customer bridge is reached. For details about these concepts, see
549 <ulink url="https://standards.ieee.org/findstds/standard/802.1AB-2016.html">IEEE 802.1AB-2016</ulink>.
550 Note that configuring this setting to true is equivalent to
551 <literal>nearest-bridge</literal>, the recommended and most restricted level of propagation.
552 See <varname>LLDP=</varname> above for an option to enable LLDP reception.</para>
553 </listitem>
554 </varlistentry>
555
556 <varlistentry>
557 <term><varname>BindCarrier=</varname></term>
558 <listitem>
559 <para>A link name or a list of link names. When set, controls the behavior of the current
560 link. When all links in the list are in an operational down state, the current link is
561 brought down. When at least one link has carrier, the current interface is brought up.</para>
562
563 <para>This forces <varname>ActivationPolicy=</varname> to be set to <literal>bound</literal>.
564 </para>
565 </listitem>
566 </varlistentry>
567
568 <varlistentry>
569 <term><varname>Address=</varname></term>
570 <listitem>
571 <para>A static IPv4 or IPv6 address and its prefix length, separated by a
572 <literal>/</literal> character. Specify this key more than once to configure several
573 addresses. The format of the address must be as described in
574 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
575 This is a short-hand for an [Address] section only containing an Address key (see below).
576 This option may be specified more than once.</para>
577
578 <para>If the specified address is <literal>0.0.0.0</literal> (for IPv4) or
579 <literal>::</literal> (for IPv6), a new address range of the requested size is automatically
580 allocated from a system-wide pool of unused ranges. Note that the prefix length must be equal
581 or larger than 8 for IPv4, and 64 for IPv6. The allocated range is checked against all
582 current network interfaces and all known network configuration files to avoid address range
583 conflicts. The default system-wide pool consists of 192.168.0.0/16, 172.16.0.0/12 and
584 10.0.0.0/8 for IPv4, and fd00::/8 for IPv6. This functionality is useful to manage a large
585 number of dynamically created network interfaces with the same network configuration and
586 automatic address range assignment.</para>
587 </listitem>
588 </varlistentry>
589
590 <varlistentry>
591 <term><varname>Gateway=</varname></term>
592 <listitem>
593 <para>The gateway address, which must be in the format described in
594 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
595 This is a short-hand for a [Route] section only containing a <varname>Gateway=</varname> key.
596 This option may be specified more than once.</para>
597 </listitem>
598 </varlistentry>
599
600 <varlistentry>
601 <term><varname>DNS=</varname></term>
602 <listitem>
603 <para>A DNS server address, which must be in the format described in
604 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
605 This option may be specified more than once. Each address can optionally take a port number
606 separated with <literal>:</literal>, a network interface name or index separated with
607 <literal>%</literal>, and a Server Name Indication (SNI) separated with <literal>#</literal>.
608 When IPv6 address is specified with a port number, then the address must be in the square
609 brackets. That is, the acceptable full formats are
610 <literal>111.222.333.444:9953%ifname#example.com</literal> for IPv4 and
611 <literal>[1111:2222::3333]:9953%ifname#example.com</literal> for IPv6. If an empty string is
612 assigned, then the all previous assignments are cleared. This setting is read by
613 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
614 </para>
615 </listitem>
616 </varlistentry>
617
618 <varlistentry>
619 <term><varname>Domains=</varname></term>
620 <listitem>
621 <para>A whitespace-separated list of domains which should be resolved using the DNS servers
622 on this link. Each item in the list should be a domain name, optionally prefixed with a tilde
623 (<literal>~</literal>). The domains with the prefix are called "routing-only domains". The
624 domains without the prefix are called "search domains" and are first used as search suffixes
625 for extending single-label hostnames (hostnames containing no dots) to become fully qualified
626 domain names (FQDNs). If a single-label hostname is resolved on this interface, each of the
627 specified search domains are appended to it in turn, converting it into a fully qualified
628 domain name, until one of them may be successfully resolved.</para>
629
630 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups
631 for hostnames ending in those domains (hence also single label names, if any "search domains"
632 are listed), are routed to the DNS servers configured for this interface. The domain routing
633 logic is particularly useful on multi-homed hosts with DNS servers serving particular private
634 DNS zones on each interface.</para>
635
636 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a
637 routing domain, the dot referring to the DNS root domain which is the implied suffix of all
638 valid DNS names) has special effect. It causes all DNS traffic which does not match another
639 configured domain routing entry to be routed to DNS servers specified for this interface.
640 This setting is useful to prefer a certain set of DNS servers if a link on which they are
641 connected is available.</para>
642
643 <para>This setting is read by
644 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
645 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname>
646 entries in
647 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
648 Domain name routing has no equivalent in the traditional glibc API, which has no concept of
649 domain name servers limited to a specific link.</para>
650 </listitem>
651 </varlistentry>
652
653 <varlistentry>
654 <term><varname>DNSDefaultRoute=</varname></term>
655 <listitem>
656 <para>Takes a boolean argument. If true, this link's configured DNS servers are used for
657 resolving domain names that do not match any link's configured <varname>Domains=</varname>
658 setting. If false, this link's configured DNS servers are never used for such domains, and
659 are exclusively used for resolving names that match at least one of the domains configured on
660 this link. If not specified defaults to an automatic mode: queries not matching any link's
661 configured domains will be routed to this link if it has no routing-only domains configured.
662 </para>
663 </listitem>
664 </varlistentry>
665
666 <varlistentry>
667 <term><varname>NTP=</varname></term>
668 <listitem>
669 <para>An NTP server address (either an IP address, or a hostname). This option may be
670 specified more than once. This setting is read by
671 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
672 </para>
673 </listitem>
674 </varlistentry>
675
676 <varlistentry>
677 <term><varname>IPForward=</varname></term>
678 <listitem>
679 <para>Configures IP packet forwarding for the system. If enabled, incoming packets on any
680 network interface will be forwarded to any other interfaces according to the routing table.
681 Takes a boolean, or the values <literal>ipv4</literal> or <literal>ipv6</literal>, which only
682 enable IP packet forwarding for the specified address family. This controls the
683 <filename>net.ipv4.ip_forward</filename> and <filename>net.ipv6.conf.all.forwarding</filename>
684 sysctl options of the network interface (see
685 <ulink url="https://docs.kernel.org/networking/ip-sysctl.html">IP Sysctl</ulink>
686 for details about sysctl options). Defaults to <literal>no</literal>.</para>
687
688 <para>Note: this setting controls a global kernel option, and does so one way only: if a
689 network that has this setting enabled is set up the global setting is turned on. However,
690 it is never turned off again, even after all networks with this setting enabled are shut
691 down again.</para>
692
693 <para>To allow IP packet forwarding only between specific network interfaces use a firewall.
694 </para>
695 </listitem>
696 </varlistentry>
697
698 <varlistentry>
699 <term><varname>IPMasquerade=</varname></term>
700 <listitem>
701 <para>Configures IP masquerading for the network interface. If enabled, packets forwarded
702 from the network interface will be appear as coming from the local host. Takes one of
703 <literal>ipv4</literal>, <literal>ipv6</literal>, <literal>both</literal>, or
704 <literal>no</literal>. Defaults to <literal>no</literal>. If enabled, this automatically sets
705 <varname>IPForward=</varname> to one of <literal>ipv4</literal>, <literal>ipv6</literal> or
706 <literal>yes</literal>.</para>
707 <para>Note. Any positive boolean values such as <literal>yes</literal> or
708 <literal>true</literal> are now deprecated. Please use one of the values in the above.</para>
709 </listitem>
710 </varlistentry>
711
712 <varlistentry>
713 <term><varname>IPv6PrivacyExtensions=</varname></term>
714 <listitem>
715 <para>Configures use of stateless temporary addresses that change over time (see
716 <ulink url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
717 Privacy Extensions for Stateless Address Autoconfiguration in IPv6). Takes a boolean or the
718 special values <literal>prefer-public</literal> and <literal>kernel</literal>. When true,
719 enables the privacy extensions and prefers temporary addresses over public addresses. When
720 <literal>prefer-public</literal>, enables the privacy extensions, but prefers public
721 addresses over temporary addresses. When false, the privacy extensions remain disabled. When
722 <literal>kernel</literal>, the kernel's default setting will be left in place. Defaults to
723 <literal>no</literal>.</para>
724 </listitem>
725 </varlistentry>
726
727 <varlistentry>
728 <term><varname>IPv6AcceptRA=</varname></term>
729 <listitem>
730 <para>Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support for the
731 interface. If true, RAs are accepted; if false, RAs are ignored. When RAs are accepted, they
732 may trigger the start of the DHCPv6 client if the relevant flags are set in the RA data, or
733 if no routers are found on the link. The default is to disable RA reception for bridge
734 devices or when IP forwarding is enabled, and to enable it otherwise. Cannot be enabled on
735 bond devices and when link-local addressing is disabled.</para>
736
737 <para>Further settings for the IPv6 RA support may be configured in the [IPv6AcceptRA]
738 section, see below.</para>
739
740 <para>Also see
741 <ulink url="https://docs.kernel.org/networking/ip-sysctl.html">IP Sysctl</ulink>
742 in the kernel documentation regarding <literal>accept_ra</literal>, but note that systemd's
743 setting of <constant>1</constant> (i.e. true) corresponds to kernel's setting of
744 <constant>2</constant>.</para>
745
746 <para>Note that kernel's implementation of the IPv6 RA protocol is always disabled,
747 regardless of this setting. If this option is enabled, a userspace implementation of the IPv6
748 RA protocol is used, and the kernel's own implementation remains disabled, since
749 <command>systemd-networkd</command> needs to know all details supplied in the advertisements,
750 and these are not available from the kernel if the kernel's own implementation is used.
751 </para>
752 </listitem>
753 </varlistentry>
754
755 <varlistentry>
756 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
757 <listitem>
758 <para>Configures the amount of IPv6 Duplicate Address Detection (DAD) probes to send. When
759 unset, the kernel's default will be used.</para>
760 </listitem>
761 </varlistentry>
762
763 <varlistentry>
764 <term><varname>IPv6HopLimit=</varname></term>
765 <listitem>
766 <para>Configures IPv6 Hop Limit. For each router that forwards the packet, the hop limit is
767 decremented by 1. When the hop limit field reaches zero, the packet is discarded. When unset,
768 the kernel's default will be used.</para>
769 </listitem>
770 </varlistentry>
771
772 <varlistentry>
773 <term><varname>IPv4AcceptLocal=</varname></term>
774 <listitem>
775 <para>Takes a boolean. Accept packets with local source addresses. In combination with
776 suitable routing, this can be used to direct packets between two local interfaces over the
777 wire and have them accepted properly. When unset, the kernel's default will be used.</para>
778 </listitem>
779 </varlistentry>
780
781 <varlistentry>
782 <term><varname>IPv4RouteLocalnet=</varname></term>
783 <listitem>
784 <para>Takes a boolean. When true, the kernel does not consider loopback addresses as martian
785 source or destination while routing. This enables the use of 127.0.0.0/8 for local routing
786 purposes. When unset, the kernel's default will be used.</para>
787 </listitem>
788 </varlistentry>
789
790 <varlistentry>
791 <term><varname>IPv4ProxyARP=</varname></term>
792 <listitem>
793 <para>Takes a boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one
794 host, usually a router, answers ARP requests intended for another machine. By "faking" its
795 identity, the router accepts responsibility for routing packets to the "real" destination.
796 See <ulink url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>. When unset, the
797 kernel's default will be used.</para>
798 </listitem>
799 </varlistentry>
800
801 <varlistentry>
802 <term><varname>IPv6ProxyNDP=</varname></term>
803 <listitem>
804 <para>Takes a boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery Protocol)
805 is a technique for IPv6 to allow routing of addresses to a different destination when peers
806 expect them to be present on a certain physical link. In this case a router answers Neighbour
807 Advertisement messages intended for another machine by offering its own MAC address as
808 destination. Unlike proxy ARP for IPv4, it is not enabled globally, but will only send
809 Neighbour Advertisement messages for addresses in the IPv6 neighbor proxy table, which can
810 also be shown by <command>ip -6 neighbour show proxy</command>. systemd-networkd will control
811 the per-interface `proxy_ndp` switch for each configured interface depending on this option.
812 When unset, the kernel's default will be used.</para>
813 </listitem>
814 </varlistentry>
815
816 <varlistentry>
817 <term><varname>IPv6ProxyNDPAddress=</varname></term>
818 <listitem>
819 <para>An IPv6 address, for which Neighbour Advertisement messages will be proxied. This
820 option may be specified more than once. systemd-networkd will add the
821 <varname>IPv6ProxyNDPAddress=</varname> entries to the kernel's IPv6 neighbor proxy table.
822 This setting implies <varname>IPv6ProxyNDP=yes</varname> but has no effect if
823 <varname>IPv6ProxyNDP=</varname> has been set to false. When unset, the kernel's default will
824 be used.</para>
825 </listitem>
826 </varlistentry>
827
828 <varlistentry>
829 <term><varname>IPv6SendRA=</varname></term>
830 <listitem>
831 <para>Whether to enable or disable Router Advertisement sending on a link. Takes a boolean
832 value. When enabled, prefixes configured in [IPv6Prefix] sections and routes configured in
833 the [IPv6RoutePrefix] sections are distributed as defined in the [IPv6SendRA] section. If
834 <varname>DHCPPrefixDelegation=</varname> is enabled, then the delegated prefixes are also
835 distributed. See <varname>DCHPPrefixDelegation=</varname> setting and the [IPv6SendRA],
836 [IPv6Prefix], [IPv6RoutePrefix], and [DHCPPrefixDelegation] sections for more configuration
837 options.</para>
838 </listitem>
839 </varlistentry>
840
841 <varlistentry>
842 <term><varname>DHCPPrefixDelegation=</varname></term>
843 <listitem>
844 <para>Takes a boolean value. When enabled, requests subnet prefixes on another link via the DHCPv6
845 protocol or via the 6RD option in the DHCPv4 protocol. An address within each delegated prefix will
846 be assigned, and the prefixes will be announced through IPv6 Router Advertisement if
847 <varname>IPv6SendRA=</varname> is enabled. This behaviour can be configured in the
848 [DHCPPrefixDelegation] section. Defaults to disabled.</para>
849 </listitem>
850 </varlistentry>
851
852 <varlistentry>
853 <term><varname>IPv6MTUBytes=</varname></term>
854 <listitem>
855 <para>Configures IPv6 maximum transmission unit (MTU). An integer greater than or equal to
856 1280 bytes. When unset, the kernel's default will be used.</para>
857 </listitem>
858 </varlistentry>
859
860 <varlistentry>
861 <term><varname>KeepMaster=</varname></term>
862 <listitem>
863 <para>Takes a boolean value. When enabled, the current master interface index will not be
864 changed, and <varname>BatmanAdvanced=</varname>, <varname>Bond=</varname>,
865 <varname>Bridge=</varname>, and <varname>VRF=</varname> settings are ignored. This may be
866 useful when a netdev with a master interface is created by another program, e.g.
867 <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
868 Defaults to false.</para>
869 </listitem>
870 </varlistentry>
871
872 <varlistentry>
873 <term><varname>BatmanAdvanced=</varname></term>
874 <term><varname>Bond=</varname></term>
875 <term><varname>Bridge=</varname></term>
876 <term><varname>VRF=</varname></term>
877 <listitem>
878 <para>The name of the B.A.T.M.A.N. Advanced, bond, bridge, or VRF interface to add the link
879 to. See
880 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
881 </para>
882 </listitem>
883 </varlistentry>
884
885 <varlistentry>
886 <term><varname>IPoIB=</varname></term>
887 <term><varname>IPVLAN=</varname></term>
888 <term><varname>IPVTAP=</varname></term>
889 <term><varname>MACsec=</varname></term>
890 <term><varname>MACVLAN=</varname></term>
891 <term><varname>MACVTAP=</varname></term>
892 <term><varname>Tunnel=</varname></term>
893 <term><varname>VLAN=</varname></term>
894 <term><varname>VXLAN=</varname></term>
895 <term><varname>Xfrm=</varname></term>
896 <listitem>
897 <para>The name of an IPoIB, IPVLAN, IPVTAP, MACsec, MACVLAN, MACVTAP, tunnel, VLAN,
898 VXLAN, or Xfrm to be created on the link. See
899 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
900 This option may be specified more than once.</para>
901 </listitem>
902 </varlistentry>
903
904 <varlistentry>
905 <term><varname>ActiveSlave=</varname></term>
906 <listitem>
907 <para>Takes a boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal>
908 option is only valid for following modes: <literal>active-backup</literal>,
909 <literal>balance-alb</literal>, and <literal>balance-tlb</literal>. Defaults to false.</para>
910 </listitem>
911 </varlistentry>
912
913 <varlistentry>
914 <term><varname>PrimarySlave=</varname></term>
915 <listitem>
916 <para>Takes a boolean. Specifies which slave is the primary device. The specified device will
917 always be the active slave while it is available. Only when the primary is off-line will
918 alternate devices be used. This is useful when one slave is preferred over another, e.g.
919 when one slave has higher throughput than another. The <literal>PrimarySlave=</literal>
920 option is only valid for following modes: <literal>active-backup</literal>,
921 <literal>balance-alb</literal>, and <literal>balance-tlb</literal>. Defaults to false.</para>
922 </listitem>
923 </varlistentry>
924
925 <varlistentry>
926 <term><varname>ConfigureWithoutCarrier=</varname></term>
927 <listitem>
928 <para>Takes a boolean. Allows networkd to configure a specific link even if it has no
929 carrier. Defaults to false. If enabled, and the <varname>IgnoreCarrierLoss=</varname> setting
930 is not explicitly set, then it is enabled as well.</para>
931 </listitem>
932 </varlistentry>
933
934 <varlistentry>
935 <term><varname>IgnoreCarrierLoss=</varname></term>
936 <listitem>
937 <para>Takes a boolean or a timespan. When true, <command>systemd-networkd</command> retains
938 both the static and dynamic configuration of the interface even if its carrier is lost. When
939 false, <command>systemd-networkd</command> drops both the static and dynamic configuration of
940 the interface. When a timespan is specified, <command>systemd-networkd</command> waits for
941 the specified timespan, and ignores the carrier loss if the link regain its carrier within
942 the timespan. Setting 0 seconds is equivalent to <literal>no</literal>, and
943 <literal>infinite</literal> is equivalent to <literal>yes</literal>.</para>
944
945 <para>Setting a finite timespan may be useful when e.g. in the following cases:
946 <itemizedlist>
947 <listitem>
948 <para>A wireless interface connecting to a network which has multiple access points with
949 the same SSID.</para>
950 </listitem>
951 <listitem>
952 <para>Enslaving a wireless interface to a bond interface, which may disconnect from the
953 connected access point and causes its carrier to be lost.</para>
954 </listitem>
955 <listitem>
956 <para>The driver of the interface resets when the MTU is changed.</para>
957 </listitem>
958 </itemizedlist>
959 </para>
960
961 <para>When <varname>Bond=</varname> is specified to a wireless interface, defaults to 3
962 seconds. When the DHCPv4 client is enabled and <varname>UseMTU=</varname> in the [DHCPv4]
963 section enabled, defaults to 5 seconds. Otherwise, defaults to the value specified with
964 <varname>ConfigureWithoutCarrier=</varname>. When <varname>ActivationPolicy=</varname> is set
965 to <literal>always-up</literal>, this is forced to <literal>yes</literal>, and ignored any
966 user specified values.</para>
967 </listitem>
968 </varlistentry>
969
970 <varlistentry>
971 <term><varname>KeepConfiguration=</varname></term>
972 <listitem>
973 <para>Takes a boolean or one of <literal>static</literal>, <literal>dhcp-on-stop</literal>,
974 <literal>dhcp</literal>. When <literal>static</literal>, <command>systemd-networkd</command>
975 will not drop static addresses and routes on starting up process. When set to
976 <literal>dhcp-on-stop</literal>, <command>systemd-networkd</command> will not drop addresses
977 and routes on stopping the daemon. When <literal>dhcp</literal>,
978 the addresses and routes provided by a DHCP server will never be dropped even if the DHCP
979 lease expires. This is contrary to the DHCP specification, but may be the best choice if,
980 e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal>
981 implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies
982 <literal>dhcp</literal> and <literal>static</literal>. Defaults to
983 <literal>dhcp-on-stop</literal> when <command>systemd-networkd</command> is running in
984 initrd, <literal>yes</literal> when the root filesystem is a network filesystem, and
985 <literal>no</literal> otherwise.</para>
986 </listitem>
987 </varlistentry>
988 </variablelist>
989 </refsect1>
990
991 <refsect1>
992 <title>[Address] Section Options</title>
993
994 <para>An [Address] section accepts the following keys. Specify several [Address] sections to
995 configure several addresses.</para>
996
997 <variablelist class='network-directives'>
998 <varlistentry>
999 <term><varname>Address=</varname></term>
1000 <listitem>
1001 <para>As in the [Network] section. This setting is mandatory. Each [Address] section can
1002 contain one <varname>Address=</varname> setting.</para>
1003 </listitem>
1004 </varlistentry>
1005
1006 <varlistentry>
1007 <term><varname>Peer=</varname></term>
1008 <listitem>
1009 <para>The peer address in a point-to-point connection. Accepts the same format as the
1010 <varname>Address=</varname> setting.</para>
1011 </listitem>
1012 </varlistentry>
1013
1014 <varlistentry>
1015 <term><varname>Broadcast=</varname></term>
1016 <listitem>
1017 <para>Takes an IPv4 address or boolean value. The address must be in the format described in
1018 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
1019 If set to true, then the IPv4 broadcast address will be derived from the
1020 <varname>Address=</varname> setting. If set to false, then the broadcast address will not be
1021 set. Defaults to true, except for wireguard interfaces, where it default to false.</para>
1022 </listitem>
1023 </varlistentry>
1024
1025 <varlistentry>
1026 <term><varname>Label=</varname></term>
1027 <listitem>
1028 <para>Specifies the label for the IPv4 address. The label must be a 7-bit ASCII string with
1029 a length of 115 characters. Defaults to unset.</para>
1030 </listitem>
1031 </varlistentry>
1032
1033 <varlistentry>
1034 <term><varname>PreferredLifetime=</varname></term>
1035 <listitem>
1036 <para>Allows the default "preferred lifetime" of the address to be overridden. Only three
1037 settings are accepted: <literal>forever</literal>, <literal>infinity</literal>, which is the
1038 default and means that the address never expires, and <literal>0</literal>, which means that
1039 the address is considered immediately "expired" and will not be used, unless explicitly
1040 requested. A setting of <option>PreferredLifetime=0</option> is useful for addresses which
1041 are added to be used only by a specific application, which is then configured to use them
1042 explicitly.</para>
1043 </listitem>
1044 </varlistentry>
1045
1046 <varlistentry>
1047 <term><varname>Scope=</varname></term>
1048 <listitem>
1049 <para>The scope of the address, which can be <literal>global</literal> (valid everywhere on
1050 the network, even through a gateway), <literal>link</literal> (only valid on this device,
1051 will not traverse a gateway) or <literal>host</literal> (only valid within the device itself,
1052 e.g. 127.0.0.1) or an integer in the range 0255. Defaults to <literal>global</literal>.
1053 </para>
1054 </listitem>
1055 </varlistentry>
1056
1057 <varlistentry>
1058 <term><varname>RouteMetric=</varname></term>
1059 <listitem>
1060 <para>The metric of the prefix route, which is pointing to the subnet of the configured IP
1061 address, taking the configured prefix length into account. Takes an unsigned integer in the
1062 range 04294967295. When unset or set to 0, the kernel's default value is used. This
1063 setting will be ignored when <varname>AddPrefixRoute=</varname> is false.</para>
1064 </listitem>
1065 </varlistentry>
1066
1067 <varlistentry>
1068 <term><varname>HomeAddress=</varname></term>
1069 <listitem>
1070 <para>Takes a boolean. Designates this address the "home address" as defined in
1071 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>. Supported only on IPv6.
1072 Defaults to false.</para>
1073 </listitem>
1074 </varlistentry>
1075
1076 <varlistentry>
1077 <term><varname>DuplicateAddressDetection=</varname></term>
1078 <listitem>
1079 <para>Takes one of <literal>ipv4</literal>, <literal>ipv6</literal>, <literal>both</literal>,
1080 or <literal>none</literal>. When <literal>ipv4</literal>, performs IPv4 Address Conflict
1081 Detection. See <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5227</ulink>.
1082 When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See
1083 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>. Defaults to
1084 <literal>ipv4</literal> for IPv4 link-local addresses, <literal>ipv6</literal> for IPv6
1085 addresses, and <literal>none</literal> otherwise.</para>
1086 </listitem>
1087 </varlistentry>
1088
1089 <varlistentry>
1090 <term><varname>ManageTemporaryAddress=</varname></term>
1091 <listitem>
1092 <para>Takes a boolean. If true the kernel manage temporary addresses created from this one as
1093 template on behalf of Privacy Extensions
1094 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become active,
1095 the use_tempaddr sysctl setting has to be set to a value greater than zero. The given address
1096 needs to have a prefix length of 64. This flag allows using privacy extensions in a manually
1097 configured network, just like if stateless auto-configuration was active. Defaults to false.
1098 </para>
1099 </listitem>
1100 </varlistentry>
1101
1102 <varlistentry>
1103 <term><varname>AddPrefixRoute=</varname></term>
1104 <listitem>
1105 <para>Takes a boolean. When true, the prefix route for the address is automatically added.
1106 Defaults to true.</para>
1107 </listitem>
1108 </varlistentry>
1109
1110 <varlistentry>
1111 <term><varname>AutoJoin=</varname></term>
1112 <listitem>
1113 <para>Takes a boolean. Joining multicast group on ethernet level via
1114 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
1115 IGMP snooping since the switch would not replicate multicast packets on ports that did not
1116 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
1117 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
1118 that enables them to do the required join. By extending <command>ip address</command> command
1119 with option <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS)
1120 vxlan interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
1121 Defaults to <literal>no</literal>.</para>
1122 </listitem>
1123 </varlistentry>
1124 </variablelist>
1125 </refsect1>
1126
1127 <refsect1>
1128 <title>[Neighbor] Section Options</title>
1129
1130 <para>A [Neighbor] section accepts the following keys. The neighbor section adds a permanent,
1131 static entry to the neighbor table (IPv6) or ARP table (IPv4) for the given hardware address on the
1132 links matched for the network. Specify several [Neighbor] sections to configure several static
1133 neighbors.</para>
1134
1135 <variablelist class='network-directives'>
1136 <varlistentry>
1137 <term><varname>Address=</varname></term>
1138 <listitem>
1139 <para>The IP address of the neighbor.</para>
1140 </listitem>
1141 </varlistentry>
1142
1143 <varlistentry>
1144 <term><varname>LinkLayerAddress=</varname></term>
1145 <listitem>
1146 <para>The link layer address (MAC address or IP address) of the neighbor.</para>
1147 </listitem>
1148 </varlistentry>
1149 </variablelist>
1150 </refsect1>
1151
1152 <refsect1>
1153 <title>[IPv6AddressLabel] Section Options</title>
1154
1155 <para>An [IPv6AddressLabel] section accepts the following keys. Specify several [IPv6AddressLabel]
1156 sections to configure several address labels. IPv6 address labels are used for address selection.
1157 See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. Precedence is managed by
1158 userspace, and only the label itself is stored in the kernel.</para>
1159
1160 <variablelist class='network-directives'>
1161 <varlistentry>
1162 <term><varname>Label=</varname></term>
1163 <listitem>
1164 <para>The label for the prefix, an unsigned integer in the range 04294967294. 0xffffffff is
1165 reserved. This setting is mandatory.</para>
1166 </listitem>
1167 </varlistentry>
1168
1169 <varlistentry>
1170 <term><varname>Prefix=</varname></term>
1171 <listitem>
1172 <para>IPv6 prefix is an address with a prefix length, separated by a slash
1173 <literal>/</literal> character. This setting is mandatory. </para>
1174 </listitem>
1175 </varlistentry>
1176 </variablelist>
1177 </refsect1>
1178
1179 <refsect1>
1180 <title>[RoutingPolicyRule] Section Options</title>
1181
1182 <para>An [RoutingPolicyRule] section accepts the following settings. Specify several
1183 [RoutingPolicyRule] sections to configure several rules.</para>
1184
1185 <variablelist class='network-directives'>
1186 <varlistentry>
1187 <term><varname>TypeOfService=</varname></term>
1188 <listitem>
1189 <para>Takes a number between 0 and 255 that specifies the type of service to match.</para>
1190 </listitem>
1191 </varlistentry>
1192
1193 <varlistentry>
1194 <term><varname>From=</varname></term>
1195 <listitem>
1196 <para>Specifies the source address prefix to match. Possibly followed by a slash and the
1197 prefix length.</para>
1198 </listitem>
1199 </varlistentry>
1200
1201 <varlistentry>
1202 <term><varname>To=</varname></term>
1203 <listitem>
1204 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the
1205 prefix length.</para>
1206 </listitem>
1207 </varlistentry>
1208
1209 <varlistentry>
1210 <term><varname>FirewallMark=</varname></term>
1211 <listitem>
1212 <para>Specifies the iptables firewall mark value to match (a number in the range
1213 14294967295). Optionally, the firewall mask (also a number between 14294967295) can be
1214 suffixed with a slash (<literal>/</literal>), e.g., <literal>7/255</literal>.</para>
1215 </listitem>
1216 </varlistentry>
1217
1218 <varlistentry>
1219 <term><varname>Table=</varname></term>
1220 <listitem>
1221 <para>Specifies the routing table identifier to lookup if the rule selector matches. Takes
1222 one of predefined names <literal>default</literal>, <literal>main</literal>, and
1223 <literal>local</literal>, and names defined in <varname>RouteTable=</varname> in
1224 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1225 or a number between 1 and 4294967295. Defaults to <literal>main</literal>.</para>
1226 </listitem>
1227 </varlistentry>
1228
1229 <varlistentry>
1230 <term><varname>Priority=</varname></term>
1231 <listitem>
1232 <para>Specifies the priority of this rule. <varname>Priority=</varname> is an integer in the
1233 range 04294967295. Higher number means lower priority, and rules get processed in order of
1234 increasing number. Defaults to unset, and the kernel will pick a value dynamically.</para>
1235 </listitem>
1236 </varlistentry>
1237
1238 <varlistentry>
1239 <term><varname>IncomingInterface=</varname></term>
1240 <listitem>
1241 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches
1242 packets originating from this host.</para>
1243 </listitem>
1244 </varlistentry>
1245
1246 <varlistentry>
1247 <term><varname>OutgoingInterface=</varname></term>
1248 <listitem>
1249 <para>Specifies the outgoing device to match. The outgoing interface is only available for
1250 packets originating from local sockets that are bound to a device.</para>
1251 </listitem>
1252 </varlistentry>
1253
1254 <varlistentry>
1255 <term><varname>SourcePort=</varname></term>
1256 <listitem>
1257 <para>Specifies the source IP port or IP port range match in forwarding information base
1258 (FIB) rules. A port range is specified by the lower and upper port separated by a dash.
1259 Defaults to unset.</para>
1260 </listitem>
1261 </varlistentry>
1262
1263 <varlistentry>
1264 <term><varname>DestinationPort=</varname></term>
1265 <listitem>
1266 <para>Specifies the destination IP port or IP port range match in forwarding information base
1267 (FIB) rules. A port range is specified by the lower and upper port separated by a dash.
1268 Defaults to unset.</para>
1269 </listitem>
1270 </varlistentry>
1271
1272 <varlistentry>
1273 <term><varname>IPProtocol=</varname></term>
1274 <listitem>
1275 <para>Specifies the IP protocol to match in forwarding information base (FIB) rules. Takes IP
1276 protocol name such as <literal>tcp</literal>, <literal>udp</literal> or
1277 <literal>sctp</literal>, or IP protocol number such as <literal>6</literal> for
1278 <literal>tcp</literal> or <literal>17</literal> for <literal>udp</literal>. Defaults to unset.
1279 </para>
1280 </listitem>
1281 </varlistentry>
1282
1283 <varlistentry>
1284 <term><varname>InvertRule=</varname></term>
1285 <listitem>
1286 <para>A boolean. Specifies whether the rule is to be inverted. Defaults to false.</para>
1287 </listitem>
1288 </varlistentry>
1289
1290 <varlistentry>
1291 <term><varname>Family=</varname></term>
1292 <listitem>
1293 <para>Takes a special value <literal>ipv4</literal>, <literal>ipv6</literal>, or
1294 <literal>both</literal>. By default, the address family is determined by the address
1295 specified in <varname>To=</varname> or <varname>From=</varname>. If neither
1296 <varname>To=</varname> nor <varname>From=</varname> are specified, then defaults to
1297 <literal>ipv4</literal>.</para>
1298 </listitem>
1299 </varlistentry>
1300
1301 <varlistentry>
1302 <term><varname>User=</varname></term>
1303 <listitem>
1304 <para>Takes a username, a user ID, or a range of user IDs separated by a dash. Defaults to
1305 unset.</para>
1306 </listitem>
1307 </varlistentry>
1308
1309 <varlistentry>
1310 <term><varname>SuppressPrefixLength=</varname></term>
1311 <listitem>
1312 <para>Takes a number <replaceable>N</replaceable> in the range 0128 and rejects routing
1313 decisions that have a prefix length of <replaceable>N</replaceable> or less. Defaults to
1314 unset.</para>
1315 </listitem>
1316 </varlistentry>
1317
1318 <varlistentry>
1319 <term><varname>SuppressInterfaceGroup=</varname></term>
1320 <listitem>
1321 <para>Takes an integer in the range 02147483647 and rejects routing decisions that have
1322 an interface with the same group id. It has the same meaning as
1323 <option>suppress_ifgroup</option> in <command>ip rule</command>. Defaults to unset.</para>
1324 </listitem>
1325 </varlistentry>
1326
1327 <varlistentry>
1328 <term><varname>Type=</varname></term>
1329 <listitem>
1330 <para>Specifies Routing Policy Database (RPDB) rule type. Takes one of
1331 <literal>blackhole</literal>, <literal>unreachable</literal> or <literal>prohibit</literal>.
1332 </para>
1333 </listitem>
1334 </varlistentry>
1335 </variablelist>
1336 </refsect1>
1337
1338 <refsect1>
1339 <title>[NextHop] Section Options</title>
1340
1341 <para>The [NextHop] section is used to manipulate entries in the kernel's "nexthop" tables. The
1342 [NextHop] section accepts the following settings. Specify several [NextHop] sections to configure
1343 several hops.</para>
1344
1345 <variablelist class='network-directives'>
1346 <varlistentry>
1347 <term><varname>Id=</varname></term>
1348 <listitem>
1349 <para>The id of the next hop. Takes an integer in the range 14294967295. If unspecified,
1350 then automatically chosen by kernel.</para>
1351 </listitem>
1352 </varlistentry>
1353
1354 <varlistentry>
1355 <term><varname>Gateway=</varname></term>
1356 <listitem>
1357 <para>As in the [Network] section.</para>
1358 </listitem>
1359 </varlistentry>
1360
1361 <varlistentry>
1362 <term><varname>Family=</varname></term>
1363 <listitem>
1364 <para>Takes one of the special values <literal>ipv4</literal> or <literal>ipv6</literal>.
1365 By default, the family is determined by the address specified in
1366 <varname>Gateway=</varname>. If <varname>Gateway=</varname> is not specified, then defaults
1367 to <literal>ipv4</literal>.</para>
1368 </listitem>
1369 </varlistentry>
1370
1371 <varlistentry>
1372 <term><varname>OnLink=</varname></term>
1373 <listitem>
1374 <para>Takes a boolean. If set to true, the kernel does not have to check if the gateway is
1375 reachable directly by the current machine (i.e., attached to the local network), so that we
1376 can insert the nexthop in the kernel table without it being complained about. Defaults to
1377 <literal>no</literal>.</para>
1378 </listitem>
1379 </varlistentry>
1380
1381 <varlistentry>
1382 <term><varname>Blackhole=</varname></term>
1383 <listitem>
1384 <para>Takes a boolean. If enabled, packets to the corresponding routes are discarded
1385 silently, and <varname>Gateway=</varname> cannot be specified. Defaults to
1386 <literal>no</literal>.</para>
1387 </listitem>
1388 </varlistentry>
1389
1390 <varlistentry>
1391 <term><varname>Group=</varname></term>
1392 <listitem>
1393 <para>Takes a whitespace separated list of nexthop IDs. Each ID must be in the range
1394 14294967295. Optionally, each nexthop ID can take a weight after a colon
1395 (<literal><replaceable>id</replaceable><optional>:<replaceable>weight</replaceable></optional></literal>).
1396 The weight must be in the range 1255. If the weight is not specified, then it is assumed
1397 that the weight is 1. This setting cannot be specified with <varname>Gateway=</varname>,
1398 <varname>Family=</varname>, <varname>Blackhole=</varname>. This setting can be specified
1399 multiple times. If an empty string is assigned, then the all previous assignments are
1400 cleared. Defaults to unset.</para>
1401 </listitem>
1402 </varlistentry>
1403 </variablelist>
1404 </refsect1>
1405
1406 <refsect1>
1407 <title>[Route] Section Options</title>
1408
1409 <para>The [Route] section accepts the following settings. Specify several [Route] sections to
1410 configure several routes.</para>
1411
1412 <variablelist class='network-directives'>
1413 <varlistentry>
1414 <term><varname>Gateway=</varname></term>
1415 <listitem>
1416 <para>Takes the gateway address or the special values <literal>_dhcp4</literal> and
1417 <literal>_ipv6ra</literal>. If <literal>_dhcp4</literal> or <literal>_ipv6ra</literal> is
1418 set, then the gateway address provided by DHCPv4 or IPv6 RA is used.</para>
1419 </listitem>
1420 </varlistentry>
1421
1422 <varlistentry>
1423 <term><varname>GatewayOnLink=</varname></term>
1424 <listitem>
1425 <para>Takes a boolean. If set to true, the kernel does not have to check if the gateway is
1426 reachable directly by the current machine (i.e., attached to the local network), so that we
1427 can insert the route in the kernel table without it being complained about. Defaults to
1428 <literal>no</literal>.</para>
1429 </listitem>
1430 </varlistentry>
1431
1432 <varlistentry>
1433 <term><varname>Destination=</varname></term>
1434 <listitem>
1435 <para>The destination prefix of the route. Possibly followed by a slash and the prefix
1436 length. If omitted, a full-length host route is assumed.</para>
1437 </listitem>
1438 </varlistentry>
1439
1440 <varlistentry>
1441 <term><varname>Source=</varname></term>
1442 <listitem>
1443 <para>The source prefix of the route. Possibly followed by a slash and the prefix length. If
1444 omitted, a full-length host route is assumed.</para>
1445 </listitem>
1446 </varlistentry>
1447
1448 <varlistentry>
1449 <term><varname>Metric=</varname></term>
1450 <listitem>
1451 <para>The metric of the route. Takes an unsigned integer in the range 04294967295. Defaults
1452 to unset, and the kernel's default will be used.</para>
1453 </listitem>
1454 </varlistentry>
1455
1456 <varlistentry>
1457 <term><varname>IPv6Preference=</varname></term>
1458 <listitem>
1459 <para>Specifies the route preference as defined in
1460 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink> for Router Discovery
1461 messages. Which can be one of <literal>low</literal> the route has a lowest priority,
1462 <literal>medium</literal> the route has a default priority or <literal>high</literal> the
1463 route has a highest priority.</para>
1464 </listitem>
1465 </varlistentry>
1466
1467 <varlistentry>
1468 <term><varname>Scope=</varname></term>
1469 <listitem>
1470 <para>The scope of the IPv4 route, which can be <literal>global</literal>,
1471 <literal>site</literal>, <literal>link</literal>, <literal>host</literal>, or
1472 <literal>nowhere</literal>:</para>
1473 <itemizedlist>
1474 <listitem>
1475 <para><literal>global</literal> means the route can reach hosts more than one hop away.
1476 </para>
1477 </listitem>
1478
1479 <listitem>
1480 <para><literal>site</literal> means an interior route in the local autonomous system.
1481 </para>
1482 </listitem>
1483
1484 <listitem>
1485 <para><literal>link</literal> means the route can only reach hosts on the local network
1486 (one hop away).</para>
1487 </listitem>
1488
1489 <listitem>
1490 <para><literal>host</literal> means the route will not leave the local machine (used for
1491 internal addresses like 127.0.0.1).</para>
1492 </listitem>
1493
1494 <listitem>
1495 <para><literal>nowhere</literal> means the destination doesn't exist.</para>
1496 </listitem>
1497 </itemizedlist>
1498
1499 <para>For IPv4 route, defaults to <literal>host</literal> if <varname>Type=</varname> is
1500 <literal>local</literal> or <literal>nat</literal>, and <literal>link</literal> if
1501 <varname>Type=</varname> is <literal>broadcast</literal>, <literal>multicast</literal>,
1502 <literal>anycast</literal>, or <literal>unicast</literal>. In other cases,
1503 defaults to <literal>global</literal>. The value is not used for IPv6.</para>
1504 </listitem>
1505 </varlistentry>
1506
1507 <varlistentry>
1508 <term><varname>PreferredSource=</varname></term>
1509 <listitem>
1510 <para>The preferred source address of the route. The address must be in the format described
1511 in
1512 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
1513 </para>
1514 </listitem>
1515 </varlistentry>
1516
1517 <varlistentry>
1518 <term><varname>Table=</varname></term>
1519 <listitem>
1520 <para>The table identifier for the route. Takes one of predefined names
1521 <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, and names
1522 defined in <varname>RouteTable=</varname> in
1523 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1524 or a number between 1 and 4294967295. The table can be retrieved using
1525 <command>ip route show table <replaceable>num</replaceable></command>. If unset and
1526 <varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>,
1527 <literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used.
1528 In other cases, defaults to <literal>main</literal>.</para>
1529 </listitem>
1530 </varlistentry>
1531
1532 <varlistentry>
1533 <term><varname>Protocol=</varname></term>
1534 <listitem>
1535 <para>The protocol identifier for the route. Takes a number between 0 and 255 or the special
1536 values <literal>kernel</literal>, <literal>boot</literal>, <literal>static</literal>,
1537 <literal>ra</literal> and <literal>dhcp</literal>. Defaults to <literal>static</literal>.
1538 </para>
1539 </listitem>
1540 </varlistentry>
1541
1542 <varlistentry>
1543 <term><varname>Type=</varname></term>
1544 <listitem>
1545 <para>Specifies the type for the route. Takes one of <literal>unicast</literal>,
1546 <literal>local</literal>, <literal>broadcast</literal>, <literal>anycast</literal>,
1547 <literal>multicast</literal>, <literal>blackhole</literal>, <literal>unreachable</literal>,
1548 <literal>prohibit</literal>, <literal>throw</literal>, <literal>nat</literal>, and
1549 <literal>xresolve</literal>. If <literal>unicast</literal>, a regular route is defined, i.e.
1550 a route indicating the path to take to a destination network address. If
1551 <literal>blackhole</literal>, packets to the defined route are discarded silently. If
1552 <literal>unreachable</literal>, packets to the defined route are discarded and the ICMP
1553 message "Host Unreachable" is generated. If <literal>prohibit</literal>, packets to the
1554 defined route are discarded and the ICMP message "Communication Administratively Prohibited"
1555 is generated. If <literal>throw</literal>, route lookup in the current routing table will
1556 fail and the route selection process will return to Routing Policy Database (RPDB). Defaults
1557 to <literal>unicast</literal>.</para>
1558 </listitem>
1559 </varlistentry>
1560
1561 <varlistentry>
1562 <term><varname>InitialCongestionWindow=</varname></term>
1563 <listitem>
1564 <para>The TCP initial congestion window is used during the start of a TCP connection.
1565 During the start of a TCP session, when a client requests a resource, the server's initial
1566 congestion window determines how many packets will be sent during the initial burst of data
1567 without waiting for acknowledgement. Takes a number between 1 and 1023. Note that 100 is
1568 considered an extremely large value for this option. When unset, the kernel's default
1569 (typically 10) will be used.</para>
1570 </listitem>
1571 </varlistentry>
1572
1573 <varlistentry>
1574 <term><varname>InitialAdvertisedReceiveWindow=</varname></term>
1575 <listitem>
1576 <para>The TCP initial advertised receive window is the amount of receive data (in bytes)
1577 that can initially be buffered at one time on a connection. The sending host can send only
1578 that amount of data before waiting for an acknowledgment and window update from the
1579 receiving host. Takes a number between 1 and 1023. Note that 100 is considered an extremely
1580 large value for this option. When unset, the kernel's default will be used.</para>
1581 </listitem>
1582 </varlistentry>
1583
1584 <varlistentry>
1585 <term><varname>QuickAck=</varname></term>
1586 <listitem>
1587 <para>Takes a boolean. When true enables TCP quick ack mode for the route. When unset, the
1588 kernel's default will be used.</para>
1589 </listitem>
1590 </varlistentry>
1591
1592 <varlistentry>
1593 <term><varname>FastOpenNoCookie=</varname></term>
1594 <listitem>
1595 <para>Takes a boolean. When true enables TCP fastopen without a cookie on a per-route basis.
1596 When unset, the kernel's default will be used.</para>
1597 </listitem>
1598 </varlistentry>
1599
1600 <varlistentry>
1601 <term><varname>TTLPropagate=</varname></term>
1602 <listitem>
1603 <para>Takes a boolean. When true enables TTL propagation at Label Switched Path (LSP) egress.
1604 When unset, the kernel's default will be used.</para>
1605 </listitem>
1606 </varlistentry>
1607
1608 <varlistentry>
1609 <term><varname>MTUBytes=</varname></term>
1610 <listitem>
1611 <para>The maximum transmission unit in bytes to set for the route. The usual suffixes K, M,
1612 G, are supported and are understood to the base of 1024.</para>
1613 </listitem>
1614 </varlistentry>
1615
1616 <varlistentry>
1617 <term><varname>TCPAdvertisedMaximumSegmentSize=</varname></term>
1618 <listitem>
1619 <para>Specifies the Path MSS (in bytes) hints given on TCP layer. The usual suffixes K, M, G,
1620 are supported and are understood to the base of 1024. An unsigned integer in the range
1621 14294967294. When unset, the kernel's default will be used.</para>
1622 </listitem>
1623 </varlistentry>
1624
1625 <varlistentry>
1626 <term><varname>MultiPathRoute=<replaceable>address</replaceable>[@<replaceable>name</replaceable>] [<replaceable>weight</replaceable>]</varname></term>
1627 <listitem>
1628 <para>Configures multipath route. Multipath routing is the technique of using multiple
1629 alternative paths through a network. Takes gateway address. Optionally, takes a network
1630 interface name or index separated with <literal>@</literal>, and a weight in 1..256 for this
1631 multipath route separated with whitespace. This setting can be specified multiple times. If
1632 an empty string is assigned, then the all previous assignments are cleared.</para>
1633 </listitem>
1634 </varlistentry>
1635
1636 <varlistentry>
1637 <term><varname>NextHop=</varname></term>
1638 <listitem>
1639 <para>Specifies the nexthop id. Takes an unsigned integer in the range 14294967295. If set,
1640 the corresponding [NextHop] section must be configured. Defaults to unset.</para>
1641 </listitem>
1642 </varlistentry>
1643 </variablelist>
1644 </refsect1>
1645
1646 <refsect1>
1647 <title>[DHCPv4] Section Options</title>
1648
1649 <para>The [DHCPv4] section configures the DHCPv4 client, if it is enabled with the
1650 <varname>DHCP=</varname> setting described above:</para>
1651
1652 <variablelist class='network-directives'>
1653
1654 <!-- DHCP packet contents -->
1655
1656 <varlistentry>
1657 <term><varname>SendHostname=</varname></term>
1658 <listitem>
1659 <para>When true (the default), the machine's hostname (or the value specified with
1660 <varname>Hostname=</varname>, described below) will be sent to the DHCP server. Note that the
1661 hostname must consist only of 7-bit ASCII lower-case characters and no spaces or dots, and be
1662 formatted as a valid DNS domain name. Otherwise, the hostname is not sent even if this option
1663 is true.</para>
1664 </listitem>
1665 </varlistentry>
1666
1667 <varlistentry>
1668 <term><varname>Hostname=</varname></term>
1669 <listitem>
1670 <para>Use this value for the hostname which is sent to the DHCP server, instead of machine's
1671 hostname. Note that the specified hostname must consist only of 7-bit ASCII lower-case
1672 characters and no spaces or dots, and be formatted as a valid DNS domain name.</para>
1673 </listitem>
1674 </varlistentry>
1675
1676 <varlistentry>
1677 <term><varname>MUDURL=</varname></term>
1678 <listitem>
1679 <para>When configured, the specified Manufacturer Usage Description (MUD) URL will be sent
1680 to the DHCPv4 server. Takes a URL of length up to 255 characters. A superficial verification
1681 that the string is a valid URL will be performed. DHCPv4 clients are intended to have at most
1682 one MUD URL associated with them. See
1683 <ulink url="https://tools.ietf.org/html/rfc8520">RFC 8520</ulink>.</para>
1684
1685 <para>MUD is an embedded software standard defined by the IETF that allows IoT device makers
1686 to advertise device specifications, including the intended communication patterns for their
1687 device when it connects to the network. The network can then use this to author a
1688 context-specific access policy, so the device functions only within those parameters.</para>
1689 </listitem>
1690 </varlistentry>
1691
1692 <varlistentry>
1693 <term><varname>ClientIdentifier=</varname></term>
1694 <listitem>
1695 <para>The DHCPv4 client identifier to use. Takes one of <option>mac</option>,
1696 <option>duid</option> or <option>duid-only</option>. If set to <option>mac</option>, the
1697 MAC address of the link is used. If set to <option>duid</option>, an RFC4361-compliant Client
1698 ID, which is the combination of IAID and DUID (see below), is used. If set to
1699 <option>duid-only</option>, only DUID is used, this may not be RFC compliant, but some setups
1700 may require to use this. Defaults to <option>duid</option>.</para>
1701 </listitem>
1702 </varlistentry>
1703
1704 <varlistentry>
1705 <term><varname>VendorClassIdentifier=</varname></term>
1706 <listitem>
1707 <para>The vendor class identifier used to identify vendor type and configuration.</para>
1708 </listitem>
1709 </varlistentry>
1710
1711 <varlistentry>
1712 <term><varname>UserClass=</varname></term>
1713 <listitem>
1714 <para>A DHCPv4 client can use UserClass option to identify the type or category of user or
1715 applications it represents. The information contained in this option is a string that
1716 represents the user class of which the client is a member. Each class sets an identifying
1717 string of information to be used by the DHCP service to classify clients. Takes a
1718 whitespace-separated list of strings.</para>
1719 </listitem>
1720 </varlistentry>
1721
1722 <varlistentry>
1723 <term><varname>DUIDType=</varname></term>
1724 <listitem>
1725 <para>Override the global <varname>DUIDType=</varname> setting for this network. See
1726 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1727 for a description of possible values.</para>
1728 </listitem>
1729 </varlistentry>
1730
1731 <varlistentry>
1732 <term><varname>DUIDRawData=</varname></term>
1733 <listitem>
1734 <para>Override the global <varname>DUIDRawData=</varname> setting for this network. See
1735 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1736 for a description of possible values.</para>
1737 </listitem>
1738 </varlistentry>
1739
1740 <varlistentry>
1741 <term><varname>IAID=</varname></term>
1742 <listitem>
1743 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned
1744 integer.</para>
1745 </listitem>
1746 </varlistentry>
1747
1748 <varlistentry>
1749 <term><varname>Anonymize=</varname></term>
1750 <listitem>
1751 <para>Takes a boolean. When true, the options sent to the DHCP server will follow the
1752 <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink> (Anonymity Profiles for
1753 DHCP Clients) to minimize disclosure of identifying information. Defaults to false.</para>
1754
1755 <para>This option should only be set to true when <varname>MACAddressPolicy=</varname> is set
1756 to <option>random</option> (see
1757 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
1758 </para>
1759
1760 <para>When true, <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
1761 <varname>VendorClassIdentifier=</varname>, <varname>UserClass=</varname>,
1762 <varname>RequestOptions=</varname>, <varname>SendOption=</varname>,
1763 <varname>SendVendorOption=</varname>, and <varname>MUDURL=</varname> are ignored.</para>
1764
1765 <para>With this option enabled DHCP requests will mimic those generated by Microsoft
1766 Windows, in order to reduce the ability to fingerprint and recognize installations. This
1767 means DHCP request sizes will grow and lease data will be more comprehensive than normally,
1768 though most of the requested data is not actually used.</para>
1769 </listitem>
1770 </varlistentry>
1771
1772 <varlistentry>
1773 <term><varname>RequestOptions=</varname></term>
1774 <listitem>
1775 <para>Sets request options to be sent to the server in the DHCPv4 request options list. A
1776 whitespace-separated list of integers in the range 1254. Defaults to unset.</para>
1777 </listitem>
1778 </varlistentry>
1779
1780 <varlistentry>
1781 <term><varname>SendOption=</varname></term>
1782 <listitem>
1783 <para>Send an arbitrary raw option in the DHCPv4 request. Takes a DHCP option number, data
1784 type and data separated with a colon
1785 (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1786 The option number must be an integer in the range 1254. The type takes one of
1787 <literal>uint8</literal>, <literal>uint16</literal>, <literal>uint32</literal>,
1788 <literal>ipv4address</literal>, or <literal>string</literal>. Special characters in the data
1789 string may be escaped using
1790 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1791 escapes</ulink>. This setting can be specified multiple times. If an empty string is
1792 specified, then all options specified earlier are cleared. Defaults to unset.</para>
1793 </listitem>
1794 </varlistentry>
1795
1796 <varlistentry>
1797 <term><varname>SendVendorOption=</varname></term>
1798 <listitem>
1799 <para>Send an arbitrary vendor option in the DHCPv4 request. Takes a DHCP option number, data
1800 type and data separated with a colon
1801 (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1802 The option number must be an integer in the range 1254. The type takes one of
1803 <literal>uint8</literal>, <literal>uint16</literal>, <literal>uint32</literal>,
1804 <literal>ipv4address</literal>, or <literal>string</literal>. Special characters in the data
1805 string may be escaped using
1806 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1807 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
1808 then all options specified earlier are cleared. Defaults to unset.</para>
1809 </listitem>
1810 </varlistentry>
1811
1812 <varlistentry>
1813 <term><varname>IPServiceType=</varname></term>
1814 <listitem>
1815 <para>Takes one of the special values <literal>none</literal>, <literal>CS6</literal>, or
1816 <literal>CS4</literal>. When <literal>none</literal> no IP service type is set to the packet
1817 sent from the DHCPv4 client. When <literal>CS6</literal> (network control) or
1818 <literal>CS4</literal> (realtime), the corresponding service type will be set. Defaults to
1819 <literal>CS6</literal>.</para>
1820 </listitem>
1821 </varlistentry>
1822
1823 <!-- How to use the DHCP lease -->
1824
1825 <varlistentry>
1826 <term><varname>Label=</varname></term>
1827 <listitem>
1828 <para>Specifies the label for the IPv4 address received from the DHCP server. The label must
1829 be a 7-bit ASCII string with a length of 115 characters. Defaults to unset.</para>
1830 </listitem>
1831 </varlistentry>
1832
1833 <varlistentry>
1834 <term><varname>UseDNS=</varname></term>
1835 <listitem>
1836 <para>When true (the default), the DNS servers received from the DHCP server will be used.
1837 </para>
1838
1839 <para>This corresponds to the <option>nameserver</option> option in
1840 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1841 </para>
1842 </listitem>
1843 </varlistentry>
1844
1845 <varlistentry>
1846 <term><varname>RoutesToDNS=</varname></term>
1847 <listitem>
1848 <para>When true, the routes to the DNS servers received from the DHCP server will be
1849 configured. When <varname>UseDNS=</varname> is disabled, this setting is ignored. Defaults to
1850 true.</para>
1851 </listitem>
1852 </varlistentry>
1853
1854 <varlistentry>
1855 <term><varname>UseNTP=</varname></term>
1856 <listitem>
1857 <para>When true (the default), the NTP servers received from the DHCP server will be used by
1858 <filename>systemd-timesyncd.service</filename>.</para>
1859 </listitem>
1860 </varlistentry>
1861
1862 <varlistentry>
1863 <term><varname>RoutesToNTP=</varname></term>
1864 <listitem>
1865 <para>When true, the routes to the NTP servers received from the DHCP server will be
1866 configured. When <varname>UseNTP=</varname> is disabled, this setting is ignored. Defaults to
1867 true.</para>
1868 </listitem>
1869 </varlistentry>
1870
1871 <varlistentry>
1872 <term><varname>UseSIP=</varname></term>
1873 <listitem>
1874 <para>When true (the default), the SIP servers received from the DHCP server will be collected
1875 and made available to client programs.</para>
1876 </listitem>
1877 </varlistentry>
1878
1879 <varlistentry>
1880 <term><varname>UseMTU=</varname></term>
1881 <listitem>
1882 <para>When true, the interface maximum transmission unit from the DHCP server will be used on
1883 the current link. If <varname>MTUBytes=</varname> is set, then this setting is ignored.
1884 Defaults to false.</para>
1885
1886 <para>Note, some drivers will reset the interfaces if the MTU is changed. For such
1887 interfaces, please try to use <varname>IgnoreCarrierLoss=</varname> with a short timespan,
1888 e.g. <literal>3 seconds</literal>.</para>
1889 </listitem>
1890 </varlistentry>
1891
1892 <varlistentry>
1893 <term><varname>UseHostname=</varname></term>
1894 <listitem>
1895 <para>When true (the default), the hostname received from the DHCP server will be set as the
1896 transient hostname of the system.</para>
1897 </listitem>
1898 </varlistentry>
1899
1900 <varlistentry>
1901 <term><varname>UseDomains=</varname></term>
1902 <listitem>
1903 <para>Takes a boolean, or the special value <option>route</option>. When true, the domain
1904 name received from the DHCP server will be used as DNS search domain over this link, similar
1905 to the effect of the <option>Domains=</option> setting. If set to <option>route</option>, the
1906 domain name received from the DHCP server will be used for routing DNS queries only, but not
1907 for searching, similar to the effect of the <option>Domains=</option> setting when the
1908 argument is prefixed with <literal>~</literal>. Defaults to false.</para>
1909
1910 <para>It is recommended to enable this option only on trusted networks, as setting this
1911 affects resolution of all hostnames, in particular of single-label names. It is generally
1912 safer to use the supplied domain only as routing domain, rather than as search domain, in
1913 order to not have it affect local resolution of single-label names.</para>
1914
1915 <para>When set to true, this setting corresponds to the <option>domain</option> option in
1916 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1917 </para>
1918 </listitem>
1919 </varlistentry>
1920
1921 <varlistentry>
1922 <term><varname>UseRoutes=</varname></term>
1923 <listitem>
1924 <para>When true (the default), the static routes will be requested from the DHCP server and
1925 added to the routing table with a metric of 1024, and a scope of <option>global</option>,
1926 <option>link</option> or <option>host</option>, depending on the route's destination and
1927 gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the link's
1928 own address, the scope will be set to <option>host</option>. Otherwise if the gateway is null
1929 (a direct route), a <option>link</option> scope will be used. For anything else, scope
1930 defaults to <option>global</option>.</para>
1931 </listitem>
1932 </varlistentry>
1933
1934 <varlistentry>
1935 <term><varname>RouteMetric=</varname></term>
1936 <listitem>
1937 <para>Set the routing metric for routes specified by the DHCP server (including the prefix
1938 route added for the specified prefix). Takes an unsigned integer in the range 04294967295.
1939 Defaults to 1024.</para>
1940 </listitem>
1941 </varlistentry>
1942
1943 <varlistentry>
1944 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1945 <listitem>
1946 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to
1947 unset). The table can be retrieved using
1948 <command>ip route show table <replaceable>num</replaceable></command>.</para>
1949
1950 <para>When used in combination with <varname>VRF=</varname>, the VRF's routing table is
1951 used when this parameter is not specified.</para>
1952 </listitem>
1953 </varlistentry>
1954
1955 <varlistentry>
1956 <term><varname>RouteMTUBytes=</varname></term>
1957 <listitem>
1958 <para>Specifies the MTU for the DHCP routes. Please see the [Route] section for further
1959 details.</para>
1960 </listitem>
1961 </varlistentry>
1962
1963 <varlistentry>
1964 <term><varname>UseGateway=</varname></term>
1965 <listitem>
1966 <para>When true, the gateway will be requested from the DHCP server and added to the routing
1967 table with a metric of 1024, and a scope of <option>link</option>. When unset, the value
1968 specified with <varname>UseRoutes=</varname> is used.</para>
1969 </listitem>
1970 </varlistentry>
1971
1972 <varlistentry>
1973 <term><varname>UseTimezone=</varname></term>
1974 <listitem><para>When true, the timezone received from the DHCP server will be set as timezone
1975 of the local system. Defaults to false.</para></listitem>
1976 </varlistentry>
1977
1978 <varlistentry>
1979 <term><varname>Use6RD=</varname></term>
1980 <listitem>
1981 <para>When true, subnets of the received IPv6 prefix are assigned to downstream interfaces
1982 which enables <varname>DHCPPrefixDelegation=</varname>. See also
1983 <varname>DHCPPrefixDelegation=</varname> in the [Network] section, the [DHCPPrefixDelegation]
1984 section, and <ulink url="https://tools.ietf.org/html/rfc5969">RFC 5969</ulink>. Defaults to
1985 false.</para>
1986 </listitem>
1987 </varlistentry>
1988
1989 <varlistentry>
1990 <term><varname>FallbackLeaseLifetimeSec=</varname></term>
1991 <listitem>
1992 <para>Allows one to set DHCPv4 lease lifetime when DHCPv4 server does not send the lease
1993 lifetime. Takes one of <literal>forever</literal> or <literal>infinity</literal>. If
1994 specified, the acquired address never expires. Defaults to unset.</para>
1995 </listitem>
1996 </varlistentry>
1997
1998 <!-- How to communicate with the server -->
1999
2000 <varlistentry>
2001 <term><varname>RequestBroadcast=</varname></term>
2002 <listitem>
2003 <para>Request the server to use broadcast messages before the IP address has been configured.
2004 This is necessary for devices that cannot receive RAW packets, or that cannot receive packets
2005 at all before an IP address has been configured. On the other hand, this must not be enabled
2006 on networks where broadcasts are filtered out.</para>
2007 </listitem>
2008 </varlistentry>
2009
2010 <varlistentry>
2011 <term><varname>MaxAttempts=</varname></term>
2012 <listitem>
2013 <para>Specifies how many times the DHCPv4 client configuration should be attempted. Takes a
2014 number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>. Note that the
2015 time between retries is increased exponentially, up to approximately one per minute, so the
2016 network will not be overloaded even if this number is high. The default is suitable in most
2017 circumstances.</para>
2018 </listitem>
2019 </varlistentry>
2020
2021 <varlistentry>
2022 <term><varname>ListenPort=</varname></term>
2023 <listitem>
2024 <para>Set the port from which the DHCP client packets originate.</para>
2025 </listitem>
2026 </varlistentry>
2027
2028 <varlistentry>
2029 <term><varname>DenyList=</varname></term>
2030 <listitem>
2031 <para>A whitespace-separated list of IPv4 addresses. Each address can optionally take a
2032 prefix length after <literal>/</literal>. DHCP offers from servers in the list are rejected.
2033 Note that if <varname>AllowList=</varname> is configured then <varname>DenyList=</varname> is
2034 ignored.</para>
2035 </listitem>
2036 </varlistentry>
2037
2038 <varlistentry>
2039 <term><varname>AllowList=</varname></term>
2040 <listitem>
2041 <para>A whitespace-separated list of IPv4 addresses. Each address can optionally take a
2042 prefix length after <literal>/</literal>. DHCP offers from servers in the list are accepted.
2043 </para>
2044 </listitem>
2045 </varlistentry>
2046
2047 <varlistentry>
2048 <term><varname>SendRelease=</varname></term>
2049 <listitem>
2050 <para>When true, the DHCPv4 client sends a DHCP release packet when it stops. Defaults to
2051 true.</para>
2052 </listitem>
2053 </varlistentry>
2054
2055 <varlistentry>
2056 <term><varname>SendDecline=</varname></term>
2057 <listitem>
2058 <para>A boolean. When true, <command>systemd-networkd</command> performs IPv4 Duplicate
2059 Address Detection to the acquired address by the DHCPv4 client. If duplicate is detected,
2060 the DHCPv4 client rejects the address by sending a <constant>DHCPDECLINE</constant> packet to
2061 the DHCP server, and tries to obtain an IP address again. See
2062 <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5227</ulink>. Defaults to false.</para>
2063 </listitem>
2064 </varlistentry>
2065 </variablelist>
2066 </refsect1>
2067
2068 <refsect1>
2069 <title>[DHCPv6] Section Options</title>
2070
2071 <para>The [DHCPv6] section configures the DHCPv6 client, if it is enabled with the
2072 <varname>DHCP=</varname> setting described above, or invoked by the IPv6 Router Advertisement:
2073 </para>
2074
2075 <variablelist class='network-directives'>
2076
2077 <!-- DHCP packet contents -->
2078
2079 <varlistentry>
2080 <term><varname>MUDURL=</varname></term>
2081 <term><varname>IAID=</varname></term>
2082 <term><varname>DUIDType=</varname></term>
2083 <term><varname>DUIDRawData=</varname></term>
2084 <term><varname>RequestOptions=</varname></term>
2085 <listitem>
2086 <para>As in the [DHCPv4] section.</para>
2087 </listitem>
2088 </varlistentry>
2089
2090 <varlistentry>
2091 <term><varname>SendOption=</varname></term>
2092 <listitem>
2093 <para>As in the [DHCPv4] section, however because DHCPv6 uses 16-bit fields to store option
2094 numbers, the option number is an integer in the range 165536.</para>
2095 </listitem>
2096 </varlistentry>
2097
2098 <varlistentry>
2099 <term><varname>SendVendorOption=</varname></term>
2100 <listitem>
2101 <para>Send an arbitrary vendor option in the DHCPv6 request. Takes an enterprise identifier,
2102 DHCP option number, data type, and data separated with a colon
2103 (<literal><replaceable>enterprise identifier</replaceable>:<replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
2104 Enterprise identifier is an unsigned integer in the range 14294967294. The option number
2105 must be an integer in the range 1254. Data type takes one of <literal>uint8</literal>,
2106 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>,
2107 <literal>ipv6address</literal>, or <literal>string</literal>. Special characters in the data
2108 string may be escaped using
2109 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
2110 escapes</ulink>. This setting can be specified multiple times. If an empty string is
2111 specified, then all options specified earlier are cleared. Defaults to unset.</para>
2112 </listitem>
2113 </varlistentry>
2114
2115 <varlistentry>
2116 <term><varname>UserClass=</varname></term>
2117 <listitem>
2118 <para>A DHCPv6 client can use User Class option to identify the type or category of user or
2119 applications it represents. The information contained in this option is a string that
2120 represents the user class of which the client is a member. Each class sets an identifying
2121 string of information to be used by the DHCP service to classify clients. Special characters
2122 in the data string may be escaped using
2123 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
2124 escapes</ulink>. This setting can be specified multiple times. If an empty string is
2125 specified, then all options specified earlier are cleared. Takes a whitespace-separated list
2126 of strings. Note that currently <constant>NUL</constant> bytes are not allowed.</para>
2127 </listitem>
2128 </varlistentry>
2129
2130 <varlistentry>
2131 <term><varname>VendorClass=</varname></term>
2132 <listitem>
2133 <para>A DHCPv6 client can use VendorClass option to identify the vendor that manufactured the
2134 hardware on which the client is running. The information contained in the data area of this
2135 option is contained in one or more opaque fields that identify details of the hardware
2136 configuration. Takes a whitespace-separated list of strings.</para>
2137 </listitem>
2138 </varlistentry>
2139
2140 <varlistentry>
2141 <term><varname>PrefixDelegationHint=</varname></term>
2142 <listitem>
2143 <para>Takes an IPv6 address with prefix length in the same format as the
2144 <varname>Address=</varname> in the [Network] section. The DHCPv6 client will include a prefix
2145 hint in the DHCPv6 solicitation sent to the server. The prefix length must be in the range
2146 1128. Defaults to unset.</para>
2147 </listitem>
2148 </varlistentry>
2149
2150 <varlistentry>
2151 <term><varname>RapidCommit=</varname></term>
2152 <listitem>
2153 <para>Takes a boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server
2154 through a rapid two-message exchange (solicit and reply). When the rapid commit option is set by
2155 both the DHCPv6 client and the DHCPv6 server, the two-message exchange is used. Otherwise, the
2156 four-message exchange (solicit, advertise, request, and reply) is used. The two-message exchange
2157 provides faster client configuration. See
2158 <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details.
2159 Defaults to true, and the two-message exchange will be used if the server support it.</para>
2160 </listitem>
2161 </varlistentry>
2162
2163 <!-- How to use the DHCP lease -->
2164
2165 <varlistentry>
2166 <term><varname>UseAddress=</varname></term>
2167 <listitem>
2168 <para>When true (the default), the IP addresses provided by the DHCPv6 server will be
2169 assigned.</para>
2170 </listitem>
2171 </varlistentry>
2172
2173 <varlistentry>
2174 <term><varname>UseDelegatedPrefix=</varname></term>
2175 <listitem>
2176 <para>When true (the default), the client will request the DHCPv6 server to delegate
2177 prefixes. If the server provides prefixes to be delegated, then subnets of the prefixes are
2178 assigned to the interfaces that have <varname>DHCPPrefixDelegation=yes</varname>.
2179 See also the <varname>DHCPPrefixDelegation=</varname> setting in the [Network] section,
2180 settings in the [DHCPPrefixDelegation] section, and
2181 <ulink url="https://www.rfc-editor.org/rfc/rfc8415.html#section-6.3">RFC 8415</ulink>.
2182 </para>
2183 </listitem>
2184 </varlistentry>
2185
2186 <varlistentry>
2187 <term><varname>UseDNS=</varname></term>
2188 <term><varname>UseNTP=</varname></term>
2189 <term><varname>UseHostname=</varname></term>
2190 <term><varname>UseDomains=</varname></term>
2191 <listitem>
2192 <para>As in the [DHCPv4] section.</para>
2193 </listitem>
2194 </varlistentry>
2195
2196 <!-- How to communicate with the server -->
2197
2198 <varlistentry>
2199 <term><varname>WithoutRA=</varname></term>
2200 <listitem>
2201 <para>Allows DHCPv6 client to start without router advertisements's
2202 <literal>managed</literal> or <literal>other configuration</literal> flag. Takes one of
2203 <literal>no</literal>, <literal>solicit</literal>, or
2204 <literal>information-request</literal>. If this is not specified,
2205 <literal>solicit</literal> is used when <varname>DHCPPrefixDelegation=</varname> is enabled
2206 and <varname>UplinkInterface=:self</varname> is specified in the [DHCPPrefixDelegation]
2207 section. Otherwise, defaults to <literal>no</literal>, and the DHCPv6 client will be started
2208 when an RA is received. See also the <varname>DHCPv6Client=</varname> setting in the
2209 [IPv6AcceptRA] section.</para>
2210 </listitem>
2211 </varlistentry>
2212 </variablelist>
2213 </refsect1>
2214
2215 <refsect1>
2216 <title>[DHCPPrefixDelegation] Section Options</title>
2217 <para>The [DHCPPrefixDelegation] section configures subnet prefixes of the delegated prefixes
2218 acquired by a DHCPv6 client, or by a DHCPv4 client through the 6RD option on another interface.
2219 The settings in this section are used only when the <varname>DHCPPrefixDelegation=</varname>
2220 setting in the [Network] section is enabled.</para>
2221
2222 <variablelist class='network-directives'>
2223 <varlistentry>
2224 <term><varname>UplinkInterface=</varname></term>
2225 <listitem>
2226 <para>Specifies the name or the index of the uplink interface, or one of the special values
2227 <literal>:self</literal> and <literal>:auto</literal>. When <literal>:self</literal>, the
2228 interface itself is considered the uplink interface, and
2229 <varname>WithoutRA=solicit</varname> is implied if the setting is not explicitly specified.
2230 When <literal>:auto</literal>, the first link which acquired prefixes to be delegated from
2231 the DHCPv6 or DHCPv4 server is selected. Defaults to <literal>:auto</literal>.</para>
2232 </listitem>
2233 </varlistentry>
2234
2235 <varlistentry>
2236 <term><varname>SubnetId=</varname></term>
2237 <listitem>
2238 <para>Configure a specific subnet ID on the interface from a (previously) received prefix
2239 delegation. You can either set "auto" (the default) or a specific subnet ID (as defined in
2240 <ulink url="https://tools.ietf.org/html/rfc4291#section-2.5.4">RFC 4291</ulink>, section
2241 2.5.4), in which case the allowed value is hexadecimal, from 0 to 0x7fffffffffffffff
2242 inclusive.</para>
2243 </listitem>
2244 </varlistentry>
2245
2246 <varlistentry>
2247 <term><varname>Announce=</varname></term>
2248 <listitem>
2249 <para>Takes a boolean. When enabled, and <varname>IPv6SendRA=</varname> in [Network] section
2250 is enabled, the delegated prefixes are distributed through the IPv6 Router Advertisement.
2251 This setting will be ignored when the <varname>DHCPPrefixDelegation=</varname> setting is
2252 enabled on the upstream interface. Defaults to yes.</para>
2253 </listitem>
2254 </varlistentry>
2255
2256 <varlistentry>
2257 <term><varname>Assign=</varname></term>
2258 <listitem>
2259 <para>Takes a boolean. Specifies whether to add an address from the delegated prefixes which
2260 are received from the WAN interface by the DHCPv6 Prefix Delegation. When true (on LAN
2261 interfce), the EUI-64 algorithm will be used by default to form an interface identifier from
2262 the delegated prefixes. See also <varname>Token=</varname> setting below. Defaults to yes.
2263 </para>
2264 </listitem>
2265 </varlistentry>
2266
2267 <varlistentry>
2268 <term><varname>Token=</varname></term>
2269 <listitem>
2270 <para>Specifies an optional address generation mode for assigning an address in each
2271 delegated prefix. This accepts the same syntax as <varname>Token=</varname> in the
2272 [IPv6AcceptRA] section. If <varname>Assign=</varname> is set to false, then this setting will
2273 be ignored. Defaults to unset, which means the EUI-64 algorithm will be used.</para>
2274 </listitem>
2275 </varlistentry>
2276
2277 <varlistentry>
2278 <term><varname>ManageTemporaryAddress=</varname></term>
2279 <listitem>
2280 <para>As in the [Address] section, but defaults to true.</para>
2281 </listitem>
2282 </varlistentry>
2283
2284 <varlistentry>
2285 <term><varname>RouteMetric=</varname></term>
2286 <listitem>
2287 <para>The metric of the route to the delegated prefix subnet. Takes an unsigned integer in
2288 the range 04294967295. When set to 0, the kernel's default value is used. Defaults to 256.
2289 </para>
2290 </listitem>
2291 </varlistentry>
2292 </variablelist>
2293 </refsect1>
2294
2295 <refsect1>
2296 <title>[IPv6AcceptRA] Section Options</title>
2297 <para>The [IPv6AcceptRA] section configures the IPv6 Router Advertisement (RA) client, if it is enabled
2298 with the <varname>IPv6AcceptRA=</varname> setting described above:</para>
2299
2300 <variablelist class='network-directives'>
2301 <varlistentry>
2302 <term><varname>Token=</varname></term>
2303 <listitem>
2304 <para>Specifies an optional address generation mode for the Stateless Address
2305 Autoconfiguration (SLAAC). The following values are supported:</para>
2306
2307 <variablelist>
2308 <varlistentry>
2309 <term><option>eui64</option></term>
2310 <listitem>
2311 <para>
2312 The EUI-64 algorithm will be used to generate an address for that prefix. Only
2313 supported by Ethernet or InfiniBand interfaces.
2314 </para>
2315 </listitem>
2316 </varlistentry>
2317 <varlistentry>
2318 <term><option>static:<replaceable>ADDRESS</replaceable></option></term>
2319 <listitem>
2320 <para>
2321 An IPv6 address must be specified after a colon (<literal>:</literal>), and the
2322 lower bits of the supplied address are combined with the upper bits of a prefix
2323 received in a Router Advertisement (RA) message to form a complete address. Note
2324 that if multiple prefixes are received in an RA message, or in multiple RA messages,
2325 addresses will be formed from each of them using the supplied address. This mode
2326 implements SLAAC but uses a static interface identifier instead of an identifier
2327 generated by using the EUI-64 algorithm. Because the interface identifier is static,
2328 if Duplicate Address Detection detects that the computed address is a duplicate
2329 (in use by another node on the link), then this mode will fail to provide an address
2330 for that prefix. If an IPv6 address without mode is specified, then
2331 <literal>static</literal> mode is assumed.
2332 </para>
2333 </listitem>
2334 </varlistentry>
2335 <varlistentry>
2336 <term><option>prefixstable[:<replaceable>ADDRESS</replaceable>][,<replaceable>UUID</replaceable>]</option></term>
2337 <listitem>
2338 <para>
2339 The algorithm specified in
2340 <ulink url="https://tools.ietf.org/html/rfc7217">RFC 7217</ulink> will be used to
2341 generate interface identifiers. This mode can optionally take an IPv6 address
2342 separated with a colon (<literal>:</literal>). If an IPv6 address is specified,
2343 then an interface identifier is generated only when a prefix received in an RA
2344 message matches the supplied address.
2345 </para>
2346 <para>
2347 This mode can also optionally take a non-null UUID in the format which
2348 <function>sd_id128_from_string()</function> accepts, e.g.
2349 <literal>86b123b969ba4b7eb8b3d8605123525a</literal> or
2350 <literal>86b123b9-69ba-4b7e-b8b3-d8605123525a</literal>. If a UUID is specified, the
2351 value is used as the secret key to generate interface identifiers. If not specified,
2352 then an application specific ID generated with the system's machine-ID will be used
2353 as the secret key. See
2354 <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
2355 <citerefentry><refentrytitle>sd_id128_from_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
2356 and
2357 <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
2358 </para>
2359 <para>
2360 Note that the <literal>prefixstable</literal> algorithm uses both the interface
2361 name and MAC address as input to the hash to compute the interface identifier, so
2362 if either of those are changed the resulting interface identifier (and address)
2363 will be changed, even if the prefix received in the RA message has not been
2364 changed.
2365 </para>
2366 </listitem>
2367 </varlistentry>
2368 </variablelist>
2369
2370 <para>If no address generation mode is specified (which is the default), or a received
2371 prefix does not match any of the addresses provided in <literal>prefixstable</literal>
2372 mode, then the EUI-64 algorithm will be used for Ethernet or InfiniBand interfaces,
2373 otherwise <literal>prefixstable</literal> will be used to form an interface identifier for
2374 that prefix.</para>
2375
2376 <para>This setting can be specified multiple times. If an empty string is assigned, then
2377 the all previous assignments are cleared.</para>
2378
2379 <para>Examples:
2380 <programlisting>Token=eui64
2381 Token=::1a:2b:3c:4d
2382 Token=static:::1a:2b:3c:4d
2383 Token=prefixstable
2384 Token=prefixstable:2002:da8:1::</programlisting></para>
2385 </listitem>
2386 </varlistentry>
2387
2388 <varlistentry>
2389 <term><varname>UseDNS=</varname></term>
2390 <listitem>
2391 <para>When true (the default), the DNS servers received in the Router Advertisement will be used.</para>
2392
2393 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
2394 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
2395 </listitem>
2396 </varlistentry>
2397
2398 <varlistentry>
2399 <term><varname>UseDomains=</varname></term>
2400 <listitem>
2401 <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name
2402 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
2403 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
2404 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
2405 effect of the <option>Domains=</option> setting when the argument is prefixed with
2406 <literal>~</literal>. Defaults to false.</para>
2407
2408 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
2409 of all hostnames, in particular of single-label names. It is generally safer to use the supplied domain
2410 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
2411 single-label names.</para>
2412
2413 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
2414 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
2415 </listitem>
2416 </varlistentry>
2417
2418 <varlistentry>
2419 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
2420 <listitem>
2421 <para>The table identifier for the routes received in the Router Advertisement
2422 (a number between 1 and 4294967295, or 0 to unset).
2423 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
2424 </para>
2425 </listitem>
2426 </varlistentry>
2427
2428 <varlistentry>
2429 <term><varname>RouteMetric=</varname></term>
2430 <listitem>
2431 <para>Set the routing metric for the routes received in the Router Advertisement. Takes an
2432 unsigned integer in the range 04294967295. Defaults to 1024.</para>
2433 </listitem>
2434 </varlistentry>
2435
2436 <varlistentry>
2437 <term><varname>UseMTU=</varname></term>
2438 <listitem>
2439 <para>Takes a boolean. When true, the MTU received in the Router Advertisement will be
2440 used. Defaults to true.</para>
2441 </listitem>
2442 </varlistentry>
2443
2444 <varlistentry>
2445 <term><varname>UseGateway=</varname></term>
2446 <listitem>
2447 <para>When true (the default), the router address will be configured as the default gateway.
2448 </para>
2449 </listitem>
2450 </varlistentry>
2451
2452 <varlistentry>
2453 <term><varname>UseRoutePrefix=</varname></term>
2454 <listitem>
2455 <para>When true (the default), the routes corresponding to the route prefixes received in
2456 the Router Advertisement will be configured.</para>
2457 </listitem>
2458 </varlistentry>
2459
2460 <varlistentry>
2461 <term><varname>UseAutonomousPrefix=</varname></term>
2462 <listitem>
2463 <para>When true (the default), the autonomous prefix received in the Router Advertisement will be used and take
2464 precedence over any statically configured ones.</para>
2465 </listitem>
2466 </varlistentry>
2467
2468 <varlistentry>
2469 <term><varname>UseOnLinkPrefix=</varname></term>
2470 <listitem>
2471 <para>When true (the default), the onlink prefix received in the Router Advertisement will be
2472 used and takes precedence over any statically configured ones.</para>
2473 </listitem>
2474 </varlistentry>
2475
2476 <varlistentry>
2477 <term><varname>RouterDenyList=</varname></term>
2478 <listitem>
2479 <para>A whitespace-separated list of IPv6 router addresses. Each address can optionally
2480 take a prefix length after <literal>/</literal>. Any information advertised by the listed
2481 router is ignored.</para>
2482 </listitem>
2483 </varlistentry>
2484
2485 <varlistentry>
2486 <term><varname>RouterAllowList=</varname></term>
2487 <listitem>
2488 <para>A whitespace-separated list of IPv6 router addresses. Each address can optionally
2489 take a prefix length after <literal>/</literal>. Only information advertised by the listed
2490 router is accepted. Note that if <varname>RouterAllowList=</varname> is configured then
2491 <varname>RouterDenyList=</varname> is ignored.</para>
2492 </listitem>
2493 </varlistentry>
2494
2495 <varlistentry>
2496 <term><varname>PrefixDenyList=</varname></term>
2497 <listitem>
2498 <para>A whitespace-separated list of IPv6 prefixes. Each prefix can optionally take its
2499 prefix length after <literal>/</literal>. IPv6 prefixes supplied via router advertisements
2500 in the list are ignored.</para>
2501 </listitem>
2502 </varlistentry>
2503
2504 <varlistentry>
2505 <term><varname>PrefixAllowList=</varname></term>
2506 <listitem>
2507 <para>A whitespace-separated list of IPv6 prefixes. Each prefix can optionally take its
2508 prefix length after <literal>/</literal>. IPv6 prefixes supplied via router advertisements
2509 in the list are allowed. Note that if <varname>PrefixAllowList=</varname> is configured
2510 then <varname>PrefixDenyList=</varname> is ignored.</para>
2511 </listitem>
2512 </varlistentry>
2513
2514 <varlistentry>
2515 <term><varname>RouteDenyList=</varname></term>
2516 <listitem>
2517 <para>A whitespace-separated list of IPv6 route prefixes. Each prefix can optionally take
2518 its prefix length after <literal>/</literal>. IPv6 route prefixes supplied via router
2519 advertisements in the list are ignored.</para>
2520 </listitem>
2521 </varlistentry>
2522
2523 <varlistentry>
2524 <term><varname>RouteAllowList=</varname></term>
2525 <listitem>
2526 <para>A whitespace-separated list of IPv6 route prefixes. Each prefix can optionally take
2527 its prefix length after <literal>/</literal>. IPv6 route prefixes supplied via router
2528 advertisements in the list are allowed. Note that if <varname>RouteAllowList=</varname> is
2529 configured then <varname>RouteDenyList=</varname> is ignored.</para>
2530 </listitem>
2531 </varlistentry>
2532
2533 <varlistentry>
2534 <term><varname>DHCPv6Client=</varname></term>
2535 <listitem>
2536 <para>Takes a boolean, or the special value <literal>always</literal>. When true, the
2537 DHCPv6 client will be started in <literal>solicit</literal> mode if the RA has the
2538 <literal>managed</literal> flag or <literal>information-request</literal> mode if the RA
2539 lacks the <literal>managed</literal> flag but has the
2540 <literal>other configuration</literal> flag. If set to <literal>always</literal>, the
2541 DHCPv6 client will be started in <literal>solicit</literal> mode when an RA is received,
2542 even if neither the <literal>managed</literal> nor the
2543 <literal>other configuration</literal> flag is set in the RA. This will be ignored when
2544 <varname>WithoutRA=</varname> in the [DHCPv6] section is enabled, or
2545 <varname>UplinkInterface=:self</varname> in the [DHCPPrefixDelegation] section is
2546 specified. Defaults to true.</para>
2547 </listitem>
2548 </varlistentry>
2549 </variablelist>
2550 </refsect1>
2551
2552 <refsect1>
2553 <title>[DHCPServer] Section Options</title>
2554 <para>The [DHCPServer] section contains settings for the DHCP server, if enabled via the
2555 <varname>DHCPServer=</varname> option described above:</para>
2556
2557 <variablelist class='network-directives'>
2558
2559 <varlistentry>
2560 <term><varname>ServerAddress=</varname></term>
2561 <listitem><para>Specifies server address for the DHCP server. Takes an IPv4 address with prefix
2562 length, for example 192.168.0.1/24. This setting may be useful when the link on
2563 which the DHCP server is running has multiple static addresses. When unset, one of static addresses
2564 in the link will be automatically selected. Defaults to unset.</para></listitem>
2565 </varlistentry>
2566
2567 <varlistentry>
2568 <term><varname>PoolOffset=</varname></term>
2569 <term><varname>PoolSize=</varname></term>
2570
2571 <listitem><para>Configures the pool of addresses to hand out. The pool
2572 is a contiguous sequence of IP addresses in the subnet configured for
2573 the server address, which does not include the subnet nor the broadcast
2574 address. <varname>PoolOffset=</varname> takes the offset of the pool
2575 from the start of subnet, or zero to use the default value.
2576 <varname>PoolSize=</varname> takes the number of IP addresses in the
2577 pool or zero to use the default value. By default, the pool starts at
2578 the first address after the subnet address and takes up the rest of
2579 the subnet, excluding the broadcast address. If the pool includes
2580 the server address (the default), this is reserved and not handed
2581 out to clients.</para></listitem>
2582 </varlistentry>
2583
2584 <varlistentry>
2585 <term><varname>DefaultLeaseTimeSec=</varname></term>
2586 <term><varname>MaxLeaseTimeSec=</varname></term>
2587
2588 <listitem><para>Control the default and maximum DHCP lease
2589 time to pass to clients. These settings take time values in seconds or
2590 another common time unit, depending on the suffix. The default
2591 lease time is used for clients that did not ask for a specific
2592 lease time. If a client asks for a lease time longer than the
2593 maximum lease time, it is automatically shortened to the
2594 specified time. The default lease time defaults to 1h, the
2595 maximum lease time to 12h. Shorter lease times are beneficial
2596 if the configuration data in DHCP leases changes frequently
2597 and clients shall learn the new settings with shorter
2598 latencies. Longer lease times reduce the generated DHCP
2599 network traffic.</para></listitem>
2600 </varlistentry>
2601
2602 <varlistentry>
2603 <term><varname>UplinkInterface=</varname></term>
2604 <listitem><para>Specifies the name or the index of the uplink interface, or one of the special
2605 values <literal>:none</literal> and <literal>:auto</literal>. When emitting DNS, NTP, or SIP
2606 servers is enabled but no servers are specified, the servers configured in the uplink interface
2607 will be emitted. When <literal>:auto</literal>, the link which has a default gateway with the
2608 highest priority will be automatically selected. When <literal>:none</literal>, no uplink
2609 interface will be selected. Defaults to <literal>:auto</literal>.</para></listitem>
2610 </varlistentry>
2611
2612 <varlistentry>
2613 <term><varname>EmitDNS=</varname></term>
2614 <term><varname>DNS=</varname></term>
2615
2616 <listitem><para><varname>EmitDNS=</varname> takes a boolean. Configures whether the DHCP leases
2617 handed out to clients shall contain DNS server information. Defaults to <literal>yes</literal>.
2618 The DNS servers to pass to clients may be configured with the <varname>DNS=</varname> option,
2619 which takes a list of IPv4 addresses, or special value <literal>_server_address</literal> which
2620 will be converted to the address used by the DHCP server.</para>
2621
2622 <para>If the <varname>EmitDNS=</varname> option is enabled but no servers configured, the
2623 servers are automatically propagated from an "uplink" interface that has appropriate servers
2624 set. The "uplink" interface is determined by the default route of the system with the highest
2625 priority. Note that this information is acquired at the time the lease is handed out, and does
2626 not take uplink interfaces into account that acquire DNS server information at a later point.
2627 If no suitable uplink interface is found the DNS server data from
2628 <filename>/etc/resolv.conf</filename> is used. Also, note that the leases are not refreshed if
2629 the uplink network configuration changes. To ensure clients regularly acquire the most current
2630 uplink DNS server information, it is thus advisable to shorten the DHCP lease time via
2631 <varname>MaxLeaseTimeSec=</varname> described above.</para>
2632
2633 <para>This setting can be specified multiple times. If an empty string is specified, then all
2634 DNS servers specified earlier are cleared.</para></listitem>
2635 </varlistentry>
2636
2637 <varlistentry>
2638 <term><varname>EmitNTP=</varname></term>
2639 <term><varname>NTP=</varname></term>
2640 <term><varname>EmitSIP=</varname></term>
2641 <term><varname>SIP=</varname></term>
2642 <term><varname>EmitPOP3=</varname></term>
2643 <term><varname>POP3=</varname></term>
2644 <term><varname>EmitSMTP=</varname></term>
2645 <term><varname>SMTP=</varname></term>
2646 <term><varname>EmitLPR=</varname></term>
2647 <term><varname>LPR=</varname></term>
2648
2649 <listitem><para>Similar to the <varname>EmitDNS=</varname> and <varname>DNS=</varname> settings
2650 described above, these settings configure whether and what server information for the indicate
2651 protocol shall be emitted as part of the DHCP lease. The same syntax, propagation semantics and
2652 defaults apply as for <varname>EmitDNS=</varname> and <varname>DNS=</varname>.</para></listitem>
2653 </varlistentry>
2654
2655 <varlistentry>
2656 <term><varname>EmitRouter=</varname></term>
2657 <term><varname>Router=</varname></term>
2658
2659 <listitem><para>The <varname>EmitRouter=</varname> setting takes a boolean value, and configures
2660 whether the DHCP lease should contain the router option. The <varname>Router=</varname> setting
2661 takes an IPv4 address, and configures the router address to be emitted. When the
2662 <varname>Router=</varname> setting is not specified, then the server address will be used for
2663 the router option. When the <varname>EmitRouter=</varname> setting is disabled, the
2664 <varname>Router=</varname> setting will be ignored. The <varname>EmitRouter=</varname> setting
2665 defaults to true, and the <varname>Router=</varname> setting defaults to unset.
2666 </para></listitem>
2667 </varlistentry>
2668
2669 <varlistentry>
2670 <term><varname>EmitTimezone=</varname></term>
2671 <term><varname>Timezone=</varname></term>
2672
2673 <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out
2674 to clients shall contain timezone information. Defaults to <literal>yes</literal>. The
2675 <varname>Timezone=</varname> setting takes a timezone string
2676 (such as <literal>Europe/Berlin</literal> or
2677 <literal>UTC</literal>) to pass to clients. If no explicit
2678 timezone is set, the system timezone of the local host is
2679 propagated, as determined by the
2680 <filename>/etc/localtime</filename> symlink.</para></listitem>
2681 </varlistentry>
2682
2683 <varlistentry>
2684 <term><varname>BootServerAddress=</varname></term>
2685
2686 <listitem>
2687 <para>Takes an IPv4 address of the boot server used by e.g. PXE boot systems. When specified, this
2688 address is sent in the <option>siaddr</option> field of the DHCP message header. See <ulink
2689 url="https://www.rfc-editor.org/rfc/rfc2131.html">RFC 2131</ulink> for more details. Defaults to
2690 unset.</para>
2691 </listitem>
2692 </varlistentry>
2693
2694 <varlistentry>
2695 <term><varname>BootServerName=</varname></term>
2696
2697 <listitem>
2698 <para>Takes a name of the boot server used by e.g. PXE boot systems. When specified, this name is
2699 sent in the DHCP option 66 ("TFTP server name"). See <ulink
2700 url="https://www.rfc-editor.org/rfc/rfc2132.html">RFC 2132</ulink> for more details. Defaults to
2701 unset.</para>
2702
2703 <para>Note that typically setting one of <varname>BootServerName=</varname> or
2704 <varname>BootServerAddress=</varname> is sufficient, but both can be set too, if desired.</para>
2705 </listitem>
2706 </varlistentry>
2707
2708 <varlistentry>
2709 <term><varname>BootFilename=</varname></term>
2710
2711 <listitem>
2712 <para>Takes a path or URL to a file loaded by e.g. a PXE boot loader. When specified, this path is
2713 sent in the DHCP option 67 ("Bootfile name"). See <ulink
2714 url="https://www.rfc-editor.org/rfc/rfc2132.html">RFC 2132</ulink> for more details. Defaults to
2715 unset.</para>
2716 </listitem>
2717 </varlistentry>
2718
2719 <varlistentry>
2720 <term><varname>SendOption=</varname></term>
2721 <listitem>
2722 <para>Send a raw option with value via DHCPv4 server. Takes a DHCP option number, data type
2723 and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
2724 The option number is an integer in the range 1254. The type takes one of <literal>uint8</literal>,
2725 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, <literal>ipv6address</literal>, or
2726 <literal>string</literal>. Special characters in the data string may be escaped using
2727 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
2728 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
2729 then all options specified earlier are cleared. Defaults to unset.</para>
2730 </listitem>
2731 </varlistentry>
2732
2733 <varlistentry>
2734 <term><varname>SendVendorOption=</varname></term>
2735 <listitem>
2736 <para>Send a vendor option with value via DHCPv4 server. Takes a DHCP option number, data type
2737 and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
2738 The option number is an integer in the range 1254. The type takes one of <literal>uint8</literal>,
2739 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
2740 <literal>string</literal>. Special characters in the data string may be escaped using
2741 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
2742 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
2743 then all options specified earlier are cleared. Defaults to unset.</para>
2744 </listitem>
2745 </varlistentry>
2746 <varlistentry>
2747 <term><varname>BindToInterface=</varname></term>
2748 <listitem>
2749 <para>Takes a boolean value. When <literal>yes</literal>, DHCP server socket will be bound
2750 to its network interface and all socket communication will be restricted to this interface.
2751 Defaults to <literal>yes</literal>, except if <varname>RelayTarget=</varname> is used (see below),
2752 in which case it defaults to <literal>no</literal>.</para>
2753 </listitem>
2754 </varlistentry>
2755 <varlistentry>
2756 <term><varname>RelayTarget=</varname></term>
2757 <listitem>
2758 <para>Takes an IPv4 address, which must be in the format described in
2759 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
2760 Turns this DHCP server into a DHCP relay agent. See <ulink url="https://tools.ietf.org/html/rfc1542">RFC 1542</ulink>.
2761 The address is the address of DHCP server or another relay agent to forward DHCP messages to and from.</para>
2762 </listitem>
2763 </varlistentry>
2764 <varlistentry>
2765 <term><varname>RelayAgentCircuitId=</varname></term>
2766 <listitem>
2767 <para>Specifies value for Agent Circuit ID suboption of Relay Agent Information option.
2768 Takes a string, which must be in the format <literal>string:<replaceable>value</replaceable></literal>,
2769 where <literal><replaceable>value</replaceable></literal> should be replaced with the value of the suboption.
2770 Defaults to unset (means no Agent Circuit ID suboption is generated).
2771 Ignored if <varname>RelayTarget=</varname> is not specified.</para>
2772 </listitem>
2773 </varlistentry>
2774 <varlistentry>
2775 <term><varname>RelayAgentRemoteId=</varname></term>
2776 <listitem>
2777 <para>Specifies value for Agent Remote ID suboption of Relay Agent Information option.
2778 Takes a string, which must be in the format <literal>string:<replaceable>value</replaceable></literal>,
2779 where <literal><replaceable>value</replaceable></literal> should be replaced with the value of the suboption.
2780 Defaults to unset (means no Agent Remote ID suboption is generated).
2781 Ignored if <varname>RelayTarget=</varname> is not specified.</para>
2782 </listitem>
2783 </varlistentry>
2784
2785 </variablelist>
2786 </refsect1>
2787
2788 <refsect1>
2789 <title>[DHCPServerStaticLease] Section Options</title>
2790 <para>The <literal>[DHCPServerStaticLease]</literal> section configures a static DHCP lease to assign a
2791 fixed IPv4 address to a specific device based on its MAC address. This section can be specified multiple
2792 times.</para>
2793
2794 <variablelist class='network-directives'>
2795 <varlistentry>
2796 <term><varname>MACAddress=</varname></term>
2797
2798 <listitem><para>The hardware address of a device to match. This key is mandatory.</para></listitem>
2799 </varlistentry>
2800
2801 <varlistentry>
2802 <term><varname>Address=</varname></term>
2803
2804 <listitem><para>The IPv4 address that should be assigned to the device that was matched with
2805 <varname>MACAddress=</varname>. This key is mandatory.</para></listitem>
2806 </varlistentry>
2807 </variablelist>
2808 </refsect1>
2809
2810 <refsect1>
2811 <title>[IPv6SendRA] Section Options</title>
2812 <para>The [IPv6SendRA] section contains settings for sending IPv6 Router Advertisements and whether
2813 to act as a router, if enabled via the <varname>IPv6SendRA=</varname> option described above. IPv6
2814 network prefixes or routes are defined with one or more [IPv6Prefix] or [IPv6RoutePrefix] sections.
2815 </para>
2816
2817 <variablelist class='network-directives'>
2818
2819 <varlistentry>
2820 <term><varname>Managed=</varname></term>
2821 <term><varname>OtherInformation=</varname></term>
2822
2823 <listitem><para>Takes a boolean. Controls whether a DHCPv6 server is used to acquire IPv6
2824 addresses on the network link when <varname>Managed=</varname>
2825 is set to <literal>true</literal> or if only additional network
2826 information can be obtained via DHCPv6 for the network link when
2827 <varname>OtherInformation=</varname> is set to
2828 <literal>true</literal>. Both settings default to
2829 <literal>false</literal>, which means that a DHCPv6 server is not being
2830 used.</para></listitem>
2831 </varlistentry>
2832
2833 <varlistentry>
2834 <term><varname>RouterLifetimeSec=</varname></term>
2835
2836 <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. The value must be 0
2837 seconds, or between 4 seconds and 9000 seconds. When set to 0, the host is not acting as a router.
2838 Defaults to 1800 seconds (30 minutes).</para>
2839 </listitem>
2840 </varlistentry>
2841
2842 <varlistentry>
2843 <term><varname>RouterPreference=</varname></term>
2844
2845 <listitem><para>Configures IPv6 router preference if
2846 <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are
2847 <literal>high</literal>, <literal>medium</literal> and
2848 <literal>low</literal>, with <literal>normal</literal> and
2849 <literal>default</literal> added as synonyms for
2850 <literal>medium</literal> just to make configuration easier. See
2851 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
2852 for details. Defaults to <literal>medium</literal>.</para></listitem>
2853 </varlistentry>
2854
2855 <varlistentry>
2856 <term><varname>UplinkInterface=</varname></term>
2857 <listitem><para>Specifies the name or the index of the uplink interface, or one of the special
2858 values <literal>:none</literal> and <literal>:auto</literal>. When emitting DNS servers or
2859 search domains is enabled but no servers are specified, the servers configured in the uplink
2860 interface will be emitted. When <literal>:auto</literal>, the value specified to the same
2861 setting in the [DHCPPrefixDelegation] section will be used if
2862 <varname>DHCPPrefixDelegation=</varname> is enabled, otherwise the link which has a default
2863 gateway with the highest priority will be automatically selected. When <literal>:none</literal>,
2864 no uplink interface will be selected. Defaults to <literal>:auto</literal>.</para></listitem>
2865 </varlistentry>
2866
2867 <varlistentry>
2868 <term><varname>EmitDNS=</varname></term>
2869 <term><varname>DNS=</varname></term>
2870
2871 <listitem><para><varname>DNS=</varname> specifies a list of recursive DNS server IPv6 addresses
2872 that are distributed via Router Advertisement messages when <varname>EmitDNS=</varname> is true.
2873 <varname>DNS=</varname> also takes special value <literal>_link_local</literal>; in that case
2874 the IPv6 link-local address is distributed. If <varname>DNS=</varname> is empty, DNS servers are
2875 read from the [Network] section. If the [Network] section does not contain any DNS servers
2876 either, DNS servers from the uplink interface specified in <varname>UplinkInterface=</varname>
2877 will be used. When <varname>EmitDNS=</varname> is false, no DNS server information is sent in
2878 Router Advertisement messages. <varname>EmitDNS=</varname> defaults to true.</para></listitem>
2879 </varlistentry>
2880
2881 <varlistentry>
2882 <term><varname>EmitDomains=</varname></term>
2883 <term><varname>Domains=</varname></term>
2884
2885 <listitem><para>A list of DNS search domains distributed via Router Advertisement messages when
2886 <varname>EmitDomains=</varname> is true. If <varname>Domains=</varname> is empty, DNS search
2887 domains are read from the [Network] section. If the [Network] section does not contain any DNS
2888 search domains either, DNS search domains from the uplink interface specified in
2889 <varname>UplinkInterface=</varname> will be used. When <varname>EmitDomains=</varname> is false,
2890 no DNS search domain information is sent in Router Advertisement messages.
2891 <varname>EmitDomains=</varname> defaults to true.</para></listitem>
2892 </varlistentry>
2893
2894 <varlistentry>
2895 <term><varname>DNSLifetimeSec=</varname></term>
2896
2897 <listitem><para>Lifetime in seconds for the DNS server addresses listed in
2898 <varname>DNS=</varname> and search domains listed in <varname>Domains=</varname>. Defaults to
2899 3600 seconds (one hour).</para></listitem>
2900 </varlistentry>
2901
2902 </variablelist>
2903 </refsect1>
2904
2905 <refsect1>
2906 <title>[IPv6Prefix] Section Options</title>
2907 <para>One or more [IPv6Prefix] sections contain the IPv6 prefixes that are announced via Router
2908 Advertisements. See <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink> for further
2909 details.</para>
2910
2911 <variablelist class='network-directives'>
2912
2913 <varlistentry>
2914 <term><varname>AddressAutoconfiguration=</varname></term>
2915 <term><varname>OnLink=</varname></term>
2916
2917 <listitem><para>Takes a boolean to specify whether IPv6 addresses can be
2918 autoconfigured with this prefix and whether the prefix can be used for
2919 onlink determination. Both settings default to <literal>true</literal>
2920 in order to ease configuration.
2921 </para></listitem>
2922 </varlistentry>
2923
2924 <varlistentry>
2925 <term><varname>Prefix=</varname></term>
2926
2927 <listitem><para>The IPv6 prefix that is to be distributed to hosts. Similarly to configuring static
2928 IPv6 addresses, the setting is configured as an IPv6 prefix and its prefix length, separated by a
2929 <literal>/</literal> character. Use multiple [IPv6Prefix] sections to configure multiple IPv6
2930 prefixes since prefix lifetimes, address autoconfiguration and onlink status may differ from one
2931 prefix to another.</para></listitem>
2932 </varlistentry>
2933
2934 <varlistentry>
2935 <term><varname>PreferredLifetimeSec=</varname></term>
2936 <term><varname>ValidLifetimeSec=</varname></term>
2937
2938 <listitem><para>Preferred and valid lifetimes for the prefix measured in seconds.
2939 <varname>PreferredLifetimeSec=</varname> defaults to 1800 seconds (30 minutes) and
2940 <varname>ValidLifetimeSec=</varname> defaults to 3600 seconds (one hour).</para></listitem>
2941 </varlistentry>
2942
2943 <varlistentry>
2944 <term><varname>Assign=</varname></term>
2945 <listitem><para>Takes a boolean. When true, adds an address from the prefix. Default to false.
2946 </para></listitem>
2947 </varlistentry>
2948
2949 <varlistentry>
2950 <term><varname>Token=</varname></term>
2951 <listitem>
2952 <para>Specifies an optional address generation mode for assigning an address in each
2953 prefix. This accepts the same syntax as <varname>Token=</varname> in the [IPv6AcceptRA]
2954 section. If <varname>Assign=</varname> is set to false, then this setting will be ignored.
2955 Defaults to unset, which means the EUI-64 algorithm will be used.</para>
2956 </listitem>
2957 </varlistentry>
2958
2959 <varlistentry>
2960 <term><varname>RouteMetric=</varname></term>
2961 <listitem>
2962 <para>The metric of the prefix route. Takes an unsigned integer in the range 04294967295.
2963 When unset or set to 0, the kernel's default value is used. This setting is ignored when
2964 <varname>Assign=</varname> is false.</para>
2965 </listitem>
2966 </varlistentry>
2967 </variablelist>
2968 </refsect1>
2969
2970 <refsect1>
2971 <title>[IPv6RoutePrefix] Section Options</title>
2972 <para>One or more [IPv6RoutePrefix] sections contain the IPv6
2973 prefix routes that are announced via Router Advertisements. See
2974 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
2975 for further details.</para>
2976
2977 <variablelist class='network-directives'>
2978
2979 <varlistentry>
2980 <term><varname>Route=</varname></term>
2981
2982 <listitem><para>The IPv6 route that is to be distributed to hosts. Similarly to configuring static
2983 IPv6 routes, the setting is configured as an IPv6 prefix routes and its prefix route length,
2984 separated by a <literal>/</literal> character. Use multiple [IPv6RoutePrefix] sections to configure
2985 multiple IPv6 prefix routes.</para></listitem>
2986 </varlistentry>
2987
2988 <varlistentry>
2989 <term><varname>LifetimeSec=</varname></term>
2990
2991 <listitem><para>Lifetime for the route prefix measured in seconds.
2992 <varname>LifetimeSec=</varname> defaults to 3600 seconds (one hour).</para></listitem>
2993 </varlistentry>
2994
2995 </variablelist>
2996 </refsect1>
2997
2998 <refsect1>
2999 <title>[Bridge] Section Options</title>
3000 <para>The [Bridge] section accepts the following keys:</para>
3001 <variablelist class='network-directives'>
3002 <varlistentry>
3003 <term><varname>UnicastFlood=</varname></term>
3004 <listitem>
3005 <para>Takes a boolean. Controls whether the bridge should flood
3006 traffic for which an FDB entry is missing and the destination
3007 is unknown through this port. When unset, the kernel's default will be used.
3008 </para>
3009 </listitem>
3010 </varlistentry>
3011 <varlistentry>
3012 <term><varname>MulticastFlood=</varname></term>
3013 <listitem>
3014 <para>Takes a boolean. Controls whether the bridge should flood
3015 traffic for which an MDB entry is missing and the destination
3016 is unknown through this port. When unset, the kernel's default will be used.
3017 </para>
3018 </listitem>
3019 </varlistentry>
3020 <varlistentry>
3021 <term><varname>MulticastToUnicast=</varname></term>
3022 <listitem>
3023 <para>Takes a boolean. Multicast to unicast works on top of the multicast snooping feature of
3024 the bridge. Which means unicast copies are only delivered to hosts which are interested in it.
3025 When unset, the kernel's default will be used.
3026 </para>
3027 </listitem>
3028 </varlistentry>
3029 <varlistentry>
3030 <term><varname>NeighborSuppression=</varname></term>
3031 <listitem>
3032 <para>Takes a boolean. Configures whether ARP and ND neighbor suppression is enabled for
3033 this port. When unset, the kernel's default will be used.
3034 </para>
3035 </listitem>
3036 </varlistentry>
3037 <varlistentry>
3038 <term><varname>Learning=</varname></term>
3039 <listitem>
3040 <para>Takes a boolean. Configures whether MAC address learning is enabled for
3041 this port. When unset, the kernel's default will be used.
3042 </para>
3043 </listitem>
3044 </varlistentry>
3045 <varlistentry>
3046 <term><varname>HairPin=</varname></term>
3047 <listitem>
3048 <para>Takes a boolean. Configures whether traffic may be sent back out of the port on which it
3049 was received. When this flag is false, then the bridge will not forward traffic back out of the
3050 receiving port. When unset, the kernel's default will be used.</para>
3051 </listitem>
3052 </varlistentry>
3053 <varlistentry>
3054 <term><varname>Isolated=</varname></term>
3055 <listitem>
3056 <para>Takes a boolean. Configures whether this port is isolated or not. Within a bridge,
3057 isolated ports can only communicate with non-isolated ports. When set to true, this port can only
3058 communicate with other ports whose Isolated setting is false. When set to false, this port
3059 can communicate with any other ports. When unset, the kernel's default will be used.</para>
3060 </listitem>
3061 </varlistentry>
3062 <varlistentry>
3063 <term><varname>UseBPDU=</varname></term>
3064 <listitem>
3065 <para>Takes a boolean. Configures whether STP Bridge Protocol Data Units will be
3066 processed by the bridge port. When unset, the kernel's default will be used.</para>
3067 </listitem>
3068 </varlistentry>
3069 <varlistentry>
3070 <term><varname>FastLeave=</varname></term>
3071 <listitem>
3072 <para>Takes a boolean. This flag allows the bridge to immediately stop multicast
3073 traffic on a port that receives an IGMP Leave message. It is only used with
3074 IGMP snooping if enabled on the bridge. When unset, the kernel's default will be used.</para>
3075 </listitem>
3076 </varlistentry>
3077 <varlistentry>
3078 <term><varname>AllowPortToBeRoot=</varname></term>
3079 <listitem>
3080 <para>Takes a boolean. Configures whether a given port is allowed to
3081 become a root port. Only used when STP is enabled on the bridge.
3082 When unset, the kernel's default will be used.</para>
3083 </listitem>
3084 </varlistentry>
3085 <varlistentry>
3086 <term><varname>ProxyARP=</varname></term>
3087 <listitem>
3088 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port.
3089 When unset, the kernel's default will be used.</para>
3090 </listitem>
3091 </varlistentry>
3092 <varlistentry>
3093 <term><varname>ProxyARPWiFi=</varname></term>
3094 <listitem>
3095 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port
3096 which meets extended requirements by IEEE 802.11 and Hotspot 2.0 specifications.
3097 When unset, the kernel's default will be used.</para>
3098 </listitem>
3099 </varlistentry>
3100 <varlistentry>
3101 <term><varname>MulticastRouter=</varname></term>
3102 <listitem>
3103 <para>Configures this port for having multicast routers attached. A port with a multicast
3104 router will receive all multicast traffic. Takes one of <literal>no</literal>
3105 to disable multicast routers on this port, <literal>query</literal> to let the system detect
3106 the presence of routers, <literal>permanent</literal> to permanently enable multicast traffic
3107 forwarding on this port, or <literal>temporary</literal> to enable multicast routers temporarily
3108 on this port, not depending on incoming queries. When unset, the kernel's default will be used.</para>
3109 </listitem>
3110 </varlistentry>
3111 <varlistentry>
3112 <term><varname>Cost=</varname></term>
3113 <listitem>
3114 <para>Sets the "cost" of sending packets of this interface.
3115 Each port in a bridge may have a different speed and the cost
3116 is used to decide which link to use. Faster interfaces
3117 should have lower costs. It is an integer value between 1 and
3118 65535.</para>
3119 </listitem>
3120 </varlistentry>
3121 <varlistentry>
3122 <term><varname>Priority=</varname></term>
3123 <listitem>
3124 <para>Sets the "priority" of sending packets on this interface.
3125 Each port in a bridge may have a different priority which is used
3126 to decide which link to use. Lower value means higher priority.
3127 It is an integer value between 0 to 63. Networkd does not set any
3128 default, meaning the kernel default value of 32 is used.</para>
3129 </listitem>
3130 </varlistentry>
3131 </variablelist>
3132 </refsect1>
3133 <refsect1>
3134 <title>[BridgeFDB] Section Options</title>
3135 <para>The [BridgeFDB] section manages the forwarding database table of a port and accepts the following
3136 keys. Specify several [BridgeFDB] sections to configure several static MAC table entries.</para>
3137
3138 <variablelist class='network-directives'>
3139 <varlistentry>
3140 <term><varname>MACAddress=</varname></term>
3141 <listitem>
3142 <para>As in the [Network] section. This key is mandatory.</para>
3143 </listitem>
3144 </varlistentry>
3145 <varlistentry>
3146 <term><varname>Destination=</varname></term>
3147 <listitem>
3148 <para>Takes an IP address of the destination VXLAN tunnel endpoint.</para>
3149 </listitem>
3150 </varlistentry>
3151 <varlistentry>
3152 <term><varname>VLANId=</varname></term>
3153 <listitem>
3154 <para>The VLAN ID for the new static MAC table entry. If
3155 omitted, no VLAN ID information is appended to the new static MAC
3156 table entry.</para>
3157 </listitem>
3158 </varlistentry>
3159 <varlistentry>
3160 <term><varname>VNI=</varname></term>
3161 <listitem>
3162 <para>The VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to
3163 the remote VXLAN tunnel endpoint. Takes a number in the range 116777215.
3164 Defaults to unset.</para>
3165 </listitem>
3166 </varlistentry>
3167 <varlistentry>
3168 <term><varname>AssociatedWith=</varname></term>
3169 <listitem>
3170 <para>Specifies where the address is associated with. Takes one of <literal>use</literal>,
3171 <literal>self</literal>, <literal>master</literal> or <literal>router</literal>.
3172 <literal>use</literal> means the address is in use. User space can use this option to
3173 indicate to the kernel that the fdb entry is in use. <literal>self</literal> means
3174 the address is associated with the port drivers fdb. Usually hardware. <literal>master</literal>
3175 means the address is associated with master devices fdb. <literal>router</literal> means
3176 the destination address is associated with a router. Note that it's valid if the referenced
3177 device is a VXLAN type device and has route shortcircuit enabled. Defaults to <literal>self</literal>.</para>
3178 </listitem>
3179 </varlistentry>
3180 <varlistentry>
3181 <term><varname>OutgoingInterface=</varname></term>
3182 <listitem>
3183 <para>Specifies the name or index of the outgoing interface for the VXLAN device driver to
3184 reach the remote VXLAN tunnel endpoint. Defaults to unset.</para>
3185 </listitem>
3186 </varlistentry>
3187 </variablelist>
3188 </refsect1>
3189 <refsect1>
3190 <title>[BridgeMDB] Section Options</title>
3191 <para>The [BridgeMDB] section manages the multicast membership entries forwarding database table of a port and accepts the following
3192 keys. Specify several [BridgeMDB] sections to configure several permanent multicast membership entries.</para>
3193
3194 <variablelist class='network-directives'>
3195 <varlistentry>
3196 <term><varname>MulticastGroupAddress=</varname></term>
3197 <listitem>
3198 <para>Specifies the IPv4 or IPv6 multicast group address to add. This setting is mandatory.</para>
3199 </listitem>
3200 </varlistentry>
3201 <varlistentry>
3202 <term><varname>VLANId=</varname></term>
3203 <listitem>
3204 <para>The VLAN ID for the new entry. Valid ranges are 0 (no VLAN) to 4094. Optional, defaults to 0.</para>
3205 </listitem>
3206 </varlistentry>
3207 </variablelist>
3208 </refsect1>
3209
3210 <refsect1>
3211 <title>[LLDP] Section Options</title>
3212 <para>The [LLDP] section manages the Link Layer Discovery Protocol (LLDP) and accepts the following
3213 keys:</para>
3214 <variablelist class='network-directives'>
3215 <varlistentry>
3216 <term><varname>MUDURL=</varname></term>
3217 <listitem>
3218 <para>When configured, the specified Manufacturer Usage Descriptions (MUD) URL will be sent in
3219 LLDP packets. The syntax and semantics are the same as for <varname>MUDURL=</varname> in the
3220 [DHCPv4] section described above.</para>
3221
3222 <para>The MUD URLs received via LLDP packets are saved and can be read using the
3223 <function>sd_lldp_neighbor_get_mud_url()</function> function.</para>
3224 </listitem>
3225 </varlistentry>
3226 </variablelist>
3227 </refsect1>
3228
3229 <refsect1>
3230 <title>[CAN] Section Options</title>
3231 <para>The [CAN] section manages the Controller Area Network (CAN bus) and accepts the
3232 following keys:</para>
3233 <variablelist class='network-directives'>
3234 <varlistentry>
3235 <term><varname>BitRate=</varname></term>
3236 <listitem>
3237 <para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can
3238 be used here. Takes a number in the range 14294967295.</para>
3239 </listitem>
3240 </varlistentry>
3241 <varlistentry>
3242 <term><varname>SamplePoint=</varname></term>
3243 <listitem>
3244 <para>Optional sample point in percent with one decimal (e.g. <literal>75%</literal>,
3245 <literal>87.5%</literal>) or permille (e.g. <literal>875</literal>). This will be ignored when
3246 <varname>BitRate=</varname> is unspecified.</para>
3247 </listitem>
3248 </varlistentry>
3249 <varlistentry>
3250 <term><varname>TimeQuantaNSec=</varname></term>
3251 <term><varname>PropagationSegment=</varname></term>
3252 <term><varname>PhaseBufferSegment1=</varname></term>
3253 <term><varname>PhaseBufferSegment2=</varname></term>
3254 <term><varname>SyncJumpWidth=</varname></term>
3255 <listitem>
3256 <para>Specifies the time quanta, propagation segment, phase buffer segment 1 and 2, and the
3257 synchronization jump width, which allow one to define the CAN bit-timing in a hardware
3258 independent format as proposed by the Bosch CAN 2.0 Specification.
3259 <varname>TimeQuantaNSec=</varname> takes a timespan in nanoseconds.
3260 <varname>PropagationSegment=</varname>, <varname>PhaseBufferSegment1=</varname>,
3261 <varname>PhaseBufferSegment2=</varname>, and <varname>SyncJumpWidth=</varname> take number
3262 of time quantum specified in <varname>TimeQuantaNSec=</varname> and must be an unsigned
3263 integer in the range 04294967295. These settings except for
3264 <varname>SyncJumpWidth=</varname> will be ignored when <varname>BitRate=</varname> is
3265 specified.</para>
3266 </listitem>
3267 </varlistentry>
3268 <varlistentry>
3269 <term><varname>DataBitRate=</varname></term>
3270 <term><varname>DataSamplePoint=</varname></term>
3271 <listitem>
3272 <para>The bitrate and sample point for the data phase, if CAN-FD is used. These settings are
3273 analogous to the <varname>BitRate=</varname> and <varname>SamplePoint=</varname> keys.</para>
3274 </listitem>
3275 </varlistentry>
3276 <varlistentry>
3277 <term><varname>DataTimeQuantaNSec=</varname></term>
3278 <term><varname>DataPropagationSegment=</varname></term>
3279 <term><varname>DataPhaseBufferSegment1=</varname></term>
3280 <term><varname>DataPhaseBufferSegment2=</varname></term>
3281 <term><varname>DataSyncJumpWidth=</varname></term>
3282 <listitem>
3283 <para>Specifies the time quanta, propagation segment, phase buffer segment 1 and 2, and the
3284 synchronization jump width for the data phase, if CAN-FD is used. These settings are
3285 analogous to the <varname>TimeQuantaNSec=</varname> or related settings.</para>
3286 </listitem>
3287 </varlistentry>
3288 <varlistentry>
3289 <term><varname>FDMode=</varname></term>
3290 <listitem>
3291 <para>Takes a boolean. When <literal>yes</literal>, CAN-FD mode is enabled for the interface.
3292 Note, that a bitrate and optional sample point should also be set for the CAN-FD data phase using
3293 the <varname>DataBitRate=</varname> and <varname>DataSamplePoint=</varname> keys, or
3294 <varname>DataTimeQuanta=</varname> and related settings.</para>
3295 </listitem>
3296 </varlistentry>
3297 <varlistentry>
3298 <term><varname>FDNonISO=</varname></term>
3299 <listitem>
3300 <para>Takes a boolean. When <literal>yes</literal>, non-ISO CAN-FD mode is enabled for the
3301 interface. When unset, the kernel's default will be used.</para>
3302 </listitem>
3303 </varlistentry>
3304 <varlistentry>
3305 <term><varname>RestartSec=</varname></term>
3306 <listitem>
3307 <para>Automatic restart delay time. If set to a non-zero value, a restart of the CAN controller will be
3308 triggered automatically in case of a bus-off condition after the specified delay time. Subsecond delays can
3309 be specified using decimals (e.g. <literal>0.1s</literal>) or a <literal>ms</literal> or
3310 <literal>us</literal> postfix. Using <literal>infinity</literal> or <literal>0</literal> will turn the
3311 automatic restart off. By default automatic restart is disabled.</para>
3312 </listitem>
3313 </varlistentry>
3314 <varlistentry>
3315 <term><varname>Termination=</varname></term>
3316 <listitem>
3317 <para>Takes a boolean or a termination resistor value in ohm in the range 065535. When
3318 <literal>yes</literal>, the termination resistor is set to 120 ohm. When
3319 <literal>no</literal> or <literal>0</literal> is set, the termination resistor is disabled.
3320 When unset, the kernel's default will be used.</para>
3321 </listitem>
3322 </varlistentry>
3323 <varlistentry>
3324 <term><varname>TripleSampling=</varname></term>
3325 <listitem>
3326 <para>Takes a boolean. When <literal>yes</literal>, three samples (instead of one) are used to determine
3327 the value of a received bit by majority rule. When unset, the kernel's default will be used.</para>
3328 </listitem>
3329 </varlistentry>
3330 <varlistentry>
3331 <term><varname>BusErrorReporting=</varname></term>
3332 <listitem>
3333 <para>Takes a boolean. When <literal>yes</literal>, reporting of CAN bus errors is activated
3334 (those include single bit, frame format, and bit stuffing errors, unable to send dominant bit,
3335 unable to send recessive bit, bus overload, active error announcement, error occurred on
3336 transmission). When unset, the kernel's default will be used. Note: in case of a CAN bus with a
3337 single CAN device, sending a CAN frame may result in a huge number of CAN bus errors.</para>
3338 </listitem>
3339 </varlistentry>
3340 <varlistentry>
3341 <term><varname>ListenOnly=</varname></term>
3342 <listitem>
3343 <para>Takes a boolean. When <literal>yes</literal>, listen-only mode is enabled. When the
3344 interface is in listen-only mode, the interface neither transmit CAN frames nor send ACK
3345 bit. Listen-only mode is important to debug CAN networks without interfering with the
3346 communication or acknowledge the CAN frame. When unset, the kernel's default will be used.
3347 </para>
3348 </listitem>
3349 </varlistentry>
3350 <varlistentry>
3351 <term><varname>Loopback=</varname></term>
3352 <listitem>
3353 <para>Takes a boolean. When <literal>yes</literal>, loopback mode is enabled. When the
3354 loopback mode is enabled, the interface treats messages transmitted by itself as received
3355 messages. The loopback mode is important to debug CAN networks. When unset, the kernel's
3356 default will be used.</para>
3357 </listitem>
3358 </varlistentry>
3359 <varlistentry>
3360 <term><varname>OneShot=</varname></term>
3361 <listitem>
3362 <para>Takes a boolean. When <literal>yes</literal>, one-shot mode is enabled. When unset,
3363 the kernel's default will be used.</para>
3364 </listitem>
3365 </varlistentry>
3366 <varlistentry>
3367 <term><varname>PresumeAck=</varname></term>
3368 <listitem>
3369 <para>Takes a boolean. When <literal>yes</literal>, the interface will ignore missing CAN
3370 ACKs. When unset, the kernel's default will be used.</para>
3371 </listitem>
3372 </varlistentry>
3373 <varlistentry>
3374 <term><varname>ClassicDataLengthCode=</varname></term>
3375 <listitem>
3376 <para>Takes a boolean. When <literal>yes</literal>, the interface will handle the 4bit data
3377 length code (DLC). When unset, the kernel's default will be used.</para>
3378 </listitem>
3379 </varlistentry>
3380 </variablelist>
3381 </refsect1>
3382
3383 <refsect1>
3384 <title>[IPoIB] Section Options</title>
3385 <para>The [IPoIB] section manages the IP over Infiniband and accepts the following keys:</para>
3386 <variablelist class='network-directives'>
3387 <xi:include href="systemd.netdev.xml" xpointer="ipoib_mode" />
3388 <xi:include href="systemd.netdev.xml" xpointer="ipoib_umcast" />
3389 </variablelist>
3390 </refsect1>
3391
3392 <refsect1>
3393 <title>[QDisc] Section Options</title>
3394 <para>The [QDisc] section manages the traffic control queueing discipline (qdisc).</para>
3395
3396 <variablelist class='network-directives'>
3397 <varlistentry>
3398 <term><varname>Parent=</varname></term>
3399 <listitem>
3400 <para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>clsact</literal>
3401 or <literal>ingress</literal>. This is mandatory.</para>
3402 </listitem>
3403 </varlistentry>
3404
3405 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3406 </variablelist>
3407 </refsect1>
3408
3409 <refsect1>
3410 <title>[NetworkEmulator] Section Options</title>
3411 <para>The [NetworkEmulator] section manages the queueing discipline (qdisc) of the network emulator. It
3412 can be used to configure the kernel packet scheduler and simulate packet delay and loss for UDP or TCP
3413 applications, or limit the bandwidth usage of a particular service to simulate internet connections.
3414 </para>
3415
3416 <variablelist class='network-directives'>
3417 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3418 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3419
3420 <varlistentry>
3421 <term><varname>DelaySec=</varname></term>
3422 <listitem>
3423 <para>Specifies the fixed amount of delay to be added to all packets going out of the
3424 interface. Defaults to unset.</para>
3425 </listitem>
3426 </varlistentry>
3427
3428 <varlistentry>
3429 <term><varname>DelayJitterSec=</varname></term>
3430 <listitem>
3431 <para>Specifies the chosen delay to be added to the packets outgoing to the network
3432 interface. Defaults to unset.</para>
3433 </listitem>
3434 </varlistentry>
3435
3436 <varlistentry>
3437 <term><varname>PacketLimit=</varname></term>
3438 <listitem>
3439 <para>Specifies the maximum number of packets the qdisc may hold queued at a time.
3440 An unsigned integer in the range 04294967294. Defaults to 1000.</para>
3441 </listitem>
3442 </varlistentry>
3443
3444 <varlistentry>
3445 <term><varname>LossRate=</varname></term>
3446 <listitem>
3447 <para>Specifies an independent loss probability to be added to the packets outgoing from the
3448 network interface. Takes a percentage value, suffixed with "%". Defaults to unset.</para>
3449 </listitem>
3450 </varlistentry>
3451
3452 <varlistentry>
3453 <term><varname>DuplicateRate=</varname></term>
3454 <listitem>
3455 <para>Specifies that the chosen percent of packets is duplicated before queuing them.
3456 Takes a percentage value, suffixed with "%". Defaults to unset.</para>
3457 </listitem>
3458 </varlistentry>
3459 </variablelist>
3460 </refsect1>
3461
3462 <refsect1>
3463 <title>[TokenBucketFilter] Section Options</title>
3464 <para>The [TokenBucketFilter] section manages the queueing discipline (qdisc) of token bucket filter
3465 (tbf).</para>
3466
3467 <variablelist class='network-directives'>
3468 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3469 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3470
3471 <varlistentry>
3472 <term><varname>LatencySec=</varname></term>
3473 <listitem>
3474 <para>Specifies the latency parameter, which specifies the maximum amount of time a
3475 packet can sit in the Token Bucket Filter (TBF). Defaults to unset.</para>
3476 </listitem>
3477 </varlistentry>
3478
3479 <varlistentry>
3480 <term><varname>LimitBytes=</varname></term>
3481 <listitem>
3482 <para>Takes the number of bytes that can be queued waiting for tokens to become available.
3483 When the size is suffixed with K, M, or G, it is parsed as Kilobytes, Megabytes, or Gigabytes,
3484 respectively, to the base of 1024. Defaults to unset.</para>
3485 </listitem>
3486 </varlistentry>
3487
3488 <varlistentry>
3489 <term><varname>BurstBytes=</varname></term>
3490 <listitem>
3491 <para>Specifies the size of the bucket. This is the maximum amount of bytes that tokens
3492 can be available for instantaneous transfer. When the size is suffixed with K, M, or G, it is
3493 parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to
3494 unset.</para>
3495 </listitem>
3496 </varlistentry>
3497
3498 <varlistentry>
3499 <term><varname>Rate=</varname></term>
3500 <listitem>
3501 <para>Specifies the device specific bandwidth. When suffixed with K, M, or G, the specified
3502 bandwidth is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000.
3503 Defaults to unset.</para>
3504 </listitem>
3505 </varlistentry>
3506
3507 <varlistentry>
3508 <term><varname>MPUBytes=</varname></term>
3509 <listitem>
3510 <para>The Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes)
3511 for a packet. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
3512 Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to zero.</para>
3513 </listitem>
3514 </varlistentry>
3515
3516 <varlistentry>
3517 <term><varname>PeakRate=</varname></term>
3518 <listitem>
3519 <para>Takes the maximum depletion rate of the bucket. When suffixed with K, M, or G, the
3520 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
3521 1000. Defaults to unset.</para>
3522 </listitem>
3523 </varlistentry>
3524
3525 <varlistentry>
3526 <term><varname>MTUBytes=</varname></term>
3527 <listitem>
3528 <para>Specifies the size of the peakrate bucket. When suffixed with K, M, or G, the specified
3529 size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024.
3530 Defaults to unset.</para>
3531 </listitem>
3532 </varlistentry>
3533 </variablelist>
3534 </refsect1>
3535
3536 <refsect1>
3537 <title>[PIE] Section Options</title>
3538 <para>The [PIE] section manages the queueing discipline (qdisc) of Proportional Integral
3539 controller-Enhanced (PIE).</para>
3540
3541 <variablelist class='network-directives'>
3542 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3543 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3544
3545 <varlistentry>
3546 <term><varname>PacketLimit=</varname></term>
3547 <listitem>
3548 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached,
3549 incoming packets are dropped. An unsigned integer in the range 14294967294. Defaults to unset and
3550 kernel's default is used.</para>
3551 </listitem>
3552 </varlistentry>
3553 </variablelist>
3554 </refsect1>
3555
3556 <refsect1>
3557 <title>[FlowQueuePIE] Section Options</title>
3558 <para>The <literal>[FlowQueuePIE]</literal> section manages the queueing discipline
3559 (qdisc) of Flow Queue Proportional Integral controller-Enhanced (fq_pie).</para>
3560
3561 <variablelist class='network-directives'>
3562 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3563 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3564
3565 <varlistentry>
3566 <term><varname>PacketLimit=</varname></term>
3567 <listitem>
3568 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached,
3569 incoming packets are dropped. An unsigned integer ranges 1 to 4294967294. Defaults to unset and
3570 kernel's default is used.</para>
3571 </listitem>
3572 </varlistentry>
3573 </variablelist>
3574 </refsect1>
3575
3576 <refsect1>
3577 <title>[StochasticFairBlue] Section Options</title>
3578 <para>The [StochasticFairBlue] section manages the queueing discipline (qdisc) of stochastic fair blue
3579 (sfb).</para>
3580
3581 <variablelist class='network-directives'>
3582 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3583 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3584
3585 <varlistentry>
3586 <term><varname>PacketLimit=</varname></term>
3587 <listitem>
3588 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached,
3589 incoming packets are dropped. An unsigned integer in the range 04294967294. Defaults to unset and
3590 kernel's default is used.</para>
3591 </listitem>
3592 </varlistentry>
3593 </variablelist>
3594 </refsect1>
3595
3596 <refsect1>
3597 <title>[StochasticFairnessQueueing] Section Options</title>
3598 <para>The [StochasticFairnessQueueing] section manages the queueing discipline (qdisc) of stochastic
3599 fairness queueing (sfq).</para>
3600
3601 <variablelist class='network-directives'>
3602 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3603 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3604
3605 <varlistentry>
3606 <term><varname>PerturbPeriodSec=</varname></term>
3607 <listitem>
3608 <para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para>
3609 </listitem>
3610 </varlistentry>
3611 </variablelist>
3612 </refsect1>
3613
3614 <refsect1>
3615 <title>[BFIFO] Section Options</title>
3616 <para>The [BFIFO] section manages the queueing discipline (qdisc) of Byte limited Packet First In First
3617 Out (bfifo).</para>
3618
3619 <variablelist class='network-directives'>
3620 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3621 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3622
3623 <varlistentry>
3624 <term><varname>LimitBytes=</varname></term>
3625 <listitem>
3626 <para>Specifies the hard limit in bytes on the FIFO buffer size. The size limit prevents overflow
3627 in case the kernel is unable to dequeue packets as quickly as it receives them. When this limit is
3628 reached, incoming packets are dropped. When suffixed with K, M, or G, the specified size is parsed
3629 as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and
3630 kernel default is used.</para>
3631 </listitem>
3632 </varlistentry>
3633 </variablelist>
3634 </refsect1>
3635
3636 <refsect1>
3637 <title>[PFIFO] Section Options</title>
3638 <para>The [PFIFO] section manages the queueing discipline (qdisc) of Packet First In First Out
3639 (pfifo).</para>
3640
3641 <variablelist class='network-directives'>
3642 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3643 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3644
3645 <varlistentry>
3646 <term><varname>PacketLimit=</varname></term>
3647 <listitem>
3648 <para>Specifies the hard limit on the number of packets in the FIFO queue. The size limit prevents
3649 overflow in case the kernel is unable to dequeue packets as quickly as it receives them. When this
3650 limit is reached, incoming packets are dropped. An unsigned integer in the range
3651 04294967294. Defaults to unset and kernel's default is used.</para>
3652 </listitem>
3653 </varlistentry>
3654 </variablelist>
3655 </refsect1>
3656
3657 <refsect1>
3658 <title>[PFIFOHeadDrop] Section Options</title>
3659 <para>The [PFIFOHeadDrop] section manages the queueing discipline (qdisc) of Packet First In First Out
3660 Head Drop (pfifo_head_drop).</para>
3661
3662 <variablelist class='network-directives'>
3663 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3664 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3665
3666 <varlistentry>
3667 <term><varname>PacketLimit=</varname></term>
3668 <listitem>
3669 <para>As in [PFIFO] section.</para></listitem>
3670 </varlistentry>
3671 </variablelist>
3672 </refsect1>
3673
3674 <refsect1>
3675 <title>[PFIFOFast] Section Options</title>
3676 <para>The [PFIFOFast] section manages the queueing discipline (qdisc) of Packet First In First Out Fast
3677 (pfifo_fast).</para>
3678
3679 <variablelist class='network-directives'>
3680 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3681 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3682 </variablelist>
3683 </refsect1>
3684
3685 <refsect1>
3686 <title>[CAKE] Section Options</title>
3687 <para>The [CAKE] section manages the queueing discipline (qdisc) of Common Applications Kept Enhanced
3688 (CAKE).</para>
3689
3690 <variablelist class='network-directives'>
3691 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3692 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3693
3694 <varlistentry>
3695 <term><varname>Bandwidth=</varname></term>
3696 <listitem>
3697 <para>Specifies the shaper bandwidth. When suffixed with K, M, or G, the specified size is
3698 parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000. Defaults to
3699 unset and kernel's default is used.</para>
3700 </listitem>
3701 </varlistentry>
3702
3703 <varlistentry>
3704 <term><varname>AutoRateIngress=</varname></term>
3705 <listitem>
3706 <para>Takes a boolean value. Enables automatic capacity estimation based on traffic arriving
3707 at this qdisc. This is most likely to be useful with cellular links, which tend to change
3708 quality randomly. If this setting is enabled, the <varname>Bandwidth=</varname> setting is
3709 used as an initial estimate. Defaults to unset, and the kernel's default is used.</para>
3710 </listitem>
3711 </varlistentry>
3712
3713 <varlistentry>
3714 <term><varname>OverheadBytes=</varname></term>
3715 <listitem>
3716 <para>Specifies that bytes to be addeded to the size of each packet. Bytes may be negative.
3717 Takes an integer in the range -64256. Defaults to unset and kernel's default is used.
3718 </para>
3719 </listitem>
3720 </varlistentry>
3721
3722 <varlistentry>
3723 <term><varname>MPUBytes=</varname></term>
3724 <listitem>
3725 <para>Rounds each packet (including overhead) up to the specified bytes. Takes an integer in
3726 the range 1256. Defaults to unset and kernel's default is used.</para>
3727 </listitem>
3728 </varlistentry>
3729
3730 <varlistentry>
3731 <term><varname>CompensationMode=</varname></term>
3732 <listitem>
3733 <para>Takes one of <literal>none</literal>, <literal>atm</literal>, or <literal>ptm</literal>.
3734 Specifies the compensation mode for overhead calculation. When <literal>none</literal>, no
3735 compensation is taken into account. When <literal>atm</literal>, enables the compensation for
3736 ATM cell framing, which is normally found on ADSL links. When <literal>ptm</literal>, enables
3737 the compensation for PTM encoding, which is normally found on VDSL2 links and uses a 64b/65b
3738 encoding scheme. Defaults to unset and the kernel's default is used.</para>
3739 </listitem>
3740 </varlistentry>
3741
3742 <varlistentry>
3743 <term><varname>UseRawPacketSize=</varname></term>
3744 <listitem>
3745 <para>Takes a boolean value. When true, the packet size reported by the Linux kernel will be
3746 used, instead of the underlying IP packet size. Defaults to unset, and the kernel's default
3747 is used.</para>
3748 </listitem>
3749 </varlistentry>
3750
3751 <varlistentry>
3752 <term><varname>FlowIsolationMode=</varname></term>
3753 <listitem>
3754 <para>CAKE places packets from different flows into different queues, then packets from each
3755 queue are delivered fairly. This specifies whether the fairness is based on source address,
3756 destination address, individual flows, or any combination of those. The available values are:
3757 </para>
3758
3759 <variablelist>
3760 <varlistentry>
3761 <term><option>none</option></term>
3762 <listitem><para>
3763 The flow isolation is disabled, and all traffic passes through a single queue.
3764 </para></listitem>
3765 </varlistentry>
3766 <varlistentry>
3767 <term><option>src-host</option></term>
3768 <listitem><para>
3769 Flows are defined only by source address. Equivalent to the <literal>srchost</literal>
3770 option for <command>tc qdisc</command> command. See also
3771 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3772 </para></listitem>
3773 </varlistentry>
3774 <varlistentry>
3775 <term><option>dst-host</option></term>
3776 <listitem><para>
3777 Flows are defined only by destination address. Equivalent to the
3778 <literal>dsthost</literal> option for <command>tc qdisc</command> command. See also
3779 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3780 </para></listitem>
3781 </varlistentry>
3782 <varlistentry>
3783 <term><option>hosts</option></term>
3784 <listitem><para>
3785 Flows are defined by source-destination host pairs. Equivalent to the same option for
3786 <command>tc qdisc</command> command. See also
3787 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3788 </para></listitem>
3789 </varlistentry>
3790 <varlistentry>
3791 <term><option>flows</option></term>
3792 <listitem><para>
3793 Flows are defined by the entire 5-tuple of source address, destination address,
3794 transport protocol, source port and destination port. Equivalent to the same option for
3795 <command>tc qdisc</command> command. See also
3796 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3797 </para></listitem>
3798 </varlistentry>
3799 <varlistentry>
3800 <term><option>dual-src-host</option></term>
3801 <listitem><para>
3802 Flows are defined by the 5-tuple (see <literal>flows</literal> in the above), and
3803 fairness is applied first over source addresses, then over individual flows. Equivalent
3804 to the <literal>dual-srchost</literal> option for <command>tc qdisc</command> command.
3805 See also
3806 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3807 </para></listitem>
3808 </varlistentry>
3809 <varlistentry>
3810 <term><option>dual-dst-host</option></term>
3811 <listitem><para>
3812 Flows are defined by the 5-tuple (see <literal>flows</literal> in the above), and
3813 fairness is applied first over destination addresses, then over individual flows.
3814 Equivalent to the <literal>dual-dsthost</literal> option for
3815 <command>tc qdisc</command> command. See also
3816 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3817 </para></listitem>
3818 </varlistentry>
3819 <varlistentry>
3820 <term><option>triple</option></term>
3821 <listitem><para>
3822 Flows are defined by the 5-tuple (see <literal>flows</literal>), and fairness is
3823 applied over source and destination addresses, and also over individual flows.
3824 Equivalent to the <literal>triple-isolate</literal> option for
3825 <command>tc qdisc</command> command. See also
3826 <citerefentry project='man-pages'><refentrytitle>tc-cake</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
3827 </para></listitem>
3828 </varlistentry>
3829 </variablelist>
3830
3831 <para>Defaults to unset and the kernel's default is used.</para>
3832 </listitem>
3833 </varlistentry>
3834
3835 <varlistentry>
3836 <term><varname>NAT=</varname></term>
3837 <listitem>
3838 <para>Takes a boolean value. When true, CAKE performs a NAT lookup before applying
3839 flow-isolation rules, to determine the true addresses and port numbers of the packet, to
3840 improve fairness between hosts inside the NAT. This has no practical effect when
3841 <varname>FlowIsolationMode=</varname> is <literal>none</literal> or <literal>flows</literal>,
3842 or if NAT is performed on a different host. Defaults to unset, and the kernel's default is
3843 used.</para>
3844 </listitem>
3845 </varlistentry>
3846
3847 <varlistentry>
3848 <term><varname>PriorityQueueingPreset=</varname></term>
3849 <listitem>
3850 <para>CAKE divides traffic into <literal>tins</literal>, and each tin has its own independent
3851 set of flow-isolation queues, bandwidth threshold, and priority. This specifies the preset of
3852 tin profiles. The available values are:</para>
3853
3854 <variablelist>
3855 <varlistentry>
3856 <term><option>besteffort</option></term>
3857 <listitem><para>
3858 Disables priority queueing by placing all traffic in one tin.
3859 </para></listitem>
3860 </varlistentry>
3861 <varlistentry>
3862 <term><option>precedence</option></term>
3863 <listitem><para>
3864 Enables priority queueing based on the legacy interpretation of TOS
3865 <literal>Precedence</literal> field. Use of this preset on the modern Internet is
3866 firmly discouraged.
3867 </para></listitem>
3868 </varlistentry>
3869 <varlistentry>
3870 <term><option>diffserv8</option></term>
3871 <listitem><para>
3872 Enables priority queueing based on the Differentiated Service
3873 (<literal>DiffServ</literal>) field with eight tins: Background Traffic, High
3874 Throughput, Best Effort, Video Streaming, Low Latency Transactions, Interactive Shell,
3875 Minimum Latency, and Network Control.
3876 </para></listitem>
3877 </varlistentry>
3878 <varlistentry>
3879 <term><option>diffserv4</option></term>
3880 <listitem><para>
3881 Enables priority queueing based on the Differentiated Service
3882 (<literal>DiffServ</literal>) field with four tins: Background Traffic, Best Effort,
3883 Streaming Media, and Latency Sensitive.
3884 </para></listitem>
3885 </varlistentry>
3886 <varlistentry>
3887 <term><option>diffserv3</option></term>
3888 <listitem><para>
3889 Enables priority queueing based on the Differentiated Service
3890 (<literal>DiffServ</literal>) field with three tins: Background Traffic, Best Effort,
3891 and Latency Sensitive.
3892 </para></listitem>
3893 </varlistentry>
3894 </variablelist>
3895
3896 <para>Defaults to unset, and the kernel's default is used.</para>
3897 </listitem>
3898 </varlistentry>
3899
3900 <varlistentry>
3901 <term><varname>FirewallMark=</varname></term>
3902 <listitem>
3903 <para>Takes an integer in the range 14294967295. When specified, firewall-mark-based
3904 overriding of CAKE's tin selection is enabled. Defaults to unset, and the kernel's default is
3905 used.</para>
3906 </listitem>
3907 </varlistentry>
3908
3909 <varlistentry>
3910 <term><varname>Wash=</varname></term>
3911 <listitem>
3912 <para>Takes a boolean value. When true, CAKE clears the DSCP fields, except for ECN bits, of
3913 any packet passing through CAKE. Defaults to unset, and the kernel's default is used.</para>
3914 </listitem>
3915 </varlistentry>
3916
3917 <varlistentry>
3918 <term><varname>SplitGSO=</varname></term>
3919 <listitem>
3920 <para>Takes a boolean value. When true, CAKE will split General Segmentation Offload (GSO)
3921 super-packets into their on-the-wire components and dequeue them individually. Defaults to
3922 unset, and the kernel's default is used.</para>
3923 </listitem>
3924 </varlistentry>
3925
3926 </variablelist>
3927 </refsect1>
3928
3929 <refsect1>
3930 <title>[ControlledDelay] Section Options</title>
3931 <para>The [ControlledDelay] section manages the queueing discipline (qdisc) of
3932 controlled delay (CoDel).</para>
3933
3934 <variablelist class='network-directives'>
3935 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3936 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3937
3938 <varlistentry>
3939 <term><varname>PacketLimit=</varname></term>
3940 <listitem>
3941 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached,
3942 incoming packets are dropped. An unsigned integer in the range 04294967294. Defaults to unset and
3943 kernel's default is used.</para>
3944 </listitem>
3945 </varlistentry>
3946
3947 <varlistentry>
3948 <term><varname>TargetSec=</varname></term>
3949 <listitem>
3950 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
3951 Defaults to unset and kernel's default is used.</para>
3952 </listitem>
3953 </varlistentry>
3954
3955 <varlistentry>
3956 <term><varname>IntervalSec=</varname></term>
3957 <listitem>
3958 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
3959 become too stale. Defaults to unset and kernel's default is used.</para>
3960 </listitem>
3961 </varlistentry>
3962
3963 <varlistentry>
3964 <term><varname>ECN=</varname></term>
3965 <listitem>
3966 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
3967 unset and kernel's default is used.</para>
3968 </listitem>
3969 </varlistentry>
3970
3971 <varlistentry>
3972 <term><varname>CEThresholdSec=</varname></term>
3973 <listitem>
3974 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
3975 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
3976 </listitem>
3977 </varlistentry>
3978 </variablelist>
3979 </refsect1>
3980
3981 <refsect1>
3982 <title>[DeficitRoundRobinScheduler] Section Options</title>
3983 <para>The [DeficitRoundRobinScheduler] section manages the queueing discipline (qdisc) of Deficit Round
3984 Robin Scheduler (DRR).</para>
3985
3986 <variablelist class='network-directives'>
3987 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3988 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3989 </variablelist>
3990 </refsect1>
3991
3992 <refsect1>
3993 <title>[DeficitRoundRobinSchedulerClass] Section Options</title>
3994 <para>The [DeficitRoundRobinSchedulerClass] section manages the traffic control class of Deficit Round
3995 Robin Scheduler (DRR).</para>
3996
3997 <variablelist class='network-directives'>
3998 <xi:include href="tc.xml" xpointer="tclass-parent" />
3999 <xi:include href="tc.xml" xpointer="tclass-classid" />
4000
4001 <varlistentry>
4002 <term><varname>QuantumBytes=</varname></term>
4003 <listitem>
4004 <para>Specifies the amount of bytes a flow is allowed to dequeue before the scheduler moves
4005 to the next class. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
4006 Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to the MTU of the
4007 interface.</para>
4008 </listitem>
4009 </varlistentry>
4010
4011 </variablelist>
4012 </refsect1>
4013
4014 <refsect1>
4015 <title>[EnhancedTransmissionSelection] Section Options</title>
4016 <para>The [EnhancedTransmissionSelection] section manages the queueing discipline (qdisc) of Enhanced
4017 Transmission Selection (ETS).</para>
4018
4019 <variablelist class='network-directives'>
4020 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4021 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4022
4023 <varlistentry>
4024 <term><varname>Bands=</varname></term>
4025 <listitem>
4026 <para>Specifies the number of bands. An unsigned integer in the range 116. This value has to be at
4027 least large enough to cover the strict bands specified through the <varname>StrictBands=</varname>
4028 and bandwidth-sharing bands specified in <varname>QuantumBytes=</varname>.</para>
4029 </listitem>
4030 </varlistentry>
4031
4032 <varlistentry>
4033 <term><varname>StrictBands=</varname></term>
4034 <listitem>
4035 <para>Specifies the number of bands that should be created in strict mode. An unsigned integer in
4036 the range 116.</para>
4037 </listitem>
4038 </varlistentry>
4039
4040 <varlistentry>
4041 <term><varname>QuantumBytes=</varname></term>
4042 <listitem>
4043 <para>Specifies the white-space separated list of quantum used in band-sharing bands. When
4044 suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
4045 respectively, to the base of 1024. This setting can be specified multiple times. If an empty
4046 string is assigned, then the all previous assignments are cleared.</para>
4047 </listitem>
4048 </varlistentry>
4049
4050 <varlistentry>
4051 <term><varname>PriorityMap=</varname></term>
4052 <listitem>
4053 <para>The priority map maps the priority of a packet to a band. The argument is a whitespace
4054 separated list of numbers. The first number indicates which band the packets with priority 0 should
4055 be put to, the second is for priority 1, and so on. There can be up to 16 numbers in the list. If
4056 there are fewer, the default band that traffic with one of the unmentioned priorities goes to is
4057 the last one. Each band number must be in the range 0255. This setting can be specified multiple
4058 times. If an empty string is assigned, then the all previous assignments are cleared.</para>
4059 </listitem>
4060 </varlistentry>
4061 </variablelist>
4062 </refsect1>
4063
4064 <refsect1>
4065 <title>[GenericRandomEarlyDetection] Section Options</title>
4066 <para>The [GenericRandomEarlyDetection] section manages the queueing discipline (qdisc) of Generic Random
4067 Early Detection (GRED).</para>
4068
4069 <variablelist class='network-directives'>
4070 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4071 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4072
4073 <varlistentry>
4074 <term><varname>VirtualQueues=</varname></term>
4075 <listitem>
4076 <para>Specifies the number of virtual queues. Takes an integer in the range 116. Defaults to unset
4077 and kernel's default is used.</para>
4078 </listitem>
4079 </varlistentry>
4080
4081 <varlistentry>
4082 <term><varname>DefaultVirtualQueue=</varname></term>
4083 <listitem>
4084 <para>Specifies the number of default virtual queue. This must be less than <varname>VirtualQueue=</varname>.
4085 Defaults to unset and kernel's default is used.</para>
4086 </listitem>
4087 </varlistentry>
4088
4089 <varlistentry>
4090 <term><varname>GenericRIO=</varname></term>
4091 <listitem>
4092 <para>Takes a boolean. It turns on the RIO-like buffering scheme. Defaults to
4093 unset and kernel's default is used.</para>
4094 </listitem>
4095 </varlistentry>
4096 </variablelist>
4097 </refsect1>
4098
4099 <refsect1>
4100 <title>[FairQueueingControlledDelay] Section Options</title>
4101 <para>The [FairQueueingControlledDelay] section manages the queueing discipline (qdisc) of fair queuing
4102 controlled delay (FQ-CoDel).</para>
4103
4104 <variablelist class='network-directives'>
4105 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4106 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4107
4108 <varlistentry>
4109 <term><varname>PacketLimit=</varname></term>
4110 <listitem>
4111 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
4112 dropped. Defaults to unset and kernel's default is used.</para>
4113 </listitem>
4114 </varlistentry>
4115
4116 <varlistentry>
4117 <term><varname>MemoryLimitBytes=</varname></term>
4118 <listitem>
4119 <para>Specifies the limit on the total number of bytes that can be queued in this FQ-CoDel instance.
4120 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
4121 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
4122 </listitem>
4123 </varlistentry>
4124
4125 <varlistentry>
4126 <term><varname>Flows=</varname></term>
4127 <listitem>
4128 <para>Specifies the number of flows into which the incoming packets are classified.
4129 Defaults to unset and kernel's default is used.</para>
4130 </listitem>
4131 </varlistentry>
4132
4133 <varlistentry>
4134 <term><varname>TargetSec=</varname></term>
4135 <listitem>
4136 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
4137 Defaults to unset and kernel's default is used.</para>
4138 </listitem>
4139 </varlistentry>
4140
4141 <varlistentry>
4142 <term><varname>IntervalSec=</varname></term>
4143 <listitem>
4144 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
4145 become too stale. Defaults to unset and kernel's default is used.</para>
4146 </listitem>
4147 </varlistentry>
4148
4149 <varlistentry>
4150 <term><varname>QuantumBytes=</varname></term>
4151 <listitem>
4152 <para>Specifies the number of bytes used as the "deficit" in the fair queuing algorithm timespan.
4153 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
4154 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
4155 </listitem>
4156 </varlistentry>
4157
4158 <varlistentry>
4159 <term><varname>ECN=</varname></term>
4160 <listitem>
4161 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
4162 unset and kernel's default is used.</para>
4163 </listitem>
4164 </varlistentry>
4165
4166 <varlistentry>
4167 <term><varname>CEThresholdSec=</varname></term>
4168 <listitem>
4169 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
4170 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
4171 </listitem>
4172 </varlistentry>
4173 </variablelist>
4174 </refsect1>
4175
4176 <refsect1>
4177 <title>[FairQueueing] Section Options</title>
4178 <para>The [FairQueueing] section manages the queueing discipline (qdisc) of fair queue traffic policing
4179 (FQ).</para>
4180
4181 <variablelist class='network-directives'>
4182 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4183 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4184
4185 <varlistentry>
4186 <term><varname>PacketLimit=</varname></term>
4187 <listitem>
4188 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
4189 dropped. Defaults to unset and kernel's default is used.</para>
4190 </listitem>
4191 </varlistentry>
4192
4193 <varlistentry>
4194 <term><varname>FlowLimit=</varname></term>
4195 <listitem>
4196 <para>Specifies the hard limit on the maximum number of packets queued per flow. Defaults to
4197 unset and kernel's default is used.</para>
4198 </listitem>
4199 </varlistentry>
4200
4201 <varlistentry>
4202 <term><varname>QuantumBytes=</varname></term>
4203 <listitem>
4204 <para>Specifies the credit per dequeue RR round, i.e. the amount of bytes a flow is allowed
4205 to dequeue at once. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
4206 Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and kernel's
4207 default is used.</para>
4208 </listitem>
4209 </varlistentry>
4210
4211 <varlistentry>
4212 <term><varname>InitialQuantumBytes=</varname></term>
4213 <listitem>
4214 <para>Specifies the initial sending rate credit, i.e. the amount of bytes a new flow is
4215 allowed to dequeue initially. When suffixed with K, M, or G, the specified size is parsed as
4216 Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and
4217 kernel's default is used.</para>
4218 </listitem>
4219 </varlistentry>
4220
4221 <varlistentry>
4222 <term><varname>MaximumRate=</varname></term>
4223 <listitem>
4224 <para>Specifies the maximum sending rate of a flow. When suffixed with K, M, or G, the
4225 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
4226 1000. Defaults to unset and kernel's default is used.</para>
4227 </listitem>
4228 </varlistentry>
4229
4230 <varlistentry>
4231 <term><varname>Buckets=</varname></term>
4232 <listitem>
4233 <para>Specifies the size of the hash table used for flow lookups. Defaults to unset and
4234 kernel's default is used.</para>
4235 </listitem>
4236 </varlistentry>
4237
4238 <varlistentry>
4239 <term><varname>OrphanMask=</varname></term>
4240 <listitem>
4241 <para>Takes an unsigned integer. For packets not owned by a socket, fq is able to mask a part
4242 of hash and reduce number of buckets associated with the traffic. Defaults to unset and
4243 kernel's default is used.</para>
4244 </listitem>
4245 </varlistentry>
4246
4247 <varlistentry>
4248 <term><varname>Pacing=</varname></term>
4249 <listitem>
4250 <para>Takes a boolean, and enables or disables flow pacing. Defaults to unset and kernel's
4251 default is used.</para>
4252 </listitem>
4253 </varlistentry>
4254
4255 <varlistentry>
4256 <term><varname>CEThresholdSec=</varname></term>
4257 <listitem>
4258 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
4259 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
4260 </listitem>
4261 </varlistentry>
4262 </variablelist>
4263 </refsect1>
4264
4265 <refsect1>
4266 <title>[TrivialLinkEqualizer] Section Options</title>
4267 <para>The [TrivialLinkEqualizer] section manages the queueing discipline (qdisc) of trivial link
4268 equalizer (teql).</para>
4269
4270 <variablelist class='network-directives'>
4271 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4272 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4273
4274 <varlistentry>
4275 <term><varname>Id=</varname></term>
4276 <listitem>
4277 <para>Specifies the interface ID <literal>N</literal> of teql. Defaults to <literal>0</literal>.
4278 Note that when teql is used, currently, the module <constant>sch_teql</constant> with
4279 <constant>max_equalizers=N+1</constant> option must be loaded before
4280 <command>systemd-networkd</command> is started.</para>
4281 </listitem>
4282 </varlistentry>
4283 </variablelist>
4284 </refsect1>
4285
4286 <refsect1>
4287 <title>[HierarchyTokenBucket] Section Options</title>
4288 <para>The [HierarchyTokenBucket] section manages the queueing discipline (qdisc) of hierarchy token
4289 bucket (htb).</para>
4290
4291 <variablelist class='network-directives'>
4292 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4293 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4294
4295 <varlistentry>
4296 <term><varname>DefaultClass=</varname></term>
4297 <listitem>
4298 <para>Takes the minor id in hexadecimal of the default class. Unclassified traffic gets sent
4299 to the class. Defaults to unset.</para>
4300 </listitem>
4301 </varlistentry>
4302
4303 <varlistentry>
4304 <term><varname>RateToQuantum=</varname></term>
4305 <listitem>
4306 <para>Takes an unsigned integer. The DRR quantums are calculated by dividing the value
4307 configured in <varname>Rate=</varname> by <varname>RateToQuantum=</varname>.</para>
4308 </listitem>
4309 </varlistentry>
4310 </variablelist>
4311 </refsect1>
4312
4313 <refsect1>
4314 <title>[HierarchyTokenBucketClass] Section Options</title>
4315 <para>The [HierarchyTokenBucketClass] section manages the traffic control class of hierarchy token bucket
4316 (htb).</para>
4317
4318 <variablelist class='network-directives'>
4319 <xi:include href="tc.xml" xpointer="tclass-parent" />
4320 <xi:include href="tc.xml" xpointer="tclass-classid" />
4321
4322 <varlistentry>
4323 <term><varname>Priority=</varname></term>
4324 <listitem>
4325 <para>Specifies the priority of the class. In the round-robin process, classes with the lowest
4326 priority field are tried for packets first.</para>
4327 </listitem>
4328 </varlistentry>
4329
4330 <varlistentry>
4331 <term><varname>QuantumBytes=</varname></term>
4332 <listitem>
4333 <para>Specifies how many bytes to serve from leaf at once. When suffixed with K, M, or G, the
4334 specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of
4335 1024.</para>
4336 </listitem>
4337 </varlistentry>
4338
4339 <varlistentry>
4340 <term><varname>MTUBytes=</varname></term>
4341 <listitem>
4342 <para>Specifies the maximum packet size we create. When suffixed with K, M, or G, the specified
4343 size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024.</para>
4344 </listitem>
4345 </varlistentry>
4346
4347 <varlistentry>
4348 <term><varname>OverheadBytes=</varname></term>
4349 <listitem>
4350 <para>Takes an unsigned integer which specifies per-packet size overhead used in rate
4351 computations. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
4352 Megabytes, or Gigabytes, respectively, to the base of 1024.</para>
4353 </listitem>
4354 </varlistentry>
4355
4356 <varlistentry>
4357 <term><varname>Rate=</varname></term>
4358 <listitem>
4359 <para>Specifies the maximum rate this class and all its children are guaranteed. When suffixed
4360 with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits, respectively,
4361 to the base of 1000. This setting is mandatory.</para>
4362 </listitem>
4363 </varlistentry>
4364
4365 <varlistentry>
4366 <term><varname>CeilRate=</varname></term>
4367 <listitem>
4368 <para>Specifies the maximum rate at which a class can send, if its parent has bandwidth to spare.
4369 When suffixed with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits,
4370 respectively, to the base of 1000. When unset, the value specified with <varname>Rate=</varname>
4371 is used.</para>
4372 </listitem>
4373 </varlistentry>
4374
4375 <varlistentry>
4376 <term><varname>BufferBytes=</varname></term>
4377 <listitem>
4378 <para>Specifies the maximum bytes burst which can be accumulated during idle period. When suffixed
4379 with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively,
4380 to the base of 1024.</para>
4381 </listitem>
4382 </varlistentry>
4383
4384 <varlistentry>
4385 <term><varname>CeilBufferBytes=</varname></term>
4386 <listitem>
4387 <para>Specifies the maximum bytes burst for ceil which can be accumulated during idle period.
4388 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
4389 respectively, to the base of 1024.</para>
4390 </listitem>
4391 </varlistentry>
4392 </variablelist>
4393 </refsect1>
4394
4395 <refsect1>
4396 <title>[HeavyHitterFilter] Section Options</title>
4397 <para>The [HeavyHitterFilter] section manages the queueing discipline (qdisc) of Heavy Hitter Filter
4398 (hhf).</para>
4399
4400 <variablelist class='network-directives'>
4401 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4402 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4403
4404 <varlistentry>
4405 <term><varname>PacketLimit=</varname></term>
4406 <listitem>
4407 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached,
4408 incoming packets are dropped. An unsigned integer in the range 04294967294. Defaults to unset and
4409 kernel's default is used.</para>
4410 </listitem>
4411 </varlistentry>
4412 </variablelist>
4413 </refsect1>
4414
4415 <refsect1>
4416 <title>[QuickFairQueueing] Section Options</title>
4417 <para>The [QuickFairQueueing] section manages the queueing discipline (qdisc) of Quick Fair Queueing
4418 (QFQ).</para>
4419
4420 <variablelist class='network-directives'>
4421 <xi:include href="tc.xml" xpointer="qdisc-parent" />
4422 <xi:include href="tc.xml" xpointer="qdisc-handle" />
4423 </variablelist>
4424 </refsect1>
4425
4426 <refsect1>
4427 <title>[QuickFairQueueingClass] Section Options</title>
4428 <para>The [QuickFairQueueingClass] section manages the traffic control class of Quick Fair Queueing
4429 (qfq).</para>
4430
4431 <variablelist class='network-directives'>
4432 <xi:include href="tc.xml" xpointer="tclass-parent" />
4433 <xi:include href="tc.xml" xpointer="tclass-classid" />
4434
4435 <varlistentry>
4436 <term><varname>Weight=</varname></term>
4437 <listitem>
4438 <para>Specifies the weight of the class. Takes an integer in the range 11023. Defaults to
4439 unset in which case the kernel default is used.</para>
4440 </listitem>
4441 </varlistentry>
4442
4443 <varlistentry>
4444 <term><varname>MaxPacketBytes=</varname></term>
4445 <listitem>
4446 <para>Specifies the maximum packet size in bytes for the class. When suffixed with K, M, or G, the
4447 specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of
4448 1024. When unset, the kernel default is used.</para>
4449 </listitem>
4450 </varlistentry>
4451 </variablelist>
4452 </refsect1>
4453
4454 <refsect1>
4455 <title>[BridgeVLAN] Section Options</title>
4456 <para>The [BridgeVLAN] section manages the VLAN ID configuration of a bridge port and accepts the
4457 following keys. Specify several [BridgeVLAN] sections to configure several VLAN entries. The
4458 <varname>VLANFiltering=</varname> option has to be enabled, see the [Bridge] section in
4459 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
4460
4461 <variablelist class='network-directives'>
4462 <varlistentry>
4463 <term><varname>VLAN=</varname></term>
4464 <listitem>
4465 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. Takes
4466 an integer in the range 14094.</para>
4467 </listitem>
4468 </varlistentry>
4469 <varlistentry>
4470 <term><varname>EgressUntagged=</varname></term>
4471 <listitem>
4472 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
4473 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
4474 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
4475 </listitem>
4476 </varlistentry>
4477 <varlistentry>
4478 <term><varname>PVID=</varname></term>
4479 <listitem>
4480 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
4481 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
4482 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
4483 </listitem>
4484 </varlistentry>
4485 </variablelist>
4486 </refsect1>
4487
4488 <refsect1>
4489 <title>Examples</title>
4490 <example>
4491 <title>Static network configuration</title>
4492
4493 <programlisting># /etc/systemd/network/50-static.network
4494 [Match]
4495 Name=enp2s0
4496
4497 [Network]
4498 Address=192.168.0.15/24
4499 Gateway=192.168.0.1</programlisting>
4500
4501 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
4502 specified gateway will be used for a default route.</para>
4503 </example>
4504
4505 <example>
4506 <title>DHCP on ethernet links</title>
4507
4508 <programlisting># /etc/systemd/network/80-dhcp.network
4509 [Match]
4510 Name=en*
4511
4512 [Network]
4513 DHCP=yes</programlisting>
4514
4515 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
4516 <literal>en</literal> (i.e. ethernet interfaces).</para>
4517 </example>
4518
4519 <example>
4520 <title>IPv6 Prefix Delegation (DHCPv6 PD)</title>
4521
4522 <programlisting># /etc/systemd/network/55-dhcpv6-pd-upstream.network
4523 [Match]
4524 Name=enp1s0
4525
4526 [Network]
4527 DHCP=ipv6
4528
4529 # The below setting is optional, to also assign an address in the delegated prefix
4530 # to the upstream interface. If not necessary, then comment out the line below and
4531 # the [DHCPPrefixDelegation] section.
4532 DHCPPrefixDelegation=yes
4533
4534 # If the upstream network provides Router Advertisement with Managed bit set,
4535 # then comment out the line below and WithoutRA= setting in the [DHCPv6] section.
4536 IPv6AcceptRA=no
4537
4538 [DHCPv6]
4539 WithoutRA=solicit
4540
4541 [DHCPPrefixDelegation]
4542 UplinkInterface=:self
4543 SubnetId=0
4544 Announce=no</programlisting>
4545
4546 <programlisting># /etc/systemd/network/55-dhcpv6-pd-downstream.network
4547 [Match]
4548 Name=enp2s0
4549
4550 [Network]
4551 DHCPPrefixDelegation=yes
4552 IPv6SendRA=yes
4553
4554 # It is expected that the host is acting as a router. So, usually it is not
4555 # necessary to receive Router Advertisement from other hosts in the downstream network.
4556 IPv6AcceptRA=no
4557
4558 [DHCPPrefixDelegation]
4559 UplinkInterface=enp1s0
4560 SubnetId=1
4561 Announce=yes</programlisting>
4562
4563 <para>This will enable DHCPv6-PD on the interface enp1s0 as an upstream interface where the
4564 DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.
4565 The delegated prefixes are distributed by IPv6 Router Advertisement on the downstream network.
4566 </para>
4567 </example>
4568
4569 <example>
4570 <title>IPv6 Prefix Delegation (DHCPv4 6RD)</title>
4571
4572 <programlisting># /etc/systemd/network/55-dhcpv4-6rd-upstream.network
4573 [Match]
4574 Name=enp1s0
4575
4576 [Network]
4577 DHCP=ipv4
4578
4579 # When DHCPv4-6RD is used, the upstream network does not support IPv6.
4580 # Hence, it is not necessary to wait for Router Advertisement, which is enabled by default.
4581 IPv6AcceptRA=no
4582
4583 [DHCPv4]
4584 Use6RD=yes</programlisting>
4585
4586 <programlisting># /etc/systemd/network/55-dhcpv4-6rd-downstream.network
4587 [Match]
4588 Name=enp2s0
4589
4590 [Network]
4591 DHCPPrefixDelegation=yes
4592 IPv6SendRA=yes
4593
4594 # It is expected that the host is acting as a router. So, usually it is not
4595 # necessary to receive Router Advertisement from other hosts in the downstream network.
4596 IPv6AcceptRA=no
4597
4598 [DHCPPrefixDelegation]
4599 UplinkInterface=enp1s0
4600 SubnetId=1
4601 Announce=yes</programlisting>
4602
4603 <para>This will enable DHCPv4-6RD on the interface enp1s0 as an upstream interface where the
4604 DHCPv4 client is running and enp2s0 as a downstream interface where the prefix is delegated to.
4605 The delegated prefixes are distributed by IPv6 Router Advertisement on the downstream network.
4606 </para>
4607 </example>
4608
4609 <example>
4610 <title>A bridge with two enslaved links</title>
4611
4612 <programlisting># /etc/systemd/network/25-bridge-static.network
4613 [Match]
4614 Name=bridge0
4615
4616 [Network]
4617 Address=192.168.0.15/24
4618 Gateway=192.168.0.1
4619 DNS=192.168.0.1</programlisting>
4620
4621 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
4622 [Match]
4623 Name=enp2s0
4624
4625 [Network]
4626 Bridge=bridge0</programlisting>
4627
4628 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
4629 [Match]
4630 Name=wlp3s0
4631
4632 [Network]
4633 Bridge=bridge0</programlisting>
4634
4635 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
4636 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
4637 and network assigned, and a default route via the specified gateway will be
4638 added. The specified DNS server will be added to the global list of DNS resolvers.
4639 </para>
4640 </example>
4641
4642 <example>
4643 <title>Bridge port with VLAN forwarding</title>
4644
4645 <programlisting>
4646 # /etc/systemd/network/25-bridge-slave-interface-1.network
4647 [Match]
4648 Name=enp2s0
4649
4650 [Network]
4651 Bridge=bridge0
4652
4653 [BridgeVLAN]
4654 VLAN=1-32
4655 PVID=42
4656 EgressUntagged=42
4657
4658 [BridgeVLAN]
4659 VLAN=100-200
4660
4661 [BridgeVLAN]
4662 EgressUntagged=300-400</programlisting>
4663
4664 <para>This overrides the configuration specified in the previous example for the
4665 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
4666 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
4667 untagged when they leave on this interface. Untagged packets which arrive on this
4668 interface will be assigned VLAN ID 42.</para>
4669 </example>
4670
4671 <example>
4672 <title>Various tunnels</title>
4673
4674 <programlisting>/etc/systemd/network/25-tunnels.network
4675 [Match]
4676 Name=ens1
4677
4678 [Network]
4679 Tunnel=ipip-tun
4680 Tunnel=sit-tun
4681 Tunnel=gre-tun
4682 Tunnel=vti-tun
4683 </programlisting>
4684
4685 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
4686 [NetDev]
4687 Name=ipip-tun
4688 Kind=ipip
4689 </programlisting>
4690
4691 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
4692 [NetDev]
4693 Name=sit-tun
4694 Kind=sit
4695 </programlisting>
4696
4697 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
4698 [NetDev]
4699 Name=gre-tun
4700 Kind=gre
4701 </programlisting>
4702
4703 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
4704 [NetDev]
4705 Name=vti-tun
4706 Kind=vti
4707 </programlisting>
4708
4709 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
4710 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
4711 </example>
4712
4713 <example>
4714 <title>A bond device</title>
4715
4716 <programlisting># /etc/systemd/network/30-bond1.network
4717 [Match]
4718 Name=bond1
4719
4720 [Network]
4721 DHCP=ipv6
4722 </programlisting>
4723
4724 <programlisting># /etc/systemd/network/30-bond1.netdev
4725 [NetDev]
4726 Name=bond1
4727 Kind=bond
4728 </programlisting>
4729
4730 <programlisting># /etc/systemd/network/30-bond1-dev1.network
4731 [Match]
4732 MACAddress=52:54:00:e9:64:41
4733
4734 [Network]
4735 Bond=bond1
4736 </programlisting>
4737
4738 <programlisting># /etc/systemd/network/30-bond1-dev2.network
4739 [Match]
4740 MACAddress=52:54:00:e9:64:42
4741
4742 [Network]
4743 Bond=bond1
4744 </programlisting>
4745
4746 <para>This will create a bond device <literal>bond1</literal> and enslave the two
4747 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
4748 will be used to acquire an address.</para>
4749 </example>
4750
4751 <example>
4752 <title>Virtual Routing and Forwarding (VRF)</title>
4753 <para>Add the <literal>bond1</literal> interface to the VRF master interface
4754 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
4755 within the routing table defined during VRF creation. For kernels before 4.8 traffic
4756 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
4757 </para>
4758 <programlisting># /etc/systemd/network/25-vrf.network
4759 [Match]
4760 Name=bond1
4761
4762 [Network]
4763 VRF=vrf1
4764 </programlisting>
4765 </example>
4766
4767 <example>
4768 <title>MacVTap</title>
4769 <para>This brings up a network interface <literal>macvtap-test</literal>
4770 and attaches it to <literal>enp0s25</literal>.</para>
4771 <programlisting># /usr/lib/systemd/network/25-macvtap.network
4772 [Match]
4773 Name=enp0s25
4774
4775 [Network]
4776 MACVTAP=macvtap-test
4777 </programlisting>
4778 </example>
4779
4780 <example>
4781 <title>A Xfrm interface with physical underlying device.</title>
4782
4783 <programlisting># /etc/systemd/network/27-xfrm.netdev
4784 [NetDev]
4785 Name=xfrm0
4786 Kind=xfrm
4787
4788 [Xfrm]
4789 InterfaceId=7</programlisting>
4790
4791 <programlisting># /etc/systemd/network/27-eth0.network
4792 [Match]
4793 Name=eth0
4794
4795 [Network]
4796 Xfrm=xfrm0</programlisting>
4797
4798 <para>This creates a <literal>xfrm0</literal> interface and binds it to the <literal>eth0</literal> device.
4799 This allows hardware based ipsec offloading to the <literal>eth0</literal> nic.
4800 If offloading is not needed, xfrm interfaces can be assigned to the <literal>lo</literal> device.
4801 </para>
4802 </example>
4803 </refsect1>
4804
4805 <refsect1>
4806 <title>See Also</title>
4807 <para>
4808 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
4809 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
4810 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
4811 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
4812 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
4813 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
4814 </para>
4815 </refsect1>
4816
4817 </refentry>