]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.netdev.xml
Merge pull request #12496 from yuwata/network-on-device-default-route
[thirdparty/systemd.git] / man / systemd.netdev.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
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.netdev" conditional='ENABLE_NETWORKD'>
7
8 <refentryinfo>
9 <title>systemd.network</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd.netdev</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd.netdev</refname>
20 <refpurpose>Virtual Network Device configuration</refpurpose>
21 </refnamediv>
22
23 <refsynopsisdiv>
24 <para><filename><replaceable>netdev</replaceable>.netdev</filename></para>
25 </refsynopsisdiv>
26
27 <refsect1>
28 <title>Description</title>
29
30 <para>Network setup is performed by
31 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
32 </para>
33
34 <para>The main Virtual Network Device file must have the extension <filename>.netdev</filename>;
35 other extensions are ignored. Virtual network devices are created as soon as networkd is
36 started. If a netdev with the specified name already exists, networkd will use that as-is rather
37 than create its own. Note that the settings of the pre-existing netdev will not be changed by
38 networkd.</para>
39
40 <para>The <filename>.netdev</filename> files are read from the files located in the system
41 network directory <filename>/usr/lib/systemd/network</filename>, the volatile runtime network
42 directory <filename>/run/systemd/network</filename> and the local administration network
43 directory <filename>/etc/systemd/network</filename>. All configuration files are collectively
44 sorted and processed in lexical order, regardless of the directories in which they live.
45 However, files with identical filenames replace each other. Files in <filename>/etc</filename>
46 have the highest priority, files in <filename>/run</filename> take precedence over files with
47 the same name in <filename>/usr/lib</filename>. This can be used to override a system-supplied
48 configuration file with a local file if needed. As a special case, an empty file (file size 0)
49 or symlink with the same name pointing to <filename>/dev/null</filename> disables the
50 configuration file entirely (it is "masked").</para>
51
52 <para>Along with the netdev file <filename>foo.netdev</filename>, a "drop-in" directory
53 <filename>foo.netdev.d/</filename> may exist. All files with the suffix <literal>.conf</literal>
54 from this directory will be parsed after the file itself is parsed. This is useful to alter or
55 add configuration settings, without having to modify the main configuration file. Each drop-in
56 file must have appropriate section headers.</para>
57
58 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
59 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
60 <filename>/run/systemd/network</filename> directories. Drop-in files in
61 <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn
62 take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these
63 directories take precedence over the main netdev file wherever located. (Of course, since
64 <filename>/run</filename> is temporary and <filename>/usr/lib</filename> is for vendors, it is
65 unlikely drop-ins should be used in either of those places.)</para>
66 </refsect1>
67
68 <refsect1>
69 <title>Supported netdev kinds</title>
70
71 <para>The following kinds of virtual network devices may be
72 configured in <filename>.netdev</filename> files:</para>
73
74 <table>
75 <title>Supported kinds of virtual network devices</title>
76
77 <tgroup cols='2'>
78 <colspec colname='kind' />
79 <colspec colname='explanation' />
80 <thead><row>
81 <entry>Kind</entry>
82 <entry>Description</entry>
83 </row></thead>
84 <tbody>
85 <row><entry><varname>bond</varname></entry>
86 <entry>A bond device is an aggregation of all its slave devices. See <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">Linux Ethernet Bonding Driver HOWTO</ulink> for details.Local configuration</entry></row>
87
88 <row><entry><varname>bridge</varname></entry>
89 <entry>A bridge device is a software switch, and each of its slave devices and the bridge itself are ports of the switch.</entry></row>
90
91 <row><entry><varname>dummy</varname></entry>
92 <entry>A dummy device drops all packets sent to it.</entry></row>
93
94 <row><entry><varname>gre</varname></entry>
95 <entry>A Level 3 GRE tunnel over IPv4. See <ulink url="https://tools.ietf.org/html/rfc2784">RFC 2784</ulink> for details.</entry></row>
96
97 <row><entry><varname>gretap</varname></entry>
98 <entry>A Level 2 GRE tunnel over IPv4.</entry></row>
99
100 <row><entry><varname>erspan</varname></entry>
101 <entry>ERSPAN mirrors traffic on one or more source ports and delivers the mirrored traffic to one or more destination ports on another switch. The traffic is encapsulated in generic routing encapsulation (GRE) and is therefore routable across a layer 3 network between the source switch and the destination switch.</entry></row>
102
103 <row><entry><varname>ip6gre</varname></entry>
104 <entry>A Level 3 GRE tunnel over IPv6.</entry></row>
105
106 <row><entry><varname>ip6tnl</varname></entry>
107 <entry>An IPv4 or IPv6 tunnel over IPv6</entry></row>
108
109 <row><entry><varname>ip6gretap</varname></entry>
110 <entry>A Level 2 GRE tunnel over IPv6.</entry></row>
111
112 <row><entry><varname>ipip</varname></entry>
113 <entry>An IPv4 over IPv4 tunnel.</entry></row>
114
115 <row><entry><varname>ipvlan</varname></entry>
116 <entry>An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.</entry></row>
117
118 <row><entry><varname>macvlan</varname></entry>
119 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
120
121 <row><entry><varname>macvtap</varname></entry>
122 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
123
124 <row><entry><varname>sit</varname></entry>
125 <entry>An IPv6 over IPv4 tunnel.</entry></row>
126
127 <row><entry><varname>tap</varname></entry>
128 <entry>A persistent Level 2 tunnel between a network device and a device node.</entry></row>
129
130 <row><entry><varname>tun</varname></entry>
131 <entry>A persistent Level 3 tunnel between a network device and a device node.</entry></row>
132
133 <row><entry><varname>veth</varname></entry>
134 <entry>An Ethernet tunnel between a pair of network devices.</entry></row>
135
136 <row><entry><varname>vlan</varname></entry>
137 <entry>A VLAN is a stacked device which receives packets from its underlying device based on VLAN tagging. See <ulink url="http://www.ieee802.org/1/pages/802.1Q.html">IEEE 802.1Q</ulink> for details.</entry></row>
138
139 <row><entry><varname>vti</varname></entry>
140 <entry>An IPv4 over IPSec tunnel.</entry></row>
141
142 <row><entry><varname>vti6</varname></entry>
143 <entry>An IPv6 over IPSec tunnel.</entry></row>
144
145 <row><entry><varname>vxlan</varname></entry>
146 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.</entry></row>
147
148 <row><entry><varname>geneve</varname></entry>
149 <entry>A GEneric NEtwork Virtualization Encapsulation (GENEVE) netdev driver.</entry></row>
150
151 <row><entry><varname>l2tp</varname></entry>
152 <entry>A Layer 2 Tunneling Protocol (L2TP) is a tunneling protocol used to support virtual private networks (VPNs) or as part of the delivery of services by ISPs. It does not provide any encryption or confidentiality by itself</entry></row>
153
154 <row><entry><varname>macsec</varname></entry>
155 <entry>Media Access Control Security (MACsec) is an 802.1AE IEEE industry-standard security technology that provides secure communication for all traffic on Ethernet links. MACsec provides point-to-point security on Ethernet links between directly connected nodes and is capable of identifying and preventing most security threats.</entry></row>
156
157 <row><entry><varname>vrf</varname></entry>
158 <entry>A Virtual Routing and Forwarding (<ulink url="https://www.kernel.org/doc/Documentation/networking/vrf.txt">VRF</ulink>) interface to create separate routing and forwarding domains.</entry></row>
159
160 <row><entry><varname>vcan</varname></entry>
161 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.</entry></row>
162
163 <row><entry><varname>vxcan</varname></entry>
164 <entry>The virtual CAN tunnel driver (vxcan). Similar to the virtual ethernet driver veth, vxcan implements a local CAN traffic tunnel between two virtual CAN network devices. When creating a vxcan, two vxcan devices are created as pair. When one end receives the packet it appears on its pair and vice versa. The vxcan can be used for cross namespace communication.
165 </entry></row>
166
167 <row><entry><varname>wireguard</varname></entry>
168 <entry>WireGuard Secure Network Tunnel.</entry></row>
169
170 <row><entry><varname>netdevsim</varname></entry>
171 <entry> A simulator. This simulated networking device is used for testing various networking APIs and at this time is particularly focused on testing hardware offloading related interfaces.</entry></row>
172
173 <row><entry><varname>fou</varname></entry>
174 <entry>Foo-over-UDP tunneling.</entry></row>
175
176 </tbody>
177 </tgroup>
178 </table>
179
180 </refsect1>
181
182 <refsect1>
183 <title>[Match] Section Options</title>
184
185 <para>A virtual network device is only created if the
186 <literal>[Match]</literal> section matches the current
187 environment, or if the section is empty. The following keys are
188 accepted:</para>
189
190 <variablelist class='network-directives'>
191 <varlistentry>
192 <term><varname>Host=</varname></term>
193 <listitem>
194 <para>Matches against the hostname or machine ID of the host. See
195 <literal>ConditionHost=</literal> in
196 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
197 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
198 If an empty string is assigned, then previously assigned value is cleared.
199 </para>
200 </listitem>
201 </varlistentry>
202 <varlistentry>
203 <term><varname>Virtualization=</varname></term>
204 <listitem>
205 <para>Checks whether the system is executed in a virtualized environment and optionally test
206 whether it is a specific implementation. See <literal>ConditionVirtualization=</literal> in
207 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
208 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
209 If an empty string is assigned, then previously assigned value is cleared.
210 </para>
211 </listitem>
212 </varlistentry>
213 <varlistentry>
214 <term><varname>KernelCommandLine=</varname></term>
215 <listitem>
216 <para>Checks whether a specific kernel command line option is set. See
217 <literal>ConditionKernelCommandLine=</literal> in
218 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
219 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
220 If an empty string is assigned, then previously assigned value is cleared.
221 </para>
222 </listitem>
223 </varlistentry>
224 <varlistentry>
225 <term><varname>KernelVersion=</varname></term>
226 <listitem>
227 <para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a
228 certain expression. See <literal>ConditionKernelVersion=</literal> in
229 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
230 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
231 If an empty string is assigned, then previously assigned value is cleared.
232 </para>
233 </listitem>
234 </varlistentry>
235 <varlistentry>
236 <term><varname>Architecture=</varname></term>
237 <listitem>
238 <para>Checks whether the system is running on a specific architecture. See
239 <literal>ConditionArchitecture=</literal> in
240 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
241 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
242 If an empty string is assigned, then previously assigned value is cleared.
243 </para>
244 </listitem>
245 </varlistentry>
246 </variablelist>
247
248 </refsect1>
249
250 <refsect1>
251 <title>[NetDev] Section Options</title>
252
253 <para>The <literal>[NetDev]</literal> section accepts the
254 following keys:</para>
255
256 <variablelist class='network-directives'>
257 <varlistentry>
258 <term><varname>Description=</varname></term>
259 <listitem>
260 <para>A free-form description of the netdev.</para>
261 </listitem>
262 </varlistentry>
263 <varlistentry>
264 <term><varname>Name=</varname></term>
265 <listitem>
266 <para>The interface name used when creating the netdev.
267 This option is compulsory.</para>
268 </listitem>
269 </varlistentry>
270 <varlistentry>
271 <term><varname>Kind=</varname></term>
272 <listitem>
273 <para>The netdev kind. This option is compulsory. See the
274 <literal>Supported netdev kinds</literal> section for the
275 valid keys.</para>
276 </listitem>
277 </varlistentry>
278 <varlistentry>
279 <term><varname>MTUBytes=</varname></term>
280 <listitem>
281 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M, G,
282 are supported and are understood to the base of 1024. For <literal>tun</literal> or
283 <literal>tap</literal> devices, <varname>MTUBytes=</varname> setting is not currently supported in
284 <literal>[NetDev]</literal> section. Please specify it in <literal>[Link]</literal> section of
285 corresponding
286 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
287 files.</para>
288 </listitem>
289 </varlistentry>
290 <varlistentry>
291 <term><varname>MACAddress=</varname></term>
292 <listitem>
293 <para>The MAC address to use for the device. For <literal>tun</literal> or <literal>tap</literal>
294 devices, setting <varname>MACAddress=</varname> in the <literal>[NetDev]</literal> section is not
295 supported. Please specify it in <literal>[Link]</literal> section of the corresponding
296 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
297 file. If this option is not set, <literal>vlan</literal> devices inherit the MAC address of the
298 physical interface. For other kind of netdevs, if this option is not set, then MAC address is
299 generated based on the interface name and the
300 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
301 </para>
302 </listitem>
303 </varlistentry>
304 </variablelist>
305 </refsect1>
306
307 <refsect1>
308 <title>[Bridge] Section Options</title>
309
310 <para>The <literal>[Bridge]</literal> section only applies for
311 netdevs of kind <literal>bridge</literal>, and accepts the
312 following keys:</para>
313
314 <variablelist class='network-directives'>
315 <varlistentry>
316 <term><varname>HelloTimeSec=</varname></term>
317 <listitem>
318 <para>HelloTimeSec specifies the number of seconds between two hello packets
319 sent out by the root bridge and the designated bridges. Hello packets are
320 used to communicate information about the topology throughout the entire
321 bridged local area network.</para>
322 </listitem>
323 </varlistentry>
324 <varlistentry>
325 <term><varname>MaxAgeSec=</varname></term>
326 <listitem>
327 <para>MaxAgeSec specifies the number of seconds of maximum message age.
328 If the last seen (received) hello packet is more than this number of
329 seconds old, the bridge in question will start the takeover procedure
330 in attempt to become the Root Bridge itself.</para>
331 </listitem>
332 </varlistentry>
333 <varlistentry>
334 <term><varname>ForwardDelaySec=</varname></term>
335 <listitem>
336 <para>ForwardDelaySec specifies the number of seconds spent in each
337 of the Listening and Learning states before the Forwarding state is entered.</para>
338 </listitem>
339 </varlistentry>
340 <varlistentry>
341 <term><varname>AgeingTimeSec=</varname></term>
342 <listitem>
343 <para>This specifies the number of seconds a MAC Address will be kept in
344 the forwarding database after having a packet received from this MAC Address.</para>
345 </listitem>
346 </varlistentry>
347 <varlistentry>
348 <term><varname>Priority=</varname></term>
349 <listitem>
350 <para>The priority of the bridge. An integer between 0 and 65535. A lower value
351 means higher priority. The bridge having the lowest priority will be elected as root bridge.</para>
352 </listitem>
353 </varlistentry>
354 <varlistentry>
355 <term><varname>GroupForwardMask=</varname></term>
356 <listitem>
357 <para>A 16-bit bitmask represented as an integer which allows forwarding of link
358 local frames with 802.1D reserved addresses (01:80:C2:00:00:0X). A logical AND
359 is performed between the specified bitmask and the exponentiation of 2^X, the
360 lower nibble of the last octet of the MAC address. For example, a value of 8
361 would allow forwarding of frames addressed to 01:80:C2:00:00:03 (802.1X PAE).</para>
362 </listitem>
363 </varlistentry>
364 <varlistentry>
365 <term><varname>DefaultPVID=</varname></term>
366 <listitem>
367 <para>This specifies the default port VLAN ID of a newly attached bridge port.
368 Set this to an integer in the range 1–4094 or <literal>none</literal> to disable the PVID.</para>
369 </listitem>
370 </varlistentry>
371 <varlistentry>
372 <term><varname>MulticastQuerier=</varname></term>
373 <listitem>
374 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
375 If enabled, the kernel will send general ICMP queries from a zero source address.
376 This feature should allow faster convergence on startup, but it causes some
377 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
378 When unset, the kernel's default will be used.
379 </para>
380 </listitem>
381 </varlistentry>
382 <varlistentry>
383 <term><varname>MulticastSnooping=</varname></term>
384 <listitem>
385 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
386 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
387 between hosts and multicast routers. When unset, the kernel's default will be used.
388 </para>
389 </listitem>
390 </varlistentry>
391 <varlistentry>
392 <term><varname>VLANFiltering=</varname></term>
393 <listitem>
394 <para>Takes a boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
395 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's default will be used.
396 </para>
397 </listitem>
398 </varlistentry>
399 <varlistentry>
400 <term><varname>STP=</varname></term>
401 <listitem>
402 <para>Takes a boolean. This enables the bridge's Spanning Tree Protocol (STP).
403 When unset, the kernel's default will be used.
404 </para>
405 </listitem>
406 </varlistentry>
407 </variablelist>
408 </refsect1>
409
410 <refsect1>
411 <title>[VLAN] Section Options</title>
412
413 <para>The <literal>[VLAN]</literal> section only applies for
414 netdevs of kind <literal>vlan</literal>, and accepts the
415 following key:</para>
416
417 <variablelist class='network-directives'>
418 <varlistentry>
419 <term><varname>Id=</varname></term>
420 <listitem>
421 <para>The VLAN ID to use. An integer in the range 0–4094.
422 This option is compulsory.</para>
423 </listitem>
424 </varlistentry>
425 <varlistentry>
426 <term><varname>GVRP=</varname></term>
427 <listitem>
428 <para>Takes a boolean. The Generic VLAN Registration Protocol (GVRP) is a protocol that
429 allows automatic learning of VLANs on a network.
430 When unset, the kernel's default will be used.
431 </para>
432 </listitem>
433 </varlistentry>
434 <varlistentry>
435 <term><varname>MVRP=</varname></term>
436 <listitem>
437 <para>Takes a boolean. Multiple VLAN Registration Protocol (MVRP) formerly known as GARP VLAN
438 Registration Protocol (GVRP) is a standards-based Layer 2 network protocol,
439 for automatic configuration of VLAN information on switches. It was defined
440 in the 802.1ak amendment to 802.1Q-2005. When unset, the kernel's default will be used.
441 </para>
442 </listitem>
443 </varlistentry>
444 <varlistentry>
445 <term><varname>LooseBinding=</varname></term>
446 <listitem>
447 <para>Takes a boolean. The VLAN loose binding mode, in which only the operational state is passed
448 from the parent to the associated VLANs, but the VLAN device state is not changed.
449 When unset, the kernel's default will be used.</para>
450 </listitem>
451 </varlistentry>
452 <varlistentry>
453 <term><varname>ReorderHeader=</varname></term>
454 <listitem>
455 <para>Takes a boolean. The VLAN reorder header is set VLAN interfaces behave like physical interfaces.
456 When unset, the kernel's default will be used.</para>
457 </listitem>
458 </varlistentry>
459 </variablelist>
460 </refsect1>
461
462 <refsect1>
463 <title>[MACVLAN] Section Options</title>
464
465 <para>The <literal>[MACVLAN]</literal> section only applies for
466 netdevs of kind <literal>macvlan</literal>, and accepts the
467 following key:</para>
468
469 <variablelist class='network-directives'>
470 <varlistentry>
471 <term><varname>Mode=</varname></term>
472 <listitem>
473 <para>The MACVLAN mode to use. The supported options are
474 <literal>private</literal>,
475 <literal>vepa</literal>,
476 <literal>bridge</literal>, and
477 <literal>passthru</literal>.
478 </para>
479 </listitem>
480 </varlistentry>
481 </variablelist>
482
483 </refsect1>
484
485 <refsect1>
486 <title>[MACVTAP] Section Options</title>
487
488 <para>The <literal>[MACVTAP]</literal> section applies for
489 netdevs of kind <literal>macvtap</literal> and accepts the
490 same key as <literal>[MACVLAN]</literal>.</para>
491
492 </refsect1>
493
494 <refsect1>
495 <title>[IPVLAN] Section Options</title>
496
497 <para>The <literal>[IPVLAN]</literal> section only applies for
498 netdevs of kind <literal>ipvlan</literal>, and accepts the
499 following key:</para>
500
501 <variablelist class='network-directives'>
502 <varlistentry>
503 <term><varname>Mode=</varname></term>
504 <listitem>
505 <para>The IPVLAN mode to use. The supported options are
506 <literal>L2</literal>,<literal>L3</literal> and <literal>L3S</literal>.
507 </para>
508 </listitem>
509 </varlistentry>
510 <varlistentry>
511 <term><varname>Flags=</varname></term>
512 <listitem>
513 <para>The IPVLAN flags to use. The supported options are
514 <literal>bridge</literal>,<literal>private</literal> and <literal>vepa</literal>.
515 </para>
516 </listitem>
517 </varlistentry>
518 </variablelist>
519
520 </refsect1>
521
522 <refsect1>
523 <title>[VXLAN] Section Options</title>
524 <para>The <literal>[VXLAN]</literal> section only applies for
525 netdevs of kind <literal>vxlan</literal>, and accepts the
526 following keys:</para>
527
528 <variablelist class='network-directives'>
529 <varlistentry>
530 <term><varname>VNI=</varname></term>
531 <listitem>
532 <para>The VXLAN Network Identifier (or VXLAN Segment ID). Takes a number in the range 1-16777215.</para>
533 </listitem>
534 </varlistentry>
535 <varlistentry>
536 <term><varname>Remote=</varname></term>
537 <listitem>
538 <para>Configures destination IP address.</para>
539 </listitem>
540 </varlistentry>
541 <varlistentry>
542 <term><varname>Local=</varname></term>
543 <listitem>
544 <para>Configures local IP address.</para>
545 </listitem>
546 </varlistentry>
547 <varlistentry>
548 <term><varname>Group=</varname></term>
549 <listitem>
550 <para>Configures VXLAN multicast group IP address. All members of a VXLAN must use the same multicast group address.</para>
551 </listitem>
552 </varlistentry>
553 <varlistentry>
554 <term><varname>TOS=</varname></term>
555 <listitem>
556 <para>The Type Of Service byte value for a vxlan interface.</para>
557 </listitem>
558 </varlistentry>
559 <varlistentry>
560 <term><varname>TTL=</varname></term>
561 <listitem>
562 <para>A fixed Time To Live N on Virtual eXtensible Local Area Network packets.
563 Takes <literal>inherit</literal> or a number in the range 0–255. 0 is a special
564 value meaning inherit the inner protocol's TTL value. <literal>inherit</literal>
565 means that it will inherit the outer protocol's TTL value.</para>
566 </listitem>
567 </varlistentry>
568 <varlistentry>
569 <term><varname>MacLearning=</varname></term>
570 <listitem>
571 <para>Takes a boolean. When true, enables dynamic MAC learning
572 to discover remote MAC addresses.</para>
573 </listitem>
574 </varlistentry>
575 <varlistentry>
576 <term><varname>FDBAgeingSec=</varname></term>
577 <listitem>
578 <para>The lifetime of Forwarding Database entry learnt by
579 the kernel, in seconds.</para>
580 </listitem>
581 </varlistentry>
582 <varlistentry>
583 <term><varname>MaximumFDBEntries=</varname></term>
584 <listitem>
585 <para>Configures maximum number of FDB entries.</para>
586 </listitem>
587 </varlistentry>
588 <varlistentry>
589 <term><varname>ReduceARPProxy=</varname></term>
590 <listitem>
591 <para>Takes a boolean. When true, bridge-connected VXLAN tunnel
592 endpoint answers ARP requests from the local bridge on behalf
593 of remote Distributed Overlay Virtual Ethernet
594 <ulink url="https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
595 (DVOE)</ulink> clients. Defaults to false.</para>
596 </listitem>
597 </varlistentry>
598 <varlistentry>
599 <term><varname>L2MissNotification=</varname></term>
600 <listitem>
601 <para>Takes a boolean. When true, enables netlink LLADDR miss
602 notifications.</para>
603 </listitem>
604 </varlistentry>
605 <varlistentry>
606 <term><varname>L3MissNotification=</varname></term>
607 <listitem>
608 <para>Takes a boolean. When true, enables netlink IP address miss
609 notifications.</para>
610 </listitem>
611 </varlistentry>
612 <varlistentry>
613 <term><varname>RouteShortCircuit=</varname></term>
614 <listitem>
615 <para>Takes a boolean. When true, route short circuiting is turned
616 on.</para>
617 </listitem>
618 </varlistentry>
619 <varlistentry>
620 <term><varname>UDPChecksum=</varname></term>
621 <listitem>
622 <para>Takes a boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.</para>
623 </listitem>
624 </varlistentry>
625 <varlistentry>
626 <term><varname>UDP6ZeroChecksumTx=</varname></term>
627 <listitem>
628 <para>Takes a boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.</para>
629 </listitem>
630 </varlistentry>
631 <varlistentry>
632 <term><varname>UDP6ZeroChecksumRx=</varname></term>
633 <listitem>
634 <para>Takes a boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.</para>
635 </listitem>
636 </varlistentry>
637 <varlistentry>
638 <term><varname>RemoteChecksumTx=</varname></term>
639 <listitem>
640 <para>Takes a boolean. When true, remote transmit checksum offload of VXLAN is turned on.</para>
641 </listitem>
642 </varlistentry>
643 <varlistentry>
644 <term><varname>RemoteChecksumRx=</varname></term>
645 <listitem>
646 <para>Takes a boolean. When true, remote receive checksum offload in VXLAN is turned on.</para>
647 </listitem>
648 </varlistentry>
649 <varlistentry>
650 <term><varname>GroupPolicyExtension=</varname></term>
651 <listitem>
652 <para>Takes a boolean. When true, it enables Group Policy VXLAN extension security label mechanism
653 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
654 <ulink url="https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
655 VXLAN Group Policy </ulink> document. Defaults to false.</para>
656 </listitem>
657 </varlistentry>
658 <varlistentry>
659 <term><varname>GenericProtocolExtension=</varname></term>
660 <listitem>
661 <para>Takes a boolean. When true, Generic Protocol Extension extends the existing VXLAN protocol
662 to provide protocol typing, OAM, and versioning capabilities. For details about the VXLAN GPE
663 Header, see the <ulink url="https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07">
664 Generic Protocol Extension for VXLAN </ulink> document. If destination port is not specified and
665 Generic Protocol Extension is set then default port of 4790 is used. Defaults to false.</para>
666 </listitem>
667 </varlistentry>
668 <varlistentry>
669 <term><varname>DestinationPort=</varname></term>
670 <listitem>
671 <para>Configures the default destination UDP port on a per-device basis.
672 If destination port is not specified then Linux kernel default will be used.
673 Set destination port 4789 to get the IANA assigned value. If not set or if the
674 destination port is assigned the empty string the default port of 4789 is used.</para>
675 </listitem>
676 </varlistentry>
677 <varlistentry>
678 <term><varname>PortRange=</varname></term>
679 <listitem>
680 <para>Configures VXLAN port range. VXLAN bases source
681 UDP port based on flow to help the receiver to be able
682 to load balance based on outer header flow. It
683 restricts the port range to the normal UDP local
684 ports, and allows overriding via configuration.</para>
685 </listitem>
686 </varlistentry>
687 <varlistentry>
688 <term><varname>FlowLabel=</varname></term>
689 <listitem>
690 <para>Specifies the flow label to use in outgoing packets.
691 The valid range is 0-1048575.
692 </para>
693 </listitem>
694 </varlistentry>
695 <varlistentry>
696 <term><varname>IPDoNotFragment=</varname></term>
697 <listitem>
698 <para>Allows to set the IPv4 Do not Fragment (DF) bit in outgoing packets, or to inherit its
699 value from the IPv4 inner header. Takes a boolean value, or <literal>inherit</literal>. Set
700 to <literal>inherit</literal> if the encapsulated protocol is IPv6. When unset, the kernel's
701 default will be used.</para>
702 </listitem>
703 </varlistentry>
704 </variablelist>
705 </refsect1>
706 <refsect1>
707 <title>[GENEVE] Section Options</title>
708 <para>The <literal>[GENEVE]</literal> section only applies for
709 netdevs of kind <literal>geneve</literal>, and accepts the
710 following keys:</para>
711
712 <variablelist class='network-directives'>
713 <varlistentry>
714 <term><varname>Id=</varname></term>
715 <listitem>
716 <para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [0-16777215]. This field is mandatory.</para>
717 </listitem>
718 </varlistentry>
719 <varlistentry>
720 <term><varname>Remote=</varname></term>
721 <listitem>
722 <para>Specifies the unicast destination IP address to use in outgoing packets.</para>
723 </listitem>
724 </varlistentry>
725 <varlistentry>
726 <term><varname>TOS=</varname></term>
727 <listitem>
728 <para>Specifies the TOS value to use in outgoing packets. Ranges [1-255].</para>
729 </listitem>
730 </varlistentry>
731 <varlistentry>
732 <term><varname>TTL=</varname></term>
733 <listitem>
734 <para>Accepts the same key in <literal>[VXLAN]</literal> section except when unset or
735 set to 0, the kernel's default will be used meaning that packets TTL will be set from
736 <filename>/proc/sys/net/ipv4/ip_default_ttl</filename>.</para>
737 </listitem>
738 </varlistentry>
739 <varlistentry>
740 <term><varname>UDPChecksum=</varname></term>
741 <listitem>
742 <para>Takes a boolean. When true, specifies if UDP checksum is calculated for transmitted packets over IPv4.</para>
743 </listitem>
744 </varlistentry>
745 <varlistentry>
746 <term><varname>UDP6ZeroChecksumTx=</varname></term>
747 <listitem>
748 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.</para>
749 </listitem>
750 </varlistentry>
751 <varlistentry>
752 <term><varname>UDP6ZeroChecksumRx=</varname></term>
753 <listitem>
754 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.</para>
755 </listitem>
756 </varlistentry>
757 <varlistentry>
758 <term><varname>DestinationPort=</varname></term>
759 <listitem>
760 <para>Specifies destination port. Defaults to 6081. If not set or assigned the empty string, the default
761 port of 6081 is used.</para>
762 </listitem>
763 </varlistentry>
764 <varlistentry>
765 <term><varname>FlowLabel=</varname></term>
766 <listitem>
767 <para>Specifies the flow label to use in outgoing packets.</para>
768 </listitem>
769 </varlistentry>
770 <varlistentry>
771 <term><varname>IPDoNotFragment=</varname></term>
772 <listitem>
773 <para>Accepts the same key in <literal>[VXLAN]</literal> section.</para>
774 </listitem>
775 </varlistentry>
776 </variablelist>
777 </refsect1>
778 <refsect1>
779 <title>[L2TP] Section Options</title>
780 <para>The <literal>[L2TP]</literal> section only applies for
781 netdevs of kind <literal>l2tp</literal>, and accepts the
782 following keys:</para>
783
784 <variablelist class='network-directives'>
785 <varlistentry>
786 <term><varname>TunnelId=</varname></term>
787 <listitem>
788 <para>Specifies the tunnel id. The value used must match the <literal>PeerTunnelId=</literal> value being used at the peer.
789 Ranges a number between 1 and 4294967295). This option is compulsory.</para>
790 </listitem>
791 </varlistentry>
792 <varlistentry>
793 <term><varname>PeerTunnelId=</varname></term>
794 <listitem>
795 <para>Specifies the peer tunnel id. The value used must match the <literal>PeerTunnelId=</literal> value being used at the peer.
796 Ranges a number between 1 and 4294967295). This option is compulsory.</para>
797 </listitem>
798 </varlistentry>
799 <varlistentry>
800 <term><varname>Remote=</varname></term>
801 <listitem>
802 <para>Specifies the IP address of the remote peer. This option is compulsory.</para>
803 </listitem>
804 </varlistentry>
805 <varlistentry>
806 <term><varname>Local=</varname></term>
807 <listitem>
808 <para>Specifies the IP address of the local interface. Takes an IP address, or the special values
809 <literal>auto</literal>, <literal>static</literal>, or <literal>dynamic</literal>. When an address
810 is set, then the local interface must have the address. If <literal>auto</literal>, then one of the
811 addresses on the local interface is used. Similarly, if <literal>static</literal> or
812 <literal>dynamic</literal> is set, then one of the static or dynamic addresses on the local
813 interface is used. Defaults to <literal>auto</literal>.</para>
814 </listitem>
815 </varlistentry>
816 <varlistentry>
817 <term><varname>EncapsulationType=</varname></term>
818 <listitem>
819 <para>Specifies the encapsulation type of the tunnel. Takes one of <literal>udp</literal> or <literal>ip</literal>.</para>
820 </listitem>
821 </varlistentry>
822 <varlistentry>
823 <term><varname>UDPSourcePort=</varname></term>
824 <listitem>
825 <para>Specifies the UDP source port to be used for the tunnel. When UDP encapsulation is selected it's mandotory. Ignored when ip
826 encapsulation is selected.</para>
827 </listitem>
828 </varlistentry>
829 <varlistentry>
830 <term><varname>DestinationPort=</varname></term>
831 <listitem>
832 <para>Specifies destination port. When UDP encapsulation is selected it's mandotory. Ignored when ip
833 encapsulation is selected.</para>
834 </listitem>
835 </varlistentry>
836 <varlistentry>
837 <term><varname>UDPChecksum=</varname></term>
838 <listitem>
839 <para>Takes a boolean. When true, specifies if UDP checksum is calculated for transmitted packets over IPv4.</para>
840 </listitem>
841 </varlistentry>
842 <varlistentry>
843 <term><varname>UDP6ZeroChecksumTx=</varname></term>
844 <listitem>
845 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.</para>
846 </listitem>
847 </varlistentry>
848 <varlistentry>
849 <term><varname>UDP6ZeroChecksumRx=</varname></term>
850 <listitem>
851 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.</para>
852 </listitem>
853 </varlistentry>
854 </variablelist>
855 </refsect1>
856 <refsect1>
857 <title>[L2TPSession] Section Options</title>
858 <para>The <literal>[L2TPSession]</literal> section only applies for
859 netdevs of kind <literal>l2tp</literal>, and accepts the
860 following keys:</para>
861 <variablelist class='network-directives'>
862 <varlistentry>
863 <term><varname>Name=</varname></term>
864 <listitem>
865 <para>Specifies the name of the session. This option is compulsory.</para>
866 </listitem>
867 </varlistentry>
868 <varlistentry>
869 <term><varname>SessionId=</varname></term>
870 <listitem>
871 <para>Specifies the session id. The value used must match the <literal>SessionId=</literal> value being used at the peer.
872 Ranges a number between 1 and 4294967295). This option is compulsory.</para>
873 </listitem>
874 </varlistentry>
875 <varlistentry>
876 <term><varname>PeerSessionId=</varname></term>
877 <listitem>
878 <para>Specifies the peer session id. The value used must match the <literal>PeerSessionId=</literal> value being used at the peer.
879 Ranges a number between 1 and 4294967295). This option is compulsory.</para>
880 </listitem>
881 </varlistentry>
882 <varlistentry>
883 <term><varname>Layer2SpecificHeader=</varname></term>
884 <listitem>
885 <para>Specifies layer2specific header type of the session. One of <literal>none</literal> or <literal>default</literal>. Defaults to <literal>default</literal>.</para>
886 </listitem>
887 </varlistentry>
888 </variablelist>
889 </refsect1>
890 <refsect1>
891 <title>[MACsec] Section Options</title>
892 <para>The <literal>[MACsec]</literal> section only applies for network devices of kind
893 <literal>macsec</literal>, and accepts the following keys:</para>
894
895 <variablelist class='network-directives'>
896 <varlistentry>
897 <term><varname>Port=</varname></term>
898 <listitem>
899 <para>Specifies the port to be used for the MACsec transmit channel. The port is used to make
900 secure channel identifier (SCI). Takes a value between 1 and 65535. Defaults to unset.
901 </para>
902 </listitem>
903 </varlistentry>
904 <varlistentry>
905 <term><varname>Encrypt=</varname></term>
906 <listitem>
907 <para>Takes a boolean. When true, enable encryption. Defaults to unset.</para>
908 </listitem>
909 </varlistentry>
910 </variablelist>
911 </refsect1>
912 <refsect1>
913 <title>[MACsecReceiveChannel] Section Options</title>
914 <para>The <literal>[MACsecReceiveChannel]</literal> section only applies for network devices of
915 kind <literal>macsec</literal>, and accepts the following keys:</para>
916
917 <variablelist class='network-directives'>
918 <varlistentry>
919 <term><varname>Port=</varname></term>
920 <listitem>
921 <para>Specifies the port to be used for the MACsec receive channel. The port is used to make
922 secure channel identifier (SCI). Takes a value between 1 and 65535. This option is
923 compulsory, and is not set by default.</para>
924 </listitem>
925 </varlistentry>
926 <varlistentry>
927 <term><varname>MACAddress=</varname></term>
928 <listitem>
929 <para>Specifies the MAC address to be used for the MACsec receive channel. The MAC address
930 used to make secure channel identifier (SCI). This option is compulsory, and is not set by
931 default.</para>
932 </listitem>
933 </varlistentry>
934 </variablelist>
935 </refsect1>
936 <refsect1>
937 <title>[MACsecTransmitAssociation] Section Options</title>
938 <para>The <literal>[MACsecTransmitAssociation]</literal> section only applies for network devices
939 of kind <literal>macsec</literal>, and accepts the following keys:</para>
940
941 <variablelist class='network-directives'>
942 <varlistentry>
943 <term><varname>PacketNumber=</varname></term>
944 <listitem>
945 <para>Specifies the packet number to be used for replay protection and the construction of
946 the initialization vector (along with the secure channel identifier [SCI]). Takes a value
947 between 1-4,294,967,295. Defaults to unset.
948 </para>
949 </listitem>
950 </varlistentry>
951 <varlistentry>
952 <term><varname>KeyId=</varname></term>
953 <listitem>
954 <para>Specifies the identification for the key. Takes a number between 0-255. This option
955 is compulsory, and is not set by default.</para>
956 </listitem>
957 </varlistentry>
958 <varlistentry>
959 <term><varname>Key=</varname></term>
960 <listitem>
961 <para>Specifies the encryption key used in the transmission channel. The same key must be
962 configured on the peer’s matching receive channel. This option is compulsory, and is not set
963 by default. Takes a 128-bit key encoded in a hexadecimal string, for example
964 <literal>dffafc8d7b9a43d5b9a3dfbbf6a30c16</literal>.</para>
965 </listitem>
966 </varlistentry>
967 <varlistentry>
968 <term><varname>KeyFile=</varname></term>
969 <listitem>
970 <para>Takes a absolute path to a file which contains a 128-bit key encoded in a hexadecimal
971 string, which will be used in the transmission channel. When this option is specified,
972 <varname>Key=</varname> is ignored. Note that the file must be readable by the user
973 <literal>systemd-network</literal>, so it should be, e.g., owned by
974 <literal>root:systemd-network</literal> with a <literal>0640</literal> file mode.</para>
975 </listitem>
976 </varlistentry>
977 <varlistentry>
978 <term><varname>Activate=</varname></term>
979 <listitem>
980 <para>Takes a boolean. If enabled, then the security association is activated. Defaults to
981 unset.</para>
982 </listitem>
983 </varlistentry>
984 <varlistentry>
985 <term><varname>UseForEncoding=</varname></term>
986 <listitem>
987 <para>Takes a boolean. If enabled, then the security association is used for encoding. Only
988 one <literal>[MACsecTransmitAssociation]</literal> section can enable this option. When enabled,
989 <varname>Activate=yes</varname> is implied. Defaults to unset.</para>
990 </listitem>
991 </varlistentry>
992 </variablelist>
993 </refsect1>
994 <refsect1>
995 <title>[MACsecReceiveAssociation] Section Options</title>
996 <para>The <literal>[MACsecReceiveAssociation]</literal> section only applies for
997 network devices of kind <literal>macsec</literal>, and accepts the
998 following keys:</para>
999
1000 <variablelist class='network-directives'>
1001 <varlistentry>
1002 <term><varname>Port=</varname></term>
1003 <listitem>
1004 <para>Accepts the same key in <literal>[MACsecReceiveChannel]</literal> section.</para>
1005 </listitem>
1006 </varlistentry>
1007 <varlistentry>
1008 <term><varname>MACAddress=</varname></term>
1009 <listitem>
1010 <para>Accepts the same key in <literal>[MACsecReceiveChannel]</literal> section.</para>
1011 </listitem>
1012 </varlistentry>
1013 <varlistentry>
1014 <term><varname>PacketNumber=</varname></term>
1015 <listitem>
1016 <para>Accepts the same key in <literal>[MACsecTransmitAssociation]</literal> section.</para>
1017 </listitem>
1018 </varlistentry>
1019 <varlistentry>
1020 <term><varname>KeyId=</varname></term>
1021 <listitem>
1022 <para>Accepts the same key in <literal>[MACsecTransmitAssociation]</literal> section.</para>
1023 </listitem>
1024 </varlistentry>
1025 <varlistentry>
1026 <term><varname>Key=</varname></term>
1027 <listitem>
1028 <para>Accepts the same key in <literal>[MACsecTransmitAssociation]</literal> section.</para>
1029 </listitem>
1030 </varlistentry>
1031 <varlistentry>
1032 <term><varname>KeyFile=</varname></term>
1033 <listitem>
1034 <para>Accepts the same key in <literal>[MACsecTransmitAssociation]</literal> section.</para>
1035 </listitem>
1036 </varlistentry>
1037 <varlistentry>
1038 <term><varname>Activate=</varname></term>
1039 <listitem>
1040 <para>Accepts the same key in <literal>[MACsecTransmitAssociation]</literal> section.</para>
1041 </listitem>
1042 </varlistentry>
1043 </variablelist>
1044 </refsect1>
1045 <refsect1>
1046 <title>[Tunnel] Section Options</title>
1047
1048 <para>The <literal>[Tunnel]</literal> section only applies for
1049 netdevs of kind
1050 <literal>ipip</literal>,
1051 <literal>sit</literal>,
1052 <literal>gre</literal>,
1053 <literal>gretap</literal>,
1054 <literal>ip6gre</literal>,
1055 <literal>ip6gretap</literal>,
1056 <literal>vti</literal>,
1057 <literal>vti6</literal>,
1058 <literal>ip6tnl</literal>, and
1059 <literal>erspan</literal> and accepts
1060 the following keys:</para>
1061
1062 <variablelist class='network-directives'>
1063 <varlistentry>
1064 <term><varname>Local=</varname></term>
1065 <listitem>
1066 <para>A static local address for tunneled packets. It must be an address on another interface of
1067 this host, or the special value <literal>any</literal>.</para>
1068 </listitem>
1069 </varlistentry>
1070 <varlistentry>
1071 <term><varname>Remote=</varname></term>
1072 <listitem>
1073 <para>The remote endpoint of the tunnel. Takes an IP address or the special value
1074 <literal>any</literal>.</para>
1075 </listitem>
1076 </varlistentry>
1077 <varlistentry>
1078 <term><varname>TOS=</varname></term>
1079 <listitem>
1080 <para>The Type Of Service byte value for a tunnel interface.
1081 For details about the TOS, see the
1082 <ulink url="http://tools.ietf.org/html/rfc1349"> Type of
1083 Service in the Internet Protocol Suite </ulink> document.
1084 </para>
1085 </listitem>
1086 </varlistentry>
1087 <varlistentry>
1088 <term><varname>TTL=</varname></term>
1089 <listitem>
1090 <para>A fixed Time To Live N on tunneled packets. N is a
1091 number in the range 1–255. 0 is a special value meaning that
1092 packets inherit the TTL value. The default value for IPv4
1093 tunnels is: inherit. The default value for IPv6 tunnels is
1094 64.</para>
1095 </listitem>
1096 </varlistentry>
1097 <varlistentry>
1098 <term><varname>DiscoverPathMTU=</varname></term>
1099 <listitem>
1100 <para>Takes a boolean. When true, enables Path MTU Discovery on
1101 the tunnel.</para>
1102 </listitem>
1103 </varlistentry>
1104 <varlistentry>
1105 <term><varname>IPv6FlowLabel=</varname></term>
1106 <listitem>
1107 <para>Configures the 20-bit flow label (see <ulink url="https://tools.ietf.org/html/rfc6437">
1108 RFC 6437</ulink>) field in the IPv6 header (see <ulink url="https://tools.ietf.org/html/rfc2460">
1109 RFC 2460</ulink>), which is used by a node to label packets of a flow.
1110 It is only used for IPv6 tunnels.
1111 A flow label of zero is used to indicate packets that have
1112 not been labeled.
1113 It can be configured to a value in the range 0–0xFFFFF, or be
1114 set to <literal>inherit</literal>, in which case the original flowlabel is used.</para>
1115 </listitem>
1116 </varlistentry>
1117 <varlistentry>
1118 <term><varname>CopyDSCP=</varname></term>
1119 <listitem>
1120 <para>Takes a boolean. When true, the Differentiated Service Code
1121 Point (DSCP) field will be copied to the inner header from
1122 outer header during the decapsulation of an IPv6 tunnel
1123 packet. DSCP is a field in an IP packet that enables different
1124 levels of service to be assigned to network traffic.
1125 Defaults to <literal>no</literal>.
1126 </para>
1127 </listitem>
1128 </varlistentry>
1129 <varlistentry>
1130 <term><varname>EncapsulationLimit=</varname></term>
1131 <listitem>
1132 <para>The Tunnel Encapsulation Limit option specifies how many additional
1133 levels of encapsulation are permitted to be prepended to the packet.
1134 For example, a Tunnel Encapsulation Limit option containing a limit
1135 value of zero means that a packet carrying that option may not enter
1136 another tunnel before exiting the current tunnel.
1137 (see <ulink url="https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC 2473</ulink>).
1138 The valid range is 0–255 and <literal>none</literal>. Defaults to 4.
1139 </para>
1140 </listitem>
1141 </varlistentry>
1142 <varlistentry>
1143 <term><varname>Key=</varname></term>
1144 <listitem>
1145 <para>The <varname>Key=</varname> parameter specifies the same key to use in
1146 both directions (<varname>InputKey=</varname> and <varname>OutputKey=</varname>).
1147 The <varname>Key=</varname> is either a number or an IPv4 address-like dotted quad.
1148 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
1149 and control path) in ip xfrm (framework used to implement IPsec protocol).
1150 See <ulink url="http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
1151 ip-xfrm — transform configuration</ulink> for details. It is only used for VTI/VTI6,
1152 GRE, GRETAP, and ERSPAN tunnels.</para>
1153 </listitem>
1154 </varlistentry>
1155 <varlistentry>
1156 <term><varname>InputKey=</varname></term>
1157 <listitem>
1158 <para>The <varname>InputKey=</varname> parameter specifies the key to use for input.
1159 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1160 and ERSPAN tunnels.</para>
1161 </listitem>
1162 </varlistentry>
1163 <varlistentry>
1164 <term><varname>OutputKey=</varname></term>
1165 <listitem>
1166 <para>The <varname>OutputKey=</varname> parameter specifies the key to use for output.
1167 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1168 and ERSPAN tunnels.</para>
1169 </listitem>
1170 </varlistentry>
1171 <varlistentry>
1172 <term><varname>Mode=</varname></term>
1173 <listitem>
1174 <para>An <literal>ip6tnl</literal> tunnel can be in one of three
1175 modes
1176 <literal>ip6ip6</literal> for IPv6 over IPv6,
1177 <literal>ipip6</literal> for IPv4 over IPv6 or
1178 <literal>any</literal> for either.
1179 </para>
1180 </listitem>
1181 </varlistentry>
1182 <varlistentry>
1183 <term><varname>Independent=</varname></term>
1184 <listitem>
1185 <para>Takes a boolean. When true tunnel does not require .network file. Created as "tunnel@NONE".
1186 Defaults to <literal>false</literal>.
1187 </para>
1188 </listitem>
1189 </varlistentry>
1190 <varlistentry>
1191 <term><varname>AllowLocalRemote=</varname></term>
1192 <listitem>
1193 <para>Takes a boolean. When true allows tunnel traffic on <varname>ip6tnl</varname> devices where the remote endpoint is a local host address.
1194 When unset, the kernel's default will be used.
1195 </para>
1196 </listitem>
1197 </varlistentry>
1198 <varlistentry>
1199 <term><varname>FooOverUDP=</varname></term>
1200 <listitem>
1201 <para>Takes a boolean. Specifies whether <varname>FooOverUDP=</varname> tunnel is to be configured.
1202 Defaults to false. This takes effects only for IPIP, SIT, GRE, and GRETAP tunnels.
1203 For more detail information see
1204 <ulink url="https://lwn.net/Articles/614348">Foo over UDP</ulink></para>
1205 </listitem>
1206 </varlistentry>
1207 <varlistentry>
1208 <term><varname>FOUDestinationPort=</varname></term>
1209 <listitem>
1210 <para>This setting specifies the UDP destination port for encapsulation.
1211 This field is mandatory when <varname>FooOverUDP=yes</varname>, and is not set by default.</para>
1212 </listitem>
1213 </varlistentry>
1214 <varlistentry>
1215 <term><varname>FOUSourcePort=</varname></term>
1216 <listitem>
1217 <para>This setting specifies the UDP source port for encapsulation. Defaults to <constant>0</constant>
1218 — that is, the source port for packets is left to the network stack to decide.</para>
1219 </listitem>
1220 </varlistentry>
1221 <varlistentry>
1222 <term><varname>Encapsulation=</varname></term>
1223 <listitem>
1224 <para>Accepts the same key as in the <literal>[FooOverUDP]</literal> section.</para>
1225 </listitem>
1226 </varlistentry>
1227 <varlistentry>
1228 <term><varname>IPv6RapidDeploymentPrefix=</varname></term>
1229 <listitem>
1230 <para>Reconfigure the tunnel for <ulink url="https://tools.ietf.org/html/rfc5569">IPv6 Rapid
1231 Deployment</ulink>, also known as 6rd. The value is an ISP-specific IPv6 prefix with a non-zero length. Only
1232 applicable to SIT tunnels.</para>
1233 </listitem>
1234 </varlistentry>
1235 <varlistentry>
1236 <term><varname>ISATAP=</varname></term>
1237 <listitem>
1238 <para>Takes a boolean. If set, configures the tunnel as Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) tunnel.
1239 Only applicable to SIT tunnels. When unset, the kernel's default will be used.</para>
1240 </listitem>
1241 </varlistentry>
1242 <varlistentry>
1243 <term><varname>SerializeTunneledPackets=</varname></term>
1244 <listitem>
1245 <para>Takes a boolean. If set to yes, then packets are serialized. Only applies for GRE,
1246 GRETAP, and ERSPAN tunnels. When unset, the kernel's default will be used.
1247 </para>
1248 </listitem>
1249 </varlistentry>
1250 <varlistentry>
1251 <term><varname>ERSPANIndex=</varname></term>
1252 <listitem>
1253 <para>Specifies the ERSPAN index field for the interface, an integer in the range 1-1048575 associated with
1254 the ERSPAN traffic's source port and direction. This field is mandatory.
1255 </para>
1256 </listitem>
1257 </varlistentry>
1258 </variablelist>
1259 </refsect1>
1260
1261 <refsect1>
1262 <title>[FooOverUDP] Section Options</title>
1263
1264 <para>The <literal>[FooOverUDP]</literal> section only applies for
1265 netdevs of kind <literal>fou</literal> and accepts the
1266 following keys:</para>
1267
1268 <variablelist class='network-directives'>
1269 <varlistentry>
1270 <term><varname>Encapsulation=</varname></term>
1271 <listitem>
1272 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols inside the UDP packets. Supports the following values:
1273
1274 <literal>FooOverUDP</literal> provides the simplest no frills model of UDP encapsulation, it simply encapsulates
1275 packets directly in the UDP payload.
1276 <literal>GenericUDPEncapsulation</literal> is a generic and extensible encapsulation, it allows encapsulation of packets for any IP
1277 protocol and optional data as part of the encapsulation.
1278 For more detailed information see <ulink url="https://lwn.net/Articles/615044">Generic UDP Encapsulation</ulink>.
1279 Defaults to <literal>FooOverUDP</literal>.
1280 </para>
1281 </listitem>
1282 </varlistentry>
1283 <varlistentry>
1284 <term><varname>Port=</varname></term>
1285 <listitem>
1286 <para>Specifies the port number, where the IP encapsulation packets will arrive. Please take note that the packets
1287 will arrive with the encapsulation will be removed. Then they will be manually fed back into the network stack, and sent ahead
1288 for delivery to the real destination. This option is mandatory.</para>
1289 </listitem>
1290 </varlistentry>
1291 <varlistentry>
1292 <term><varname>Protocol=</varname></term>
1293 <listitem>
1294 <para>The <varname>Protocol=</varname> specifies the protocol number of the packets arriving
1295 at the UDP port. When <varname>Encapsulation=FooOverUDP</varname>, this field is mandatory
1296 and is not set by default. Takes an IP protocol name such as <literal>gre</literal> or
1297 <literal>ipip</literal>, or an integer within the range 1-255. When
1298 <varname>Encapsulation=GenericUDPEncapsulation</varname>, this must not be specified.</para>
1299 </listitem>
1300 </varlistentry>
1301 </variablelist>
1302 </refsect1>
1303 <refsect1>
1304 <title>[Peer] Section Options</title>
1305
1306 <para>The <literal>[Peer]</literal> section only applies for
1307 netdevs of kind <literal>veth</literal> and accepts the
1308 following keys:</para>
1309
1310 <variablelist class='network-directives'>
1311 <varlistentry>
1312 <term><varname>Name=</varname></term>
1313 <listitem>
1314 <para>The interface name used when creating the netdev.
1315 This option is compulsory.</para>
1316 </listitem>
1317 </varlistentry>
1318 <varlistentry>
1319 <term><varname>MACAddress=</varname></term>
1320 <listitem>
1321 <para>The peer MACAddress, if not set, it is generated in
1322 the same way as the MAC address of the main
1323 interface.</para>
1324 </listitem>
1325 </varlistentry>
1326 </variablelist>
1327 </refsect1>
1328 <refsect1>
1329 <title>[VXCAN] Section Options</title>
1330 <para>The <literal>[VXCAN]</literal> section only applies for
1331 netdevs of kind <literal>vxcan</literal> and accepts the
1332 following key:</para>
1333
1334 <variablelist class='network-directives'>
1335 <varlistentry>
1336 <term><varname>Peer=</varname></term>
1337 <listitem>
1338 <para>The peer interface name used when creating the netdev.
1339 This option is compulsory.</para>
1340 </listitem>
1341 </varlistentry>
1342 </variablelist>
1343 </refsect1>
1344 <refsect1>
1345 <title>[Tun] Section Options</title>
1346
1347 <para>The <literal>[Tun]</literal> section only applies for
1348 netdevs of kind <literal>tun</literal>, and accepts the following
1349 keys:</para>
1350
1351 <variablelist class='network-directives'>
1352 <varlistentry>
1353 <term><varname>OneQueue=</varname></term>
1354 <listitem><para>Takes a boolean. Configures whether
1355 all packets are queued at the device (enabled), or a fixed
1356 number of packets are queued at the device and the rest at the
1357 <literal>qdisc</literal>. Defaults to
1358 <literal>no</literal>.</para>
1359 </listitem>
1360 </varlistentry>
1361 <varlistentry>
1362 <term><varname>MultiQueue=</varname></term>
1363 <listitem><para>Takes a boolean. Configures whether
1364 to use multiple file descriptors (queues) to parallelize
1365 packets sending and receiving. Defaults to
1366 <literal>no</literal>.</para>
1367 </listitem>
1368 </varlistentry>
1369 <varlistentry>
1370 <term><varname>PacketInfo=</varname></term>
1371 <listitem><para>Takes a boolean. Configures whether
1372 packets should be prepended with four extra bytes (two flag
1373 bytes and two protocol bytes). If disabled, it indicates that
1374 the packets will be pure IP packets. Defaults to
1375 <literal>no</literal>.</para>
1376 </listitem>
1377 </varlistentry>
1378 <varlistentry>
1379 <term><varname>VNetHeader=</varname></term>
1380 <listitem><para>Takes a boolean. Configures
1381 IFF_VNET_HDR flag for a tap device. It allows sending
1382 and receiving larger Generic Segmentation Offload (GSO)
1383 packets. This may increase throughput significantly.
1384 Defaults to
1385 <literal>no</literal>.</para>
1386 </listitem>
1387 </varlistentry>
1388 <varlistentry>
1389 <term><varname>User=</varname></term>
1390 <listitem><para>User to grant access to the
1391 <filename>/dev/net/tun</filename> device.</para>
1392 </listitem>
1393 </varlistentry>
1394 <varlistentry>
1395 <term><varname>Group=</varname></term>
1396 <listitem><para>Group to grant access to the
1397 <filename>/dev/net/tun</filename> device.</para>
1398 </listitem>
1399 </varlistentry>
1400
1401 </variablelist>
1402
1403 </refsect1>
1404
1405 <refsect1>
1406 <title>[Tap] Section Options</title>
1407
1408 <para>The <literal>[Tap]</literal> section only applies for
1409 netdevs of kind <literal>tap</literal>, and accepts the same keys
1410 as the <literal>[Tun]</literal> section.</para>
1411 </refsect1>
1412
1413 <refsect1>
1414 <title>[WireGuard] Section Options</title>
1415
1416 <para>The <literal>[WireGuard]</literal> section accepts the following
1417 keys:</para>
1418
1419 <variablelist class='network-directives'>
1420 <varlistentry>
1421 <term><varname>PrivateKey=</varname></term>
1422 <listitem>
1423 <para>The Base64 encoded private key for the interface. It can be
1424 generated using the <command>wg genkey</command> command
1425 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
1426 This option or <varname>PrivateKeyFile=</varname> is mandatory to use WireGuard.
1427 Note that because this information is secret, you may want to set
1428 the permissions of the .netdev file to be owned by <literal>root:systemd-network</literal>
1429 with a <literal>0640</literal> file mode.</para>
1430 </listitem>
1431 </varlistentry>
1432 <varlistentry>
1433 <term><varname>PrivateKeyFile=</varname></term>
1434 <listitem>
1435 <para>Takes an absolute path to a file which contains the Base64 encoded private key for the interface.
1436 When this option is specified, then <varname>PrivateKey=</varname> is ignored.
1437 Note that the file must be readable by the user <literal>systemd-network</literal>, so it
1438 should be, e.g., owned by <literal>root:systemd-network</literal> with a
1439 <literal>0640</literal> file mode.</para>
1440 </listitem>
1441 </varlistentry>
1442 <varlistentry>
1443 <term><varname>ListenPort=</varname></term>
1444 <listitem>
1445 <para>Sets UDP port for listening. Takes either value between 1 and 65535
1446 or <literal>auto</literal>. If <literal>auto</literal> is specified,
1447 the port is automatically generated based on interface name.
1448 Defaults to <literal>auto</literal>.</para>
1449 </listitem>
1450 </varlistentry>
1451 <varlistentry>
1452 <term><varname>FirewallMark=</varname></term>
1453 <listitem>
1454 <para>Sets a firewall mark on outgoing WireGuard packets from this interface. Takes a number between 1 and 4294967295.</para>
1455 </listitem>
1456 </varlistentry>
1457 </variablelist>
1458 </refsect1>
1459
1460 <refsect1>
1461 <title>[WireGuardPeer] Section Options</title>
1462
1463 <para>The <literal>[WireGuardPeer]</literal> section accepts the following
1464 keys:</para>
1465
1466 <variablelist class='network-directives'>
1467 <varlistentry>
1468 <term><varname>PublicKey=</varname></term>
1469 <listitem>
1470 <para>Sets a Base64 encoded public key calculated by <command>wg pubkey</command>
1471 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1472 from a private key, and usually transmitted out of band to the
1473 author of the configuration file. This option is mandatory for this
1474 section.</para>
1475 </listitem>
1476 </varlistentry>
1477 <varlistentry>
1478 <term><varname>PresharedKey=</varname></term>
1479 <listitem>
1480 <para>Optional preshared key for the interface. It can be generated
1481 by the <command>wg genpsk</command> command. This option adds an
1482 additional layer of symmetric-key cryptography to be mixed into the
1483 already existing public-key cryptography, for post-quantum
1484 resistance.
1485 Note that because this information is secret, you may want to set
1486 the permissions of the .netdev file to be owned by <literal>root:systemd-networkd</literal>
1487 with a <literal>0640</literal> file mode.</para>
1488 </listitem>
1489 </varlistentry>
1490 <varlistentry>
1491 <term><varname>PresharedKeyFile=</varname></term>
1492 <listitem>
1493 <para>Takes an absolute path to a file which contains the Base64 encoded preshared key for the
1494 peer. When this option is specified, then <varname>PresharedKey=</varname> is ignored.
1495 Note that the file must be readable by the user <literal>systemd-network</literal>, so it
1496 should be, e.g., owned by <literal>root:systemd-network</literal> with a
1497 <literal>0640</literal> file mode.</para>
1498 </listitem>
1499 </varlistentry>
1500 <varlistentry>
1501 <term><varname>AllowedIPs=</varname></term>
1502 <listitem>
1503 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1504 from which this peer is allowed to send incoming traffic and to
1505 which outgoing traffic for this peer is directed. The catch-all
1506 0.0.0.0/0 may be specified for matching all IPv4 addresses, and
1507 ::/0 may be specified for matching all IPv6 addresses. </para>
1508 </listitem>
1509 </varlistentry>
1510 <varlistentry>
1511 <term><varname>Endpoint=</varname></term>
1512 <listitem>
1513 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1514 a port number. This endpoint will be updated automatically once to
1515 the most recent source IP address and port of correctly
1516 authenticated packets from the peer at configuration time.</para>
1517 </listitem>
1518 </varlistentry>
1519 <varlistentry>
1520 <term><varname>PersistentKeepalive=</varname></term>
1521 <listitem>
1522 <para>Sets a seconds interval, between 1 and 65535 inclusive, of how often
1523 to send an authenticated empty packet to the peer for the purpose
1524 of keeping a stateful firewall or NAT mapping valid persistently.
1525 For example, if the interface very rarely sends traffic, but it
1526 might at anytime receive traffic from a peer, and it is behind NAT,
1527 the interface might benefit from having a persistent keepalive
1528 interval of 25 seconds. If set to 0 or "off", this option is
1529 disabled. By default or when unspecified, this option is off.
1530 Most users will not need this.</para>
1531 </listitem>
1532 </varlistentry>
1533 </variablelist>
1534 </refsect1>
1535
1536 <refsect1>
1537 <title>[Bond] Section Options</title>
1538
1539 <para>The <literal>[Bond]</literal> section accepts the following
1540 key:</para>
1541
1542 <variablelist class='network-directives'>
1543 <varlistentry>
1544 <term><varname>Mode=</varname></term>
1545 <listitem>
1546 <para>Specifies one of the bonding policies. The default is
1547 <literal>balance-rr</literal> (round robin). Possible values are
1548 <literal>balance-rr</literal>,
1549 <literal>active-backup</literal>,
1550 <literal>balance-xor</literal>,
1551 <literal>broadcast</literal>,
1552 <literal>802.3ad</literal>,
1553 <literal>balance-tlb</literal>, and
1554 <literal>balance-alb</literal>.
1555 </para>
1556 </listitem>
1557 </varlistentry>
1558
1559 <varlistentry>
1560 <term><varname>TransmitHashPolicy=</varname></term>
1561 <listitem>
1562 <para>Selects the transmit hash policy to use for slave
1563 selection in balance-xor, 802.3ad, and tlb modes. Possible
1564 values are
1565 <literal>layer2</literal>,
1566 <literal>layer3+4</literal>,
1567 <literal>layer2+3</literal>,
1568 <literal>encap2+3</literal>, and
1569 <literal>encap3+4</literal>.
1570 </para>
1571 </listitem>
1572 </varlistentry>
1573
1574 <varlistentry>
1575 <term><varname>LACPTransmitRate=</varname></term>
1576 <listitem>
1577 <para>Specifies the rate with which link partner transmits
1578 Link Aggregation Control Protocol Data Unit packets in
1579 802.3ad mode. Possible values are <literal>slow</literal>,
1580 which requests partner to transmit LACPDUs every 30 seconds,
1581 and <literal>fast</literal>, which requests partner to
1582 transmit LACPDUs every second. The default value is
1583 <literal>slow</literal>.</para>
1584 </listitem>
1585 </varlistentry>
1586
1587 <varlistentry>
1588 <term><varname>MIIMonitorSec=</varname></term>
1589 <listitem>
1590 <para>Specifies the frequency that Media Independent
1591 Interface link monitoring will occur. A value of zero
1592 disables MII link monitoring. This value is rounded down to
1593 the nearest millisecond. The default value is 0.</para>
1594 </listitem>
1595 </varlistentry>
1596
1597 <varlistentry>
1598 <term><varname>UpDelaySec=</varname></term>
1599 <listitem>
1600 <para>Specifies the delay before a link is enabled after a
1601 link up status has been detected. This value is rounded down
1602 to a multiple of MIIMonitorSec. The default value is
1603 0.</para>
1604 </listitem>
1605 </varlistentry>
1606
1607 <varlistentry>
1608 <term><varname>DownDelaySec=</varname></term>
1609 <listitem>
1610 <para>Specifies the delay before a link is disabled after a
1611 link down status has been detected. This value is rounded
1612 down to a multiple of MIIMonitorSec. The default value is
1613 0.</para>
1614 </listitem>
1615 </varlistentry>
1616
1617 <varlistentry>
1618 <term><varname>LearnPacketIntervalSec=</varname></term>
1619 <listitem>
1620 <para>Specifies the number of seconds between instances where the bonding
1621 driver sends learning packets to each slave peer switch.
1622 The valid range is 1–0x7fffffff; the default value is 1. This option
1623 has an effect only for the balance-tlb and balance-alb modes.</para>
1624 </listitem>
1625 </varlistentry>
1626
1627 <varlistentry>
1628 <term><varname>AdSelect=</varname></term>
1629 <listitem>
1630 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
1631 <literal>stable</literal>,
1632 <literal>bandwidth</literal> and
1633 <literal>count</literal>.
1634 </para>
1635 </listitem>
1636 </varlistentry>
1637
1638 <varlistentry>
1639 <term><varname>AdActorSystemPriority=</varname></term>
1640 <listitem>
1641 <para>Specifies the 802.3ad actor system priority. Ranges [1-65535].</para>
1642 </listitem>
1643 </varlistentry>
1644
1645 <varlistentry>
1646 <term><varname>AdUserPortKey=</varname></term>
1647 <listitem>
1648 <para>Specifies the 802.3ad user defined portion of the port key. Ranges [0-1023].</para>
1649 </listitem>
1650 </varlistentry>
1651
1652 <varlistentry>
1653 <term><varname>AdActorSystem=</varname></term>
1654 <listitem>
1655 <para>Specifies the 802.3ad system mac address. This can not be either NULL or Multicast.</para>
1656 </listitem>
1657 </varlistentry>
1658
1659 <varlistentry>
1660 <term><varname>FailOverMACPolicy=</varname></term>
1661 <listitem>
1662 <para>Specifies whether the active-backup mode should set all slaves to
1663 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
1664 bond's MAC address in accordance with the selected policy. The default policy is none.
1665 Possible values are
1666 <literal>none</literal>,
1667 <literal>active</literal> and
1668 <literal>follow</literal>.
1669 </para>
1670 </listitem>
1671 </varlistentry>
1672
1673 <varlistentry>
1674 <term><varname>ARPValidate=</varname></term>
1675 <listitem>
1676 <para>Specifies whether or not ARP probes and replies should be
1677 validated in any mode that supports ARP monitoring, or whether
1678 non-ARP traffic should be filtered (disregarded) for link
1679 monitoring purposes. Possible values are
1680 <literal>none</literal>,
1681 <literal>active</literal>,
1682 <literal>backup</literal> and
1683 <literal>all</literal>.
1684 </para>
1685 </listitem>
1686 </varlistentry>
1687
1688 <varlistentry>
1689 <term><varname>ARPIntervalSec=</varname></term>
1690 <listitem>
1691 <para>Specifies the ARP link monitoring frequency in milliseconds.
1692 A value of 0 disables ARP monitoring. The default value is 0.
1693 </para>
1694 </listitem>
1695 </varlistentry>
1696
1697 <varlistentry>
1698 <term><varname>ARPIPTargets=</varname></term>
1699 <listitem>
1700 <para>Specifies the IP addresses to use as ARP monitoring peers when
1701 ARPIntervalSec is greater than 0. These are the targets of the ARP request
1702 sent to determine the health of the link to the targets.
1703 Specify these values in IPv4 dotted decimal format. At least one IP
1704 address must be given for ARP monitoring to function. The
1705 maximum number of targets that can be specified is 16. The
1706 default value is no IP addresses.
1707 </para>
1708 </listitem>
1709 </varlistentry>
1710
1711 <varlistentry>
1712 <term><varname>ARPAllTargets=</varname></term>
1713 <listitem>
1714 <para>Specifies the quantity of ARPIPTargets that must be reachable
1715 in order for the ARP monitor to consider a slave as being up.
1716 This option affects only active-backup mode for slaves with
1717 ARPValidate enabled. Possible values are
1718 <literal>any</literal> and
1719 <literal>all</literal>.
1720 </para>
1721 </listitem>
1722 </varlistentry>
1723
1724 <varlistentry>
1725 <term><varname>PrimaryReselectPolicy=</varname></term>
1726 <listitem>
1727 <para>Specifies the reselection policy for the primary slave. This
1728 affects how the primary slave is chosen to become the active slave
1729 when failure of the active slave or recovery of the primary slave
1730 occurs. This option is designed to prevent flip-flopping between
1731 the primary slave and other slaves. Possible values are
1732 <literal>always</literal>,
1733 <literal>better</literal> and
1734 <literal>failure</literal>.
1735 </para>
1736 </listitem>
1737 </varlistentry>
1738
1739 <varlistentry>
1740 <term><varname>ResendIGMP=</varname></term>
1741 <listitem>
1742 <para>Specifies the number of IGMP membership reports to be issued after
1743 a failover event. One membership report is issued immediately after
1744 the failover, subsequent packets are sent in each 200ms interval.
1745 The valid range is 0–255. Defaults to 1. A value of 0
1746 prevents the IGMP membership report from being issued in response
1747 to the failover event.
1748 </para>
1749 </listitem>
1750 </varlistentry>
1751
1752 <varlistentry>
1753 <term><varname>PacketsPerSlave=</varname></term>
1754 <listitem>
1755 <para>Specify the number of packets to transmit through a slave before
1756 moving to the next one. When set to 0, then a slave is chosen at
1757 random. The valid range is 0–65535. Defaults to 1. This option
1758 only has effect when in balance-rr mode.
1759 </para>
1760 </listitem>
1761 </varlistentry>
1762
1763 <varlistentry>
1764 <term><varname>GratuitousARP=</varname></term>
1765 <listitem>
1766 <para>Specify the number of peer notifications (gratuitous ARPs and
1767 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1768 failover event. As soon as the link is up on the new slave,
1769 a peer notification is sent on the bonding device and each
1770 VLAN sub-device. This is repeated at each link monitor interval
1771 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1772 greater than 1. The valid range is 0–255. The default value is 1.
1773 These options affect only the active-backup mode.
1774 </para>
1775 </listitem>
1776 </varlistentry>
1777
1778 <varlistentry>
1779 <term><varname>AllSlavesActive=</varname></term>
1780 <listitem>
1781 <para>Takes a boolean. Specifies that duplicate frames (received on inactive ports)
1782 should be dropped when false, or delivered when true. Normally, bonding will drop
1783 duplicate frames (received on inactive ports), which is desirable for
1784 most users. But there are some times it is nice to allow duplicate
1785 frames to be delivered. The default value is false (drop duplicate frames
1786 received on inactive ports).
1787 </para>
1788 </listitem>
1789 </varlistentry>
1790
1791 <varlistentry>
1792 <term><varname>DynamicTransmitLoadBalancing=</varname></term>
1793 <listitem>
1794 <para>Takes a boolean. Specifies if dynamic shuffling of flows is enabled. Applies only
1795 for balance-tlb mode. Defaults to unset.
1796 </para>
1797 </listitem>
1798 </varlistentry>
1799
1800 <varlistentry>
1801 <term><varname>MinLinks=</varname></term>
1802 <listitem>
1803 <para>Specifies the minimum number of links that must be active before
1804 asserting carrier. The default value is 0.
1805 </para>
1806 </listitem>
1807 </varlistentry>
1808 </variablelist>
1809
1810 <para>For more detail information see
1811 <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1812 Linux Ethernet Bonding Driver HOWTO</ulink></para>
1813
1814 </refsect1>
1815
1816 <refsect1>
1817 <title>Examples</title>
1818 <example>
1819 <title>/etc/systemd/network/25-bridge.netdev</title>
1820
1821 <programlisting>[NetDev]
1822 Name=bridge0
1823 Kind=bridge</programlisting>
1824 </example>
1825
1826 <example>
1827 <title>/etc/systemd/network/25-vlan1.netdev</title>
1828
1829 <programlisting>[Match]
1830 Virtualization=no
1831
1832 [NetDev]
1833 Name=vlan1
1834 Kind=vlan
1835
1836 [VLAN]
1837 Id=1</programlisting>
1838 </example>
1839 <example>
1840 <title>/etc/systemd/network/25-ipip.netdev</title>
1841 <programlisting>[NetDev]
1842 Name=ipip-tun
1843 Kind=ipip
1844 MTUBytes=1480
1845
1846 [Tunnel]
1847 Local=192.168.223.238
1848 Remote=192.169.224.239
1849 TTL=64</programlisting>
1850 </example>
1851 <example>
1852 <title>/etc/systemd/network/1-fou-tunnel.netdev</title>
1853 <programlisting>[NetDev]
1854 Name=fou-tun
1855 Kind=fou
1856
1857 [FooOverUDP]
1858 Port=5555
1859 Protocol=4
1860 </programlisting>
1861 </example>
1862 <example>
1863 <title>/etc/systemd/network/25-fou-ipip.netdev</title>
1864 <programlisting>[NetDev]
1865 Name=ipip-tun
1866 Kind=ipip
1867
1868 [Tunnel]
1869 Independent=yes
1870 Local=10.65.208.212
1871 Remote=10.65.208.211
1872 FooOverUDP=yes
1873 FOUDestinationPort=5555
1874 </programlisting>
1875 </example>
1876 <example>
1877 <title>/etc/systemd/network/25-tap.netdev</title>
1878 <programlisting>[NetDev]
1879 Name=tap-test
1880 Kind=tap
1881
1882 [Tap]
1883 MultiQueue=yes
1884 PacketInfo=yes</programlisting> </example>
1885
1886 <example>
1887 <title>/etc/systemd/network/25-sit.netdev</title>
1888 <programlisting>[NetDev]
1889 Name=sit-tun
1890 Kind=sit
1891 MTUBytes=1480
1892
1893 [Tunnel]
1894 Local=10.65.223.238
1895 Remote=10.65.223.239</programlisting>
1896 </example>
1897
1898 <example>
1899 <title>/etc/systemd/network/25-6rd.netdev</title>
1900 <programlisting>[NetDev]
1901 Name=6rd-tun
1902 Kind=sit
1903 MTUBytes=1480
1904
1905 [Tunnel]
1906 Local=10.65.223.238
1907 IPv6RapidDeploymentPrefix=2602::/24</programlisting>
1908 </example>
1909
1910 <example>
1911 <title>/etc/systemd/network/25-gre.netdev</title>
1912 <programlisting>[NetDev]
1913 Name=gre-tun
1914 Kind=gre
1915 MTUBytes=1480
1916
1917 [Tunnel]
1918 Local=10.65.223.238
1919 Remote=10.65.223.239</programlisting>
1920 </example>
1921
1922 <example>
1923 <title>/etc/systemd/network/25-vti.netdev</title>
1924
1925 <programlisting>[NetDev]
1926 Name=vti-tun
1927 Kind=vti
1928 MTUBytes=1480
1929
1930 [Tunnel]
1931 Local=10.65.223.238
1932 Remote=10.65.223.239</programlisting>
1933 </example>
1934
1935 <example>
1936 <title>/etc/systemd/network/25-veth.netdev</title>
1937 <programlisting>[NetDev]
1938 Name=veth-test
1939 Kind=veth
1940
1941 [Peer]
1942 Name=veth-peer</programlisting>
1943 </example>
1944
1945 <example>
1946 <title>/etc/systemd/network/25-bond.netdev</title>
1947 <programlisting>[NetDev]
1948 Name=bond1
1949 Kind=bond
1950
1951 [Bond]
1952 Mode=802.3ad
1953 TransmitHashPolicy=layer3+4
1954 MIIMonitorSec=1s
1955 LACPTransmitRate=fast
1956 </programlisting>
1957 </example>
1958
1959 <example>
1960 <title>/etc/systemd/network/25-dummy.netdev</title>
1961 <programlisting>[NetDev]
1962 Name=dummy-test
1963 Kind=dummy
1964 MACAddress=12:34:56:78:9a:bc</programlisting>
1965 </example>
1966 <example>
1967 <title>/etc/systemd/network/25-vrf.netdev</title>
1968 <para>Create a VRF interface with table 42.</para>
1969 <programlisting>[NetDev]
1970 Name=vrf-test
1971 Kind=vrf
1972
1973 [VRF]
1974 Table=42</programlisting>
1975 </example>
1976
1977 <example>
1978 <title>/etc/systemd/network/25-macvtap.netdev</title>
1979 <para>Create a MacVTap device.</para>
1980 <programlisting>[NetDev]
1981 Name=macvtap-test
1982 Kind=macvtap
1983 </programlisting>
1984 </example>
1985 <example>
1986 <title>/etc/systemd/network/25-wireguard.netdev</title>
1987 <programlisting>[NetDev]
1988 Name=wg0
1989 Kind=wireguard
1990
1991 [WireGuard]
1992 PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
1993 ListenPort=51820
1994
1995 [WireGuardPeer]
1996 PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
1997 AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24
1998 Endpoint=wireguard.example.com:51820</programlisting>
1999 </example>
2000 </refsect1>
2001 <refsect1>
2002 <title>See Also</title>
2003 <para>
2004 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2005 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
2006 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2007 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
2008 </para>
2009 </refsect1>
2010
2011 </refentry>