]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.netdev.xml
Merge pull request #10607 from yuwata/fix-10605
[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>
798d3a52
ZJS
914 </variablelist>
915 </refsect1>
53cb501a
SS
916
917 <refsect1>
918 <title>[FooOverUDP] Section Options</title>
919
920 <para>The <literal>[FooOverUDP]</literal> section only applies for
921 netdevs of kind <literal>fou</literal> and accepts the
922 following keys:</para>
923
924 <variablelist class='network-directives'>
925 <varlistentry>
926 <term><varname>Protocol=</varname></term>
927 <listitem>
928 <para>The <varname>Protocol=</varname> specifies the protocol number of the
929 packets arriving at the UDP port. This field is mandatory and is not set by default. Valid range is 1-255.</para>
930 </listitem>
931 </varlistentry>
932 <varlistentry>
933 <term><varname>Encapsulation=</varname></term>
934 <listitem>
935 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols inside the UDP packets. Supports the following values:
936
937 <literal>FooOverUDP</literal> provides the simplest no frills model of UDP encapsulation, it simply encapsulates
938 packets directly in the UDP payload.
939 <literal>GenericUDPEncapsulation</literal> is a generic and extensible encapsulation, it allows encapsulation of packets for any IP
940 protocol and optional data as part of the encapsulation.
941 For more detailed information see <ulink url="https://lwn.net/Articles/615044">Generic UDP Encapsulation</ulink>.
942 Defaults to <literal>FooOverUDP</literal>.
943 </para>
944 </listitem>
945 </varlistentry>
946 <varlistentry>
947 <term><varname>Port=</varname></term>
948 <listitem>
949 <para>Specifies the port number, where the IP encapsulation packets will arrive. Please take note that the packets
950 will arrive with the encapsulation will be removed. Then they will be manually fed back into the network stack, and sent ahead
951 for delivery to the real destination. This option is mandatory.</para>
952 </listitem>
953 </varlistentry>
954 </variablelist>
955 </refsect1>
798d3a52
ZJS
956 <refsect1>
957 <title>[Peer] Section Options</title>
958
959 <para>The <literal>[Peer]</literal> section only applies for
960 netdevs of kind <literal>veth</literal> and accepts the
a8eaaee7 961 following keys:</para>
798d3a52
ZJS
962
963 <variablelist class='network-directives'>
964 <varlistentry>
965 <term><varname>Name=</varname></term>
966 <listitem>
967 <para>The interface name used when creating the netdev.
968 This option is compulsory.</para>
969 </listitem>
970 </varlistentry>
971 <varlistentry>
972 <term><varname>MACAddress=</varname></term>
973 <listitem>
b938cb90 974 <para>The peer MACAddress, if not set, it is generated in
798d3a52
ZJS
975 the same way as the MAC address of the main
976 interface.</para>
977 </listitem>
978 </varlistentry>
979 </variablelist>
980 </refsect1>
d6df583c
SS
981 <refsect1>
982 <title>[VXCAN] Section Options</title>
983 <para>The <literal>[VXCAN]</literal> section only applies for
984 netdevs of kind <literal>vxcan</literal> and accepts the
985 following key:</para>
986
987 <variablelist class='network-directives'>
988 <varlistentry>
989 <term><varname>Peer=</varname></term>
990 <listitem>
991 <para>The peer interface name used when creating the netdev.
992 This option is compulsory.</para>
993 </listitem>
994 </varlistentry>
995 </variablelist>
996 </refsect1>
798d3a52
ZJS
997 <refsect1>
998 <title>[Tun] Section Options</title>
999
1000 <para>The <literal>[Tun]</literal> section only applies for
1001 netdevs of kind <literal>tun</literal>, and accepts the following
1002 keys:</para>
1003
1004 <variablelist class='network-directives'>
1005 <varlistentry>
1006 <term><varname>OneQueue=</varname></term>
1007 <listitem><para>Takes a boolean argument. Configures whether
1008 all packets are queued at the device (enabled), or a fixed
1009 number of packets are queued at the device and the rest at the
1010 <literal>qdisc</literal>. Defaults to
1011 <literal>no</literal>.</para>
1012 </listitem>
1013 </varlistentry>
1014 <varlistentry>
1015 <term><varname>MultiQueue=</varname></term>
1016 <listitem><para>Takes a boolean argument. Configures whether
1017 to use multiple file descriptors (queues) to parallelize
1018 packets sending and receiving. Defaults to
1019 <literal>no</literal>.</para>
1020 </listitem>
1021 </varlistentry>
1022 <varlistentry>
1023 <term><varname>PacketInfo=</varname></term>
1024 <listitem><para>Takes a boolean argument. Configures whether
ff9b60f3 1025 packets should be prepended with four extra bytes (two flag
b938cb90 1026 bytes and two protocol bytes). If disabled, it indicates that
798d3a52
ZJS
1027 the packets will be pure IP packets. Defaults to
1028 <literal>no</literal>.</para>
1029 </listitem>
1030 </varlistentry>
43f78da4 1031 <varlistentry>
2aba142e 1032 <term><varname>VNetHeader=</varname></term>
43f78da4
SS
1033 <listitem><para>Takes a boolean argument. Configures
1034 IFF_VNET_HDR flag for a tap device. It allows sending
1035 and receiving larger Generic Segmentation Offload (GSO)
1036 packets. This may increase throughput significantly.
1037 Defaults to
1038 <literal>no</literal>.</para>
1039 </listitem>
1040 </varlistentry>
798d3a52
ZJS
1041 <varlistentry>
1042 <term><varname>User=</varname></term>
1043 <listitem><para>User to grant access to the
1044 <filename>/dev/net/tun</filename> device.</para>
1045 </listitem>
1046 </varlistentry>
1047 <varlistentry>
1048 <term><varname>Group=</varname></term>
1049 <listitem><para>Group to grant access to the
1050 <filename>/dev/net/tun</filename> device.</para>
1051 </listitem>
1052 </varlistentry>
1053
1054 </variablelist>
1055
1056 </refsect1>
1057
1058 <refsect1>
1059 <title>[Tap] Section Options</title>
1060
1061 <para>The <literal>[Tap]</literal> section only applies for
1062 netdevs of kind <literal>tap</literal>, and accepts the same keys
1063 as the <literal>[Tun]</literal> section.</para>
1064 </refsect1>
1065
e5719363
JT
1066 <refsect1>
1067 <title>[WireGuard] Section Options</title>
1068
1069 <para>The <literal>[WireGuard]</literal> section accepts the following
1070 keys:</para>
1071
1072 <variablelist class='network-directives'>
1073 <varlistentry>
1074 <term><varname>PrivateKey=</varname></term>
1075 <listitem>
1076 <para>The Base64 encoded private key for the interface. It can be
1077 generated using the <command>wg genkey</command> command
1078 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
a8d6dbed
JD
1079 This option is mandatory to use WireGuard.
1080 Note that because this information is secret, you may want to set
bd277f53 1081 the permissions of the .netdev file to be owned by <literal>root:systemd-network</literal>
a8d6dbed 1082 with a <literal>0640</literal> file mode.</para>
e5719363
JT
1083 </listitem>
1084 </varlistentry>
1085 <varlistentry>
1086 <term><varname>ListenPort=</varname></term>
1087 <listitem>
1088 <para>Sets UDP port for listening. Takes either value between 1 and 65535
1089 or <literal>auto</literal>. If <literal>auto</literal> is specified,
1090 the port is automatically generated based on interface name.
1091 Defaults to <literal>auto</literal>.</para>
1092 </listitem>
1093 </varlistentry>
1094 <varlistentry>
1095 <term><varname>FwMark=</varname></term>
1096 <listitem>
3209474f 1097 <para>Sets a firewall mark on outgoing WireGuard packets from this interface.</para>
e5719363
JT
1098 </listitem>
1099 </varlistentry>
1100 </variablelist>
1101 </refsect1>
1102
1103 <refsect1>
1104 <title>[WireGuardPeer] Section Options</title>
1105
1106 <para>The <literal>[WireGuardPeer]</literal> section accepts the following
1107 keys:</para>
1108
1109 <variablelist class='network-directives'>
1110 <varlistentry>
1111 <term><varname>PublicKey=</varname></term>
1112 <listitem>
1113 <para>Sets a Base64 encoded public key calculated by <command>wg pubkey</command>
1114 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1115 from a private key, and usually transmitted out of band to the
1116 author of the configuration file. This option is mandatory for this
1117 section.</para>
1118 </listitem>
1119 </varlistentry>
1120 <varlistentry>
1121 <term><varname>PresharedKey=</varname></term>
1122 <listitem>
1123 <para>Optional preshared key for the interface. It can be generated
1124 by the <command>wg genpsk</command> command. This option adds an
1125 additional layer of symmetric-key cryptography to be mixed into the
1126 already existing public-key cryptography, for post-quantum
a8d6dbed
JD
1127 resistance.
1128 Note that because this information is secret, you may want to set
1129 the permissions of the .netdev file to be owned by <literal>root:systemd-networkd</literal>
1130 with a <literal>0640</literal> file mode.</para>
e5719363
JT
1131 </listitem>
1132 </varlistentry>
1133 <varlistentry>
1134 <term><varname>AllowedIPs=</varname></term>
1135 <listitem>
1136 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1137 from which this peer is allowed to send incoming traffic and to
1138 which outgoing traffic for this peer is directed. The catch-all
1139 0.0.0.0/0 may be specified for matching all IPv4 addresses, and
1140 ::/0 may be specified for matching all IPv6 addresses. </para>
1141 </listitem>
1142 </varlistentry>
1143 <varlistentry>
1144 <term><varname>Endpoint=</varname></term>
1145 <listitem>
1146 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1147 a port number. This endpoint will be updated automatically once to
1148 the most recent source IP address and port of correctly
1149 authenticated packets from the peer at configuration time.</para>
1150 </listitem>
1151 </varlistentry>
1152 <varlistentry>
1153 <term><varname>PersistentKeepalive=</varname></term>
1154 <listitem>
1155 <para>Sets a seconds interval, between 1 and 65535 inclusive, of how often
1156 to send an authenticated empty packet to the peer for the purpose
1157 of keeping a stateful firewall or NAT mapping valid persistently.
1158 For example, if the interface very rarely sends traffic, but it
1159 might at anytime receive traffic from a peer, and it is behind NAT,
1160 the interface might benefit from having a persistent keepalive
1161 interval of 25 seconds. If set to 0 or "off", this option is
1162 disabled. By default or when unspecified, this option is off.
1163 Most users will not need this.</para>
1164 </listitem>
1165 </varlistentry>
1166 </variablelist>
1167 </refsect1>
1168
798d3a52
ZJS
1169 <refsect1>
1170 <title>[Bond] Section Options</title>
1171
1172 <para>The <literal>[Bond]</literal> section accepts the following
1173 key:</para>
1174
1175 <variablelist class='network-directives'>
1176 <varlistentry>
1177 <term><varname>Mode=</varname></term>
1178 <listitem>
1179 <para>Specifies one of the bonding policies. The default is
1180 <literal>balance-rr</literal> (round robin). Possible values are
1181 <literal>balance-rr</literal>,
1182 <literal>active-backup</literal>,
1183 <literal>balance-xor</literal>,
1184 <literal>broadcast</literal>,
1185 <literal>802.3ad</literal>,
1186 <literal>balance-tlb</literal>, and
1187 <literal>balance-alb</literal>.
1188 </para>
1189 </listitem>
1190 </varlistentry>
1191
1192 <varlistentry>
1193 <term><varname>TransmitHashPolicy=</varname></term>
1194 <listitem>
1195 <para>Selects the transmit hash policy to use for slave
1196 selection in balance-xor, 802.3ad, and tlb modes. Possible
1197 values are
1198 <literal>layer2</literal>,
1199 <literal>layer3+4</literal>,
1200 <literal>layer2+3</literal>,
4d89618a 1201 <literal>encap2+3</literal>, and
798d3a52
ZJS
1202 <literal>encap3+4</literal>.
1203 </para>
1204 </listitem>
1205 </varlistentry>
1206
1207 <varlistentry>
1208 <term><varname>LACPTransmitRate=</varname></term>
1209 <listitem>
1210 <para>Specifies the rate with which link partner transmits
1211 Link Aggregation Control Protocol Data Unit packets in
1212 802.3ad mode. Possible values are <literal>slow</literal>,
1213 which requests partner to transmit LACPDUs every 30 seconds,
1214 and <literal>fast</literal>, which requests partner to
1215 transmit LACPDUs every second. The default value is
1216 <literal>slow</literal>.</para>
1217 </listitem>
1218 </varlistentry>
1219
1220 <varlistentry>
1221 <term><varname>MIIMonitorSec=</varname></term>
1222 <listitem>
1223 <para>Specifies the frequency that Media Independent
1224 Interface link monitoring will occur. A value of zero
dd2b607b 1225 disables MII link monitoring. This value is rounded down to
798d3a52
ZJS
1226 the nearest millisecond. The default value is 0.</para>
1227 </listitem>
1228 </varlistentry>
1229
1230 <varlistentry>
1231 <term><varname>UpDelaySec=</varname></term>
1232 <listitem>
1233 <para>Specifies the delay before a link is enabled after a
1234 link up status has been detected. This value is rounded down
1235 to a multiple of MIIMonitorSec. The default value is
1236 0.</para>
1237 </listitem>
1238 </varlistentry>
1239
1240 <varlistentry>
1241 <term><varname>DownDelaySec=</varname></term>
1242 <listitem>
1243 <para>Specifies the delay before a link is disabled after a
1244 link down status has been detected. This value is rounded
1245 down to a multiple of MIIMonitorSec. The default value is
1246 0.</para>
1247 </listitem>
1248 </varlistentry>
1249
81bd37a8 1250 <varlistentry>
38422da7 1251 <term><varname>LearnPacketIntervalSec=</varname></term>
81bd37a8
SS
1252 <listitem>
1253 <para>Specifies the number of seconds between instances where the bonding
a8eaaee7
JE
1254 driver sends learning packets to each slave peer switch.
1255 The valid range is 1–0x7fffffff; the default value is 1. This option
1256 has an effect only for the balance-tlb and balance-alb modes.</para>
81bd37a8
SS
1257 </listitem>
1258 </varlistentry>
1259
1260 <varlistentry>
1261 <term><varname>AdSelect=</varname></term>
1262 <listitem>
1263 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
1264 <literal>stable</literal>,
a8eaaee7
JE
1265 <literal>bandwidth</literal> and
1266 <literal>count</literal>.
81bd37a8
SS
1267 </para>
1268 </listitem>
1269 </varlistentry>
1270
1271 <varlistentry>
38422da7 1272 <term><varname>FailOverMACPolicy=</varname></term>
81bd37a8 1273 <listitem>
a8eaaee7
JE
1274 <para>Specifies whether the active-backup mode should set all slaves to
1275 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
81bd37a8
SS
1276 bond's MAC address in accordance with the selected policy. The default policy is none.
1277 Possible values are
1278 <literal>none</literal>,
a8eaaee7
JE
1279 <literal>active</literal> and
1280 <literal>follow</literal>.
81bd37a8
SS
1281 </para>
1282 </listitem>
1283 </varlistentry>
1284
1285 <varlistentry>
38422da7 1286 <term><varname>ARPValidate=</varname></term>
81bd37a8
SS
1287 <listitem>
1288 <para>Specifies whether or not ARP probes and replies should be
38422da7 1289 validated in any mode that supports ARP monitoring, or whether
81bd37a8
SS
1290 non-ARP traffic should be filtered (disregarded) for link
1291 monitoring purposes. Possible values are
1292 <literal>none</literal>,
1293 <literal>active</literal>,
a8eaaee7
JE
1294 <literal>backup</literal> and
1295 <literal>all</literal>.
81bd37a8
SS
1296 </para>
1297 </listitem>
1298 </varlistentry>
1299
1300 <varlistentry>
38422da7 1301 <term><varname>ARPIntervalSec=</varname></term>
81bd37a8
SS
1302 <listitem>
1303 <para>Specifies the ARP link monitoring frequency in milliseconds.
1304 A value of 0 disables ARP monitoring. The default value is 0.
1305 </para>
1306 </listitem>
1307 </varlistentry>
1308
1309 <varlistentry>
38422da7 1310 <term><varname>ARPIPTargets=</varname></term>
81bd37a8
SS
1311 <listitem>
1312 <para>Specifies the IP addresses to use as ARP monitoring peers when
38422da7 1313 ARPIntervalSec is greater than 0. These are the targets of the ARP request
81bd37a8 1314 sent to determine the health of the link to the targets.
a8eaaee7 1315 Specify these values in IPv4 dotted decimal format. At least one IP
81bd37a8
SS
1316 address must be given for ARP monitoring to function. The
1317 maximum number of targets that can be specified is 16. The
1318 default value is no IP addresses.
1319 </para>
1320 </listitem>
1321 </varlistentry>
1322
1323 <varlistentry>
38422da7 1324 <term><varname>ARPAllTargets=</varname></term>
81bd37a8 1325 <listitem>
38422da7 1326 <para>Specifies the quantity of ARPIPTargets that must be reachable
81bd37a8
SS
1327 in order for the ARP monitor to consider a slave as being up.
1328 This option affects only active-backup mode for slaves with
38422da7 1329 ARPValidate enabled. Possible values are
a8eaaee7
JE
1330 <literal>any</literal> and
1331 <literal>all</literal>.
81bd37a8
SS
1332 </para>
1333 </listitem>
1334 </varlistentry>
1335
1336 <varlistentry>
38422da7 1337 <term><varname>PrimaryReselectPolicy=</varname></term>
81bd37a8
SS
1338 <listitem>
1339 <para>Specifies the reselection policy for the primary slave. This
1340 affects how the primary slave is chosen to become the active slave
1341 when failure of the active slave or recovery of the primary slave
1342 occurs. This option is designed to prevent flip-flopping between
1343 the primary slave and other slaves. Possible values are
1344 <literal>always</literal>,
a8eaaee7
JE
1345 <literal>better</literal> and
1346 <literal>failure</literal>.
81bd37a8
SS
1347 </para>
1348 </listitem>
1349 </varlistentry>
1350
1351 <varlistentry>
1352 <term><varname>ResendIGMP=</varname></term>
1353 <listitem>
1354 <para>Specifies the number of IGMP membership reports to be issued after
1355 a failover event. One membership report is issued immediately after
1356 the failover, subsequent packets are sent in each 200ms interval.
b938cb90 1357 The valid range is 0–255. Defaults to 1. A value of 0
81bd37a8
SS
1358 prevents the IGMP membership report from being issued in response
1359 to the failover event.
1360 </para>
1361 </listitem>
1362 </varlistentry>
1363
1364 <varlistentry>
1365 <term><varname>PacketsPerSlave=</varname></term>
1366 <listitem>
b938cb90
JE
1367 <para>Specify the number of packets to transmit through a slave before
1368 moving to the next one. When set to 0, then a slave is chosen at
1369 random. The valid range is 0–65535. Defaults to 1. This option
a8eaaee7 1370 only has effect when in balance-rr mode.
81bd37a8
SS
1371 </para>
1372 </listitem>
1373 </varlistentry>
1374
1375 <varlistentry>
38422da7 1376 <term><varname>GratuitousARP=</varname></term>
81bd37a8
SS
1377 <listitem>
1378 <para>Specify the number of peer notifications (gratuitous ARPs and
1379 unsolicited IPv6 Neighbor Advertisements) to be issued after a
b938cb90 1380 failover event. As soon as the link is up on the new slave,
81bd37a8
SS
1381 a peer notification is sent on the bonding device and each
1382 VLAN sub-device. This is repeated at each link monitor interval
38422da7 1383 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
a8eaaee7 1384 greater than 1. The valid range is 0–255. The default value is 1.
38422da7 1385 These options affect only the active-backup mode.
81bd37a8
SS
1386 </para>
1387 </listitem>
1388 </varlistentry>
1389
1390 <varlistentry>
1391 <term><varname>AllSlavesActive=</varname></term>
1392 <listitem>
a8eaaee7
JE
1393 <para>A boolean. Specifies that duplicate frames (received on inactive ports)
1394 should be dropped when false, or delivered when true. Normally, bonding will drop
81bd37a8
SS
1395 duplicate frames (received on inactive ports), which is desirable for
1396 most users. But there are some times it is nice to allow duplicate
1397 frames to be delivered. The default value is false (drop duplicate frames
1398 received on inactive ports).
1399 </para>
1400 </listitem>
1401 </varlistentry>
1402
1403 <varlistentry>
1404 <term><varname>MinLinks=</varname></term>
1405 <listitem>
1406 <para>Specifies the minimum number of links that must be active before
1407 asserting carrier. The default value is 0.
1408 </para>
1409 </listitem>
1410 </varlistentry>
798d3a52 1411 </variablelist>
81bd37a8
SS
1412
1413 <para>For more detail information see
1414 <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1415 Linux Ethernet Bonding Driver HOWTO</ulink></para>
1416
798d3a52
ZJS
1417 </refsect1>
1418
1419 <refsect1>
48847676 1420 <title>Examples</title>
798d3a52 1421 <example>
6c1695be 1422 <title>/etc/systemd/network/25-bridge.netdev</title>
798d3a52
ZJS
1423
1424 <programlisting>[NetDev]
eac684ef
TG
1425Name=bridge0
1426Kind=bridge</programlisting>
798d3a52 1427 </example>
eac684ef 1428
798d3a52 1429 <example>
6c1695be 1430 <title>/etc/systemd/network/25-vlan1.netdev</title>
eac684ef 1431
798d3a52 1432 <programlisting>[Match]
eac684ef
TG
1433Virtualization=no
1434
1435[NetDev]
1436Name=vlan1
1437Kind=vlan
1438
1439[VLAN]
1440Id=1</programlisting>
798d3a52
ZJS
1441 </example>
1442 <example>
6c1695be 1443 <title>/etc/systemd/network/25-ipip.netdev</title>
798d3a52 1444 <programlisting>[NetDev]
b35a2909
TG
1445Name=ipip-tun
1446Kind=ipip
1447MTUBytes=1480
1448
1449[Tunnel]
1450Local=192.168.223.238
1451Remote=192.169.224.239
1452TTL=64</programlisting>
798d3a52 1453 </example>
53cb501a
SS
1454 <example>
1455 <title>/etc/systemd/network/1-fou-tunnel.netdev</title>
1456 <programlisting>[NetDev]
1457Name=fou-tun
1458Kind=fou
1459
1460[FooOverUDP]
1461Port=5555
1462Protocol=4
1463 </programlisting>
1464 </example>
1465 <example>
1466 <title>/etc/systemd/network/25-fou-ipip.netdev</title>
1467 <programlisting>[NetDev]
1468[NetDev]
1469Name=ipip-tun
1470Kind=ipip
1471
1472[Tunnel]
964c4eda 1473Independent=yes
53cb501a
SS
1474Local=10.65.208.212
1475Remote=10.65.208.211
964c4eda 1476FooOverUDP=yes
53cb501a
SS
1477FOUDestinationPort=5555
1478 </programlisting>
1479 </example>
798d3a52 1480 <example>
6c1695be 1481 <title>/etc/systemd/network/25-tap.netdev</title>
798d3a52 1482 <programlisting>[NetDev]
30ae9dfd
SS
1483Name=tap-test
1484Kind=tap
1485
1486[Tap]
964c4eda
LP
1487MultiQueue=yes
1488PacketInfo=yes</programlisting> </example>
eac684ef 1489
798d3a52 1490 <example>
6c1695be 1491 <title>/etc/systemd/network/25-sit.netdev</title>
798d3a52 1492 <programlisting>[NetDev]
b35a2909
TG
1493Name=sit-tun
1494Kind=sit
1495MTUBytes=1480
1496
1497[Tunnel]
1498Local=10.65.223.238
1499Remote=10.65.223.239</programlisting>
798d3a52 1500 </example>
eac684ef 1501
798d3a52 1502 <example>
6c1695be 1503 <title>/etc/systemd/network/25-gre.netdev</title>
798d3a52 1504 <programlisting>[NetDev]
b35a2909
TG
1505Name=gre-tun
1506Kind=gre
1507MTUBytes=1480
1508
1509[Tunnel]
1510Local=10.65.223.238
1511Remote=10.65.223.239</programlisting>
798d3a52 1512 </example>
b35a2909 1513
798d3a52 1514 <example>
6c1695be 1515 <title>/etc/systemd/network/25-vti.netdev</title>
b35a2909 1516
798d3a52 1517 <programlisting>[NetDev]
b35a2909
TG
1518Name=vti-tun
1519Kind=vti
1520MTUBytes=1480
1521
1522[Tunnel]
1523Local=10.65.223.238
1524Remote=10.65.223.239</programlisting>
798d3a52 1525 </example>
b35a2909 1526
798d3a52 1527 <example>
6c1695be 1528 <title>/etc/systemd/network/25-veth.netdev</title>
798d3a52 1529 <programlisting>[NetDev]
b35a2909
TG
1530Name=veth-test
1531Kind=veth
1532
1533[Peer]
1534Name=veth-peer</programlisting>
798d3a52 1535 </example>
b35a2909 1536
d94facdc 1537 <example>
6c1695be 1538 <title>/etc/systemd/network/25-bond.netdev</title>
d94facdc
MH
1539 <programlisting>[NetDev]
1540Name=bond1
1541Kind=bond
1542
1543[Bond]
1544Mode=802.3ad
1545TransmitHashPolicy=layer3+4
1546MIIMonitorSec=1s
1547LACPTransmitRate=fast
1548</programlisting>
1549 </example>
1550
798d3a52 1551 <example>
6c1695be 1552 <title>/etc/systemd/network/25-dummy.netdev</title>
798d3a52 1553 <programlisting>[NetDev]
9e358851
TG
1554Name=dummy-test
1555Kind=dummy
1556MACAddress=12:34:56:78:9a:bc</programlisting>
798d3a52 1557 </example>
20897a0d
AR
1558 <example>
1559 <title>/etc/systemd/network/25-vrf.netdev</title>
037a3ded 1560 <para>Create a VRF interface with table 42.</para>
20897a0d
AR
1561 <programlisting>[NetDev]
1562Name=vrf-test
1563Kind=vrf
798d3a52 1564
20897a0d 1565[VRF]
362f6336 1566Table=42</programlisting>
20897a0d 1567 </example>
42125eda
SS
1568
1569 <example>
1570 <title>/etc/systemd/network/25-macvtap.netdev</title>
1571 <para>Create a MacVTap device.</para>
1572 <programlisting>[NetDev]
1573Name=macvtap-test
1574Kind=macvtap
1575 </programlisting>
1576 </example>
e5719363
JT
1577 <example>
1578 <title>/etc/systemd/network/25-wireguard.netdev</title>
1579 <programlisting>[NetDev]
1580Name=wg0
1581Kind=wireguard
1582
1583[WireGuard]
1584PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
1585ListenPort=51820
1586
1587[WireGuardPeer]
1588PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
1589AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24
1590Endpoint=wireguard.example.com:51820</programlisting>
1591 </example>
798d3a52
ZJS
1592 </refsect1>
1593 <refsect1>
1594 <title>See Also</title>
1595 <para>
1596 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1597 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1598 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1599 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1600 </para>
1601 </refsect1>
eac684ef
TG
1602
1603</refentry>