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