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