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