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