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