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