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