]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.network.xml
Merge pull request #15265 from fbuihuu/mount-fixes
[thirdparty/systemd.git] / man / systemd.network.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
5
6 <refentry id="systemd.network" conditional='ENABLE_NETWORKD'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd.network</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd.network</refentrytitle>
16 <manvolnum>5</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd.network</refname>
21 <refpurpose>Network configuration</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename><replaceable>network</replaceable>.network</filename></para>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>A plain ini-style text file that encodes network configuration for matching network interfaces,
32 used by
33 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
34 See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
35 for a general description of the syntax.</para>
36
37 <para>The main network file must have the extension <filename>.network</filename>; other
38 extensions are ignored. Networks are applied to links whenever the links appear.</para>
39
40 <para>The <filename>.network</filename> files are read from the files located in the system network
41 directories <filename>/usr/lib/systemd/network</filename> and
42 <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
43 <filename>/run/systemd/network</filename> and the local administration network directory
44 <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and processed
45 in lexical order, regardless of the directories in which they live. However, files with identical
46 filenames replace each other. Files in <filename>/etc</filename> have the highest priority, files in
47 <filename>/run</filename> take precedence over files with the same name under
48 <filename>/usr</filename>. This can be used to override a system-supplied configuration file with a local
49 file if needed. As a special case, an empty file (file size 0) or symlink with the same name pointing to
50 <filename>/dev/null</filename> disables the configuration file entirely (it is "masked").</para>
51
52 <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory
53 <filename>foo.network.d/</filename> may exist. All files with the suffix
54 <literal>.conf</literal> from this directory will be parsed after the file itself is
55 parsed. This is useful to alter or add configuration settings, without having to modify the main
56 configuration file. Each drop-in file must have appropriate section headers.</para>
57
58 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
59 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
60 <filename>/run/systemd/network</filename> directories. Drop-in files in
61 <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn
62 take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these
63 directories take precedence over the main network file wherever located.</para>
64
65 <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
66 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
67 disabled for that interface by writing "1" to
68 <filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>.
69 </para>
70 </refsect1>
71
72 <refsect1>
73 <title>[Match] Section Options</title>
74
75 <para>The network file contains a <literal>[Match]</literal>
76 section, which determines if a given network file may be applied
77 to a given device; and a <literal>[Network]</literal> section
78 specifying how the device should be configured. The first (in
79 lexical order) of the network files that matches a given device
80 is applied, all later files are ignored, even if they match as
81 well.</para>
82
83 <para>A network file is said to match a network interface if all matches specified by the
84 <literal>[Match]</literal> section are satisfied. When a network file does not contain valid
85 settings in <literal>[Match]</literal> section, then the file will match all interfaces and
86 <command>systemd-networkd</command> warns about that. Hint: to avoid the warning and to make it
87 clear that all interfaces shall be matched, add the following:
88 <programlisting>Name=*</programlisting>
89 The following keys are accepted:</para>
90
91 <variablelist class='network-directives'>
92 <xi:include href="systemd.link.xml" xpointer="mac-address" />
93 <xi:include href="systemd.link.xml" xpointer="permanent-mac-address" />
94 <xi:include href="systemd.link.xml" xpointer="path" />
95 <xi:include href="systemd.link.xml" xpointer="driver" />
96 <xi:include href="systemd.link.xml" xpointer="type" />
97 <xi:include href="systemd.link.xml" xpointer="property" />
98
99 <varlistentry>
100 <term><varname>Name=</varname></term>
101 <listitem>
102 <para>A whitespace-separated list of shell-style globs matching the device name, as exposed
103 by the udev property <literal>INTERFACE</literal>, or device's alternative names. If the
104 list is prefixed with a "!", the test is inverted.</para>
105 </listitem>
106 </varlistentry>
107
108 <varlistentry>
109 <term><varname>WLANInterfaceType=</varname></term>
110 <listitem>
111 <para>A whitespace-separated list of wireless network type. Supported values are
112 <literal>ad-hoc</literal>, <literal>station</literal>, <literal>ap</literal>,
113 <literal>ap-vlan</literal>, <literal>wds</literal>, <literal>monitor</literal>,
114 <literal>mesh-point</literal>, <literal>p2p-client</literal>, <literal>p2p-go</literal>,
115 <literal>p2p-device</literal>, <literal>ocb</literal>, and <literal>nan</literal>. If the
116 list is prefixed with a "!", the test is inverted.
117 </para>
118 </listitem>
119 </varlistentry>
120
121 <varlistentry>
122 <term><varname>SSID=</varname></term>
123 <listitem>
124 <para>A whitespace-separated list of shell-style globs matching the SSID of the currently
125 connected wireless LAN. If the list is prefixed with a "!", the test is inverted.
126 </para>
127 </listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term><varname>BSSID=</varname></term>
132 <listitem>
133 <para>A whitespace-separated list of hardware address of the currently connected wireless
134 LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example in
135 <varname>MACAddress=</varname>. This option may appear more than one, in which case the
136 lists are merged. If the empty string is assigned to this option, the list of BSSID defined
137 prior to this is reset.</para>
138 </listitem>
139 </varlistentry>
140
141 <xi:include href="systemd.link.xml" xpointer="host" />
142 <xi:include href="systemd.link.xml" xpointer="virtualization" />
143 <xi:include href="systemd.link.xml" xpointer="kernel-command-line" />
144 <xi:include href="systemd.link.xml" xpointer="kernel-version" />
145 <xi:include href="systemd.link.xml" xpointer="architecture" />
146 </variablelist>
147
148 </refsect1>
149
150 <refsect1>
151 <title>[Link] Section Options</title>
152
153 <para> The <literal>[Link]</literal> section accepts the following keys:</para>
154
155 <variablelist class='network-directives'>
156 <varlistentry>
157 <term><varname>MACAddress=</varname></term>
158 <listitem>
159 <para>The hardware address to set for the device.</para>
160 </listitem>
161 </varlistentry>
162 <varlistentry>
163 <term><varname>MTUBytes=</varname></term>
164 <listitem>
165 <para>The maximum transmission unit in bytes to set for the
166 device. The usual suffixes K, M, G, are supported and are
167 understood to the base of 1024.</para>
168 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
169 below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para>
170 </listitem>
171 </varlistentry>
172 <varlistentry>
173 <term><varname>ARP=</varname></term>
174 <listitem>
175 <para>Takes a boolean. If set to true, the ARP (low-level Address Resolution Protocol)
176 for this interface is enabled. When unset, the kernel's default will be used.</para>
177 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
178 interfaces atop a single lower-level physical interface, which will then only serve as a
179 link/"bridge" device aggregating traffic to the same physical link and not participate in
180 the network otherwise.</para>
181 </listitem>
182 </varlistentry>
183 <varlistentry>
184 <term><varname>Multicast=</varname></term>
185 <listitem>
186 <para>Takes a boolean. If set to true, the multicast flag on the device is enabled.</para>
187 </listitem>
188 </varlistentry>
189 <varlistentry>
190 <term><varname>AllMulticast=</varname></term>
191 <listitem>
192 <para>Takes a boolean. If set to true, the driver retrieves all multicast packets from the network.
193 This happens when multicast routing is enabled.</para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><varname>Unmanaged=</varname></term>
198 <listitem>
199 <para>Takes a boolean. When <literal>yes</literal>, no attempts are
200 made to bring up or configure matching links, equivalent to
201 when there are no matching network files. Defaults to
202 <literal>no</literal>.</para>
203 <para>This is useful for preventing later matching network
204 files from interfering with certain interfaces that are fully
205 controlled by other applications.</para>
206 </listitem>
207 </varlistentry>
208 <varlistentry>
209 <term><varname>RequiredForOnline=</varname></term>
210 <listitem>
211 <para>Takes a boolean or a minimum operational state and an optional maximum operational state.
212 Please see <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
213 for possible operational states. When <literal>yes</literal>, the network is deemed required when
214 determining whether the system is online when running
215 <command>systemd-networkd-wait-online</command>. When <literal>no</literal>, the network is ignored
216 when checking for online state. When a minimum operational state and an optional maximum operational
217 state are set, <literal>yes</literal> is implied, and this controls the minimum and maximum
218 operational state required for the network interface to be considered online.
219 Defaults to <literal>yes</literal>.</para>
220
221 <para>The network will be brought up normally in all cases, but in
222 the event that there is no address being assigned by DHCP or the
223 cable is not plugged in, the link will simply remain offline and be
224 skipped automatically by <command>systemd-networkd-wait-online</command>
225 if <literal>RequiredForOnline=no</literal>.</para>
226 </listitem>
227 </varlistentry>
228 </variablelist>
229 </refsect1>
230
231 <refsect1>
232 <title>[Network] Section Options</title>
233
234 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
235
236 <variablelist class='network-directives'>
237 <varlistentry>
238 <term><varname>Description=</varname></term>
239 <listitem>
240 <para>A description of the device. This is only used for
241 presentation purposes.</para>
242 </listitem>
243 </varlistentry>
244 <varlistentry>
245 <term><varname>DHCP=</varname></term>
246 <listitem>
247 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
248 <literal>yes</literal>, <literal>no</literal>,
249 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults
250 to <literal>no</literal>.</para>
251
252 <para>Note that DHCPv6 will by default be triggered by Router
253 Advertisement, if that is enabled, regardless of this parameter.
254 By enabling DHCPv6 support explicitly, the DHCPv6 client will
255 be started regardless of the presence of routers on the link,
256 or what flags the routers pass. See
257 <literal>IPv6AcceptRA=</literal>.</para>
258
259 <para>Furthermore, note that by default the domain name
260 specified through DHCP is not used for name resolution.
261 See option <option>UseDomains=</option> below.</para>
262
263 <para>See the <literal>[DHCPv4]</literal> or <literal>[DHCPv6]</literal> section below for
264 further configuration options for the DHCP client support.</para>
265 </listitem>
266 </varlistentry>
267 <varlistentry>
268 <term><varname>DHCPServer=</varname></term>
269 <listitem>
270 <para>Takes a boolean. If set to <literal>yes</literal>, DHCPv4 server will be started. Defaults
271 to <literal>no</literal>. Further settings for the DHCP
272 server may be set in the <literal>[DHCPServer]</literal>
273 section described below.</para>
274 </listitem>
275 </varlistentry>
276 <varlistentry>
277 <term><varname>LinkLocalAddressing=</varname></term>
278 <listitem>
279 <para>Enables link-local address autoconfiguration. Accepts <literal>yes</literal>,
280 <literal>no</literal>, <literal>ipv4</literal>, <literal>ipv6</literal>,
281 <literal>fallback</literal>, or <literal>ipv4-fallback</literal>. If
282 <literal>fallback</literal> or <literal>ipv4-fallback</literal> is specified, then an IPv4
283 link-local address is configured only when DHCPv4 fails. If <literal>fallback</literal>,
284 an IPv6 link-local address is always configured, and if <literal>ipv4-fallback</literal>,
285 the address is not configured. Note that, the fallback mechanism works only when DHCPv4
286 client is enabled, that is, it requires <literal>DHCP=yes</literal> or
287 <literal>DHCP=ipv4</literal>. If <varname>Bridge=</varname> is set, defaults to
288 <literal>no</literal>, and if not, defaults to <literal>ipv6</literal>.
289 </para>
290 </listitem>
291 </varlistentry>
292 <varlistentry>
293 <term><varname>IPv4LLRoute=</varname></term>
294 <listitem>
295 <para>Takes a boolean. If set to true, sets up the route needed for
296 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
297 to false.
298 </para>
299 </listitem>
300 </varlistentry>
301 <varlistentry>
302 <term><varname>DefaultRouteOnDevice=</varname></term>
303 <listitem>
304 <para>Takes a boolean. If set to true, sets up the default route bound to the interface.
305 Defaults to false. This is useful when creating routes on point-to-point interfaces.
306 This is equivalent to e.g. the following.
307 <programlisting>ip route add default dev veth99</programlisting></para>
308 </listitem>
309 </varlistentry>
310 <varlistentry>
311 <term><varname>IPv6Token=</varname></term>
312 <listitem>
313 <para>Specifies an optional address generation mode and a required IPv6 address. If
314 the mode is present, the two parts must be separated with a colon
315 <literal><replaceable>mode</replaceable>:<replaceable>address</replaceable></literal>. The
316 address generation mode may be either <constant>prefixstable</constant> or
317 <constant>static</constant>. If not specified, <constant>static</constant> is assumed.
318 </para>
319 <para>When the mode is set to <constant>static</constant>, or unspecified, the lower bits of
320 the supplied address are combined with the upper bits of a prefix received in a Router Advertisement
321 message to form a complete address. Note that if multiple prefixes are received in an RA message, or in
322 multiple RA messages, addresses will be formed from each of them using the supplied address. This
323 mode implements SLAAC but uses a static interface identifier instead of an identifier generated
324 using the EUI-64 algorithm. Because the interface identifier is static, if Duplicate Address Detection
325 detects that the computed address is a duplicate (in use by another node on the link), then this
326 mode will fail to provide an address for that prefix.
327 </para>
328 <para>When the mode is set to <literal>prefixstable</literal> the RFC 7217 algorithm for generating
329 interface identifiers will be used, but only when a prefix received in an RA message matches the supplied address.
330 See <ulink url="https://tools.ietf.org/html/rfc7217">RFC 7217</ulink>. Prefix matching will be attempted
331 against each <constant>prefixstable</constant> IPv6Token variable provided in the configuration; if a received
332 prefix does not match any of the provided addresses, then the EUI-64 algorithm will be used to form
333 an interface identifier for that prefix. This mode is also SLAAC, but with a potentially stable interface
334 identifier which does not directly map to the interface's hardware address.
335
336 Note that the <constant>prefixstable</constant> algorithm includes both the interface's name and
337 MAC address in the hash used to compute the interface identifier, so if either of those are changed the resulting
338 interface identifier (and address) will change, even if the prefix received in the RA message has not changed.
339
340 Note that if multiple <constant>prefixstable</constant> IPv6Token variables are supplied with addresses that
341 match a prefix received in an RA message, only the first one will be used to generate addresses.
342 </para>
343 </listitem>
344 </varlistentry>
345 <varlistentry>
346 <term><varname>LLMNR=</varname></term>
347 <listitem>
348 <para>Takes a boolean or <literal>resolve</literal>. When true,
349 enables <ulink
350 url="https://tools.ietf.org/html/rfc4795">Link-Local
351 Multicast Name Resolution</ulink> on the link. When set to
352 <literal>resolve</literal>, only resolution is enabled,
353 but not host registration and announcement. Defaults to
354 true. This setting is read by
355 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
356 </listitem>
357 </varlistentry>
358 <varlistentry>
359 <term><varname>MulticastDNS=</varname></term>
360 <listitem>
361 <para>Takes a boolean or <literal>resolve</literal>. When true,
362 enables <ulink
363 url="https://tools.ietf.org/html/rfc6762">Multicast
364 DNS</ulink> support on the link. When set to
365 <literal>resolve</literal>, only resolution is enabled,
366 but not host or service registration and
367 announcement. Defaults to false. This setting is read by
368 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
369 </listitem>
370 </varlistentry>
371 <varlistentry>
372 <term><varname>DNSOverTLS=</varname></term>
373 <listitem>
374 <para>Takes a boolean or <literal>opportunistic</literal>.
375 When true, enables
376 <ulink
377 url="https://tools.ietf.org/html/rfc7858">DNS-over-TLS</ulink>
378 support on the link.
379 When set to <literal>opportunistic</literal>, compatibility with
380 non-DNS-over-TLS servers is increased, by automatically
381 turning off DNS-over-TLS servers in this case.
382 This option defines a per-interface setting for
383 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
384 global <varname>DNSOverTLS=</varname> option. Defaults to
385 false. This setting is read by
386 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
387 </listitem>
388 </varlistentry>
389 <varlistentry>
390 <term><varname>DNSSEC=</varname></term>
391 <listitem>
392 <para>Takes a boolean. or
393 <literal>allow-downgrade</literal>. When true, enables
394 <ulink
395 url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink>
396 DNS validation support on the link. When set to
397 <literal>allow-downgrade</literal>, compatibility with
398 non-DNSSEC capable networks is increased, by automatically
399 turning off DNSSEC in this case. This option defines a
400 per-interface setting for
401 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
402 global <varname>DNSSEC=</varname> option. Defaults to
403 false. This setting is read by
404 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
405 </listitem>
406 </varlistentry>
407 <varlistentry>
408 <term><varname>DNSSECNegativeTrustAnchors=</varname></term>
409 <listitem><para>A space-separated list of DNSSEC negative
410 trust anchor domains. If specified and DNSSEC is enabled,
411 look-ups done via the interface's DNS server will be subject
412 to the list of negative trust anchors, and not require
413 authentication for the specified domains, or anything below
414 it. Use this to disable DNSSEC authentication for specific
415 private domains, that cannot be proven valid using the
416 Internet DNS hierarchy. Defaults to the empty list. This
417 setting is read by
418 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
419 </listitem>
420 </varlistentry>
421 <varlistentry>
422 <term><varname>LLDP=</varname></term>
423 <listitem>
424 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
425 implemented on professional routers and bridges which announces which physical port a system is connected
426 to, as well as other related data. Accepts a boolean or the special value
427 <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
428 neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers
429 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
430 others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
431 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
432 collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below
433 for enabling LLDP packet emission from the local system.
434 </para>
435 </listitem>
436 </varlistentry>
437 <varlistentry>
438 <term><varname>EmitLLDP=</varname></term>
439 <listitem>
440 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
441 <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and
442 <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
443 a short LLDP packet with information about the local system is sent out in regular intervals on the
444 link. The LLDP packet will contain information about the local hostname, the local machine ID (as stored
445 in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
446 local interface name, as well as the pretty hostname of the system (as set in
447 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
448 emission is only available on Ethernet links. Note that this setting passes data suitable for
449 identification of host to the network and should thus not be enabled on untrusted networks, where such
450 identification data should not be made available. Use this option to permit other systems to identify on
451 which interfaces they are connected to this system. The three special values control propagation of the
452 LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest
453 connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but
454 not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge
455 is reached. For details about these concepts, see <ulink
456 url="https://standards.ieee.org/findstds/standard/802.1AB-2016.html">IEEE 802.1AB-2016</ulink>. Note that
457 configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and
458 most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP
459 reception.</para>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry>
464 <term><varname>BindCarrier=</varname></term>
465 <listitem>
466 <para>A link name or a list of link names. When set, controls the behavior of the current
467 link. When all links in the list are in an operational down state, the current link is brought
468 down. When at least one link has carrier, the current interface is brought up.
469 </para>
470 </listitem>
471 </varlistentry>
472 <varlistentry>
473 <term><varname>Address=</varname></term>
474 <listitem>
475 <para>A static IPv4 or IPv6 address and its prefix length,
476 separated by a <literal>/</literal> character. Specify
477 this key more than once to configure several addresses.
478 The format of the address must be as described in
479 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
480 This is a short-hand for an [Address] section only
481 containing an Address key (see below). This option may be
482 specified more than once.
483 </para>
484
485 <para>If the specified address is <literal>0.0.0.0</literal> (for IPv4) or <literal>::</literal>
486 (for IPv6), a new address range of the requested size is automatically allocated from a
487 system-wide pool of unused ranges. Note that the prefix length must be equal or larger than 8 for
488 IPv4, and 64 for IPv6. The allocated range is checked against all current network interfaces and
489 all known network configuration files to avoid address range conflicts. The default system-wide
490 pool consists of 192.168.0.0/16, 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fd00::/8 for IPv6.
491 This functionality is useful to manage a large number of dynamically created network interfaces
492 with the same network configuration and automatic address range assignment.</para>
493
494 </listitem>
495 </varlistentry>
496 <varlistentry>
497 <term><varname>Gateway=</varname></term>
498 <listitem>
499 <para>The gateway address, which must be in the format
500 described in
501 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
502 This is a short-hand for a [Route] section only containing
503 a Gateway key. This option may be specified more than
504 once.</para>
505 </listitem>
506 </varlistentry>
507 <varlistentry>
508 <term><varname>DNS=</varname></term>
509 <listitem>
510 <para>A DNS server address, which must be in the format
511 described in
512 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
513 This option may be specified more than once. This setting is read by
514 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
515 </listitem>
516 </varlistentry>
517 <varlistentry>
518 <term><varname>Domains=</varname></term>
519 <listitem>
520 <para>A whitespace-separated list of domains which should be resolved using the DNS servers on
521 this link. Each item in the list should be a domain name, optionally prefixed with a tilde
522 (<literal>~</literal>). The domains with the prefix are called "routing-only domains". The
523 domains without the prefix are called "search domains" and are first used as search suffixes for
524 extending single-label hostnames (hostnames containing no dots) to become fully qualified
525 domain names (FQDNs). If a single-label hostname is resolved on this interface, each of the
526 specified search domains are appended to it in turn, converting it into a fully qualified domain
527 name, until one of them may be successfully resolved.</para>
528
529 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for hostnames
530 ending in those domains (hence also single label names, if any "search domains" are listed), are routed to
531 the DNS servers configured for this interface. The domain routing logic is particularly useful on
532 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para>
533
534 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain,
535 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
536 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
537 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
538 if a link on which they are connected is available.</para>
539
540 <para>This setting is read by
541 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
542 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in
543 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
544 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
545 name servers limited to a specific link.</para>
546 </listitem>
547 </varlistentry>
548 <varlistentry>
549 <term><varname>DNSDefaultRoute=</varname></term>
550 <listitem>
551 <para>Takes a boolean argument. If true, this link's configured DNS servers are used for resolving domain
552 names that do not match any link's configured <varname>Domains=</varname> setting. If false, this link's
553 configured DNS servers are never used for such domains, and are exclusively used for resolving names that
554 match at least one of the domains configured on this link. If not specified defaults to an automatic mode:
555 queries not matching any link's configured domains will be routed to this link if it has no routing-only
556 domains configured.</para>
557 </listitem>
558 </varlistentry>
559 <varlistentry>
560 <term><varname>NTP=</varname></term>
561 <listitem>
562 <para>An NTP server address. This option may be specified more than once. This setting is read by
563 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
564 </listitem>
565 </varlistentry>
566 <varlistentry>
567 <term><varname>IPForward=</varname></term>
568 <listitem><para>Configures IP packet forwarding for the
569 system. If enabled, incoming packets on any network
570 interface will be forwarded to any other interfaces
571 according to the routing table. Takes a boolean,
572 or the values <literal>ipv4</literal> or
573 <literal>ipv6</literal>, which only enable IP packet
574 forwarding for the specified address family. This controls
575 the <filename>net.ipv4.ip_forward</filename> and
576 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
577 options of the network interface (see <ulink
578 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
579 for details about sysctl options). Defaults to
580 <literal>no</literal>.</para>
581
582 <para>Note: this setting controls a global kernel option,
583 and does so one way only: if a network that has this setting
584 enabled is set up the global setting is turned on. However,
585 it is never turned off again, even after all networks with
586 this setting enabled are shut down again.</para>
587
588 <para>To allow IP packet forwarding only between specific
589 network interfaces use a firewall.</para>
590 </listitem>
591 </varlistentry>
592 <varlistentry>
593 <term><varname>IPMasquerade=</varname></term>
594 <listitem><para>Configures IP masquerading for the network
595 interface. If enabled, packets forwarded from the network
596 interface will be appear as coming from the local host.
597 Takes a boolean argument. Implies
598 <varname>IPForward=ipv4</varname>. Defaults to
599 <literal>no</literal>.</para></listitem>
600 </varlistentry>
601 <varlistentry>
602 <term><varname>IPv6PrivacyExtensions=</varname></term>
603 <listitem><para>Configures use of stateless temporary
604 addresses that change over time (see <ulink
605 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
606 Privacy Extensions for Stateless Address Autoconfiguration
607 in IPv6). Takes a boolean or the special values
608 <literal>prefer-public</literal> and
609 <literal>kernel</literal>. When true, enables the privacy
610 extensions and prefers temporary addresses over public
611 addresses. When <literal>prefer-public</literal>, enables the
612 privacy extensions, but prefers public addresses over
613 temporary addresses. When false, the privacy extensions
614 remain disabled. When <literal>kernel</literal>, the kernel's
615 default setting will be left in place. Defaults to
616 <literal>no</literal>.</para></listitem>
617 </varlistentry>
618 <varlistentry>
619 <term><varname>IPv6AcceptRA=</varname></term>
620 <listitem><para>Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support for the
621 interface. If true, RAs are accepted; if false, RAs are ignored. When RAs are accepted, they may
622 trigger the start of the DHCPv6 client if the relevant flags are set in the RA data, or if no
623 routers are found on the link. The default is to disable RA reception for bridge devices or when IP
624 forwarding is enabled, and to enable it otherwise. Cannot be enabled on bond devices and when link
625 local addressing is disabled.</para>
626
627 <para>Further settings for the IPv6 RA support may be configured in the
628 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
629
630 <para>Also see <ulink
631 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
632 documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of
633 <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para>
634
635 <para>Note that kernel's implementation of the IPv6 RA protocol is always disabled,
636 regardless of this setting. If this option is enabled, a userspace implementation of the IPv6
637 RA protocol is used, and the kernel's own implementation remains disabled, since
638 <command>systemd-networkd</command> needs to know all details supplied in the advertisements,
639 and these are not available from the kernel if the kernel's own implementation is used.</para>
640 </listitem>
641 </varlistentry>
642 <varlistentry>
643 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
644 <listitem><para>Configures the amount of IPv6 Duplicate
645 Address Detection (DAD) probes to send. When unset, the kernel's default will be used.
646 </para></listitem>
647 </varlistentry>
648 <varlistentry>
649 <term><varname>IPv6HopLimit=</varname></term>
650 <listitem><para>Configures IPv6 Hop Limit. For each router that
651 forwards the packet, the hop limit is decremented by 1. When the
652 hop limit field reaches zero, the packet is discarded.
653 When unset, the kernel's default will be used.
654 </para></listitem>
655 </varlistentry>
656 <varlistentry>
657 <term><varname>IPv4ProxyARP=</varname></term>
658 <listitem><para>Takes a boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
659 usually a router, answers ARP requests intended for another machine. By "faking" its identity,
660 the router accepts responsibility for routing packets to the "real" destination. (see <ulink
661 url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>.
662 When unset, the kernel's default will be used.
663 </para></listitem>
664 </varlistentry>
665 <varlistentry>
666 <term><varname>IPv6ProxyNDP=</varname></term>
667 <listitem><para>Takes a boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery
668 Protocol) is a technique for IPv6 to allow routing of addresses to a different
669 destination when peers expect them to be present on a certain physical link.
670 In this case a router answers Neighbour Advertisement messages intended for
671 another machine by offering its own MAC address as destination.
672 Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour
673 Advertisement messages for addresses in the IPv6 neighbor proxy table,
674 which can also be shown by <command>ip -6 neighbour show proxy</command>.
675 systemd-networkd will control the per-interface `proxy_ndp` switch for each configured
676 interface depending on this option.
677 When unset, the kernel's default will be used.
678 </para></listitem>
679 </varlistentry>
680 <varlistentry>
681 <term><varname>IPv6ProxyNDPAddress=</varname></term>
682 <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be
683 proxied. This option may be specified more than once. systemd-networkd will add the
684 <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table.
685 This option implies <option>IPv6ProxyNDP=yes</option> but has no effect if
686 <option>IPv6ProxyNDP</option> has been set to false. When unset, the kernel's default will be used.
687 </para></listitem>
688 </varlistentry>
689 <varlistentry>
690 <term><varname>IPv6PrefixDelegation=</varname></term>
691 <listitem><para>Whether to enable or disable Router Advertisement sending on a link.
692 Allowed values are <literal>static</literal> which distributes prefixes as defined in
693 the <literal>[IPv6PrefixDelegation]</literal> and any <literal>[IPv6Prefix]</literal>
694 sections, <literal>dhcpv6</literal> which requests prefixes using a DHCPv6 client
695 configured for another link and any values configured in the
696 <literal>[IPv6PrefixDelegation]</literal> section while ignoring all static prefix
697 configuration sections, <literal>yes</literal> which uses both static configuration
698 and DHCPv6, and <literal>false</literal> which turns off IPv6 prefix delegation
699 altogether. Defaults to <literal>false</literal>. See the
700 <literal>[IPv6PrefixDelegation]</literal> and the <literal>[IPv6Prefix]</literal>
701 sections for more configuration options.
702 </para></listitem>
703 </varlistentry>
704 <varlistentry>
705 <term><varname>IPv6MTUBytes=</varname></term>
706 <listitem><para>Configures IPv6 maximum transmission unit (MTU).
707 An integer greater than or equal to 1280 bytes. When unset, the kernel's default will be used.
708 </para></listitem>
709 </varlistentry>
710 <varlistentry>
711 <term><varname>Bridge=</varname></term>
712 <listitem>
713 <para>The name of the bridge to add the link to. See
714 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
715 </para>
716 </listitem>
717 </varlistentry>
718 <varlistentry>
719 <term><varname>Bond=</varname></term>
720 <listitem>
721 <para>The name of the bond to add the link to. See
722 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
723 </para>
724 </listitem>
725 </varlistentry>
726 <varlistentry>
727 <term><varname>VRF=</varname></term>
728 <listitem>
729 <para>The name of the VRF to add the link to. See
730 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
731 </para>
732 </listitem>
733 </varlistentry>
734 <varlistentry>
735 <term><varname>VLAN=</varname></term>
736 <listitem>
737 <para>The name of a VLAN to create on the link. See
738 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
739 This option may be specified more than once.</para>
740 </listitem>
741 </varlistentry>
742 <varlistentry>
743 <term><varname>IPVLAN=</varname></term>
744 <listitem>
745 <para>The name of a IPVLAN to create on the link. See
746 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
747 This option may be specified more than once.</para>
748 </listitem>
749 </varlistentry>
750 <varlistentry>
751 <term><varname>MACVLAN=</varname></term>
752 <listitem>
753 <para>The name of a MACVLAN to create on the link. See
754 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
755 This option may be specified more than once.</para>
756 </listitem>
757 </varlistentry>
758 <varlistentry>
759 <term><varname>VXLAN=</varname></term>
760 <listitem>
761 <para>The name of a VXLAN to create on the link. See
762 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
763 This option may be specified more than once.</para>
764 </listitem>
765 </varlistentry>
766 <varlistentry>
767 <term><varname>Tunnel=</varname></term>
768 <listitem>
769 <para>The name of a Tunnel to create on the link. See
770 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
771 This option may be specified more than once.</para>
772 </listitem>
773 </varlistentry>
774 <varlistentry>
775 <term><varname>MACsec=</varname></term>
776 <listitem>
777 <para>The name of a MACsec device to create on the link. See
778 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
779 This option may be specified more than once.</para>
780 </listitem>
781 </varlistentry>
782 <varlistentry>
783 <term><varname>ActiveSlave=</varname></term>
784 <listitem>
785 <para>Takes a boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal>
786 option is only valid for following modes:
787 <literal>active-backup</literal>,
788 <literal>balance-alb</literal> and
789 <literal>balance-tlb</literal>. Defaults to false.
790 </para>
791 </listitem>
792 </varlistentry>
793 <varlistentry>
794 <term><varname>PrimarySlave=</varname></term>
795 <listitem>
796 <para>Takes a boolean. Specifies which slave is the primary device. The specified
797 device will always be the active slave while it is available. Only when the
798 primary is off-line will alternate devices be used. This is useful when
799 one slave is preferred over another, e.g. when one slave has higher throughput
800 than another. The <literal>PrimarySlave=</literal> option is only valid for
801 following modes:
802 <literal>active-backup</literal>,
803 <literal>balance-alb</literal> and
804 <literal>balance-tlb</literal>. Defaults to false.
805 </para>
806 </listitem>
807 </varlistentry>
808 <varlistentry>
809 <term><varname>ConfigureWithoutCarrier=</varname></term>
810 <listitem>
811 <para>Takes a boolean. Allows networkd to configure a specific link even if it has no carrier.
812 Defaults to false.
813 </para>
814 </listitem>
815 </varlistentry>
816 <varlistentry>
817 <term><varname>IgnoreCarrierLoss=</varname></term>
818 <listitem>
819 <para>A boolean. Allows networkd to retain both the static and dynamic configuration of the
820 interface even if its carrier is lost. Defaults to false.
821 </para>
822 </listitem>
823 </varlistentry>
824 <varlistentry>
825 <term><varname>Xfrm=</varname></term>
826 <listitem>
827 <para>The name of the xfrm to create on the link. See
828 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
829 This option may be specified more than once.</para>
830 </listitem>
831 </varlistentry>
832 <varlistentry>
833 <term><varname>KeepConfiguration=</varname></term>
834 <listitem>
835 <para>Takes a boolean or one of <literal>static</literal>, <literal>dhcp-on-stop</literal>,
836 <literal>dhcp</literal>. When <literal>static</literal>, <command>systemd-networkd</command>
837 will not drop static addresses and routes on starting up process. When set to
838 <literal>dhcp-on-stop</literal>, <command>systemd-networkd</command> will not drop addresses
839 and routes on stopping the daemon. When <literal>dhcp</literal>,
840 the addresses and routes provided by a DHCP server will never be dropped even if the DHCP
841 lease expires. This is contrary to the DHCP specification, but may be the best choice if,
842 e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal>
843 implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies
844 <literal>dhcp</literal> and <literal>static</literal>. Defaults to <literal>no</literal>.
845 </para>
846 </listitem>
847 </varlistentry>
848
849 </variablelist>
850
851 </refsect1>
852
853 <refsect1>
854 <title>[Address] Section Options</title>
855
856 <para>An <literal>[Address]</literal> section accepts the
857 following keys. Specify several <literal>[Address]</literal>
858 sections to configure several addresses.</para>
859
860 <variablelist class='network-directives'>
861 <varlistentry>
862 <term><varname>Address=</varname></term>
863 <listitem>
864 <para>As in the <literal>[Network]</literal> section. This key is mandatory. Each
865 <literal>[Address]</literal> section can contain one <varname>Address=</varname> setting.</para>
866 </listitem>
867 </varlistentry>
868 <varlistentry>
869 <term><varname>Peer=</varname></term>
870 <listitem>
871 <para>The peer address in a point-to-point connection.
872 Accepts the same format as the <varname>Address=</varname>
873 key.</para>
874 </listitem>
875 </varlistentry>
876 <varlistentry>
877 <term><varname>Broadcast=</varname></term>
878 <listitem>
879 <para>The broadcast address, which must be in the format
880 described in
881 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
882 This key only applies to IPv4 addresses. If it is not
883 given, it is derived from the <varname>Address=</varname>
884 key.</para>
885 </listitem>
886 </varlistentry>
887 <varlistentry>
888 <term><varname>Label=</varname></term>
889 <listitem>
890 <para>An address label.</para>
891 </listitem>
892 </varlistentry>
893 <varlistentry>
894 <term><varname>PreferredLifetime=</varname></term>
895 <listitem>
896 <para>Allows the default "preferred lifetime" of the address to be overridden.
897 Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal>
898 which is the default and means that the address never expires, and <literal>0</literal> which means
899 that the address is considered immediately "expired" and will not be used,
900 unless explicitly requested. A setting of PreferredLifetime=0 is useful for
901 addresses which are added to be used only by a specific application,
902 which is then configured to use them explicitly.</para>
903 </listitem>
904 </varlistentry>
905 <varlistentry>
906 <term><varname>Scope=</varname></term>
907 <listitem>
908 <para>The scope of the address, which can be <literal>global</literal>,
909 <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255.
910 Defaults to <literal>global</literal>.</para>
911 </listitem>
912 </varlistentry>
913 <varlistentry>
914 <term><varname>HomeAddress=</varname></term>
915 <listitem>
916 <para>Takes a boolean. Designates this address the "home address" as defined in
917 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>.
918 Supported only on IPv6. Defaults to false.</para>
919 </listitem>
920 </varlistentry>
921 <varlistentry>
922 <term><varname>DuplicateAddressDetection=</varname></term>
923 <listitem>
924 <para>Takes one of <literal>ipv4</literal>, <literal>ipv6</literal>,
925 <literal>both</literal>, <literal>none</literal>. When <literal>ipv4</literal>,
926 performs IPv4 Duplicate Address Detection. See
927 <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5224</ulink>.
928 When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See
929 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>.
930 Defaults to <literal>ipv6</literal>.</para>
931 </listitem>
932 </varlistentry>
933 <varlistentry>
934 <term><varname>ManageTemporaryAddress=</varname></term>
935 <listitem>
936 <para>Takes a boolean. If true the kernel manage temporary addresses created
937 from this one as template on behalf of Privacy Extensions
938 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become
939 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
940 The given address needs to have a prefix length of 64. This flag allows using privacy
941 extensions in a manually configured network, just like if stateless auto-configuration
942 was active. Defaults to false. </para>
943 </listitem>
944 </varlistentry>
945 <varlistentry>
946 <term><varname>AddPrefixRoute=</varname></term>
947 <listitem>
948 <para>Takes a boolean. When true, the prefix route for the address is automatically added.
949 Defaults to true.</para>
950 </listitem>
951 </varlistentry>
952 <varlistentry>
953 <term><varname>AutoJoin=</varname></term>
954 <listitem>
955 <para>Takes a boolean. Joining multicast group on ethernet level via
956 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
957 IGMP snooping since the switch would not replicate multicast packets on ports that did not
958 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
959 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
960 that enables then to do the required join. By extending ip address command with option
961 <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan
962 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
963 Defaults to <literal>no</literal>.</para>
964 </listitem>
965 </varlistentry>
966 </variablelist>
967 </refsect1>
968
969 <refsect1>
970 <title>[Neighbor] Section Options</title>
971 <para>A <literal>[Neighbor]</literal> section accepts the
972 following keys. The neighbor section adds a permanent, static
973 entry to the neighbor table (IPv6) or ARP table (IPv4) for
974 the given hardware address on the links matched for the network.
975 Specify several <literal>[Neighbor]</literal> sections to configure
976 several static neighbors.</para>
977
978 <variablelist class='network-directives'>
979 <varlistentry>
980 <term><varname>Address=</varname></term>
981 <listitem>
982 <para>The IP address of the neighbor.</para>
983 </listitem>
984 </varlistentry>
985 <varlistentry>
986 <term><varname>LinkLayerAddress=</varname></term>
987 <listitem>
988 <para>The link layer address (MAC address or IP address) of the neighbor.</para>
989 </listitem>
990 </varlistentry>
991 </variablelist>
992 </refsect1>
993
994 <refsect1>
995 <title>[IPv6AddressLabel] Section Options</title>
996
997 <para>An <literal>[IPv6AddressLabel]</literal> section accepts the
998 following keys. Specify several <literal>[IPv6AddressLabel]</literal>
999 sections to configure several address labels. IPv6 address labels are
1000 used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>.
1001 Precedence is managed by userspace, and only the label itself is stored in the kernel</para>
1002
1003 <variablelist class='network-directives'>
1004 <varlistentry>
1005 <term><varname>Label=</varname></term>
1006 <listitem>
1007 <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294.
1008 0xffffffff is reserved. This key is mandatory.</para>
1009 </listitem>
1010 </varlistentry>
1011 <varlistentry>
1012 <term><varname>Prefix=</varname></term>
1013 <listitem>
1014 <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character.
1015 This key is mandatory. </para>
1016 </listitem>
1017 </varlistentry>
1018 </variablelist>
1019 </refsect1>
1020
1021 <refsect1>
1022 <title>[RoutingPolicyRule] Section Options</title>
1023
1024 <para>An <literal>[RoutingPolicyRule]</literal> section accepts the
1025 following keys. Specify several <literal>[RoutingPolicyRule]</literal>
1026 sections to configure several rules.</para>
1027
1028 <variablelist class='network-directives'>
1029 <varlistentry>
1030 <term><varname>TypeOfService=</varname></term>
1031 <listitem>
1032 <para>Specifies the type of service to match a number between 0 to 255.</para>
1033 </listitem>
1034 </varlistentry>
1035 <varlistentry>
1036 <term><varname>From=</varname></term>
1037 <listitem>
1038 <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para>
1039 </listitem>
1040 </varlistentry>
1041 <varlistentry>
1042 <term><varname>To=</varname></term>
1043 <listitem>
1044 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para>
1045 </listitem>
1046 </varlistentry>
1047 <varlistentry>
1048 <term><varname>FirewallMark=</varname></term>
1049 <listitem>
1050 <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para>
1051 </listitem>
1052 </varlistentry>
1053 <varlistentry>
1054 <term><varname>Table=</varname></term>
1055 <listitem>
1056 <para>Specifies the routing table identifier to lookup if the rule selector matches. Takes
1057 one of <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>,
1058 or a number between 1 and 4294967295. Defaults to <literal>main</literal>.</para>
1059 </listitem>
1060 </varlistentry>
1061 <varlistentry>
1062 <term><varname>Priority=</varname></term>
1063 <listitem>
1064 <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned
1065 integer. Higher number means lower priority, and rules get processed in order of increasing number.</para>
1066 </listitem>
1067 </varlistentry>
1068 <varlistentry>
1069 <term><varname>IncomingInterface=</varname></term>
1070 <listitem>
1071 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para>
1072 </listitem>
1073 </varlistentry>
1074 <varlistentry>
1075 <term><varname>OutgoingInterface=</varname></term>
1076 <listitem>
1077 <para>Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device.</para>
1078 </listitem>
1079 </varlistentry>
1080 <varlistentry>
1081 <term><varname>SourcePort=</varname></term>
1082 <listitem>
1083 <para>Specifies the source IP port or IP port range match in forwarding information base (FIB) rules.
1084 A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para>
1085 </listitem>
1086 </varlistentry>
1087 <varlistentry>
1088 <term><varname>DestinationPort=</varname></term>
1089 <listitem>
1090 <para>Specifies the destination IP port or IP port range match in forwarding information base (FIB) rules.
1091 A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para>
1092 </listitem>
1093 </varlistentry>
1094 <varlistentry>
1095 <term><varname>IPProtocol=</varname></term>
1096 <listitem>
1097 <para>Specifies the IP protocol to match in forwarding information base (FIB) rules. Takes IP protocol name such as <literal>tcp</literal>,
1098 <literal>udp</literal> or <literal>sctp</literal>, or IP protocol number such as <literal>6</literal> for <literal>tcp</literal> or
1099 <literal>17</literal> for <literal>udp</literal>.
1100 Defaults to unset.</para>
1101 </listitem>
1102 </varlistentry>
1103 <varlistentry>
1104 <term><varname>InvertRule=</varname></term>
1105 <listitem>
1106 <para>A boolean. Specifies whether the rule is to be inverted. Defaults to false.</para>
1107 </listitem>
1108 </varlistentry>
1109 <varlistentry>
1110 <term><varname>Family=</varname></term>
1111 <listitem>
1112 <para>Takes a special value <literal>ipv4</literal>, <literal>ipv6</literal>, or
1113 <literal>both</literal>. By default, the address family is determined by the address
1114 specified in <varname>To=</varname> or <varname>From=</varname>. If neither
1115 <varname>To=</varname> nor <varname>From=</varname> are specified, then defaults to
1116 <literal>ipv4</literal>.</para>
1117 </listitem>
1118 </varlistentry>
1119 <varlistentry>
1120 <term><varname>User=</varname></term>
1121 <listitem>
1122 <para>Takes a username, a user ID, or a range of user IDs separated by a dash. Defaults to
1123 unset.</para>
1124 </listitem>
1125 </varlistentry>
1126 <varlistentry>
1127 <term><varname>SuppressPrefixLength=</varname></term>
1128 <listitem>
1129 <para>Takes a number <replaceable>N</replaceable> in the range 0-128 and rejects routing
1130 decisions that have a prefix length of <replaceable>N</replaceable> or less. Defaults to
1131 unset.</para>
1132 </listitem>
1133 </varlistentry>
1134 </variablelist>
1135 </refsect1>
1136
1137 <refsect1>
1138 <title>[NextHop] Section Options</title>
1139 <para>The <literal>[NextHop]</literal> section accepts the
1140 following keys. Specify several <literal>[NextHop]</literal>
1141 sections to configure several nexthop. Nexthop is used to manipulate entries in the kernel's nexthop
1142 tables.</para>
1143
1144 <variablelist class='network-directives'>
1145 <varlistentry>
1146 <term><varname>Gateway=</varname></term>
1147 <listitem>
1148 <para>As in the <literal>[Network]</literal> section. This is mandatory.</para>
1149 </listitem>
1150 </varlistentry>
1151 <varlistentry>
1152 <term><varname>Id=</varname></term>
1153 <listitem>
1154 <para>The id of the nexthop (an unsigned integer). If unspecified or '0' then automatically chosen by kernel.</para>
1155 </listitem>
1156 </varlistentry>
1157 </variablelist>
1158 </refsect1>
1159
1160 <refsect1>
1161 <title>[Route] Section Options</title>
1162 <para>The <literal>[Route]</literal> section accepts the
1163 following keys. Specify several <literal>[Route]</literal>
1164 sections to configure several routes.</para>
1165
1166 <variablelist class='network-directives'>
1167 <varlistentry>
1168 <term><varname>Gateway=</varname></term>
1169 <listitem>
1170 <para>Takes the gateway address or special value <literal>_dhcp</literal>. If
1171 <literal>_dhcp</literal>, then the gateway address provided by DHCP (or in the IPv6 case,
1172 provided by IPv6 RA) is used.</para>
1173 </listitem>
1174 </varlistentry>
1175 <varlistentry>
1176 <term><varname>GatewayOnLink=</varname></term>
1177 <listitem>
1178 <para>Takes a boolean. If set to true, the kernel does not have
1179 to check if the gateway is reachable directly by the current machine (i.e., the kernel does
1180 not need to check if the gateway is attached to the local network), so that we can insert the
1181 route in the kernel table without it being complained about. Defaults to <literal>no</literal>.
1182 </para>
1183 </listitem>
1184 </varlistentry>
1185 <varlistentry>
1186 <term><varname>Destination=</varname></term>
1187 <listitem>
1188 <para>The destination prefix of the route. Possibly
1189 followed by a slash and the prefix length. If omitted, a
1190 full-length host route is assumed.</para>
1191 </listitem>
1192 </varlistentry>
1193 <varlistentry>
1194 <term><varname>Source=</varname></term>
1195 <listitem>
1196 <para>The source prefix of the route. Possibly followed by
1197 a slash and the prefix length. If omitted, a full-length
1198 host route is assumed.</para>
1199 </listitem>
1200 </varlistentry>
1201 <varlistentry>
1202 <term><varname>Metric=</varname></term>
1203 <listitem>
1204 <para>The metric of the route (an unsigned integer).</para>
1205 </listitem>
1206 </varlistentry>
1207 <varlistentry>
1208 <term><varname>IPv6Preference=</varname></term>
1209 <listitem>
1210 <para>Specifies the route preference as defined in <ulink
1211 url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages.
1212 Which can be one of <literal>low</literal> the route has a lowest priority,
1213 <literal>medium</literal> the route has a default priority or
1214 <literal>high</literal> the route has a highest priority.</para>
1215 </listitem>
1216 </varlistentry>
1217 <varlistentry>
1218 <term><varname>Scope=</varname></term>
1219 <listitem>
1220 <para>The scope of the route, which can be <literal>global</literal>, <literal>site</literal>,
1221 <literal>link</literal>, <literal>host</literal>, or <literal>nowhere</literal>. For IPv4 route,
1222 defaults to <literal>host</literal> if <varname>Type=</varname> is <literal>local</literal>
1223 or <literal>nat</literal>, and <literal>link</literal> if <varname>Type=</varname> is
1224 <literal>broadcast</literal>, <literal>multicast</literal>, or <literal>anycast</literal>.
1225 In other cases, defaults to <literal>global</literal>.</para>
1226 </listitem>
1227 </varlistentry>
1228 <varlistentry>
1229 <term><varname>PreferredSource=</varname></term>
1230 <listitem>
1231 <para>The preferred source address of the route. The address
1232 must be in the format described in
1233 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
1234 </listitem>
1235 </varlistentry>
1236 <varlistentry>
1237 <term><varname>Table=</varname></term>
1238 <listitem>
1239 <para>The table identifier for the route. Takes <literal>default</literal>,
1240 <literal>main</literal>, <literal>local</literal> or a number between 1 and 4294967295.
1241 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1242 If unset and <varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>,
1243 <literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used.
1244 In other cases, defaults to <literal>main</literal>.
1245 </para>
1246 </listitem>
1247 </varlistentry>
1248 <varlistentry>
1249 <term><varname>Protocol=</varname></term>
1250 <listitem>
1251 <para>The protocol identifier for the route. Takes a number between 0 and 255 or the special values
1252 <literal>kernel</literal>, <literal>boot</literal>, <literal>static</literal>,
1253 <literal>ra</literal> and <literal>dhcp</literal>. Defaults to <literal>static</literal>.
1254 </para>
1255 </listitem>
1256 </varlistentry>
1257 <varlistentry>
1258 <term><varname>Type=</varname></term>
1259 <listitem>
1260 <para>Specifies the type for the route. Takes one of <literal>unicast</literal>,
1261 <literal>local</literal>, <literal>broadcast</literal>, <literal>anycast</literal>,
1262 <literal>multicast</literal>, <literal>blackhole</literal>, <literal>unreachable</literal>,
1263 <literal>prohibit</literal>, <literal>throw</literal>, <literal>nat</literal>, and
1264 <literal>xresolve</literal>. If <literal>unicast</literal>, a regular route is defined, i.e. a
1265 route indicating the path to take to a destination network address. If <literal>blackhole</literal>, packets
1266 to the defined route are discarded silently. If <literal>unreachable</literal>, packets to the defined route
1267 are discarded and the ICMP message "Host Unreachable" is generated. If <literal>prohibit</literal>, packets
1268 to the defined route are discarded and the ICMP message "Communication Administratively Prohibited" is
1269 generated. If <literal>throw</literal>, route lookup in the current routing table will fail and the route
1270 selection process will return to Routing Policy Database (RPDB). Defaults to <literal>unicast</literal>.
1271 </para>
1272 </listitem>
1273 </varlistentry>
1274 <varlistentry>
1275 <term><varname>InitialCongestionWindow=</varname></term>
1276 <listitem>
1277 <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP
1278 session, when a client requests a resource, the server's initial congestion window determines how many data bytes
1279 will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual
1280 suffixes K, M, G are supported and are understood to the base of 1024. When unset, the kernel's default will be used.
1281 </para>
1282 </listitem>
1283 </varlistentry>
1284 <varlistentry>
1285 <term><varname>InitialAdvertisedReceiveWindow=</varname></term>
1286 <listitem>
1287 <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initially be buffered at one time
1288 on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update
1289 from the receiving host. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual suffixes K, M, G are supported
1290 and are understood to the base of 1024. When unset, the kernel's default will be used.
1291 </para>
1292 </listitem>
1293 </varlistentry>
1294 <varlistentry>
1295 <term><varname>QuickAck=</varname></term>
1296 <listitem>
1297 <para>Takes a boolean. When true enables TCP quick ack mode for the route. When unset, the kernel's default will be used.
1298 </para>
1299 </listitem>
1300 </varlistentry>
1301 <varlistentry>
1302 <term><varname>FastOpenNoCookie=</varname></term>
1303 <listitem>
1304 <para>Takes a boolean. When true enables TCP fastopen without a cookie on a per-route basis.
1305 When unset, the kernel's default will be used.
1306 </para>
1307 </listitem>
1308 </varlistentry>
1309 <varlistentry>
1310 <term><varname>TTLPropagate=</varname></term>
1311 <listitem>
1312 <para>Takes a boolean. When true enables TTL propagation at Label Switched Path (LSP) egress.
1313 When unset, the kernel's default will be used.
1314 </para>
1315 </listitem>
1316 </varlistentry>
1317 <varlistentry>
1318 <term><varname>MTUBytes=</varname></term>
1319 <listitem>
1320 <para>The maximum transmission unit in bytes to set for the
1321 route. The usual suffixes K, M, G, are supported and are
1322 understood to the base of 1024.</para>
1323 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
1324 below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para>
1325 </listitem>
1326 </varlistentry>
1327 <varlistentry>
1328 <term><varname>IPServiceType=</varname></term>
1329 <listitem>
1330 <para>Takes string; <literal>CS6</literal> or <literal>CS4</literal>. Used to set IP
1331 service type to CS6 (network control) or CS4 (Realtime). Defaults to CS6.</para>
1332 </listitem>
1333 </varlistentry>
1334 <varlistentry>
1335 <term><varname>MultiPathRoute=<replaceable>address</replaceable>[@<replaceable>name</replaceable>] [<replaceable>weight</replaceable>]</varname></term>
1336 <listitem>
1337 <para>Configures multipath route. Multipath routing is the technique of using multiple
1338 alternative paths through a network. Takes gateway address. Optionally, takes a network
1339 interface name or index separated with <literal>@</literal>, and a weight in 1..256 for
1340 this multipath route separated with whitespace. This setting can be specified multiple
1341 times. If an empty string is assigned, then the all previous assignments are cleared.</para>
1342 </listitem>
1343 </varlistentry>
1344 </variablelist>
1345 </refsect1>
1346
1347 <refsect1>
1348 <title>[DHCPv4] Section Options</title>
1349 <para>The <literal>[DHCPv4]</literal> section configures the
1350 DHCPv4 client, if it is enabled with the
1351 <varname>DHCP=</varname> setting described above:</para>
1352
1353 <variablelist class='network-directives'>
1354 <varlistentry>
1355 <term><varname>UseDNS=</varname></term>
1356 <listitem>
1357 <para>When true (the default), the DNS servers received
1358 from the DHCP server will be used and take precedence over
1359 any statically configured ones.</para>
1360
1361 <para>This corresponds to the <option>nameserver</option>
1362 option in <citerefentry
1363 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1364 </listitem>
1365 </varlistentry>
1366 <varlistentry>
1367 <term><varname>RoutesToDNS=</varname></term>
1368 <listitem>
1369 <para>When true, the routes to the DNS servers received from the DHCP server will be
1370 configured. When <varname>UseDNS=</varname> is disabled, this setting is ignored.
1371 Defaults to false.</para>
1372 </listitem>
1373 </varlistentry>
1374 <varlistentry>
1375 <term><varname>UseNTP=</varname></term>
1376 <listitem>
1377 <para>When true (the default), the NTP servers received
1378 from the DHCP server will be used by systemd-timesyncd
1379 and take precedence over any statically configured ones.</para>
1380 </listitem>
1381 </varlistentry>
1382 <varlistentry>
1383 <term><varname>UseSIP=</varname></term>
1384 <listitem>
1385 <para>When true (the default), the SIP servers received
1386 from the DHCP server will be saved at the state files and can be
1387 read via <function>sd_network_link_get_sip_servers()</function> function.</para>
1388 </listitem>
1389 </varlistentry>
1390
1391 <varlistentry>
1392 <term><varname>UseMTU=</varname></term>
1393 <listitem>
1394 <para>When true, the interface maximum transmission unit
1395 from the DHCP server will be used on the current link.
1396 If <varname>MTUBytes=</varname> is set, then this setting is ignored.
1397 Defaults to false.</para>
1398 </listitem>
1399 </varlistentry>
1400 <varlistentry>
1401 <term><varname>Anonymize=</varname></term>
1402 <listitem>
1403 <para>Takes a boolean. When true, the options sent to the DHCP server will
1404 follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
1405 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1406 Defaults to false.</para>
1407
1408 <para>This option should only be set to true when
1409 <varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
1410 (see <citerefentry
1411 project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
1412
1413 <para>Note that this configuration will overwrite others.
1414 In concrete, the following variables will be ignored:
1415 <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
1416 <varname>UseRoutes=</varname>, <varname>UseMTU=</varname>,
1417 <varname>VendorClassIdentifier=</varname>, <varname>UseTimezone=</varname>.</para>
1418
1419 <para>With this option enabled DHCP requests will mimic those generated by Microsoft Windows, in
1420 order to reduce the ability to fingerprint and recognize installations. This means DHCP request
1421 sizes will grow and lease data will be more comprehensive than normally, though most of the
1422 requested data is not actually used.</para>
1423 </listitem>
1424 </varlistentry>
1425 <varlistentry>
1426 <term><varname>SendHostname=</varname></term>
1427 <listitem>
1428 <para>When true (the default), the machine's hostname will be sent to the DHCP server.
1429 Note that the machine's hostname must consist only of 7-bit ASCII lower-case characters and
1430 no spaces or dots, and be formatted as a valid DNS domain name. Otherwise, the hostname is not
1431 sent even if this is set to true.</para>
1432 </listitem>
1433 </varlistentry>
1434
1435 <varlistentry>
1436 <term><varname>MUDURL=</varname></term>
1437 <listitem>
1438 <para>When configured, the Manufacturer Usage Descriptions (MUD) URL will be sent to the
1439 DHCPv4 server. Takes an URL of length up to 255 characters. A superficial verification that
1440 the string is a valid URL will be performed. DHCPv4 clients are intended to have at most one
1441 MUD URL associated with them. See
1442 <ulink url="https://tools.ietf.org/html/rfc8520">RFC 8520</ulink>.</para>
1443 </listitem>
1444 </varlistentry>
1445
1446 <varlistentry>
1447 <term><varname>UseHostname=</varname></term>
1448 <listitem>
1449 <para>When true (the default), the hostname received from
1450 the DHCP server will be set as the transient hostname of the system.
1451 </para>
1452 </listitem>
1453 </varlistentry>
1454 <varlistentry>
1455 <term><varname>Hostname=</varname></term>
1456 <listitem>
1457 <para>Use this value for the hostname which is sent to the DHCP server, instead of machine's hostname.
1458 Note that the specified hostname must consist only of 7-bit ASCII lower-case characters and
1459 no spaces or dots, and be formatted as a valid DNS domain name.</para>
1460 </listitem>
1461 </varlistentry>
1462 <varlistentry>
1463 <term><varname>UseDomains=</varname></term>
1464 <listitem>
1465 <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name
1466 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1467 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
1468 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1469 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
1470 false.</para>
1471
1472 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1473 of all hostnames, in particular of single-label names. It is generally safer to use the supplied domain
1474 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1475 single-label names.</para>
1476
1477 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1478 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1479 </listitem>
1480 </varlistentry>
1481 <varlistentry>
1482 <term><varname>UseRoutes=</varname></term>
1483 <listitem>
1484 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1485 routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's
1486 destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the
1487 link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a
1488 "link" scope will be used. For anything else, scope defaults to "global".</para>
1489 </listitem>
1490 </varlistentry>
1491 <varlistentry>
1492 <term><varname>UseGateway=</varname></term>
1493 <listitem>
1494 <para>When true, the gateway will be requested from the DHCP server and added to the routing table with a
1495 metric of 1024, and a scope of "link". When unset, the value specified with <option>UseRoutes=</option>
1496 is used.</para>
1497 </listitem>
1498 </varlistentry>
1499 <varlistentry>
1500 <term><varname>UseTimezone=</varname></term>
1501
1502 <listitem><para>When true, the timezone received from the
1503 DHCP server will be set as timezone of the local
1504 system. Defaults to <literal>no</literal>.</para></listitem>
1505 </varlistentry>
1506
1507 <varlistentry>
1508 <term><varname>ClientIdentifier=</varname></term>
1509 <listitem>
1510 <para>The DHCPv4 client identifier to use. Takes one of <literal>mac</literal>, <literal>duid</literal> or <literal>duid-only</literal>.
1511 If set to <literal>mac</literal>, the MAC address of the link is used.
1512 If set to <literal>duid</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used.
1513 If set to <literal>duid-only</literal>, only DUID is used, this may not be RFC compliant, but some setups may require to use this.
1514 Defaults to <literal>duid</literal>.</para>
1515 </listitem>
1516 </varlistentry>
1517
1518 <varlistentry>
1519 <term><varname>VendorClassIdentifier=</varname></term>
1520 <listitem>
1521 <para>The vendor class identifier used to identify vendor
1522 type and configuration.</para>
1523 </listitem>
1524 </varlistentry>
1525
1526 <varlistentry>
1527 <term><varname>UserClass=</varname></term>
1528 <listitem>
1529 <para>A DHCPv4 client can use UserClass option to identify the type or category of user or applications
1530 it represents. The information contained in this option is a string that represents the user class of which
1531 the client is a member. Each class sets an identifying string of information to be used by the DHCP
1532 service to classify clients. Takes a whitespace-separated list of strings.</para>
1533 </listitem>
1534 </varlistentry>
1535
1536 <varlistentry>
1537 <term><varname>MaxAttempts=</varname></term>
1538 <listitem>
1539 <para>Specifies how many times the DHCPv4 client configuration should be attempted. Takes a
1540 number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>.
1541 Note that the time between retries is increased exponentially, so the network will not be
1542 overloaded even if this number is high.</para>
1543 </listitem>
1544 </varlistentry>
1545
1546 <varlistentry>
1547 <term><varname>DUIDType=</varname></term>
1548 <listitem>
1549 <para>Override the global <varname>DUIDType</varname> setting for this network. See
1550 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1551 for a description of possible values.</para>
1552 </listitem>
1553 </varlistentry>
1554
1555 <varlistentry>
1556 <term><varname>DUIDRawData=</varname></term>
1557 <listitem>
1558 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
1559 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1560 for a description of possible values.</para>
1561 </listitem>
1562 </varlistentry>
1563
1564 <varlistentry>
1565 <term><varname>IAID=</varname></term>
1566 <listitem>
1567 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
1568 </listitem>
1569 </varlistentry>
1570
1571 <varlistentry>
1572 <term><varname>RequestBroadcast=</varname></term>
1573 <listitem>
1574 <para>Request the server to use broadcast messages before
1575 the IP address has been configured. This is necessary for
1576 devices that cannot receive RAW packets, or that cannot
1577 receive packets at all before an IP address has been
1578 configured. On the other hand, this must not be enabled on
1579 networks where broadcasts are filtered out.</para>
1580 </listitem>
1581 </varlistentry>
1582
1583 <varlistentry>
1584 <term><varname>RouteMetric=</varname></term>
1585 <listitem>
1586 <para>Set the routing metric for routes specified by the
1587 DHCP server.</para>
1588 </listitem>
1589 </varlistentry>
1590
1591 <varlistentry>
1592 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1593 <listitem>
1594 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
1595 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1596 </para>
1597 <para>When used in combination with <varname>VRF=</varname> the
1598 VRF's routing table is used unless this parameter is specified.
1599 </para>
1600 </listitem>
1601 </varlistentry>
1602
1603 <varlistentry>
1604 <term><varname>RouteMTUBytes=</varname></term>
1605 <listitem>
1606 <para>Specifies the MTU for the DHCP routes. Please see the [Route] section for further details.</para>
1607 </listitem>
1608 </varlistentry>
1609
1610 <varlistentry>
1611 <term><varname>ListenPort=</varname></term>
1612 <listitem>
1613 <para>Allow setting custom port for the DHCP client to listen on.</para>
1614 </listitem>
1615 </varlistentry>
1616
1617 <varlistentry>
1618 <term><varname>SendRelease=</varname></term>
1619 <listitem>
1620 <para>When true, the DHCPv4 client sends a DHCP release packet when it stops.
1621 Defaults to true.</para>
1622 </listitem>
1623 </varlistentry>
1624
1625 <varlistentry>
1626 <term><varname>SendDecline=</varname></term>
1627 <listitem>
1628 <para>A boolean. When <literal>true</literal>, DHCPv4 clients receives IP address from DHCP server.
1629 After new IP is received, DHCPv4 performs IPv4 Duplicate Address Detection. If duplicate use of IP is detected
1630 the DHCPv4 client rejects the IP by sending a DHCPDECLINE packet DHCP clients try to obtain an IP address again.
1631 See <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5224</ulink>.
1632 Defaults to <literal>unset</literal>.</para>
1633 </listitem>
1634 </varlistentry>
1635
1636 <varlistentry>
1637 <term><varname>BlackList=</varname></term>
1638 <listitem>
1639 <para>A whitespace-separated list of IPv4 addresses. DHCP offers from servers in the list are rejected.</para>
1640 </listitem>
1641 </varlistentry>
1642
1643 <varlistentry>
1644 <term><varname>RequestOptions=</varname></term>
1645 <listitem>
1646 <para>A whitespace-separated list of integers in the range 1–254.</para>
1647 </listitem>
1648 </varlistentry>
1649
1650 <varlistentry>
1651 <term><varname>SendOption=</varname></term>
1652 <listitem>
1653 <para>Send an arbitrary raw option in the DHCPv4 request. Takes a DHCP option number, data type
1654 and data separated with a colon
1655 (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1656 The option number must be an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
1657 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
1658 <literal>string</literal>. Special characters in the data string may be escaped using
1659 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1660 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
1661 then all options specified earlier are cleared. Defaults to unset.</para>
1662 </listitem>
1663 </varlistentry>
1664
1665 <varlistentry>
1666 <term><varname>SendVendorOption=</varname></term>
1667 <listitem>
1668 <para>Send an arbitrary vendor option in the DHCPv4 request. Takes a DHCP option number, data type
1669 and data separated with a colon
1670 (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1671 The option number must be an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
1672 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
1673 <literal>string</literal>. Special characters in the data string may be escaped using
1674 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1675 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
1676 then all options specified earlier are cleared. Defaults to unset.</para>
1677 </listitem>
1678 </varlistentry>
1679 </variablelist>
1680 </refsect1>
1681
1682 <refsect1>
1683 <title>[DHCPv6] Section Options</title>
1684 <para>The <literal>[DHCPv6]</literal> section configures the DHCPv6 client, if it is enabled with the
1685 <varname>DHCP=</varname> setting described above, or invoked by the IPv6 Router Advertisement:</para>
1686
1687 <variablelist class='network-directives'>
1688 <varlistentry>
1689 <term><varname>UseDNS=</varname></term>
1690 <term><varname>UseNTP=</varname></term>
1691 <listitem>
1692 <para>As in the <literal>[DHCPv4]</literal> section.</para>
1693 </listitem>
1694 </varlistentry>
1695
1696 <varlistentry>
1697 <term><varname>RapidCommit=</varname></term>
1698 <listitem>
1699 <para>Takes a boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through
1700 a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both
1701 the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default
1702 four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides
1703 faster client configuration and is beneficial in environments in which networks are under a heavy load.
1704 See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details.
1705 Defaults to true.</para>
1706 </listitem>
1707 </varlistentry>
1708
1709 <varlistentry>
1710 <term><varname>MUDURL=</varname></term>
1711 <listitem>
1712 <para>When configured, the Manufacturer Usage Descriptions (MUD) URL will be sent to the DHCPV6 server.
1713 Takes an URL of length up to 255 characters. A superficial verification that the string is a valid URL
1714 will be performed. DHCPv6 clients are intended to have at most one MUD URL associated with them. See
1715 <ulink url="https://tools.ietf.org/html/rfc8520">RFC 8520</ulink>.</para>
1716 </listitem>
1717 </varlistentry>
1718
1719 <varlistentry>
1720 <term><varname>ForceDHCPv6PDOtherInformation=</varname></term>
1721 <listitem>
1722 <para>Takes a boolean that enforces DHCPv6 stateful mode when the 'Other information' bit is set in
1723 Router Advertisement messages. By default setting only the 'O' bit in Router Advertisements
1724 makes DHCPv6 request network information in a stateless manner using a two-message Information
1725 Request and Information Reply message exchange.
1726 <ulink url="https://tools.ietf.org/html/rfc7084">RFC 7084</ulink>, requirement WPD-4, updates
1727 this behavior for a Customer Edge router so that stateful DHCPv6 Prefix Delegation is also
1728 requested when only the 'O' bit is set in Router Advertisements. This option enables such a CE
1729 behavior as it is impossible to automatically distinguish the intention of the 'O' bit otherwise.
1730 By default this option is set to 'false', enable it if no prefixes are delegated when the device
1731 should be acting as a CE router.</para>
1732 </listitem>
1733 </varlistentry>
1734
1735 <varlistentry>
1736 <term><varname>PrefixDelegationHint=</varname></term>
1737 <listitem>
1738 <para>Takes an IPv6 address with prefix length as <varname>Address=</varname> in
1739 the "[Network]" section. Specifies the DHCPv6 client for the requesting router to include
1740 a prefix-hint in the DHCPv6 solicitation. Prefix ranges 1-128. Defaults to unset.</para>
1741 </listitem>
1742 </varlistentry>
1743
1744 <varlistentry>
1745 <term><varname>WithoutRA=</varname></term>
1746 <listitem>
1747 <para>When true, DHCPv6 client starts without router advertisements's managed or other address configuration flag.
1748 Defaults to false.</para>
1749 </listitem>
1750 </varlistentry>
1751
1752 <varlistentry>
1753 <term><varname>SendOption=</varname></term>
1754 <listitem>
1755 <para>As in the <literal>[DHCPv4]</literal> section, however because DHCPv6 uses 16-bit fields to store
1756 option numbers, the option number is an integer in the range 1..65536.</para>
1757 </listitem>
1758 </varlistentry>
1759 </variablelist>
1760 </refsect1>
1761
1762 <refsect1>
1763 <title>[IPv6AcceptRA] Section Options</title>
1764 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1765 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1766 above:</para>
1767
1768 <variablelist class='network-directives'>
1769 <varlistentry>
1770 <term><varname>UseDNS=</varname></term>
1771 <listitem>
1772 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1773 precedence over any statically configured ones.</para>
1774
1775 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1776 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1777 </listitem>
1778 </varlistentry>
1779
1780 <varlistentry>
1781 <term><varname>UseDomains=</varname></term>
1782 <listitem>
1783 <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name
1784 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1785 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1786 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1787 effect of the <option>Domains=</option> setting when the argument is prefixed with
1788 <literal>~</literal>. Defaults to false.</para>
1789
1790 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1791 of all hostnames, in particular of single-label names. It is generally safer to use the supplied domain
1792 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1793 single-label names.</para>
1794
1795 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1796 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1797 </listitem>
1798 </varlistentry>
1799
1800 <varlistentry>
1801 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1802 <listitem>
1803 <para>The table identifier for the routes received in the Router Advertisement
1804 (a number between 1 and 4294967295, or 0 to unset).
1805 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1806 </para>
1807 </listitem>
1808 </varlistentry>
1809
1810 <varlistentry>
1811 <term><varname>UseAutonomousPrefix=</varname></term>
1812 <listitem>
1813 <para>When true (the default), the autonomous prefix received in the Router Advertisement will be used and take
1814 precedence over any statically configured ones.</para>
1815 </listitem>
1816 </varlistentry>
1817
1818 <varlistentry>
1819 <term><varname>UseOnLinkPrefix=</varname></term>
1820 <listitem>
1821 <para>When true (the default), the onlink prefix received in the Router Advertisement will be used and take
1822 precedence over any statically configured ones.</para>
1823 </listitem>
1824 </varlistentry>
1825
1826 <varlistentry>
1827 <term><varname>BlackList=</varname></term>
1828 <listitem>
1829 <para>A whitespace-separated list of IPv6 prefixes. IPv6 prefixes supplied via router advertisements in the list are ignored.</para>
1830 </listitem>
1831 </varlistentry>
1832
1833 <varlistentry>
1834 <term><varname>DHCPv6Client=</varname></term>
1835 <listitem>
1836 <para>Takes a boolean, or the special value <literal>always</literal>. When true (the default), the DHCPv6 client will be started when the
1837 RA has the managed or other information flag. If set to <literal>always</literal>, the DHCPv6 client will be started even if there is no
1838 managed or other information flag in the RA.</para>
1839 </listitem>
1840 </varlistentry>
1841 </variablelist>
1842 </refsect1>
1843
1844 <refsect1>
1845 <title>[DHCPServer] Section Options</title>
1846 <para>The <literal>[DHCPServer]</literal> section contains
1847 settings for the DHCP server, if enabled via the
1848 <varname>DHCPServer=</varname> option described above:</para>
1849
1850 <variablelist class='network-directives'>
1851
1852 <varlistentry>
1853 <term><varname>PoolOffset=</varname></term>
1854 <term><varname>PoolSize=</varname></term>
1855
1856 <listitem><para>Configures the pool of addresses to hand out. The pool
1857 is a contiguous sequence of IP addresses in the subnet configured for
1858 the server address, which does not include the subnet nor the broadcast
1859 address. <varname>PoolOffset=</varname> takes the offset of the pool
1860 from the start of subnet, or zero to use the default value.
1861 <varname>PoolSize=</varname> takes the number of IP addresses in the
1862 pool or zero to use the default value. By default, the pool starts at
1863 the first address after the subnet address and takes up the rest of
1864 the subnet, excluding the broadcast address. If the pool includes
1865 the server address (the default), this is reserved and not handed
1866 out to clients.</para></listitem>
1867 </varlistentry>
1868
1869 <varlistentry>
1870 <term><varname>DefaultLeaseTimeSec=</varname></term>
1871 <term><varname>MaxLeaseTimeSec=</varname></term>
1872
1873 <listitem><para>Control the default and maximum DHCP lease
1874 time to pass to clients. These settings take time values in seconds or
1875 another common time unit, depending on the suffix. The default
1876 lease time is used for clients that did not ask for a specific
1877 lease time. If a client asks for a lease time longer than the
1878 maximum lease time, it is automatically shortened to the
1879 specified time. The default lease time defaults to 1h, the
1880 maximum lease time to 12h. Shorter lease times are beneficial
1881 if the configuration data in DHCP leases changes frequently
1882 and clients shall learn the new settings with shorter
1883 latencies. Longer lease times reduce the generated DHCP
1884 network traffic.</para></listitem>
1885 </varlistentry>
1886
1887 <varlistentry>
1888 <term><varname>EmitDNS=</varname></term>
1889 <term><varname>DNS=</varname></term>
1890
1891 <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out
1892 to clients shall contain DNS server information. Defaults to <literal>yes</literal>.
1893 The DNS servers to pass to clients may be configured with the
1894 <varname>DNS=</varname> option, which takes a list of IPv4
1895 addresses. If the <varname>EmitDNS=</varname> option is
1896 enabled but no servers configured, the servers are
1897 automatically propagated from an "uplink" interface that has
1898 appropriate servers set. The "uplink" interface is determined
1899 by the default route of the system with the highest
1900 priority. Note that this information is acquired at the time
1901 the lease is handed out, and does not take uplink interfaces
1902 into account that acquire DNS or NTP server information at a
1903 later point. DNS server propagation does not take
1904 <filename>/etc/resolv.conf</filename> into account. Also, note
1905 that the leases are not refreshed if the uplink network
1906 configuration changes. To ensure clients regularly acquire the
1907 most current uplink DNS server information, it is thus
1908 advisable to shorten the DHCP lease time via
1909 <varname>MaxLeaseTimeSec=</varname> described
1910 above.</para></listitem>
1911 </varlistentry>
1912
1913 <varlistentry>
1914 <term><varname>EmitNTP=</varname></term>
1915 <term><varname>NTP=</varname></term>
1916
1917 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
1918 <varname>DNS=</varname> settings described above, these
1919 settings configure whether and what NTP server information
1920 shall be emitted as part of the DHCP lease. The same syntax,
1921 propagation semantics and defaults apply as for
1922 <varname>EmitDNS=</varname> and
1923 <varname>DNS=</varname>.</para></listitem>
1924 </varlistentry>
1925
1926 <varlistentry>
1927 <term><varname>EmitSIP=</varname></term>
1928 <term><varname>SIP=</varname></term>
1929
1930 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
1931 <varname>DNS=</varname> settings described above, these
1932 settings configure whether and what SIP server information
1933 shall be emitted as part of the DHCP lease. The same syntax,
1934 propagation semantics and defaults apply as for
1935 <varname>EmitDNS=</varname> and
1936 <varname>DNS=</varname>.</para></listitem>
1937 </varlistentry>
1938
1939 <varlistentry>
1940 <term><varname>POP3Servers=</varname></term>
1941
1942 <listitem><para>Similar to the <varname>DNS=</varname> setting described above, this setting
1943 configures whether and what POP3 server information shall be emitted as part of the DHCP lease. The
1944 same syntax, propagation semantics and defaults apply as for
1945 <varname>DNS=</varname>.</para></listitem>
1946 </varlistentry>
1947
1948 <varlistentry>
1949 <term><varname>SMTPServers=</varname></term>
1950
1951 <listitem><para>Similar to the <varname>DNS=</varname> setting described above, this
1952 setting configures whether and what SMTP server information shall be emitted as part of
1953 the DHCP lease. The same syntax, propagation semantics and defaults apply as for
1954 <varname>DNS=</varname>.</para></listitem>
1955 </varlistentry>
1956
1957 <varlistentry>
1958 <term><varname>LPRServers=</varname></term>
1959
1960 <listitem><para>Similar to the <varname>DNS=</varname> setting described above, this
1961 setting configures whether and what LPR (line printer) server information shall be emitted
1962 as part of the DHCP lease. The same syntax, propagation semantics and defaults apply as for
1963 <varname>DNS=</varname>.</para></listitem>
1964 </varlistentry>
1965
1966 <varlistentry>
1967 <term><varname>EmitRouter=</varname></term>
1968
1969 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1970 setting described above, this setting configures whether the
1971 DHCP lease should contain the router option. The same syntax,
1972 propagation semantics and defaults apply as for
1973 <varname>EmitDNS=</varname>.</para></listitem>
1974 </varlistentry>
1975
1976 <varlistentry>
1977 <term><varname>EmitTimezone=</varname></term>
1978 <term><varname>Timezone=</varname></term>
1979
1980 <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out
1981 to clients shall contain timezone information. Defaults to <literal>yes</literal>. The
1982 <varname>Timezone=</varname> setting takes a timezone string
1983 (such as <literal>Europe/Berlin</literal> or
1984 <literal>UTC</literal>) to pass to clients. If no explicit
1985 timezone is set, the system timezone of the local host is
1986 propagated, as determined by the
1987 <filename>/etc/localtime</filename> symlink.</para></listitem>
1988 </varlistentry>
1989
1990 <varlistentry>
1991 <term><varname>SendOption=</varname></term>
1992 <listitem>
1993 <para>Send a raw option with value via DHCPv4 server. Takes a DHCP option number, data type
1994 and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
1995 The option number is an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
1996 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, <literal>ipv6address</literal>, or
1997 <literal>string</literal>. Special characters in the data string may be escaped using
1998 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
1999 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
2000 then all options specified earlier are cleared. Defaults to unset.</para>
2001 </listitem>
2002 </varlistentry>
2003
2004 <varlistentry>
2005 <term><varname>SendVendorOption=</varname></term>
2006 <listitem>
2007 <para>Send a vendor option with value via DHCPv4 server. Takes a DHCP option number, data type
2008 and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>).
2009 The option number is an integer in the range 1..254. The type takes one of <literal>uint8</literal>,
2010 <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or
2011 <literal>string</literal>. Special characters in the data string may be escaped using
2012 <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
2013 escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
2014 then all options specified earlier are cleared. Defaults to unset.</para>
2015 </listitem>
2016 </varlistentry>
2017
2018 </variablelist>
2019 </refsect1>
2020
2021 <refsect1>
2022 <title>[IPv6PrefixDelegation] Section Options</title>
2023 <para>The <literal>[IPv6PrefixDelegation]</literal> section contains
2024 settings for sending IPv6 Router Advertisements and whether to act as
2025 a router, if enabled via the <varname>IPv6PrefixDelegation=</varname>
2026 option described above. IPv6 network prefixes are defined with one or
2027 more <literal>[IPv6Prefix]</literal> sections.</para>
2028
2029 <variablelist class='network-directives'>
2030
2031 <varlistentry>
2032 <term><varname>Managed=</varname></term>
2033 <term><varname>OtherInformation=</varname></term>
2034
2035 <listitem><para>Takes a boolean. Controls whether a DHCPv6 server is used to acquire IPv6
2036 addresses on the network link when <varname>Managed=</varname>
2037 is set to <literal>true</literal> or if only additional network
2038 information can be obtained via DHCPv6 for the network link when
2039 <varname>OtherInformation=</varname> is set to
2040 <literal>true</literal>. Both settings default to
2041 <literal>false</literal>, which means that a DHCPv6 server is not being
2042 used.</para></listitem>
2043 </varlistentry>
2044
2045 <varlistentry>
2046 <term><varname>RouterLifetimeSec=</varname></term>
2047
2048 <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. If set,
2049 this host also announces itself in Router Advertisements as an IPv6
2050 router for the network link. When unset, the host is not acting as a router.</para>
2051 </listitem>
2052 </varlistentry>
2053
2054 <varlistentry>
2055 <term><varname>RouterPreference=</varname></term>
2056
2057 <listitem><para>Configures IPv6 router preference if
2058 <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are
2059 <literal>high</literal>, <literal>medium</literal> and
2060 <literal>low</literal>, with <literal>normal</literal> and
2061 <literal>default</literal> added as synonyms for
2062 <literal>medium</literal> just to make configuration easier. See
2063 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
2064 for details. Defaults to <literal>medium</literal>.</para></listitem>
2065 </varlistentry>
2066
2067 <varlistentry>
2068 <term><varname>EmitDNS=</varname></term>
2069 <term><varname>DNS=</varname></term>
2070
2071 <listitem><para><varname>DNS=</varname> specifies a list of recursive DNS server IPv6 addresses
2072 that are distributed via Router Advertisement messages when <varname>EmitDNS=</varname> is
2073 true. <varname>DNS=</varname> also takes special value <literal>_link_local</literal>; in that
2074 case the IPv6 link local address is distributed. If <varname>DNS=</varname> is empty, DNS
2075 servers are read from the <literal>[Network]</literal> section. If the
2076 <literal>[Network]</literal> section does not contain any DNS servers either, DNS servers from
2077 the uplink with the highest priority default route are used. When <varname>EmitDNS=</varname>
2078 is false, no DNS server information is sent in Router Advertisement messages.
2079 <varname>EmitDNS=</varname> defaults to true.
2080 </para></listitem>
2081 </varlistentry>
2082
2083 <varlistentry>
2084 <term><varname>EmitDomains=</varname></term>
2085 <term><varname>Domains=</varname></term>
2086
2087 <listitem><para>A list of DNS search domains distributed via Router
2088 Advertisement messages when <varname>EmitDomains=</varname> is true. If
2089 <varname>Domains=</varname> is empty, DNS search domains are read from the
2090 <literal>[Network]</literal> section. If the <literal>[Network]</literal>
2091 section does not contain any DNS search domains either, DNS search
2092 domains from the uplink with the highest priority default route are
2093 used. When <varname>EmitDomains=</varname> is false, no DNS search domain
2094 information is sent in Router Advertisement messages.
2095 <varname>EmitDomains=</varname> defaults to true.
2096 </para></listitem>
2097 </varlistentry>
2098
2099 <varlistentry>
2100 <term><varname>DNSLifetimeSec=</varname></term>
2101
2102 <listitem><para>Lifetime in seconds for the DNS server addresses listed
2103 in <varname>DNS=</varname> and search domains listed in
2104 <varname>Domains=</varname>.</para></listitem>
2105 </varlistentry>
2106
2107 </variablelist>
2108 </refsect1>
2109
2110 <refsect1>
2111 <title>[IPv6Prefix] Section Options</title>
2112 <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6
2113 prefixes that are announced via Router Advertisements. See
2114 <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink>
2115 for further details.</para>
2116
2117 <variablelist class='network-directives'>
2118
2119 <varlistentry>
2120 <term><varname>AddressAutoconfiguration=</varname></term>
2121 <term><varname>OnLink=</varname></term>
2122
2123 <listitem><para>Takes a boolean to specify whether IPv6 addresses can be
2124 autoconfigured with this prefix and whether the prefix can be used for
2125 onlink determination. Both settings default to <literal>true</literal>
2126 in order to ease configuration.
2127 </para></listitem>
2128 </varlistentry>
2129
2130 <varlistentry>
2131 <term><varname>Prefix=</varname></term>
2132
2133 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
2134 Similarly to configuring static IPv6 addresses, the setting is
2135 configured as an IPv6 prefix and its prefix length, separated by a
2136 <literal>/</literal> character. Use multiple
2137 <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6
2138 prefixes since prefix lifetimes, address autoconfiguration and onlink
2139 status may differ from one prefix to another.</para></listitem>
2140 </varlistentry>
2141
2142 <varlistentry>
2143 <term><varname>PreferredLifetimeSec=</varname></term>
2144 <term><varname>ValidLifetimeSec=</varname></term>
2145
2146 <listitem><para>Preferred and valid lifetimes for the prefix measured in
2147 seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800
2148 seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults
2149 to 2592000 seconds (30 days).</para></listitem>
2150 </varlistentry>
2151
2152 <varlistentry>
2153 <term><varname>Assign=</varname></term>
2154 <listitem><para>Takes a boolean. When true, adds an address from the prefix. Default to false.
2155 </para></listitem>
2156 </varlistentry>
2157 </variablelist>
2158 </refsect1>
2159
2160 <refsect1>
2161 <title>[IPv6RoutePrefix] Section Options</title>
2162 <para>One or more <literal>[IPv6RoutePrefix]</literal> sections contain the IPv6
2163 prefix routes that are announced via Router Advertisements. See
2164 <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink>
2165 for further details.</para>
2166
2167 <variablelist class='network-directives'>
2168
2169 <varlistentry>
2170 <term><varname>Route=</varname></term>
2171
2172 <listitem><para>The IPv6 route that is to be distributed to hosts.
2173 Similarly to configuring static IPv6 routes, the setting is
2174 configured as an IPv6 prefix routes and its prefix route length,
2175 separated by a<literal>/</literal> character. Use multiple
2176 <literal>[IPv6PrefixRoutes]</literal> sections to configure multiple IPv6
2177 prefix routes.</para></listitem>
2178 </varlistentry>
2179
2180 <varlistentry>
2181 <term><varname>LifetimeSec=</varname></term>
2182
2183 <listitem><para>Lifetime for the route prefix measured in
2184 seconds. <varname>LifetimeSec=</varname> defaults to 604800 seconds (one week).
2185 </para></listitem>
2186 </varlistentry>
2187
2188 </variablelist>
2189 </refsect1>
2190
2191 <refsect1>
2192 <title>[Bridge] Section Options</title>
2193 <para>The <literal>[Bridge]</literal> section accepts the
2194 following keys.</para>
2195 <variablelist class='network-directives'>
2196 <varlistentry>
2197 <term><varname>UnicastFlood=</varname></term>
2198 <listitem>
2199 <para>Takes a boolean. Controls whether the bridge should flood
2200 traffic for which an FDB entry is missing and the destination
2201 is unknown through this port. When unset, the kernel's default will be used.
2202 </para>
2203 </listitem>
2204 </varlistentry>
2205 <varlistentry>
2206 <term><varname>MulticastFlood=</varname></term>
2207 <listitem>
2208 <para>Takes a boolean. Controls whether the bridge should flood
2209 traffic for which an MDB entry is missing and the destination
2210 is unknown through this port. When unset, the kernel's default will be used.
2211 </para>
2212 </listitem>
2213 </varlistentry>
2214 <varlistentry>
2215 <term><varname>MulticastToUnicast=</varname></term>
2216 <listitem>
2217 <para>Takes a boolean. Multicast to unicast works on top of the multicast snooping feature of
2218 the bridge. Which means unicast copies are only delivered to hosts which are interested in it.
2219 When unset, the kernel's default will be used.
2220 </para>
2221 </listitem>
2222 </varlistentry>
2223 <varlistentry>
2224 <term><varname>NeighborSuppression=</varname></term>
2225 <listitem>
2226 <para>Takes a boolean. Configures whether ARP and ND neighbor suppression is enabled for
2227 this port. When unset, the kernel's default will be used.
2228 </para>
2229 </listitem>
2230 </varlistentry>
2231 <varlistentry>
2232 <term><varname>Learning=</varname></term>
2233 <listitem>
2234 <para>Takes a boolean. Configures whether MAC address learning is enabled for
2235 this port. When unset, the kernel's default will be used.
2236 </para>
2237 </listitem>
2238 </varlistentry>
2239 <varlistentry>
2240 <term><varname>HairPin=</varname></term>
2241 <listitem>
2242 <para>Takes a boolean. Configures whether traffic may be sent back
2243 out of the port on which it was received. When this flag is false, and the bridge
2244 will not forward traffic back out of the receiving port.
2245 When unset, the kernel's default will be used.</para>
2246 </listitem>
2247 </varlistentry>
2248 <varlistentry>
2249 <term><varname>UseBPDU=</varname></term>
2250 <listitem>
2251 <para>Takes a boolean. Configures whether STP Bridge Protocol Data Units will be
2252 processed by the bridge port. When unset, the kernel's default will be used.</para>
2253 </listitem>
2254 </varlistentry>
2255 <varlistentry>
2256 <term><varname>FastLeave=</varname></term>
2257 <listitem>
2258 <para>Takes a boolean. This flag allows the bridge to immediately stop multicast
2259 traffic on a port that receives an IGMP Leave message. It is only used with
2260 IGMP snooping if enabled on the bridge. When unset, the kernel's default will be used.</para>
2261 </listitem>
2262 </varlistentry>
2263 <varlistentry>
2264 <term><varname>AllowPortToBeRoot=</varname></term>
2265 <listitem>
2266 <para>Takes a boolean. Configures whether a given port is allowed to
2267 become a root port. Only used when STP is enabled on the bridge.
2268 When unset, the kernel's default will be used.</para>
2269 </listitem>
2270 </varlistentry>
2271 <varlistentry>
2272 <term><varname>ProxyARP=</varname></term>
2273 <listitem>
2274 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port.
2275 When unset, the kernel's default will be used.</para>
2276 </listitem>
2277 </varlistentry>
2278 <varlistentry>
2279 <term><varname>ProxyARPWiFi=</varname></term>
2280 <listitem>
2281 <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port
2282 which meets extended requirements by IEEE 802.11 and Hotspot 2.0 specifications.
2283 When unset, the kernel's default will be used.</para>
2284 </listitem>
2285 </varlistentry>
2286 <varlistentry>
2287 <term><varname>MulticastRouter=</varname></term>
2288 <listitem>
2289 <para>Configures this port for having multicast routers attached. A port with a multicast
2290 router will receive all multicast traffic. Takes one of <literal>no</literal>
2291 to disable multicast routers on this port, <literal>query</literal> to let the system detect
2292 the presence of routers, <literal>permanent</literal> to permanently enable multicast traffic
2293 forwarding on this port, or <literal>temporary</literal> to enable multicast routers temporarily
2294 on this port, not depending on incoming queries. When unset, the kernel's default will be used.</para>
2295 </listitem>
2296 </varlistentry>
2297 <varlistentry>
2298 <term><varname>Cost=</varname></term>
2299 <listitem>
2300 <para>Sets the "cost" of sending packets of this interface.
2301 Each port in a bridge may have a different speed and the cost
2302 is used to decide which link to use. Faster interfaces
2303 should have lower costs. It is an integer value between 1 and
2304 65535.</para>
2305 </listitem>
2306 </varlistentry>
2307 <varlistentry>
2308 <term><varname>Priority=</varname></term>
2309 <listitem>
2310 <para>Sets the "priority" of sending packets on this interface.
2311 Each port in a bridge may have a different priority which is used
2312 to decide which link to use. Lower value means higher priority.
2313 It is an integer value between 0 to 63. Networkd does not set any
2314 default, meaning the kernel default value of 32 is used.</para>
2315 </listitem>
2316 </varlistentry>
2317 </variablelist>
2318 </refsect1>
2319 <refsect1>
2320 <title>[BridgeFDB] Section Options</title>
2321 <para>The <literal>[BridgeFDB]</literal> section manages the
2322 forwarding database table of a port and accepts the following
2323 keys. Specify several <literal>[BridgeFDB]</literal> sections to
2324 configure several static MAC table entries.</para>
2325
2326 <variablelist class='network-directives'>
2327 <varlistentry>
2328 <term><varname>MACAddress=</varname></term>
2329 <listitem>
2330 <para>As in the <literal>[Network]</literal> section. This
2331 key is mandatory.</para>
2332 </listitem>
2333 </varlistentry>
2334 <varlistentry>
2335 <term><varname>Destination=</varname></term>
2336 <listitem>
2337 <para>Takes an IP address of the destination VXLAN tunnel endpoint.</para>
2338 </listitem>
2339 </varlistentry>
2340 <varlistentry>
2341 <term><varname>VLANId=</varname></term>
2342 <listitem>
2343 <para>The VLAN ID for the new static MAC table entry. If
2344 omitted, no VLAN ID information is appended to the new static MAC
2345 table entry.</para>
2346 </listitem>
2347 </varlistentry>
2348 <varlistentry>
2349 <term><varname>VNI=</varname></term>
2350 <listitem>
2351 <para>The VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to
2352 the remote VXLAN tunnel endpoint. Takes a number in the range 1-16777215.
2353 Defaults to unset.</para>
2354 </listitem>
2355 </varlistentry>
2356 <varlistentry>
2357 <term><varname>AssociatedWith=</varname></term>
2358 <listitem>
2359 <para>Specifies where the address is associated with. Takes one of <literal>use</literal>,
2360 <literal>self</literal>, <literal>master</literal> or <literal>router</literal>.
2361 <literal>use</literal> means the address is in use. User space can use this option to
2362 indicate to the kernel that the fdb entry is in use. <literal>self</literal> means
2363 the address is associated with the port drivers fdb. Usually hardware. <literal>master</literal>
2364 means the address is associated with master devices fdb. <literal>router</literal> means
2365 the destination address is associated with a router. Note that it's valid if the referenced
2366 device is a VXLAN type device and has route shortcircuit enabled. Defaults to <literal>self</literal>.</para>
2367 </listitem>
2368 </varlistentry>
2369 </variablelist>
2370 </refsect1>
2371
2372 <refsect1>
2373 <title>[LLDP] Section Options</title>
2374 <para>The <literal>[LLDP]</literal> section manages the Link Layer Discovery Protocol (LLDP) and accepts the
2375 following keys.</para>
2376 <variablelist class='network-directives'>
2377 <varlistentry>
2378 <term><varname>MUDURL=</varname></term>
2379 <listitem>
2380 <para>Controls support for Ethernet LLDP packet's Manufacturer Usage Description (MUD). MUD is an embedded software
2381 standard defined by the IETF that allows IoT Device makers to advertise device specifications, including the intended
2382 communication patterns for their device when it connects to the network. The network can then use this intent to author
2383 a context-specific access policy, so the device functions only within those parameters. Takes an URL of length up to 255
2384 characters. A superficial verification that the string is a valid URL
2385 will be performed. See
2386 <ulink url="https://tools.ietf.org/html/rfc8520">RFC 8520</ulink> for details. The MUD URL received
2387 from the LLDP packets will be saved at the state files and can be read via
2388 <function>sd_lldp_neighbor_get_mud_url()</function> function.</para>
2389 </listitem>
2390 </varlistentry>
2391 </variablelist>
2392 </refsect1>
2393
2394 <refsect1>
2395 <title>[CAN] Section Options</title>
2396 <para>The <literal>[CAN]</literal> section manages the Controller Area Network (CAN bus) and accepts the
2397 following keys.</para>
2398 <variablelist class='network-directives'>
2399 <varlistentry>
2400 <term><varname>BitRate=</varname></term>
2401 <listitem>
2402 <para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can
2403 be used here. Takes a number in the range 1..4294967295.</para>
2404 </listitem>
2405 </varlistentry>
2406 <varlistentry>
2407 <term><varname>SamplePoint=</varname></term>
2408 <listitem>
2409 <para>Optional sample point in percent with one decimal (e.g. <literal>75%</literal>,
2410 <literal>87.5%</literal>) or permille (e.g. <literal>875‰</literal>).</para>
2411 </listitem>
2412 </varlistentry>
2413 <varlistentry>
2414 <term><varname>DataBitRate=</varname></term>
2415 <term><varname>DataSamplePoint=</varname></term>
2416 <listitem>
2417 <para>The bitrate and sample point for the data phase, if CAN-FD is used. These settings are
2418 analogous to the <varname>BitRate=</varname> and <varname>SamplePoint=</varname> keys.</para>
2419 </listitem>
2420 </varlistentry>
2421 <varlistentry>
2422 <term><varname>FDMode=</varname></term>
2423 <listitem>
2424 <para>Takes a boolean. When <literal>yes</literal>, CAN-FD mode is enabled for the interface.
2425 Note, that a bitrate and optional sample point should also be set for the CAN-FD data phase using
2426 the <varname>DataBitRate=</varname> and <varname>DataSamplePoint=</varname> keys.</para>
2427 </listitem>
2428 </varlistentry>
2429 <varlistentry>
2430 <term><varname>FDNonISO=</varname></term>
2431 <listitem>
2432 <para>Takes a boolean. When <literal>yes</literal>, non-ISO CAN-FD mode is enabled for the
2433 interface. When unset, the kernel's default will be used.</para>
2434 </listitem>
2435 </varlistentry>
2436 <varlistentry>
2437 <term><varname>RestartSec=</varname></term>
2438 <listitem>
2439 <para>Automatic restart delay time. If set to a non-zero value, a restart of the CAN controller will be
2440 triggered automatically in case of a bus-off condition after the specified delay time. Subsecond delays can
2441 be specified using decimals (e.g. <literal>0.1s</literal>) or a <literal>ms</literal> or
2442 <literal>us</literal> postfix. Using <literal>infinity</literal> or <literal>0</literal> will turn the
2443 automatic restart off. By default automatic restart is disabled.</para>
2444 </listitem>
2445 </varlistentry>
2446 <varlistentry>
2447 <term><varname>Termination=</varname></term>
2448 <listitem>
2449 <para>Takes a boolean. When <literal>yes</literal>, the termination resistor will be selected for
2450 the bias network. When unset, the kernel's default will be used.</para>
2451 </listitem>
2452 </varlistentry>
2453 <varlistentry>
2454 <term><varname>TripleSampling=</varname></term>
2455 <listitem>
2456 <para>Takes a boolean. When <literal>yes</literal>, three samples (instead of one) are used to determine
2457 the value of a received bit by majority rule. When unset, the kernel's default will be used.</para>
2458 </listitem>
2459 </varlistentry>
2460 <varlistentry>
2461 <term><varname>ListenOnly=</varname></term>
2462 <listitem>
2463 <para>Takes a boolean. When <literal>yes</literal>, listen-only mode is enabled. When the
2464 interface is in listen-only mode, the interface neither transmit CAN frames nor send ACK
2465 bit. Listen-only mode is important to debug CAN networks without interfering with the
2466 communication or acknowledge the CAN frame. When unset, the kernel's default will be used.
2467 </para>
2468 </listitem>
2469 </varlistentry>
2470 </variablelist>
2471 </refsect1>
2472
2473 <refsect1>
2474 <title>[QDisc] Section Options</title>
2475 <para>The <literal>[QDisc]</literal> section manages the traffic control queueing discipline (qdisc).</para>
2476
2477 <variablelist class='network-directives'>
2478 <varlistentry>
2479 <term><varname>Parent=</varname></term>
2480 <listitem>
2481 <para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>clsact</literal>
2482 or <literal>ingress</literal>. This is mandatory.</para>
2483 </listitem>
2484 </varlistentry>
2485
2486 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2487 </variablelist>
2488 </refsect1>
2489
2490 <refsect1>
2491 <title>[NetworkEmulator] Section Options</title>
2492 <para>The <literal>[NetworkEmulator]</literal> section manages the queueing discipline (qdisc) of
2493 the network emulator. It can be used to configure the kernel packet scheduler and simulate packet
2494 delay and loss for UDP or TCP applications, or limit the bandwidth usage of a particular service to
2495 simulate internet connections.</para>
2496
2497 <variablelist class='network-directives'>
2498 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2499 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2500
2501 <varlistentry>
2502 <term><varname>DelaySec=</varname></term>
2503 <listitem>
2504 <para>Specifies the fixed amount of delay to be added to all packets going out of the
2505 interface. Defaults to unset.</para>
2506 </listitem>
2507 </varlistentry>
2508
2509 <varlistentry>
2510 <term><varname>DelayJitterSec=</varname></term>
2511 <listitem>
2512 <para>Specifies the chosen delay to be added to the packets outgoing to the network
2513 interface. Defaults to unset.</para>
2514 </listitem>
2515 </varlistentry>
2516
2517 <varlistentry>
2518 <term><varname>PacketLimit=</varname></term>
2519 <listitem>
2520 <para>Specifies the maximum number of packets the qdisc may hold queued at a time.
2521 An unsigned integer ranges 0 to 4294967294. Defaults to 1000.</para>
2522 </listitem>
2523 </varlistentry>
2524
2525 <varlistentry>
2526 <term><varname>LossRate=</varname></term>
2527 <listitem>
2528 <para>Specifies an independent loss probability to be added to the packets outgoing from the
2529 network interface. Takes a percentage value, suffixed with "%". Defaults to unset.</para>
2530 </listitem>
2531 </varlistentry>
2532
2533 <varlistentry>
2534 <term><varname>DuplicateRate=</varname></term>
2535 <listitem>
2536 <para>Specifies that the chosen percent of packets is duplicated before queuing them.
2537 Takes a percentage value, suffixed with "%". Defaults to unset.</para>
2538 </listitem>
2539 </varlistentry>
2540 </variablelist>
2541 </refsect1>
2542
2543 <refsect1>
2544 <title>[TokenBucketFilter] Section Options</title>
2545 <para>The <literal>[TokenBucketFilter]</literal> section manages the queueing discipline (qdisc) of
2546 token bucket filter (tbf).</para>
2547
2548 <variablelist class='network-directives'>
2549 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2550 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2551
2552 <varlistentry>
2553 <term><varname>LatencySec=</varname></term>
2554 <listitem>
2555 <para>Specifies the latency parameter, which specifies the maximum amount of time a
2556 packet can sit in the Token Bucket Filter (TBF). Defaults to unset.</para>
2557 </listitem>
2558 </varlistentry>
2559
2560 <varlistentry>
2561 <term><varname>LimitSize=</varname></term>
2562 <listitem>
2563 <para>Takes the number of bytes that can be queued waiting for tokens to become available.
2564 When the size is suffixed with K, M, or G, it is parsed as Kilobytes, Megabytes, or Gigabytes,
2565 respectively, to the base of 1000. Defaults to unset.</para>
2566 </listitem>
2567 </varlistentry>
2568
2569 <varlistentry>
2570 <term><varname>Burst=</varname></term>
2571 <listitem>
2572 <para>Specifies the size of the bucket. This is the maximum amount of bytes that tokens
2573 can be available for instantaneous transfer. When the size is suffixed with K, M, or G, it is
2574 parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to
2575 unset.</para>
2576 </listitem>
2577 </varlistentry>
2578
2579 <varlistentry>
2580 <term><varname>Rate=</varname></term>
2581 <listitem>
2582 <para>Specifies the device specific bandwidth. When suffixed with K, M, or G, the specified
2583 bandwidth is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000.
2584 Defaults to unset.</para>
2585 </listitem>
2586 </varlistentry>
2587
2588 <varlistentry>
2589 <term><varname>MPUBytes=</varname></term>
2590 <listitem>
2591 <para>The Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes)
2592 for a packet. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
2593 Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to zero.</para>
2594 </listitem>
2595 </varlistentry>
2596
2597 <varlistentry>
2598 <term><varname>PeakRate=</varname></term>
2599 <listitem>
2600 <para>Takes the maximum depletion rate of the bucket. When suffixed with K, M, or G, the
2601 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
2602 1000. Defaults to unset.</para>
2603 </listitem>
2604 </varlistentry>
2605
2606 <varlistentry>
2607 <term><varname>MTUBytes=</varname></term>
2608 <listitem>
2609 <para>Specifies the size of the peakrate bucket. When suffixed with K, M, or G, the specified
2610 size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000.
2611 Defaults to unset.</para>
2612 </listitem>
2613 </varlistentry>
2614 </variablelist>
2615 </refsect1>
2616
2617 <refsect1>
2618 <title>[PIE] Section Options</title>
2619 <para>The <literal>[PIE]</literal> section manages the queueing discipline
2620 (qdisc) of Proportional Integral controller-Enhanced (PIE).</para>
2621
2622 <variablelist class='network-directives'>
2623 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2624 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2625
2626 <varlistentry>
2627 <term><varname>PacketLimit=</varname></term>
2628 <listitem>
2629 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are
2630 dropped. An unsigned integer ranges 1 to 4294967294. Defaults to unset and kernel's default is used.</para>
2631 </listitem>
2632 </varlistentry>
2633 </variablelist>
2634 </refsect1>
2635
2636 <refsect1>
2637 <title>[StochasticFairBlue] Section Options</title>
2638 <para>The <literal>[StochasticFairBlue]</literal> section manages the queueing discipline
2639 (qdisc) of stochastic fair blue (sfb).</para>
2640
2641 <variablelist class='network-directives'>
2642 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2643 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2644
2645 <varlistentry>
2646 <term><varname>PacketLimit=</varname></term>
2647 <listitem>
2648 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are
2649 dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
2650 </listitem>
2651 </varlistentry>
2652 </variablelist>
2653 </refsect1>
2654
2655 <refsect1>
2656 <title>[StochasticFairnessQueueing] Section Options</title>
2657 <para>The <literal>[StochasticFairnessQueueing]</literal> section manages the queueing discipline
2658 (qdisc) of stochastic fairness queueing (sfq).</para>
2659
2660 <variablelist class='network-directives'>
2661 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2662 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2663
2664 <varlistentry>
2665 <term><varname>PerturbPeriodSec=</varname></term>
2666 <listitem>
2667 <para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para>
2668 </listitem>
2669 </varlistentry>
2670 </variablelist>
2671 </refsect1>
2672
2673 <refsect1>
2674 <title>[BFIFO] Section Options</title>
2675 <para>The <literal>[BFIFO]</literal> section manages the queueing discipline (qdisc) of
2676 Byte limited Packet First In First Out (bfifo).</para>
2677
2678 <variablelist class='network-directives'>
2679 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2680 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2681
2682 <varlistentry>
2683 <term><varname>LimitSize=</varname></term>
2684 <listitem>
2685 <para>Specifies the hard limit on the FIFO size in bytes. The size limit (a buffer size) to prevent it
2686 from overflowing in case it is unable to dequeue packets as quickly as it receives them. When this limit
2687 is reached, incoming packets are dropped. When suffixed with K, M, or G, the specified size is parsed as
2688 Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
2689 </listitem>
2690 </varlistentry>
2691 </variablelist>
2692 </refsect1>
2693
2694 <refsect1>
2695 <title>[PFIFO] Section Options</title>
2696 <para>The <literal>[PFIFO]</literal> section manages the queueing discipline (qdisc) of
2697 Packet First In First Out (pfifo).</para>
2698
2699 <variablelist class='network-directives'>
2700 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2701 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2702
2703 <varlistentry>
2704 <term><varname>PacketLimit=</varname></term>
2705 <listitem>
2706 <para>Specifies the hard limit on the FIFO size in number of packets. The size limit (a buffer size) to prevent it
2707 from overflowing in case it is unable to dequeue packets as quickly as it receives them. When this limit is reached,
2708 incoming packets are dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
2709 </listitem>
2710 </varlistentry>
2711 </variablelist>
2712 </refsect1>
2713
2714 <refsect1>
2715 <title>[PFIFOHeadDrop] Section Options</title>
2716 <para>The <literal>[PFIFOHeadDrop]</literal> section manages the queueing discipline (qdisc) of
2717 Packet First In First Out Head Drop (pfifo_head_drop).</para>
2718
2719 <variablelist class='network-directives'>
2720 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2721 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2722
2723 <varlistentry>
2724 <term><varname>PacketLimit=</varname></term>
2725 <listitem>
2726 <para>As in <literal>[PFIFO]</literal> section.</para></listitem>
2727 </varlistentry>
2728 </variablelist>
2729 </refsect1>
2730
2731 <refsect1>
2732 <title>[PFIFOFast] Section Options</title>
2733 <para>The <literal>[PFIFOFast]</literal> section manages the queueing discipline (qdisc) of
2734 Packet First In First Out Fast (pfifo_fast).</para>
2735
2736 <variablelist class='network-directives'>
2737 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2738 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2739 </variablelist>
2740 </refsect1>
2741
2742 <refsect1>
2743 <title>[CAKE] Section Options</title>
2744 <para>The <literal>[CAKE]</literal> section manages the queueing discipline (qdisc) of
2745 Common Applications Kept Enhanced (CAKE).</para>
2746
2747 <variablelist class='network-directives'>
2748 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2749 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2750
2751 <varlistentry>
2752 <term><varname>Overhead=</varname></term>
2753 <listitem>
2754 <para>Specifies that bytes to be addeded to the size of each packet. Bytes may be negative.
2755 Takes an integer ranges -64 to 256. Defaults to unset and kernel's default is used.</para>
2756 </listitem>
2757 </varlistentry>
2758
2759 <varlistentry>
2760 <term><varname>Bandwidth=</varname></term>
2761 <listitem>
2762 <para>Specifies the shaper bandwidth. When suffixed with K, M, or G, the specified size is
2763 parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000. Defaults to
2764 unset and kernel's default is used.</para>
2765 </listitem>
2766 </varlistentry>
2767 </variablelist>
2768 </refsect1>
2769
2770 <refsect1>
2771 <title>[ControlledDelay] Section Options</title>
2772 <para>The <literal>[ControlledDelay]</literal> section manages the queueing discipline (qdisc) of
2773 controlled delay (CoDel).</para>
2774
2775 <variablelist class='network-directives'>
2776 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2777 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2778
2779 <varlistentry>
2780 <term><varname>PacketLimit=</varname></term>
2781 <listitem>
2782 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are
2783 dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
2784 </listitem>
2785 </varlistentry>
2786
2787 <varlistentry>
2788 <term><varname>TargetSec=</varname></term>
2789 <listitem>
2790 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
2791 Defaults to unset and kernel's default is used.</para>
2792 </listitem>
2793 </varlistentry>
2794
2795 <varlistentry>
2796 <term><varname>IntervalSec=</varname></term>
2797 <listitem>
2798 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
2799 become too stale. Defaults to unset and kernel's default is used.</para>
2800 </listitem>
2801 </varlistentry>
2802
2803 <varlistentry>
2804 <term><varname>ECN=</varname></term>
2805 <listitem>
2806 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
2807 unset and kernel's default is used.</para>
2808 </listitem>
2809 </varlistentry>
2810
2811 <varlistentry>
2812 <term><varname>CEThresholdSec=</varname></term>
2813 <listitem>
2814 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
2815 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
2816 </listitem>
2817 </varlistentry>
2818 </variablelist>
2819 </refsect1>
2820
2821 <refsect1>
2822 <title>[DeficitRoundRobinScheduler] Section Options</title>
2823 <para>The <literal>[DeficitRoundRobinScheduler]</literal> section manages the queueing discipline (qdisc) of
2824 Deficit Round Robin Scheduler (DRR).</para>
2825
2826 <variablelist class='network-directives'>
2827 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2828 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2829 </variablelist>
2830 </refsect1>
2831
2832 <refsect1>
2833 <title>[DeficitRoundRobinSchedulerClass] Section Options</title>
2834 <para>The <literal>[DeficitRoundRobinSchedulerClass]</literal> section manages the traffic control class of
2835 Deficit Round Robin Scheduler (DRR).</para>
2836
2837 <variablelist class='network-directives'>
2838 <xi:include href="tc.xml" xpointer="tclass-parent" />
2839 <xi:include href="tc.xml" xpointer="tclass-classid" />
2840
2841 <varlistentry>
2842 <term><varname>Quantum=</varname></term>
2843 <listitem>
2844 <para>Specifies the amount of bytes a flow is allowed to dequeue before the
2845 scheduler moves to the next class. An unsigned integer ranges 1 to 4294967294.
2846 Defaults to the MTU of the interface.</para>
2847 </listitem>
2848 </varlistentry>
2849
2850 </variablelist>
2851 </refsect1>
2852
2853 <refsect1>
2854 <title>[GenericRandomEarlyDetection] Section Options</title>
2855 <para>The <literal>[GenericRandomEarlyDetection]</literal> section manages the queueing discipline
2856 (qdisc) of Generic Random Early Detection (GRED).</para>
2857
2858 <variablelist class='network-directives'>
2859 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2860 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2861
2862 <varlistentry>
2863 <term><varname>VirtualQueues=</varname></term>
2864 <listitem>
2865 <para>Specifies the number of virtual queues. Takes a integer in the range 1-16. Defaults to unset and kernel's default is used.</para>
2866 </listitem>
2867 </varlistentry>
2868
2869 <varlistentry>
2870 <term><varname>DefaultVirtualQueue=</varname></term>
2871 <listitem>
2872 <para>Specifies the number of default virtual queue. This must be less than <varname>VirtualQueue=</varname>.
2873 Defaults to unset and kernel's default is used.</para>
2874 </listitem>
2875 </varlistentry>
2876
2877 <varlistentry>
2878 <term><varname>GenericRIO=</varname></term>
2879 <listitem>
2880 <para>Takes a boolean. It turns on the RIO-like buffering scheme. Defaults to
2881 unset and kernel's default is used.</para>
2882 </listitem>
2883 </varlistentry>
2884 </variablelist>
2885 </refsect1>
2886
2887 <refsect1>
2888 <title>[FairQueueingControlledDelay] Section Options</title>
2889 <para>The <literal>[FairQueueingControlledDelay]</literal> section manages the queueing discipline
2890 (qdisc) of fair queuing controlled delay (FQ-CoDel).</para>
2891
2892 <variablelist class='network-directives'>
2893 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2894 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2895
2896 <varlistentry>
2897 <term><varname>PacketLimit=</varname></term>
2898 <listitem>
2899 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
2900 dropped. Defaults to unset and kernel's default is used.</para>
2901 </listitem>
2902 </varlistentry>
2903
2904 <varlistentry>
2905 <term><varname>MemoryLimit=</varname></term>
2906 <listitem>
2907 <para>Specifies the limit on the total number of bytes that can be queued in this FQ-CoDel instance.
2908 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
2909 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
2910 </listitem>
2911 </varlistentry>
2912
2913 <varlistentry>
2914 <term><varname>Flows=</varname></term>
2915 <listitem>
2916 <para>Specifies the number of flows into which the incoming packets are classified.
2917 Defaults to unset and kernel's default is used.</para>
2918 </listitem>
2919 </varlistentry>
2920
2921 <varlistentry>
2922 <term><varname>TargetSec=</varname></term>
2923 <listitem>
2924 <para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
2925 Defaults to unset and kernel's default is used.</para>
2926 </listitem>
2927 </varlistentry>
2928
2929 <varlistentry>
2930 <term><varname>IntervalSec=</varname></term>
2931 <listitem>
2932 <para>Takes a timespan. This is used to ensure that the measured minimum delay does not
2933 become too stale. Defaults to unset and kernel's default is used.</para>
2934 </listitem>
2935 </varlistentry>
2936
2937 <varlistentry>
2938 <term><varname>Quantum=</varname></term>
2939 <listitem>
2940 <para>Specifies the number of bytes used as 'deficit' in the fair queuing algorithmtimespan.
2941 When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
2942 respectively, to the base of 1024. Defaults to unset and kernel's default is used.</para>
2943 </listitem>
2944 </varlistentry>
2945
2946 <varlistentry>
2947 <term><varname>ECN=</varname></term>
2948 <listitem>
2949 <para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
2950 unset and kernel's default is used.</para>
2951 </listitem>
2952 </varlistentry>
2953
2954 <varlistentry>
2955 <term><varname>CEThresholdSec=</varname></term>
2956 <listitem>
2957 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
2958 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
2959 </listitem>
2960 </varlistentry>
2961 </variablelist>
2962 </refsect1>
2963
2964 <refsect1>
2965 <title>[FairQueueing] Section Options</title>
2966 <para>The <literal>[FairQueueing]</literal> section manages the queueing discipline
2967 (qdisc) of fair queue traffic policing (FQ).</para>
2968
2969 <variablelist class='network-directives'>
2970 <xi:include href="tc.xml" xpointer="qdisc-parent" />
2971 <xi:include href="tc.xml" xpointer="qdisc-handle" />
2972
2973 <varlistentry>
2974 <term><varname>PacketLimit=</varname></term>
2975 <listitem>
2976 <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
2977 dropped. Defaults to unset and kernel's default is used.</para>
2978 </listitem>
2979 </varlistentry>
2980
2981 <varlistentry>
2982 <term><varname>FlowLimit=</varname></term>
2983 <listitem>
2984 <para>Specifies the hard limit on the maximum number of packets queued per flow. Defaults to
2985 unset and kernel's default is used.</para>
2986 </listitem>
2987 </varlistentry>
2988
2989 <varlistentry>
2990 <term><varname>Quantum=</varname></term>
2991 <listitem>
2992 <para>Specifies the credit per dequeue RR round, i.e. the amount of bytes a flow is allowed
2993 to dequeue at once. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
2994 Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and kernel's
2995 default is used.</para>
2996 </listitem>
2997 </varlistentry>
2998
2999 <varlistentry>
3000 <term><varname>InitialQuantum=</varname></term>
3001 <listitem>
3002 <para>Specifies the initial sending rate credit, i.e. the amount of bytes a new flow is
3003 allowed to dequeue initially. When suffixed with K, M, or G, the specified size is parsed as
3004 Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. Defaults to unset and
3005 kernel's default is used.</para>
3006 </listitem>
3007 </varlistentry>
3008
3009 <varlistentry>
3010 <term><varname>MaximumRate=</varname></term>
3011 <listitem>
3012 <para>Specifies the maximum sending rate of a flow. When suffixed with K, M, or G, the
3013 specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
3014 1000. Defaults to unset and kernel's default is used.</para>
3015 </listitem>
3016 </varlistentry>
3017
3018 <varlistentry>
3019 <term><varname>Buckets=</varname></term>
3020 <listitem>
3021 <para>Specifies the size of the hash table used for flow lookups. Defaults to unset and
3022 kernel's default is used.</para>
3023 </listitem>
3024 </varlistentry>
3025
3026 <varlistentry>
3027 <term><varname>OrphanMask=</varname></term>
3028 <listitem>
3029 <para>Takes an unsigned integer. For packets not owned by a socket, fq is able to mask a part
3030 of hash and reduce number of buckets associated with the traffic. Defaults to unset and
3031 kernel's default is used.</para>
3032 </listitem>
3033 </varlistentry>
3034
3035 <varlistentry>
3036 <term><varname>Pacing=</varname></term>
3037 <listitem>
3038 <para>Takes a boolean, and enables or disables flow pacing. Defaults to unset and kernel's
3039 default is used.</para>
3040 </listitem>
3041 </varlistentry>
3042
3043 <varlistentry>
3044 <term><varname>CEThresholdSec=</varname></term>
3045 <listitem>
3046 <para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
3047 Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
3048 </listitem>
3049 </varlistentry>
3050 </variablelist>
3051 </refsect1>
3052
3053 <refsect1>
3054 <title>[TrivialLinkEqualizer] Section Options</title>
3055 <para>The <literal>[TrivialLinkEqualizer]</literal> section manages the queueing discipline (qdisc) of
3056 trivial link equalizer (teql).</para>
3057
3058 <variablelist class='network-directives'>
3059 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3060 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3061
3062 <varlistentry>
3063 <term><varname>Id=</varname></term>
3064 <listitem>
3065 <para>Specifies the interface ID <literal>N</literal> of teql. Defaults to <literal>0</literal>.
3066 Note that when teql is used, currently, the module <constant>sch_teql</constant> with
3067 <constant>max_equalizers=N+1</constant> option must be loaded before
3068 <command>systemd-networkd</command> is started.</para>
3069 </listitem>
3070 </varlistentry>
3071 </variablelist>
3072 </refsect1>
3073
3074 <refsect1>
3075 <title>[HierarchyTokenBucket] Section Options</title>
3076 <para>The <literal>[HierarchyTokenBucket]</literal> section manages the queueing discipline (qdisc) of
3077 hierarchy token bucket (htb).</para>
3078
3079 <variablelist class='network-directives'>
3080 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3081 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3082
3083 <varlistentry>
3084 <term><varname>DefaultClass=</varname></term>
3085 <listitem>
3086 <para>Takes the minor id in hexadecimal of the default class. Unclassified traffic gets sent
3087 to the class. Defaults to unset.</para>
3088 </listitem>
3089 </varlistentry>
3090 </variablelist>
3091 </refsect1>
3092
3093 <refsect1>
3094 <title>[HierarchyTokenBucketClass] Section Options</title>
3095 <para>The <literal>[HierarchyTokenBucketClass]</literal> section manages the traffic control class of
3096 hierarchy token bucket (htb).</para>
3097
3098 <variablelist class='network-directives'>
3099 <xi:include href="tc.xml" xpointer="tclass-parent" />
3100 <xi:include href="tc.xml" xpointer="tclass-classid" />
3101
3102 <varlistentry>
3103 <term><varname>Priority=</varname></term>
3104 <listitem>
3105 <para>Specifies the priority of the class. In the round-robin process, classes with the lowest
3106 priority field are tried for packets first. This setting is mandatory.</para>
3107 </listitem>
3108 </varlistentry>
3109
3110 <varlistentry>
3111 <term><varname>Rate=</varname></term>
3112 <listitem>
3113 <para>Specifies the maximum rate this class and all its children are guaranteed. When suffixed
3114 with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits, respectively,
3115 to the base of 1000. This setting is mandatory.</para>
3116 </listitem>
3117 </varlistentry>
3118
3119 <varlistentry>
3120 <term><varname>CeilRate=</varname></term>
3121 <listitem>
3122 <para>Specifies the maximum rate at which a class can send, if its parent has bandwidth to spare.
3123 When suffixed with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits,
3124 respectively, to the base of 1000. When unset, the value specified with <varname>Rate=</varname>
3125 is used.</para>
3126 </listitem>
3127 </varlistentry>
3128 </variablelist>
3129 </refsect1>
3130
3131 <refsect1>
3132 <title>[HeavyHitterFilter] Section Options</title>
3133 <para>The <literal>[HeavyHitterFilter]</literal> section manages the queueing discipline
3134 (qdisc) of Heavy Hitter Filter (hhf).</para>
3135
3136 <variablelist class='network-directives'>
3137 <xi:include href="tc.xml" xpointer="qdisc-parent" />
3138 <xi:include href="tc.xml" xpointer="qdisc-handle" />
3139
3140 <varlistentry>
3141 <term><varname>PacketLimit=</varname></term>
3142 <listitem>
3143 <para>Specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are
3144 dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
3145 </listitem>
3146 </varlistentry>
3147 </variablelist>
3148 </refsect1>
3149
3150 <refsect1>
3151 <title>[BridgeVLAN] Section Options</title>
3152 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
3153 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
3154 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
3155 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
3156
3157 <variablelist class='network-directives'>
3158 <varlistentry>
3159 <term><varname>VLAN=</varname></term>
3160 <listitem>
3161 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
3162 from 1 to 4094.</para>
3163 </listitem>
3164 </varlistentry>
3165 <varlistentry>
3166 <term><varname>EgressUntagged=</varname></term>
3167 <listitem>
3168 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
3169 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
3170 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
3171 </listitem>
3172 </varlistentry>
3173 <varlistentry>
3174 <term><varname>PVID=</varname></term>
3175 <listitem>
3176 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
3177 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
3178 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
3179 </listitem>
3180 </varlistentry>
3181 </variablelist>
3182 </refsect1>
3183
3184 <refsect1>
3185 <title>Examples</title>
3186 <example>
3187 <title>Static network configuration</title>
3188
3189 <programlisting># /etc/systemd/network/50-static.network
3190 [Match]
3191 Name=enp2s0
3192
3193 [Network]
3194 Address=192.168.0.15/24
3195 Gateway=192.168.0.1</programlisting>
3196
3197 <para>This brings interface <literal>enp2s0</literal> up with a static address. The
3198 specified gateway will be used for a default route.</para>
3199 </example>
3200
3201 <example>
3202 <title>DHCP on ethernet links</title>
3203
3204 <programlisting># /etc/systemd/network/80-dhcp.network
3205 [Match]
3206 Name=en*
3207
3208 [Network]
3209 DHCP=yes</programlisting>
3210
3211 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
3212 <literal>en</literal> (i.e. ethernet interfaces).</para>
3213 </example>
3214
3215 <example>
3216 <title>IPv6 Prefix Delegation</title>
3217
3218 <programlisting># /etc/systemd/network/55-ipv6-pd-upstream.network
3219 [Match]
3220 Name=enp1s0
3221
3222 [Network]
3223 DHCP=ipv6</programlisting>
3224
3225 <programlisting># /etc/systemd/network/56-ipv6-pd-downstream.network
3226 [Match]
3227 Name=enp2s0
3228
3229 [Network]
3230 IPv6PrefixDelegation=dhcpv6</programlisting>
3231
3232 <para>This will enable IPv6 PD on the interface enp1s0 as an upstream interface where the
3233 DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.</para>
3234 </example>
3235
3236 <example>
3237 <title>A bridge with two enslaved links</title>
3238
3239 <programlisting># /etc/systemd/network/25-bridge-static.network
3240 [Match]
3241 Name=bridge0
3242
3243 [Network]
3244 Address=192.168.0.15/24
3245 Gateway=192.168.0.1
3246 DNS=192.168.0.1</programlisting>
3247
3248 <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network
3249 [Match]
3250 Name=enp2s0
3251
3252 [Network]
3253 Bridge=bridge0</programlisting>
3254
3255 <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network
3256 [Match]
3257 Name=wlp3s0
3258
3259 [Network]
3260 Bridge=bridge0</programlisting>
3261
3262 <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and
3263 <literal>wlp3s0</literal> to it. The bridge will have the specified static address
3264 and network assigned, and a default route via the specified gateway will be
3265 added. The specified DNS server will be added to the global list of DNS resolvers.
3266 </para>
3267 </example>
3268
3269 <example>
3270 <title></title>
3271
3272 <programlisting>
3273 # /etc/systemd/network/20-bridge-slave-interface-vlan.network
3274 [Match]
3275 Name=enp2s0
3276
3277 [Network]
3278 Bridge=bridge0
3279
3280 [BridgeVLAN]
3281 VLAN=1-32
3282 PVID=42
3283 EgressUntagged=42
3284
3285 [BridgeVLAN]
3286 VLAN=100-200
3287
3288 [BridgeVLAN]
3289 EgressUntagged=300-400</programlisting>
3290
3291 <para>This overrides the configuration specified in the previous example for the
3292 interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs
3293 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be
3294 untagged when they leave on this interface. Untagged packets which arrive on this
3295 interface will be assigned VLAN ID 42.</para>
3296 </example>
3297
3298 <example>
3299 <title>Various tunnels</title>
3300
3301 <programlisting>/etc/systemd/network/25-tunnels.network
3302 [Match]
3303 Name=ens1
3304
3305 [Network]
3306 Tunnel=ipip-tun
3307 Tunnel=sit-tun
3308 Tunnel=gre-tun
3309 Tunnel=vti-tun
3310 </programlisting>
3311
3312 <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev
3313 [NetDev]
3314 Name=ipip-tun
3315 Kind=ipip
3316 </programlisting>
3317
3318 <programlisting>/etc/systemd/network/25-tunnel-sit.netdev
3319 [NetDev]
3320 Name=sit-tun
3321 Kind=sit
3322 </programlisting>
3323
3324 <programlisting>/etc/systemd/network/25-tunnel-gre.netdev
3325 [NetDev]
3326 Name=gre-tun
3327 Kind=gre
3328 </programlisting>
3329
3330 <programlisting>/etc/systemd/network/25-tunnel-vti.netdev
3331 [NetDev]
3332 Name=vti-tun
3333 Kind=vti
3334 </programlisting>
3335
3336 <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel,
3337 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para>
3338 </example>
3339
3340 <example>
3341 <title>A bond device</title>
3342
3343 <programlisting># /etc/systemd/network/30-bond1.network
3344 [Match]
3345 Name=bond1
3346
3347 [Network]
3348 DHCP=ipv6
3349 </programlisting>
3350
3351 <programlisting># /etc/systemd/network/30-bond1.netdev
3352 [NetDev]
3353 Name=bond1
3354 Kind=bond
3355 </programlisting>
3356
3357 <programlisting># /etc/systemd/network/30-bond1-dev1.network
3358 [Match]
3359 MACAddress=52:54:00:e9:64:41
3360
3361 [Network]
3362 Bond=bond1
3363 </programlisting>
3364
3365 <programlisting># /etc/systemd/network/30-bond1-dev2.network
3366 [Match]
3367 MACAddress=52:54:00:e9:64:42
3368
3369 [Network]
3370 Bond=bond1
3371 </programlisting>
3372
3373 <para>This will create a bond device <literal>bond1</literal> and enslave the two
3374 devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP
3375 will be used to acquire an address.</para>
3376 </example>
3377
3378 <example>
3379 <title>Virtual Routing and Forwarding (VRF)</title>
3380 <para>Add the <literal>bond1</literal> interface to the VRF master interface
3381 <literal>vrf1</literal>. This will redirect routes generated on this interface to be
3382 within the routing table defined during VRF creation. For kernels before 4.8 traffic
3383 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
3384 </para>
3385 <programlisting># /etc/systemd/network/25-vrf.network
3386 [Match]
3387 Name=bond1
3388
3389 [Network]
3390 VRF=vrf1
3391 </programlisting>
3392 </example>
3393
3394 <example>
3395 <title>MacVTap</title>
3396 <para>This brings up a network interface <literal>macvtap-test</literal>
3397 and attaches it to <literal>enp0s25</literal>.</para>
3398 <programlisting># /usr/lib/systemd/network/25-macvtap.network
3399 [Match]
3400 Name=enp0s25
3401
3402 [Network]
3403 MACVTAP=macvtap-test
3404 </programlisting>
3405 </example>
3406
3407 <example>
3408 <title>A Xfrm interface with physical underlying device.</title>
3409
3410 <programlisting># /etc/systemd/network/27-xfrm.netdev
3411 [NetDev]
3412 Name=xfrm0
3413
3414 [Xfrm]
3415 InterfaceId=7</programlisting>
3416
3417 <programlisting># /etc/systemd/network/27-eth0.network
3418 [Match]
3419 Name=eth0
3420
3421 [Network]
3422 Xfrm=xfrm0</programlisting>
3423
3424 <para>This creates a <literal>xfrm0</literal> interface and binds it to the <literal>eth0</literal> device.
3425 This allows hardware based ipsec offloading to the <literal>eth0</literal> nic.
3426 If offloading is not needed, xfrm interfaces can be assigned to the <literal>lo</literal> device.
3427 </para>
3428 </example>
3429 </refsect1>
3430
3431 <refsect1>
3432 <title>See Also</title>
3433 <para>
3434 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3435 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
3436 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3437 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3438 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
3439 </para>
3440 </refsect1>
3441
3442 </refentry>