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