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