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