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