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