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