]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.netdev.xml
tree-wide: link to docs.kernel.org for kernel documentation
[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-or-later -->
5
6 <refentry id="systemd.netdev" conditional='ENABLE_NETWORKD'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd.network</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd.netdev</refentrytitle>
16 <manvolnum>5</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd.netdev</refname>
21 <refpurpose>Virtual Network Device configuration</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename><replaceable>netdev</replaceable>.netdev</filename></para>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>A plain ini-style text file that encodes configuration about a virtual network device, used by
32 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
33 See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
34 for a general description of the syntax.</para>
35
36 <para>The main Virtual Network Device file must have the extension <filename>.netdev</filename>;
37 other extensions are ignored. Virtual network devices are created as soon as networkd is
38 started. If a netdev with the specified name already exists, networkd will use that as-is rather
39 than create its own. Note that the settings of the pre-existing netdev will not be changed by
40 networkd.</para>
41
42 <para>The <filename>.netdev</filename> files are read from the files located in the system network
43 directory <filename>/usr/lib/systemd/network</filename> and
44 <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
45 <filename>/run/systemd/network</filename> and the local administration network directory
46 <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
47 processed in alphanumeric order, regardless of the directories in which they live. However, files
48 with identical filenames replace each other. It is recommended that each filename is prefixed with
49 a number (e.g. <filename>10-vlan.netdev</filename>). Otherwise, <filename>.netdev</filename> files
50 generated by
51 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
52 may take precedence over user configured files. Files in <filename>/etc/</filename> have the
53 highest priority, files in <filename>/run/</filename> take precedence over files with the same name
54 in <filename>/usr/lib/</filename>. This can be used to override a system-supplied configuration
55 file with a local file if needed. As a special case, an empty file (file size 0) or symlink with
56 the same name pointing to <filename>/dev/null</filename> disables the configuration file entirely
57 (it is "masked").</para>
58
59 <para>Along with the netdev file <filename>foo.netdev</filename>, a "drop-in" directory
60 <filename>foo.netdev.d/</filename> may exist. All files with the suffix <literal>.conf</literal>
61 from this directory will be merged in the alphanumeric order and parsed after the main file itself
62 has been parsed. This is useful to alter or add configuration settings, without having to modify
63 the main configuration file. Each drop-in file must have appropriate section headers.</para>
64
65 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
66 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
67 <filename>/run/systemd/network</filename> directories. Drop-in files in
68 <filename>/etc/</filename> take precedence over those in <filename>/run/</filename> which in turn
69 take precedence over those in <filename>/usr/lib/</filename>. Drop-in files under any of these
70 directories take precedence over the main netdev file wherever located. (Of course, since
71 <filename>/run/</filename> is temporary and <filename>/usr/lib/</filename> is for vendors, it is
72 unlikely drop-ins should be used in either of those places.)</para>
73 </refsect1>
74
75 <refsect1>
76 <title>Supported netdev kinds</title>
77
78 <para>The following kinds of virtual network devices may be
79 configured in <filename>.netdev</filename> files:</para>
80
81 <table>
82 <title>Supported kinds of virtual network devices</title>
83
84 <tgroup cols='2'>
85 <colspec colname='kind' />
86 <colspec colname='explanation' />
87 <thead><row>
88 <entry>Kind</entry>
89 <entry>Description</entry>
90 </row></thead>
91 <tbody>
92 <row><entry><varname>bond</varname></entry>
93 <entry>A bond device is an aggregation of all its slave devices. See <ulink url="https://docs.kernel.org/networking/bonding.html">Linux Ethernet Bonding Driver HOWTO</ulink> for details.</entry></row>
94
95 <row><entry><varname>bridge</varname></entry>
96 <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>
97
98 <row><entry><varname>dummy</varname></entry>
99 <entry>A dummy device drops all packets sent to it.</entry></row>
100
101 <row><entry><varname>gre</varname></entry>
102 <entry>A Level 3 GRE tunnel over IPv4. See <ulink url="https://tools.ietf.org/html/rfc2784">RFC 2784</ulink> for details. Name <literal>gre0</literal> should not be used, as the kernel creates a device with this name when the corresponding kernel module is loaded.</entry></row>
103
104 <row><entry><varname>gretap</varname></entry>
105 <entry>A Level 2 GRE tunnel over IPv4. Name <literal>gretap0</literal> should not be used, as the kernel creates a device with this name when the corresponding kernel module is loaded.</entry></row>
106
107 <row><entry><varname>erspan</varname></entry>
108 <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. Name <literal>erspan0</literal> should not be used, as the kernel creates a device with this name when the corresponding kernel module is loaded.</entry></row>
109
110 <row><entry><varname>ip6gre</varname></entry>
111 <entry>A Level 3 GRE tunnel over IPv6.</entry></row>
112
113 <row><entry><varname>ip6tnl</varname></entry>
114 <entry>An IPv4 or IPv6 tunnel over IPv6</entry></row>
115
116 <row><entry><varname>ip6gretap</varname></entry>
117 <entry>A Level 2 GRE tunnel over IPv6.</entry></row>
118
119 <row><entry><varname>ipip</varname></entry>
120 <entry>An IPv4 over IPv4 tunnel.</entry></row>
121
122 <row><entry><varname>ipvlan</varname></entry>
123 <entry>An IPVLAN device is a stacked device which receives packets from its underlying device based on IP address filtering.</entry></row>
124
125 <row><entry><varname>ipvtap</varname></entry>
126 <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>
127
128 <row><entry><varname>macvlan</varname></entry>
129 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
130
131 <row><entry><varname>macvtap</varname></entry>
132 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
133
134 <row><entry><varname>sit</varname></entry>
135 <entry>An IPv6 over IPv4 tunnel.</entry></row>
136
137 <row><entry><varname>tap</varname></entry>
138 <entry>A persistent Level 2 tunnel between a network device and a device node.</entry></row>
139
140 <row><entry><varname>tun</varname></entry>
141 <entry>A persistent Level 3 tunnel between a network device and a device node.</entry></row>
142
143 <row><entry><varname>veth</varname></entry>
144 <entry>An Ethernet tunnel between a pair of network devices.</entry></row>
145
146 <row><entry><varname>vlan</varname></entry>
147 <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>
148
149 <row><entry><varname>vti</varname></entry>
150 <entry>An IPv4 over IPSec tunnel.</entry></row>
151
152 <row><entry><varname>vti6</varname></entry>
153 <entry>An IPv6 over IPSec tunnel.</entry></row>
154
155 <row><entry><varname>vxlan</varname></entry>
156 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.</entry></row>
157
158 <row><entry><varname>geneve</varname></entry>
159 <entry>A GEneric NEtwork Virtualization Encapsulation (GENEVE) netdev driver.</entry></row>
160
161 <row><entry><varname>l2tp</varname></entry>
162 <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>
163
164 <row><entry><varname>macsec</varname></entry>
165 <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>
166
167 <row><entry><varname>vrf</varname></entry>
168 <entry>A Virtual Routing and Forwarding (<ulink url="https://docs.kernel.org/networking/vrf.html">VRF</ulink>) interface to create separate routing and forwarding domains.</entry></row>
169
170 <row><entry><varname>vcan</varname></entry>
171 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.</entry></row>
172
173 <row><entry><varname>vxcan</varname></entry>
174 <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.
175 </entry></row>
176
177 <row><entry><varname>wireguard</varname></entry>
178 <entry>WireGuard Secure Network Tunnel.</entry></row>
179
180 <row><entry><varname>nlmon</varname></entry>
181 <entry>A Netlink monitor device. Use an nlmon device when you want to monitor system Netlink messages.</entry></row>
182
183 <row><entry><varname>fou</varname></entry>
184 <entry>Foo-over-UDP tunneling.</entry></row>
185
186 <row><entry><varname>xfrm</varname></entry>
187 <entry>A virtual tunnel interface like vti/vti6 but with several advantages.</entry></row>
188
189 <row><entry><varname>ifb</varname></entry>
190 <entry>The Intermediate Functional Block (ifb) pseudo network interface acts as a QoS concentrator for multiple different sources of traffic.</entry></row>
191
192 <row><entry><varname>bareudp</varname></entry>
193 <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>
194
195 <row><entry><varname>batadv</varname></entry>
196 <entry><ulink url="https://www.open-mesh.org/projects/open-mesh/wiki">B.A.T.M.A.N. Advanced</ulink> is a routing protocol for multi-hop mobile ad-hoc networks which operates on layer 2.</entry></row>
197
198 <row><entry><varname>ipoib</varname></entry>
199 <entry>An IP over Infiniband subinterface.</entry></row>
200
201 <row><entry><varname>wlan</varname></entry>
202 <entry>A virtual wireless network (WLAN) interface.</entry></row>
203 </tbody>
204 </tgroup>
205 </table>
206
207 </refsect1>
208
209 <refsect1>
210 <title>[Match] Section Options</title>
211
212 <para>A virtual network device is only created if the [Match] section matches the current
213 environment, or if the section is empty. The following keys are accepted:</para>
214
215 <variablelist class='network-directives'>
216 <xi:include href="systemd.link.xml" xpointer="host" />
217 <xi:include href="systemd.link.xml" xpointer="virtualization" />
218 <xi:include href="systemd.link.xml" xpointer="kernel-command-line" />
219 <xi:include href="systemd.link.xml" xpointer="kernel-version" />
220 <xi:include href="systemd.link.xml" xpointer="architecture" />
221 <xi:include href="systemd.link.xml" xpointer="firmware" />
222 </variablelist>
223 </refsect1>
224
225 <refsect1>
226 <title>[NetDev] Section Options</title>
227
228 <para>The [NetDev] section accepts the
229 following keys:</para>
230
231 <variablelist class='network-directives'>
232 <varlistentry>
233 <term><varname>Description=</varname></term>
234 <listitem>
235 <para>A free-form description of the netdev.</para>
236 </listitem>
237 </varlistentry>
238 <varlistentry>
239 <term><varname>Name=</varname></term>
240 <listitem>
241 <para>The interface name used when creating the netdev.
242 This setting is compulsory.</para>
243 </listitem>
244 </varlistentry>
245 <varlistentry>
246 <term><varname>Kind=</varname></term>
247 <listitem>
248 <para>The netdev kind. This setting is compulsory. See the
249 <literal>Supported netdev kinds</literal> section for the
250 valid keys.</para>
251 </listitem>
252 </varlistentry>
253 <varlistentry>
254 <term><varname>MTUBytes=</varname></term>
255 <listitem>
256 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M, G
257 are supported and are understood to the base of 1024. For <literal>tun</literal> or
258 <literal>tap</literal> devices, <varname>MTUBytes=</varname> setting is not currently supported in
259 [NetDev] section. Please specify it in [Link] section of
260 corresponding
261 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
262 files.</para>
263 </listitem>
264 </varlistentry>
265 <varlistentry>
266 <term><varname>MACAddress=</varname></term>
267 <listitem>
268 <para>Specifies the MAC address to use for the device, or takes the special value
269 <literal>none</literal>. When <literal>none</literal>, <command>systemd-networkd</command>
270 does not request the MAC address for the device, and the kernel will assign a random MAC
271 address. For <literal>tun</literal>, <literal>tap</literal>, or <literal>l2tp</literal>
272 devices, the <varname>MACAddress=</varname> setting in the [NetDev] section is not
273 supported and will be ignored. Please specify it in the [Link] section of the corresponding
274 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
275 file. If this option is not set, <literal>vlan</literal> device inherits the MAC address of
276 the master interface. For other kind of netdevs, if this option is not set, then the MAC
277 address is generated based on the interface name and the
278 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
279 </para>
280 <para>Note, even if <literal>none</literal> is specified, <command>systemd-udevd</command>
281 will assign the persistent MAC address for the device, as <filename>99-default.link</filename>
282 has <varname>MACAddressPolicy=persistent</varname>. So, it is also necessary to create a
283 custom .link file for the device, if the MAC address assignment is not desired.</para>
284 </listitem>
285 </varlistentry>
286 </variablelist>
287 </refsect1>
288
289 <refsect1>
290 <title>[Bridge] Section Options</title>
291
292 <para>The [Bridge] section only applies for
293 netdevs of kind <literal>bridge</literal>, and accepts the
294 following keys:</para>
295
296 <variablelist class='network-directives'>
297 <varlistentry>
298 <term><varname>HelloTimeSec=</varname></term>
299 <listitem>
300 <para>HelloTimeSec specifies the number of seconds between two hello packets
301 sent out by the root bridge and the designated bridges. Hello packets are
302 used to communicate information about the topology throughout the entire
303 bridged local area network.</para>
304 </listitem>
305 </varlistentry>
306 <varlistentry>
307 <term><varname>MaxAgeSec=</varname></term>
308 <listitem>
309 <para>MaxAgeSec specifies the number of seconds of maximum message age.
310 If the last seen (received) hello packet is more than this number of
311 seconds old, the bridge in question will start the takeover procedure
312 in attempt to become the Root Bridge itself.</para>
313 </listitem>
314 </varlistentry>
315 <varlistentry>
316 <term><varname>ForwardDelaySec=</varname></term>
317 <listitem>
318 <para>ForwardDelaySec specifies the number of seconds spent in each
319 of the Listening and Learning states before the Forwarding state is entered.</para>
320 </listitem>
321 </varlistentry>
322 <varlistentry>
323 <term><varname>AgeingTimeSec=</varname></term>
324 <listitem>
325 <para>This specifies the number of seconds a MAC Address will be kept in
326 the forwarding database after having a packet received from this MAC Address.</para>
327 </listitem>
328 </varlistentry>
329 <varlistentry>
330 <term><varname>Priority=</varname></term>
331 <listitem>
332 <para>The priority of the bridge. An integer between 0 and 65535. A lower value
333 means higher priority. The bridge having the lowest priority will be elected as root bridge.</para>
334 </listitem>
335 </varlistentry>
336 <varlistentry>
337 <term><varname>GroupForwardMask=</varname></term>
338 <listitem>
339 <para>A 16-bit bitmask represented as an integer which allows forwarding of link
340 local frames with 802.1D reserved addresses (01:80:C2:00:00:0X). A logical AND
341 is performed between the specified bitmask and the exponentiation of 2^X, the
342 lower nibble of the last octet of the MAC address. For example, a value of 8
343 would allow forwarding of frames addressed to 01:80:C2:00:00:03 (802.1X PAE).</para>
344 </listitem>
345 </varlistentry>
346 <varlistentry>
347 <term><varname>DefaultPVID=</varname></term>
348 <listitem>
349 <para>This specifies the default port VLAN ID of a newly attached bridge port.
350 Set this to an integer in the range 1…4094 or <literal>none</literal> to disable the PVID.</para>
351 </listitem>
352 </varlistentry>
353 <varlistentry>
354 <term><varname>MulticastQuerier=</varname></term>
355 <listitem>
356 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
357 If enabled, the kernel will send general ICMP queries from a zero source address.
358 This feature should allow faster convergence on startup, but it causes some
359 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
360 When unset, the kernel's default will be used.
361 </para>
362 </listitem>
363 </varlistentry>
364 <varlistentry>
365 <term><varname>MulticastSnooping=</varname></term>
366 <listitem>
367 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
368 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
369 between hosts and multicast routers. When unset, the kernel's default will be used.
370 </para>
371 </listitem>
372 </varlistentry>
373 <varlistentry>
374 <term><varname>VLANFiltering=</varname></term>
375 <listitem>
376 <para>Takes a boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
377 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's default will be used.
378 </para>
379 </listitem>
380 </varlistentry>
381 <varlistentry>
382 <term><varname>VLANProtocol=</varname></term>
383 <listitem>
384 <para>Allows setting the protocol used for VLAN filtering. Takes
385 <option>802.1q</option> or,
386 <option>802.1ad</option>, and defaults to unset and kernel's default is used.
387 </para>
388 </listitem>
389 </varlistentry>
390 <varlistentry>
391 <term><varname>STP=</varname></term>
392 <listitem>
393 <para>Takes a boolean. This enables the bridge's Spanning Tree Protocol (STP).
394 When unset, the kernel's default will be used.
395 </para>
396 </listitem>
397 </varlistentry>
398 <varlistentry>
399 <term><varname>MulticastIGMPVersion=</varname></term>
400 <listitem>
401 <para>Allows changing bridge's multicast Internet Group Management Protocol (IGMP) version.
402 Takes an integer 2 or 3. When unset, the kernel's default will be used.
403 </para>
404 </listitem>
405 </varlistentry>
406 </variablelist>
407 </refsect1>
408
409 <refsect1>
410 <title>[VLAN] Section Options</title>
411
412 <para>The [VLAN] section only applies for
413 netdevs of kind <literal>vlan</literal>, and accepts the
414 following key:</para>
415
416 <variablelist class='network-directives'>
417 <varlistentry>
418 <term><varname>Id=</varname></term>
419 <listitem>
420 <para>The VLAN ID to use. An integer in the range 0…4094.
421 This setting is compulsory.</para>
422 </listitem>
423 </varlistentry>
424 <varlistentry>
425 <term><varname>Protocol=</varname></term>
426 <listitem>
427 <para>Allows setting the protocol used for the VLAN interface. Takes <literal>802.1q</literal> or,
428 <literal>802.1ad</literal>, and defaults to unset and kernel's default is used.</para>
429 </listitem>
430 </varlistentry>
431 <varlistentry>
432 <term><varname>GVRP=</varname></term>
433 <listitem>
434 <para>Takes a boolean. The Generic VLAN Registration Protocol (GVRP) is a protocol that
435 allows automatic learning of VLANs on a network.
436 When unset, the kernel's default will be used.
437 </para>
438 </listitem>
439 </varlistentry>
440 <varlistentry>
441 <term><varname>MVRP=</varname></term>
442 <listitem>
443 <para>Takes a boolean. Multiple VLAN Registration Protocol (MVRP) formerly known as GARP VLAN
444 Registration Protocol (GVRP) is a standards-based Layer 2 network protocol,
445 for automatic configuration of VLAN information on switches. It was defined
446 in the 802.1ak amendment to 802.1Q-2005. When unset, the kernel's default will be used.
447 </para>
448 </listitem>
449 </varlistentry>
450 <varlistentry>
451 <term><varname>LooseBinding=</varname></term>
452 <listitem>
453 <para>Takes a boolean. The VLAN loose binding mode, in which only the operational state is passed
454 from the parent to the associated VLANs, but the VLAN device state is not changed.
455 When unset, the kernel's default will be used.</para>
456 </listitem>
457 </varlistentry>
458 <varlistentry>
459 <term><varname>ReorderHeader=</varname></term>
460 <listitem>
461 <para>Takes a boolean. When enabled, the VLAN reorder header is used and VLAN interfaces behave
462 like physical interfaces. When unset, the kernel's default will be used.</para>
463 </listitem>
464 </varlistentry>
465 <varlistentry>
466 <term><varname>EgressQOSMaps=</varname></term>
467 <term><varname>IngressQOSMaps=</varname></term>
468 <listitem>
469 <para>Defines a mapping of Linux internal packet priority (<constant>SO_PRIORITY</constant>)
470 to VLAN header PCP field for outgoing and incoming frames, respectively. Takes a
471 whitespace-separated list of integer pairs, where each integer must be in the range
472 1…4294967294, in the format <literal>from</literal>-<literal>to</literal>, e.g.,
473 <literal>21-7 45-5</literal>. Note that <literal>from</literal> must be greater than or equal
474 to <literal>to</literal>. When unset, the kernel's default will be used.</para>
475 </listitem>
476 </varlistentry>
477 </variablelist>
478 </refsect1>
479
480 <refsect1>
481 <title>[MACVLAN] Section Options</title>
482
483 <para>The [MACVLAN] section only applies for
484 netdevs of kind <literal>macvlan</literal>, and accepts the
485 following key:</para>
486
487 <variablelist class='network-directives'>
488 <varlistentry>
489 <term><varname>Mode=</varname></term>
490 <listitem>
491 <para>The MACVLAN mode to use. The supported options are
492 <literal>private</literal>,
493 <literal>vepa</literal>,
494 <literal>bridge</literal>,
495 <literal>passthru</literal>, and
496 <literal>source</literal>.
497 </para>
498 </listitem>
499 </varlistentry>
500 <varlistentry>
501 <term><varname>SourceMACAddress=</varname></term>
502 <listitem>
503 <para>A whitespace-separated list of remote hardware addresses allowed on the MACVLAN. This
504 option only has an effect in source mode. Use full colon-, hyphen- or dot-delimited
505 hexadecimal. This option may appear more than once, in which case the lists are merged. If
506 the empty string is assigned to this option, the list of hardware addresses defined prior
507 to this is reset. Defaults to unset.</para>
508 </listitem>
509 </varlistentry>
510 <varlistentry>
511 <term><varname>BroadcastMulticastQueueLength=</varname></term>
512 <listitem>
513 <para>Specifies the length of the receive queue for broadcast/multicast packets. An unsigned
514 integer in the range 0…4294967294. Defaults to unset.</para>
515 </listitem>
516 </varlistentry>
517 </variablelist>
518 </refsect1>
519
520 <refsect1>
521 <title>[MACVTAP] Section Options</title>
522
523 <para>The [MACVTAP] section applies for netdevs of kind <literal>macvtap</literal> and accepts the same
524 keys as [MACVLAN].</para>
525 </refsect1>
526
527 <refsect1>
528 <title>[IPVLAN] Section Options</title>
529
530 <para>The [IPVLAN] section only applies for
531 netdevs of kind <literal>ipvlan</literal>, and accepts the
532 following key:</para>
533
534 <variablelist class='network-directives'>
535 <varlistentry>
536 <term><varname>Mode=</varname></term>
537 <listitem>
538 <para>The IPVLAN mode to use. The supported options are
539 <literal>L2</literal>,<literal>L3</literal> and <literal>L3S</literal>.
540 </para>
541 </listitem>
542 </varlistentry>
543 <varlistentry>
544 <term><varname>Flags=</varname></term>
545 <listitem>
546 <para>The IPVLAN flags to use. The supported options are
547 <literal>bridge</literal>,<literal>private</literal> and <literal>vepa</literal>.
548 </para>
549 </listitem>
550 </varlistentry>
551 </variablelist>
552 </refsect1>
553
554 <refsect1>
555 <title>[IPVTAP] Section Options</title>
556
557 <para>The [IPVTAP] section only applies for netdevs of kind <literal>ipvtap</literal> and accepts the
558 same keys as [IPVLAN].</para>
559 </refsect1>
560
561 <refsect1>
562 <title>[VXLAN] Section Options</title>
563
564 <para>The [VXLAN] section only applies for
565 netdevs of kind <literal>vxlan</literal>, and accepts the
566 following keys:</para>
567
568 <variablelist class='network-directives'>
569 <varlistentry>
570 <term><varname>VNI=</varname></term>
571 <listitem>
572 <para>The VXLAN Network Identifier (or VXLAN Segment ID). Takes a number in the range 1…16777215.</para>
573 </listitem>
574 </varlistentry>
575 <varlistentry>
576 <term><varname>Remote=</varname></term>
577 <listitem>
578 <para>Configures destination IP address.</para>
579 </listitem>
580 </varlistentry>
581 <varlistentry>
582 <term><varname>Local=</varname></term>
583 <listitem>
584 <para>Configures local IP address. It must be an address on the underlying interface of the
585 VXLAN interface, or one of the special values <literal>ipv4_link_local</literal>,
586 <literal>ipv6_link_local</literal>, <literal>dhcp4</literal>, <literal>dhcp6</literal>, and
587 <literal>slaac</literal>. If one of the special values is specified, an address which matches
588 the corresponding type on the underlying interface will be used. Defaults to unset.</para>
589 </listitem>
590 </varlistentry>
591 <varlistentry>
592 <term><varname>Group=</varname></term>
593 <listitem>
594 <para>Configures VXLAN multicast group IP address. All members of a VXLAN must use the same
595 multicast group address.</para>
596 </listitem>
597 </varlistentry>
598 <varlistentry>
599 <term><varname>TOS=</varname></term>
600 <listitem>
601 <para>The Type Of Service byte value for a vxlan interface.</para>
602 </listitem>
603 </varlistentry>
604 <varlistentry>
605 <term><varname>TTL=</varname></term>
606 <listitem>
607 <para>A fixed Time To Live N on Virtual eXtensible Local Area Network packets.
608 Takes <literal>inherit</literal> or a number in the range 0…255. 0 is a special
609 value meaning inherit the inner protocol's TTL value. <literal>inherit</literal>
610 means that it will inherit the outer protocol's TTL value.</para>
611 </listitem>
612 </varlistentry>
613 <varlistentry>
614 <term><varname>MacLearning=</varname></term>
615 <listitem>
616 <para>Takes a boolean. When true, enables dynamic MAC learning
617 to discover remote MAC addresses.</para>
618 </listitem>
619 </varlistentry>
620 <varlistentry>
621 <term><varname>FDBAgeingSec=</varname></term>
622 <listitem>
623 <para>The lifetime of Forwarding Database entry learnt by
624 the kernel, in seconds.</para>
625 </listitem>
626 </varlistentry>
627 <varlistentry>
628 <term><varname>MaximumFDBEntries=</varname></term>
629 <listitem>
630 <para>Configures maximum number of FDB entries.</para>
631 </listitem>
632 </varlistentry>
633 <varlistentry>
634 <term><varname>ReduceARPProxy=</varname></term>
635 <listitem>
636 <para>Takes a boolean. When true, bridge-connected VXLAN tunnel
637 endpoint answers ARP requests from the local bridge on behalf
638 of remote Distributed Overlay Virtual Ethernet
639 <ulink url="https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
640 (DOVE)</ulink> clients. Defaults to false.</para>
641 </listitem>
642 </varlistentry>
643 <varlistentry>
644 <term><varname>L2MissNotification=</varname></term>
645 <listitem>
646 <para>Takes a boolean. When true, enables netlink LLADDR miss
647 notifications.</para>
648 </listitem>
649 </varlistentry>
650 <varlistentry>
651 <term><varname>L3MissNotification=</varname></term>
652 <listitem>
653 <para>Takes a boolean. When true, enables netlink IP address miss notifications.</para>
654 </listitem>
655 </varlistentry>
656 <varlistentry>
657 <term><varname>RouteShortCircuit=</varname></term>
658 <listitem>
659 <para>Takes a boolean. When true, route short circuiting is turned
660 on.</para>
661 </listitem>
662 </varlistentry>
663 <varlistentry>
664 <term><varname>UDPChecksum=</varname></term>
665 <listitem>
666 <para>Takes a boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.</para>
667 </listitem>
668 </varlistentry>
669 <varlistentry>
670 <term><varname>UDP6ZeroChecksumTx=</varname></term>
671 <listitem>
672 <para>Takes a boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.</para>
673 </listitem>
674 </varlistentry>
675 <varlistentry>
676 <term><varname>UDP6ZeroChecksumRx=</varname></term>
677 <listitem>
678 <para>Takes a boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.</para>
679 </listitem>
680 </varlistentry>
681 <varlistentry>
682 <term><varname>RemoteChecksumTx=</varname></term>
683 <listitem>
684 <para>Takes a boolean. When true, remote transmit checksum offload of VXLAN is turned on.</para>
685 </listitem>
686 </varlistentry>
687 <varlistentry>
688 <term><varname>RemoteChecksumRx=</varname></term>
689 <listitem>
690 <para>Takes a boolean. When true, remote receive checksum offload in VXLAN is turned on.</para>
691 </listitem>
692 </varlistentry>
693 <varlistentry>
694 <term><varname>GroupPolicyExtension=</varname></term>
695 <listitem>
696 <para>Takes a boolean. When true, it enables Group Policy VXLAN extension security label mechanism
697 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
698 <ulink url="https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
699 VXLAN Group Policy </ulink> document. Defaults to false.</para>
700 </listitem>
701 </varlistentry>
702 <varlistentry>
703 <term><varname>GenericProtocolExtension=</varname></term>
704 <listitem>
705 <para>Takes a boolean. When true, Generic Protocol Extension extends the existing VXLAN protocol
706 to provide protocol typing, OAM, and versioning capabilities. For details about the VXLAN GPE
707 Header, see the <ulink url="https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07">
708 Generic Protocol Extension for VXLAN </ulink> document. If destination port is not specified and
709 Generic Protocol Extension is set then default port of 4790 is used. Defaults to false.</para>
710 </listitem>
711 </varlistentry>
712 <varlistentry>
713 <term><varname>DestinationPort=</varname></term>
714 <listitem>
715 <para>Configures the default destination UDP port. If the destination port is not specified then
716 Linux kernel default will be used. Set to 4789 to get the IANA assigned value.</para>
717 </listitem>
718 </varlistentry>
719 <varlistentry>
720 <term><varname>PortRange=</varname></term>
721 <listitem>
722 <para>Configures the source port range for the VXLAN. The kernel assigns the source UDP port based
723 on the flow to help the receiver to do load balancing. When this option is not set, the normal
724 range of local UDP ports is used.</para>
725 </listitem>
726 </varlistentry>
727 <varlistentry>
728 <term><varname>FlowLabel=</varname></term>
729 <listitem>
730 <para>Specifies the flow label to use in outgoing packets.
731 The valid range is 0-1048575.
732 </para>
733 </listitem>
734 </varlistentry>
735 <varlistentry>
736 <term><varname>IPDoNotFragment=</varname></term>
737 <listitem>
738 <para>Allows setting the IPv4 Do not Fragment (DF) bit in outgoing packets, or to inherit its
739 value from the IPv4 inner header. Takes a boolean value, or <literal>inherit</literal>. Set
740 to <literal>inherit</literal> if the encapsulated protocol is IPv6. When unset, the kernel's
741 default will be used.</para>
742 </listitem>
743 </varlistentry>
744 <varlistentry>
745 <term><varname>Independent=</varname></term>
746 <listitem>
747 <para>Takes a boolean. When true, the vxlan interface is created without any underlying network
748 interface. Defaults to false, which means that a .network file that requests this VXLAN interface
749 using <varname>VXLAN=</varname> is required for the VXLAN to be created.</para>
750 </listitem>
751 </varlistentry>
752 </variablelist>
753 </refsect1>
754
755 <refsect1>
756 <title>[GENEVE] Section Options</title>
757
758 <para>The [GENEVE] section only applies for
759 netdevs of kind <literal>geneve</literal>, and accepts the
760 following keys:</para>
761
762 <variablelist class='network-directives'>
763 <varlistentry>
764 <term><varname>Id=</varname></term>
765 <listitem>
766 <para>Specifies the Virtual Network Identifier (VNI) to use, a number between 0 and 16777215. This
767 field is mandatory.</para>
768 </listitem>
769 </varlistentry>
770 <varlistentry>
771 <term><varname>Remote=</varname></term>
772 <listitem>
773 <para>Specifies the unicast destination IP address to use in outgoing packets.</para>
774 </listitem>
775 </varlistentry>
776 <varlistentry>
777 <term><varname>TOS=</varname></term>
778 <listitem>
779 <para>Specifies the TOS value to use in outgoing packets. Takes a number between 1 and 255.</para>
780 </listitem>
781 </varlistentry>
782 <varlistentry>
783 <term><varname>TTL=</varname></term>
784 <listitem>
785 <para>Accepts the same values as in the [VXLAN] section, except that when unset
786 or set to 0, the kernel's default will be used, meaning that packet TTL will be set from
787 <filename>/proc/sys/net/ipv4/ip_default_ttl</filename>.</para>
788 </listitem>
789 </varlistentry>
790 <varlistentry>
791 <term><varname>UDPChecksum=</varname></term>
792 <listitem>
793 <para>Takes a boolean. When true, specifies that UDP checksum is calculated for transmitted packets
794 over IPv4.</para>
795 </listitem>
796 </varlistentry>
797 <varlistentry>
798 <term><varname>UDP6ZeroChecksumTx=</varname></term>
799 <listitem>
800 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.</para>
801 </listitem>
802 </varlistentry>
803 <varlistentry>
804 <term><varname>UDP6ZeroChecksumRx=</varname></term>
805 <listitem>
806 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.</para>
807 </listitem>
808 </varlistentry>
809 <varlistentry>
810 <term><varname>DestinationPort=</varname></term>
811 <listitem>
812 <para>Specifies destination port. Defaults to 6081. If not set or assigned the empty string, the default
813 port of 6081 is used.</para>
814 </listitem>
815 </varlistentry>
816 <varlistentry>
817 <term><varname>FlowLabel=</varname></term>
818 <listitem>
819 <para>Specifies the flow label to use in outgoing packets.</para>
820 </listitem>
821 </varlistentry>
822 <varlistentry>
823 <term><varname>IPDoNotFragment=</varname></term>
824 <listitem>
825 <para>Accepts the same key as in [VXLAN] section.</para>
826 </listitem>
827 </varlistentry>
828 </variablelist>
829 </refsect1>
830
831 <refsect1>
832 <title>[BareUDP] Section Options</title>
833
834 <para>The [BareUDP] section only applies for
835 netdevs of kind <literal>bareudp</literal>, and accepts the
836 following keys:</para>
837
838 <variablelist class='network-directives'>
839 <varlistentry>
840 <term><varname>DestinationPort=</varname></term>
841 <listitem>
842 <para>Specifies the destination UDP port (in range 1…65535). This is mandatory.</para>
843 </listitem>
844 </varlistentry>
845
846 <varlistentry>
847 <term><varname>EtherType=</varname></term>
848 <listitem>
849 <para>Specifies the L3 protocol. Takes one of <literal>ipv4</literal>, <literal>ipv6</literal>, <literal>mpls-uc</literal>
850 or <literal>mpls-mc</literal>. This is mandatory.</para>
851 </listitem>
852 </varlistentry>
853 </variablelist>
854 </refsect1>
855
856 <refsect1>
857 <title>[L2TP] Section Options</title>
858
859 <para>The [L2TP] section only applies for
860 netdevs of kind <literal>l2tp</literal>, and accepts the
861 following keys:</para>
862
863 <variablelist class='network-directives'>
864 <varlistentry>
865 <term><varname>TunnelId=</varname></term>
866 <listitem>
867 <para>Specifies the tunnel identifier. Takes an number in the range 1…4294967295. The value used
868 must match the <literal>PeerTunnelId=</literal> value being used at the peer. This setting is
869 compulsory.</para>
870 </listitem>
871 </varlistentry>
872 <varlistentry>
873 <term><varname>PeerTunnelId=</varname></term>
874 <listitem>
875 <para>Specifies the peer tunnel id. Takes a number in the range 1…4294967295. The value used must
876 match the <literal>TunnelId=</literal> value being used at the peer. This setting is compulsory.
877 </para>
878 </listitem>
879 </varlistentry>
880 <varlistentry>
881 <term><varname>Remote=</varname></term>
882 <listitem>
883 <para>Specifies the IP address of the remote peer. This setting is compulsory.</para>
884 </listitem>
885 </varlistentry>
886 <varlistentry>
887 <term><varname>Local=</varname></term>
888 <listitem>
889 <para>Specifies the IP address of a local interface. Takes an IP address, or the special
890 values <literal>auto</literal>, <literal>static</literal>, or <literal>dynamic</literal>.
891 Optionally a name of a local interface can be specified after <literal>@</literal>, e.g.
892 <literal>192.168.0.1@eth0</literal> or <literal>auto@eth0</literal>. When an address is
893 specified, then a local or specified interface must have the address, and the remote address
894 must be accessible through the local address. If <literal>auto</literal>, then one of the
895 addresses on a local or specified interface which is accessible to the remote address will be
896 used. Similarly, if <literal>static</literal> or <literal>dynamic</literal> is set, then one
897 of the static or dynamic addresses will be 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 an 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 as in [MACsecReceiveChannel] section.</para>
1104 </listitem>
1105 </varlistentry>
1106 <varlistentry>
1107 <term><varname>MACAddress=</varname></term>
1108 <listitem>
1109 <para>Accepts the same key as in [MACsecReceiveChannel] section.</para>
1110 </listitem>
1111 </varlistentry>
1112 <varlistentry>
1113 <term><varname>PacketNumber=</varname></term>
1114 <listitem>
1115 <para>Accepts the same key as in [MACsecTransmitAssociation] section.</para>
1116 </listitem>
1117 </varlistentry>
1118 <varlistentry>
1119 <term><varname>KeyId=</varname></term>
1120 <listitem>
1121 <para>Accepts the same key as in [MACsecTransmitAssociation] section.</para>
1122 </listitem>
1123 </varlistentry>
1124 <varlistentry>
1125 <term><varname>Key=</varname></term>
1126 <listitem>
1127 <para>Accepts the same key as in [MACsecTransmitAssociation] section.</para>
1128 </listitem>
1129 </varlistentry>
1130 <varlistentry>
1131 <term><varname>KeyFile=</varname></term>
1132 <listitem>
1133 <para>Accepts the same key as in [MACsecTransmitAssociation] section.</para>
1134 </listitem>
1135 </varlistentry>
1136 <varlistentry>
1137 <term><varname>Activate=</varname></term>
1138 <listitem>
1139 <para>Accepts the same key as 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>External=</varname></term>
1165 <listitem>
1166 <para>Takes a boolean value. When true, then the tunnel is externally controlled, which is
1167 also known as collect metadata mode, and most settings below like <varname>Local=</varname>
1168 or <varname>Remote=</varname> are ignored. This implies <varname>Independent=</varname>.
1169 Defaults to false.</para>
1170 </listitem>
1171 </varlistentry>
1172 <varlistentry>
1173 <term><varname>Local=</varname></term>
1174 <listitem>
1175 <para>A static local address for tunneled packets. It must be an address on another interface
1176 of this host, or one of the special values <literal>any</literal>,
1177 <literal>ipv4_link_local</literal>, <literal>ipv6_link_local</literal>,
1178 <literal>dhcp4</literal>, <literal>dhcp6</literal>, and <literal>slaac</literal>. If one
1179 of the special values except for <literal>any</literal> is specified, an address which
1180 matches the corresponding type on the underlying interface will be used. Defaults to
1181 <literal>any</literal>.</para>
1182 </listitem>
1183 </varlistentry>
1184 <varlistentry>
1185 <term><varname>Remote=</varname></term>
1186 <listitem>
1187 <para>The remote endpoint of the tunnel. Takes an IP address or the special value
1188 <literal>any</literal>.</para>
1189 </listitem>
1190 </varlistentry>
1191 <varlistentry>
1192 <term><varname>TOS=</varname></term>
1193 <listitem>
1194 <para>The Type Of Service byte value for a tunnel interface.
1195 For details about the TOS, see the
1196 <ulink url="http://tools.ietf.org/html/rfc1349"> Type of
1197 Service in the Internet Protocol Suite </ulink> document.
1198 </para>
1199 </listitem>
1200 </varlistentry>
1201 <varlistentry>
1202 <term><varname>TTL=</varname></term>
1203 <listitem>
1204 <para>A fixed Time To Live N on tunneled packets. N is a
1205 number in the range 1…255. 0 is a special value meaning that
1206 packets inherit the TTL value. The default value for IPv4
1207 tunnels is 0 (inherit). The default value for IPv6 tunnels is
1208 64.</para>
1209 </listitem>
1210 </varlistentry>
1211 <varlistentry>
1212 <term><varname>DiscoverPathMTU=</varname></term>
1213 <listitem>
1214 <para>Takes a boolean. When true, enables Path MTU Discovery on
1215 the tunnel.</para>
1216 </listitem>
1217 </varlistentry>
1218 <varlistentry>
1219 <term><varname>IPv6FlowLabel=</varname></term>
1220 <listitem>
1221 <para>Configures the 20-bit flow label (see <ulink url="https://tools.ietf.org/html/rfc6437">
1222 RFC 6437</ulink>) field in the IPv6 header (see <ulink url="https://tools.ietf.org/html/rfc2460">
1223 RFC 2460</ulink>), which is used by a node to label packets of a flow.
1224 It is only used for IPv6 tunnels.
1225 A flow label of zero is used to indicate packets that have
1226 not been labeled.
1227 It can be configured to a value in the range 0…0xFFFFF, or be
1228 set to <literal>inherit</literal>, in which case the original flowlabel is used.</para>
1229 </listitem>
1230 </varlistentry>
1231 <varlistentry>
1232 <term><varname>CopyDSCP=</varname></term>
1233 <listitem>
1234 <para>Takes a boolean. When true, the Differentiated Service Code
1235 Point (DSCP) field will be copied to the inner header from
1236 outer header during the decapsulation of an IPv6 tunnel
1237 packet. DSCP is a field in an IP packet that enables different
1238 levels of service to be assigned to network traffic.
1239 Defaults to <literal>no</literal>.
1240 </para>
1241 </listitem>
1242 </varlistentry>
1243 <varlistentry>
1244 <term><varname>EncapsulationLimit=</varname></term>
1245 <listitem>
1246 <para>The Tunnel Encapsulation Limit option specifies how many additional
1247 levels of encapsulation are permitted to be prepended to the packet.
1248 For example, a Tunnel Encapsulation Limit option containing a limit
1249 value of zero means that a packet carrying that option may not enter
1250 another tunnel before exiting the current tunnel.
1251 (see <ulink url="https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC 2473</ulink>).
1252 The valid range is 0…255 and <literal>none</literal>. Defaults to 4.
1253 </para>
1254 </listitem>
1255 </varlistentry>
1256 <varlistentry>
1257 <term><varname>Key=</varname></term>
1258 <listitem>
1259 <para>The <varname>Key=</varname> parameter specifies the same key to use in
1260 both directions (<varname>InputKey=</varname> and <varname>OutputKey=</varname>).
1261 The <varname>Key=</varname> is either a number or an IPv4 address-like dotted quad.
1262 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
1263 and control path) in IP XFRM (framework used to implement IPsec protocol).
1264 See <ulink url="https://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
1265 ip-xfrm — transform configuration</ulink> for details. It is only used for VTI/VTI6,
1266 GRE, GRETAP, and ERSPAN tunnels.</para>
1267 </listitem>
1268 </varlistentry>
1269 <varlistentry>
1270 <term><varname>InputKey=</varname></term>
1271 <listitem>
1272 <para>The <varname>InputKey=</varname> parameter specifies the key to use for input.
1273 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1274 and ERSPAN tunnels.</para>
1275 </listitem>
1276 </varlistentry>
1277 <varlistentry>
1278 <term><varname>OutputKey=</varname></term>
1279 <listitem>
1280 <para>The <varname>OutputKey=</varname> parameter specifies the key to use for output.
1281 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1282 and ERSPAN tunnels.</para>
1283 </listitem>
1284 </varlistentry>
1285 <varlistentry>
1286 <term><varname>Mode=</varname></term>
1287 <listitem>
1288 <para>An <literal>ip6tnl</literal> tunnel can be in one of three
1289 modes
1290 <literal>ip6ip6</literal> for IPv6 over IPv6,
1291 <literal>ipip6</literal> for IPv4 over IPv6 or
1292 <literal>any</literal> for either.
1293 </para>
1294 </listitem>
1295 </varlistentry>
1296 <varlistentry>
1297 <term><varname>Independent=</varname></term>
1298 <listitem>
1299 <para>Takes a boolean. When false (the default), the tunnel is always created over some network
1300 device, and a .network file that requests this tunnel using <varname>Tunnel=</varname> is required
1301 for the tunnel to be created. When true, the tunnel is created independently of any network as
1302 "tunnel@NONE".</para>
1303 </listitem>
1304 </varlistentry>
1305 <varlistentry>
1306 <term><varname>AssignToLoopback=</varname></term>
1307 <listitem>
1308 <para>Takes a boolean. If set to <literal>yes</literal>, the loopback interface <literal>lo</literal>
1309 is used as the underlying device of the tunnel interface. Defaults to <literal>no</literal>.</para>
1310 </listitem>
1311 </varlistentry>
1312 <varlistentry>
1313 <term><varname>AllowLocalRemote=</varname></term>
1314 <listitem>
1315 <para>Takes a boolean. When true allows tunnel traffic on <varname>ip6tnl</varname> devices where the remote endpoint is a local host address.
1316 When unset, the kernel's default will be used.
1317 </para>
1318 </listitem>
1319 </varlistentry>
1320 <varlistentry>
1321 <term><varname>FooOverUDP=</varname></term>
1322 <listitem>
1323 <para>Takes a boolean. Specifies whether <varname>FooOverUDP=</varname> tunnel is to be configured.
1324 Defaults to false. This takes effects only for IPIP, SIT, GRE, and GRETAP tunnels.
1325 For more detail information see
1326 <ulink url="https://lwn.net/Articles/614348">Foo over UDP</ulink></para>
1327 </listitem>
1328 </varlistentry>
1329 <varlistentry>
1330 <term><varname>FOUDestinationPort=</varname></term>
1331 <listitem>
1332 <para>This setting specifies the UDP destination port for encapsulation.
1333 This field is mandatory when <varname>FooOverUDP=yes</varname>, and is not set by default.</para>
1334 </listitem>
1335 </varlistentry>
1336 <varlistentry>
1337 <term><varname>FOUSourcePort=</varname></term>
1338 <listitem>
1339 <para>This setting specifies the UDP source port for encapsulation. Defaults to <constant>0</constant>
1340 — that is, the source port for packets is left to the network stack to decide.</para>
1341 </listitem>
1342 </varlistentry>
1343 <varlistentry>
1344 <term><varname>Encapsulation=</varname></term>
1345 <listitem>
1346 <para>Accepts the same key as in the [FooOverUDP] section.</para>
1347 </listitem>
1348 </varlistentry>
1349 <varlistentry>
1350 <term><varname>IPv6RapidDeploymentPrefix=</varname></term>
1351 <listitem>
1352 <para>Reconfigure the tunnel for <ulink url="https://tools.ietf.org/html/rfc5569">IPv6 Rapid
1353 Deployment</ulink>, also known as 6rd. The value is an ISP-specific IPv6 prefix with a non-zero length. Only
1354 applicable to SIT tunnels.</para>
1355 </listitem>
1356 </varlistentry>
1357 <varlistentry>
1358 <term><varname>ISATAP=</varname></term>
1359 <listitem>
1360 <para>Takes a boolean. If set, configures the tunnel as Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) tunnel.
1361 Only applicable to SIT tunnels. When unset, the kernel's default will be used.</para>
1362 </listitem>
1363 </varlistentry>
1364 <varlistentry>
1365 <term><varname>SerializeTunneledPackets=</varname></term>
1366 <listitem>
1367 <para>Takes a boolean. If set to yes, then packets are serialized. Only applies for GRE,
1368 GRETAP, and ERSPAN tunnels. When unset, the kernel's default will be used.
1369 </para>
1370 </listitem>
1371 </varlistentry>
1372 <varlistentry>
1373 <term><varname>ERSPANVersion=</varname></term>
1374 <listitem>
1375 <para>Specifies the ERSPAN version number. Takes 0 for version 0 (a.k.a. type I), 1 for version 1
1376 (a.k.a. type II), or 2 for version 2 (a.k.a. type III). Defaults to 1.</para>
1377 </listitem>
1378 </varlistentry>
1379 <varlistentry>
1380 <term><varname>ERSPANIndex=</varname></term>
1381 <listitem>
1382 <para>Specifies the ERSPAN v1 index field for the interface. Takes an integer in the range
1383 0…1048575, which is associated with the ERSPAN traffic's source port and direction. Only used when
1384 <varname>ERSPANVersion=1</varname>. Defaults to 0.</para>
1385 </listitem>
1386 </varlistentry>
1387 <varlistentry>
1388 <term><varname>ERSPANDirection=</varname></term>
1389 <listitem>
1390 <para>Specifies the ERSPAN v2 mirrored traffic's direction. Takes <literal>ingress</literal> or
1391 <literal>egress</literal>. Only used when <varname>ERSPANVersion=2</varname>. Defaults to
1392 <literal>ingress</literal>.</para>
1393 </listitem>
1394 </varlistentry>
1395 <varlistentry>
1396 <term><varname>ERSPANHardwareId=</varname></term>
1397 <listitem>
1398 <para>Specifies an unique identifier of the ERSPAN v2 engine. Takes an integer in the range 0…63.
1399 Only used when <varname>ERSPANVersion=2</varname>. Defaults to 0.</para>
1400 </listitem>
1401 </varlistentry>
1402 </variablelist>
1403 </refsect1>
1404
1405 <refsect1>
1406 <title>[FooOverUDP] Section Options</title>
1407
1408 <para>The [FooOverUDP] section only applies for
1409 netdevs of kind <literal>fou</literal> and accepts the
1410 following keys:</para>
1411
1412 <variablelist class='network-directives'>
1413 <varlistentry>
1414 <term><varname>Encapsulation=</varname></term>
1415 <listitem>
1416 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols
1417 inside the UDP packets. Supports the following values:
1418
1419 <literal>FooOverUDP</literal> provides the simplest no-frills model of UDP encapsulation, it simply
1420 encapsulates packets directly in the UDP payload. <literal>GenericUDPEncapsulation</literal> is a
1421 generic and extensible encapsulation, it allows encapsulation of packets for any IP protocol and
1422 optional data as part of the encapsulation. For more detailed information see <ulink
1423 url="https://lwn.net/Articles/615044">Generic UDP Encapsulation</ulink>. Defaults to
1424 <literal>FooOverUDP</literal>.
1425 </para>
1426 </listitem>
1427 </varlistentry>
1428 <varlistentry>
1429 <term><varname>Port=</varname></term>
1430 <listitem>
1431 <para>Specifies the port number where the encapsulated packets will arrive. Those packets will be
1432 removed and manually fed back into the network stack with the encapsulation removed to be sent to
1433 the real destination. This option is mandatory.</para>
1434 </listitem>
1435 </varlistentry>
1436 <varlistentry>
1437 <term><varname>PeerPort=</varname></term>
1438 <listitem>
1439 <para>Specifies the peer port number. Defaults to unset. Note that when peer port is set
1440 <literal>Peer=</literal> address is mandatory.</para>
1441 </listitem>
1442 </varlistentry>
1443 <varlistentry>
1444 <term><varname>Protocol=</varname></term>
1445 <listitem>
1446 <para>The <varname>Protocol=</varname> specifies the protocol number of the packets arriving
1447 at the UDP port. When <varname>Encapsulation=FooOverUDP</varname>, this field is mandatory
1448 and is not set by default. Takes an IP protocol name such as <literal>gre</literal> or
1449 <literal>ipip</literal>, or an integer within the range 1…255. When
1450 <varname>Encapsulation=GenericUDPEncapsulation</varname>, this must not be specified.</para>
1451 </listitem>
1452 </varlistentry>
1453 <varlistentry>
1454 <term><varname>Peer=</varname></term>
1455 <listitem>
1456 <para>Configures peer IP address. Note that when peer address is set <literal>PeerPort=</literal>
1457 is mandatory.</para>
1458 </listitem>
1459 </varlistentry>
1460 <varlistentry>
1461 <term><varname>Local=</varname></term>
1462 <listitem>
1463 <para>Configures local IP address.</para>
1464 </listitem>
1465 </varlistentry>
1466 </variablelist>
1467 </refsect1>
1468
1469 <refsect1>
1470 <title>[Peer] Section Options</title>
1471
1472 <para>The [Peer] section only applies for
1473 netdevs of kind <literal>veth</literal> and accepts the
1474 following keys:</para>
1475
1476 <variablelist class='network-directives'>
1477 <varlistentry>
1478 <term><varname>Name=</varname></term>
1479 <listitem>
1480 <para>The interface name used when creating the netdev.
1481 This setting is compulsory.</para>
1482 </listitem>
1483 </varlistentry>
1484 <varlistentry>
1485 <term><varname>MACAddress=</varname></term>
1486 <listitem>
1487 <para>The peer MACAddress, if not set, it is generated in
1488 the same way as the MAC address of the main
1489 interface.</para>
1490 </listitem>
1491 </varlistentry>
1492 </variablelist>
1493 </refsect1>
1494
1495 <refsect1>
1496 <title>[VXCAN] Section Options</title>
1497
1498 <para>The [VXCAN] section only applies for
1499 netdevs of kind <literal>vxcan</literal> and accepts the
1500 following key:</para>
1501
1502 <variablelist class='network-directives'>
1503 <varlistentry>
1504 <term><varname>Peer=</varname></term>
1505 <listitem>
1506 <para>The peer interface name used when creating the netdev.
1507 This setting is compulsory.</para>
1508 </listitem>
1509 </varlistentry>
1510 </variablelist>
1511 </refsect1>
1512
1513 <refsect1>
1514 <title>[Tun] Section Options</title>
1515
1516 <para>The [Tun] section only applies for
1517 netdevs of kind <literal>tun</literal>, and accepts the following
1518 keys:</para>
1519
1520 <variablelist class='network-directives'>
1521 <varlistentry>
1522 <term><varname>MultiQueue=</varname></term>
1523 <listitem><para>Takes a boolean. Configures whether
1524 to use multiple file descriptors (queues) to parallelize
1525 packets sending and receiving. Defaults to
1526 <literal>no</literal>.</para>
1527 </listitem>
1528 </varlistentry>
1529 <varlistentry>
1530 <term><varname>PacketInfo=</varname></term>
1531 <listitem><para>Takes a boolean. Configures whether
1532 packets should be prepended with four extra bytes (two flag
1533 bytes and two protocol bytes). If disabled, it indicates that
1534 the packets will be pure IP packets. Defaults to
1535 <literal>no</literal>.</para>
1536 </listitem>
1537 </varlistentry>
1538 <varlistentry>
1539 <term><varname>VNetHeader=</varname></term>
1540 <listitem><para>Takes a boolean. Configures
1541 IFF_VNET_HDR flag for a tun or tap device. It allows sending
1542 and receiving larger Generic Segmentation Offload (GSO)
1543 packets. This may increase throughput significantly.
1544 Defaults to
1545 <literal>no</literal>.</para>
1546 </listitem>
1547 </varlistentry>
1548 <varlistentry>
1549 <term><varname>User=</varname></term>
1550 <listitem><para>User to grant access to the
1551 <filename>/dev/net/tun</filename> device.</para>
1552 </listitem>
1553 </varlistentry>
1554 <varlistentry>
1555 <term><varname>Group=</varname></term>
1556 <listitem><para>Group to grant access to the
1557 <filename>/dev/net/tun</filename> device.</para>
1558 </listitem>
1559 </varlistentry>
1560 </variablelist>
1561 </refsect1>
1562
1563 <refsect1>
1564 <title>[Tap] Section Options</title>
1565
1566 <para>The [Tap] section only applies for
1567 netdevs of kind <literal>tap</literal>, and accepts the same keys
1568 as the [Tun] section.</para>
1569 </refsect1>
1570
1571 <refsect1>
1572 <title>[WireGuard] Section Options</title>
1573
1574 <para>The [WireGuard] section accepts the following
1575 keys:</para>
1576
1577 <variablelist class='network-directives'>
1578 <varlistentry>
1579 <term><varname>PrivateKey=</varname></term>
1580 <listitem>
1581 <para>The Base64 encoded private key for the interface. It can be
1582 generated using the <command>wg genkey</command> command
1583 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
1584 This option or <varname>PrivateKeyFile=</varname> is mandatory to use WireGuard.
1585 Note that because this information is secret, you may want to set
1586 the permissions of the .netdev file to be owned by <literal>root:systemd-network</literal>
1587 with a <literal>0640</literal> file mode.</para>
1588 </listitem>
1589 </varlistentry>
1590 <varlistentry>
1591 <term><varname>PrivateKeyFile=</varname></term>
1592 <listitem>
1593 <para>Takes an absolute path to a file which contains the Base64 encoded private key for the
1594 interface. When this option is specified, then <varname>PrivateKey=</varname> is ignored. Note
1595 that the file must be readable by the user <literal>systemd-network</literal>, so it should be,
1596 e.g., owned by <literal>root:systemd-network</literal> with a <literal>0640</literal> file mode. If
1597 the path refers to an <constant>AF_UNIX</constant> stream socket in the file system a connection is
1598 made to it and the key read from it.</para>
1599 </listitem>
1600 </varlistentry>
1601 <varlistentry>
1602 <term><varname>ListenPort=</varname></term>
1603 <listitem>
1604 <para>Sets UDP port for listening. Takes either value between 1 and 65535
1605 or <literal>auto</literal>. If <literal>auto</literal> is specified,
1606 the port is automatically generated based on interface name.
1607 Defaults to <literal>auto</literal>.</para>
1608 </listitem>
1609 </varlistentry>
1610 <varlistentry>
1611 <term><varname>FirewallMark=</varname></term>
1612 <listitem>
1613 <para>Sets a firewall mark on outgoing WireGuard packets from this interface. Takes a number between 1 and 4294967295.</para>
1614 </listitem>
1615 </varlistentry>
1616 <varlistentry>
1617 <term><varname>RouteTable=</varname></term>
1618 <listitem>
1619 <para>The table identifier for the routes to the addresses specified in the
1620 <varname>AllowedIPs=</varname>. Takes a negative boolean value, one of the predefined names
1621 <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, names
1622 defined in <varname>RouteTable=</varname> in
1623 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1624 or a number in the range 1…4294967295. When <literal>off</literal> the routes to the
1625 addresses specified in the <varname>AllowedIPs=</varname> setting will not be configured.
1626 Defaults to false. This setting will be ignored when the same setting is specified in the
1627 [WireGuardPeer] section.</para>
1628 </listitem>
1629 </varlistentry>
1630 <varlistentry>
1631 <term><varname>RouteMetric=</varname></term>
1632 <listitem>
1633 <para>The priority of the routes to the addresses specified in the
1634 <varname>AllowedIPs=</varname>. Takes an integer in the range 0…4294967295. Defaults to 0
1635 for IPv4 addresses, and 1024 for IPv6 addresses. This setting will be ignored when the same
1636 setting is specified in the [WireGuardPeer] section.</para>
1637 </listitem>
1638 </varlistentry>
1639 </variablelist>
1640 </refsect1>
1641
1642 <refsect1>
1643 <title>[WireGuardPeer] Section Options</title>
1644
1645 <para>The [WireGuardPeer] section accepts the following
1646 keys:</para>
1647
1648 <variablelist class='network-directives'>
1649 <varlistentry>
1650 <term><varname>PublicKey=</varname></term>
1651 <listitem>
1652 <para>Sets a Base64 encoded public key calculated by <command>wg pubkey</command>
1653 (see <citerefentry project="wireguard"><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1654 from a private key, and usually transmitted out of band to the
1655 author of the configuration file. This option is mandatory for this
1656 section.</para>
1657 </listitem>
1658 </varlistentry>
1659 <varlistentry>
1660 <term><varname>PresharedKey=</varname></term>
1661 <listitem>
1662 <para>Optional preshared key for the interface. It can be generated
1663 by the <command>wg genpsk</command> command. This option adds an
1664 additional layer of symmetric-key cryptography to be mixed into the
1665 already existing public-key cryptography, for post-quantum
1666 resistance.
1667 Note that because this information is secret, you may want to set
1668 the permissions of the .netdev file to be owned by <literal>root:systemd-network</literal>
1669 with a <literal>0640</literal> file mode.</para>
1670 </listitem>
1671 </varlistentry>
1672 <varlistentry>
1673 <term><varname>PresharedKeyFile=</varname></term>
1674 <listitem>
1675 <para>Takes an absolute path to a file which contains the Base64 encoded preshared key for the
1676 peer. When this option is specified, then <varname>PresharedKey=</varname> is ignored. Note that
1677 the file must be readable by the user <literal>systemd-network</literal>, so it should be, e.g.,
1678 owned by <literal>root:systemd-network</literal> with a <literal>0640</literal> file mode. If the
1679 path refers to an <constant>AF_UNIX</constant> stream socket in the file system a connection is
1680 made to it and the key read from it.</para>
1681 </listitem>
1682 </varlistentry>
1683 <varlistentry>
1684 <term><varname>AllowedIPs=</varname></term>
1685 <listitem>
1686 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1687 from which this peer is allowed to send incoming traffic and to
1688 which outgoing traffic for this peer is directed.</para>
1689
1690 <para>The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses,
1691 and ::/0 may be specified for matching all IPv6 addresses.</para>
1692
1693 <para>Note that this only affects <emphasis>routing inside the network interface itself</emphasis>,
1694 i.e. the packets that pass through the tunnel itself. To cause packets to be sent via the tunnel in
1695 the first place, an appropriate route needs to be added as well — either in the
1696 <literal>[Routes]</literal> section on the <literal>.network</literal> matching the wireguard
1697 interface, or externally to <filename>systemd-networkd</filename>.</para>
1698 </listitem>
1699 </varlistentry>
1700 <varlistentry>
1701 <term><varname>Endpoint=</varname></term>
1702 <listitem>
1703 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1704 a port number. This endpoint will be updated automatically once to
1705 the most recent source IP address and port of correctly
1706 authenticated packets from the peer at configuration time.</para>
1707 </listitem>
1708 </varlistentry>
1709 <varlistentry>
1710 <term><varname>PersistentKeepalive=</varname></term>
1711 <listitem>
1712 <para>Sets a seconds interval, between 1 and 65535 inclusive, of how often
1713 to send an authenticated empty packet to the peer for the purpose
1714 of keeping a stateful firewall or NAT mapping valid persistently.
1715 For example, if the interface very rarely sends traffic, but it
1716 might at anytime receive traffic from a peer, and it is behind NAT,
1717 the interface might benefit from having a persistent keepalive
1718 interval of 25 seconds. If set to 0 or "off", this option is
1719 disabled. By default or when unspecified, this option is off.
1720 Most users will not need this.</para>
1721 </listitem>
1722 </varlistentry>
1723 <varlistentry>
1724 <term><varname>RouteTable=</varname></term>
1725 <listitem>
1726 <para>The table identifier for the routes to the addresses specified in the
1727 <varname>AllowedIPs=</varname>. Takes a negative boolean value, one of the predefined names
1728 <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, names
1729 defined in <varname>RouteTable=</varname> in
1730 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1731 or a number in the range 1…4294967295. Defaults to unset, and the value specified in the
1732 same setting in the [WireGuard] section will be used.</para>
1733 </listitem>
1734 </varlistentry>
1735 <varlistentry>
1736 <term><varname>RouteMetric=</varname></term>
1737 <listitem>
1738 <para>The priority of the routes to the addresses specified in the
1739 <varname>AllowedIPs=</varname>. Takes an integer in the range 0…4294967295. Defaults to
1740 unset, and the value specified in the same setting in the [WireGuard] section will be used.
1741 </para>
1742 </listitem>
1743 </varlistentry>
1744 </variablelist>
1745 </refsect1>
1746
1747 <refsect1>
1748 <title>[Bond] Section Options</title>
1749
1750 <para>The [Bond] section accepts the following
1751 key:</para>
1752
1753 <variablelist class='network-directives'>
1754 <varlistentry>
1755 <term><varname>Mode=</varname></term>
1756 <listitem>
1757 <para>Specifies one of the bonding policies. The default is
1758 <literal>balance-rr</literal> (round robin). Possible values are
1759 <literal>balance-rr</literal>,
1760 <literal>active-backup</literal>,
1761 <literal>balance-xor</literal>,
1762 <literal>broadcast</literal>,
1763 <literal>802.3ad</literal>,
1764 <literal>balance-tlb</literal>, and
1765 <literal>balance-alb</literal>.
1766 </para>
1767 </listitem>
1768 </varlistentry>
1769
1770 <varlistentry>
1771 <term><varname>TransmitHashPolicy=</varname></term>
1772 <listitem>
1773 <para>Selects the transmit hash policy to use for slave
1774 selection in balance-xor, 802.3ad, and tlb modes. Possible
1775 values are
1776 <literal>layer2</literal>,
1777 <literal>layer3+4</literal>,
1778 <literal>layer2+3</literal>,
1779 <literal>encap2+3</literal>, and
1780 <literal>encap3+4</literal>.
1781 </para>
1782 </listitem>
1783 </varlistentry>
1784
1785 <varlistentry>
1786 <term><varname>LACPTransmitRate=</varname></term>
1787 <listitem>
1788 <para>Specifies the rate with which link partner transmits
1789 Link Aggregation Control Protocol Data Unit packets in
1790 802.3ad mode. Possible values are <literal>slow</literal>,
1791 which requests partner to transmit LACPDUs every 30 seconds,
1792 and <literal>fast</literal>, which requests partner to
1793 transmit LACPDUs every second. The default value is
1794 <literal>slow</literal>.</para>
1795 </listitem>
1796 </varlistentry>
1797
1798 <varlistentry>
1799 <term><varname>MIIMonitorSec=</varname></term>
1800 <listitem>
1801 <para>Specifies the frequency that Media Independent
1802 Interface link monitoring will occur. A value of zero
1803 disables MII link monitoring. This value is rounded down to
1804 the nearest millisecond. The default value is 0.</para>
1805 </listitem>
1806 </varlistentry>
1807
1808 <varlistentry>
1809 <term><varname>UpDelaySec=</varname></term>
1810 <listitem>
1811 <para>Specifies the delay before a link is enabled after a
1812 link up status has been detected. This value is rounded down
1813 to a multiple of <varname>MIIMonitorSec=</varname>. The default value is
1814 0.</para>
1815 </listitem>
1816 </varlistentry>
1817
1818 <varlistentry>
1819 <term><varname>DownDelaySec=</varname></term>
1820 <listitem>
1821 <para>Specifies the delay before a link is disabled after a
1822 link down status has been detected. This value is rounded
1823 down to a multiple of <varname>MIIMonitorSec=</varname>. The default value is
1824 0.</para>
1825 </listitem>
1826 </varlistentry>
1827
1828 <varlistentry>
1829 <term><varname>LearnPacketIntervalSec=</varname></term>
1830 <listitem>
1831 <para>Specifies the number of seconds between instances where the bonding
1832 driver sends learning packets to each slave peer switch.
1833 The valid range is 1…0x7fffffff; the default value is 1. This option
1834 has an effect only for the balance-tlb and balance-alb modes.</para>
1835 </listitem>
1836 </varlistentry>
1837
1838 <varlistentry>
1839 <term><varname>AdSelect=</varname></term>
1840 <listitem>
1841 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
1842 <literal>stable</literal>,
1843 <literal>bandwidth</literal> and
1844 <literal>count</literal>.
1845 </para>
1846 </listitem>
1847 </varlistentry>
1848
1849 <varlistentry>
1850 <term><varname>AdActorSystemPriority=</varname></term>
1851 <listitem>
1852 <para>Specifies the 802.3ad actor system priority. Takes a number in the range 1…65535.</para>
1853 </listitem>
1854 </varlistentry>
1855
1856 <varlistentry>
1857 <term><varname>AdUserPortKey=</varname></term>
1858 <listitem>
1859 <para>Specifies the 802.3ad user defined portion of the port key. Takes a number in the range
1860 0…1023.</para>
1861 </listitem>
1862 </varlistentry>
1863
1864 <varlistentry>
1865 <term><varname>AdActorSystem=</varname></term>
1866 <listitem>
1867 <para>Specifies the 802.3ad system MAC address. This cannot be a null or multicast address.
1868 </para>
1869 </listitem>
1870 </varlistentry>
1871
1872 <varlistentry>
1873 <term><varname>FailOverMACPolicy=</varname></term>
1874 <listitem>
1875 <para>Specifies whether the active-backup mode should set all slaves to
1876 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
1877 bond's MAC address in accordance with the selected policy. The default policy is none.
1878 Possible values are
1879 <literal>none</literal>,
1880 <literal>active</literal> and
1881 <literal>follow</literal>.
1882 </para>
1883 </listitem>
1884 </varlistentry>
1885
1886 <varlistentry>
1887 <term><varname>ARPValidate=</varname></term>
1888 <listitem>
1889 <para>Specifies whether or not ARP probes and replies should be
1890 validated in any mode that supports ARP monitoring, or whether
1891 non-ARP traffic should be filtered (disregarded) for link
1892 monitoring purposes. Possible values are
1893 <literal>none</literal>,
1894 <literal>active</literal>,
1895 <literal>backup</literal> and
1896 <literal>all</literal>.
1897 </para>
1898 </listitem>
1899 </varlistentry>
1900
1901 <varlistentry>
1902 <term><varname>ARPIntervalSec=</varname></term>
1903 <listitem>
1904 <para>Specifies the ARP link monitoring frequency. A value of 0 disables ARP monitoring. The
1905 default value is 0, and the default unit seconds.
1906 </para>
1907 </listitem>
1908 </varlistentry>
1909
1910 <varlistentry>
1911 <term><varname>ARPIPTargets=</varname></term>
1912 <listitem>
1913 <para>Specifies the IP addresses to use as ARP monitoring peers when
1914 <varname>ARPIntervalSec=</varname> is greater than 0. These are the targets of the ARP
1915 request sent to determine the health of the link to the targets.
1916 Specify these values in IPv4 dotted decimal format. At least one IP
1917 address must be given for ARP monitoring to function. The
1918 maximum number of targets that can be specified is 16. The
1919 default value is no IP addresses.
1920 </para>
1921 </listitem>
1922 </varlistentry>
1923
1924 <varlistentry>
1925 <term><varname>ARPAllTargets=</varname></term>
1926 <listitem>
1927 <para>Specifies the quantity of <varname>ARPIPTargets=</varname> that must be reachable
1928 in order for the ARP monitor to consider a slave as being up.
1929 This option affects only active-backup mode for slaves with
1930 ARPValidate enabled. Possible values are
1931 <literal>any</literal> and
1932 <literal>all</literal>.
1933 </para>
1934 </listitem>
1935 </varlistentry>
1936
1937 <varlistentry>
1938 <term><varname>PrimaryReselectPolicy=</varname></term>
1939 <listitem>
1940 <para>Specifies the reselection policy for the primary slave. This
1941 affects how the primary slave is chosen to become the active slave
1942 when failure of the active slave or recovery of the primary slave
1943 occurs. This option is designed to prevent flip-flopping between
1944 the primary slave and other slaves. Possible values are
1945 <literal>always</literal>,
1946 <literal>better</literal> and
1947 <literal>failure</literal>.
1948 </para>
1949 </listitem>
1950 </varlistentry>
1951
1952 <varlistentry>
1953 <term><varname>ResendIGMP=</varname></term>
1954 <listitem>
1955 <para>Specifies the number of IGMP membership reports to be issued after
1956 a failover event. One membership report is issued immediately after
1957 the failover, subsequent packets are sent in each 200ms interval.
1958 The valid range is 0…255. Defaults to 1. A value of 0
1959 prevents the IGMP membership report from being issued in response
1960 to the failover event.
1961 </para>
1962 </listitem>
1963 </varlistentry>
1964
1965 <varlistentry>
1966 <term><varname>PacketsPerSlave=</varname></term>
1967 <listitem>
1968 <para>Specify the number of packets to transmit through a slave before
1969 moving to the next one. When set to 0, then a slave is chosen at
1970 random. The valid range is 0…65535. Defaults to 1. This option
1971 only has effect when in balance-rr mode.
1972 </para>
1973 </listitem>
1974 </varlistentry>
1975
1976 <varlistentry>
1977 <term><varname>GratuitousARP=</varname></term>
1978 <listitem>
1979 <para>Specify the number of peer notifications (gratuitous ARPs and
1980 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1981 failover event. As soon as the link is up on the new slave,
1982 a peer notification is sent on the bonding device and each
1983 VLAN sub-device. This is repeated at each link monitor interval
1984 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1985 greater than 1. The valid range is 0…255. The default value is 1.
1986 These options affect only the active-backup mode.
1987 </para>
1988 </listitem>
1989 </varlistentry>
1990
1991 <varlistentry>
1992 <term><varname>AllSlavesActive=</varname></term>
1993 <listitem>
1994 <para>Takes a boolean. Specifies that duplicate frames (received on inactive ports)
1995 should be dropped when false, or delivered when true. Normally, bonding will drop
1996 duplicate frames (received on inactive ports), which is desirable for
1997 most users. But there are some times it is nice to allow duplicate
1998 frames to be delivered. The default value is false (drop duplicate frames
1999 received on inactive ports).
2000 </para>
2001 </listitem>
2002 </varlistentry>
2003
2004 <varlistentry>
2005 <term><varname>DynamicTransmitLoadBalancing=</varname></term>
2006 <listitem>
2007 <para>Takes a boolean. Specifies if dynamic shuffling of flows is enabled. Applies only
2008 for balance-tlb mode. Defaults to unset.
2009 </para>
2010 </listitem>
2011 </varlistentry>
2012
2013 <varlistentry>
2014 <term><varname>MinLinks=</varname></term>
2015 <listitem>
2016 <para>Specifies the minimum number of links that must be active before
2017 asserting carrier. The default value is 0.
2018 </para>
2019 </listitem>
2020 </varlistentry>
2021 </variablelist>
2022
2023 <para>For more detail information see
2024 <ulink url="https://docs.kernel.org/networking/bonding.html">
2025 Linux Ethernet Bonding Driver HOWTO</ulink></para>
2026 </refsect1>
2027
2028 <refsect1>
2029 <title>[Xfrm] Section Options</title>
2030
2031 <para>The [Xfrm] section accepts the following
2032 keys:</para>
2033
2034 <variablelist class='network-directives'>
2035 <varlistentry>
2036 <term><varname>InterfaceId=</varname></term>
2037 <listitem>
2038 <para>Sets the ID/key of the xfrm interface which needs to be associated with a SA/policy.
2039 Can be decimal or hexadecimal, valid range is 1-0xffffffff. This is mandatory.</para>
2040 </listitem>
2041 </varlistentry>
2042 <varlistentry>
2043 <term><varname>Independent=</varname></term>
2044 <listitem>
2045 <para>Takes a boolean. If false (the default), the xfrm interface must have an underlying device
2046 which can be used for hardware offloading.</para>
2047 </listitem>
2048 </varlistentry>
2049 </variablelist>
2050
2051 <para>For more detail information see
2052 <ulink url="https://lwn.net/Articles/757391">Virtual XFRM Interfaces</ulink>.</para>
2053 </refsect1>
2054
2055 <refsect1>
2056 <title>[VRF] Section Options</title>
2057 <para>The [VRF] section only applies for
2058 netdevs of kind <literal>vrf</literal> and accepts the
2059 following key:</para>
2060
2061 <variablelist class='network-directives'>
2062 <varlistentry>
2063 <term><varname>Table=</varname></term>
2064 <listitem>
2065 <para>The numeric routing table identifier. This setting is compulsory.</para>
2066 </listitem>
2067 </varlistentry>
2068 </variablelist>
2069 </refsect1>
2070
2071 <refsect1>
2072 <title>[BatmanAdvanced] Section Options</title>
2073
2074 <para>The [BatmanAdvanced] section only applies for netdevs of kind <literal>batadv</literal> and accepts
2075 the following keys:</para>
2076
2077 <variablelist class='network-directives'>
2078 <varlistentry>
2079 <term><varname>GatewayMode=</varname></term>
2080 <listitem>
2081 <para>Takes one of <literal>off</literal>, <literal>server</literal>, or <literal>client</literal>.
2082 A batman-adv node can either run in server mode (sharing its internet
2083 connection with the mesh) or in client mode (searching for the most suitable internet connection
2084 in the mesh) or having the gateway support turned off entirely (which is the default setting).
2085 </para>
2086 </listitem>
2087 </varlistentry>
2088 <varlistentry>
2089 <term><varname>Aggregation=</varname></term>
2090 <listitem>
2091 <para>Takes a boolean value. Enables or disables aggregation of originator messages. Defaults to
2092 true.
2093 </para>
2094 </listitem>
2095 </varlistentry>
2096 <varlistentry>
2097 <term><varname>BridgeLoopAvoidance=</varname></term>
2098 <listitem>
2099 <para>Takes a boolean value. Enables or disables avoidance of loops on bridges. Defaults to true.
2100 </para>
2101 </listitem>
2102 </varlistentry>
2103 <varlistentry>
2104 <term><varname>DistributedArpTable=</varname></term>
2105 <listitem>
2106 <para>Takes a boolean value. Enables or disables the distributed ARP table. Defaults to true.</para>
2107 </listitem>
2108 </varlistentry>
2109 <varlistentry>
2110 <term><varname>Fragmentation=</varname></term>
2111 <listitem>
2112 <para>Takes a boolean value. Enables or disables fragmentation. Defaults to true.</para>
2113 </listitem>
2114 </varlistentry>
2115 <varlistentry>
2116 <term><varname>HopPenalty=</varname></term>
2117 <listitem>
2118 <para>The hop penalty setting allows one to modify
2119 <citerefentry project='mankier'><refentrytitle>batctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
2120 preference for multihop routes vs. short routes. This integer value is applied to the
2121 TQ (Transmit Quality) of each forwarded OGM (Originator Message), thereby propagating the
2122 cost of an extra hop (the packet has to be received and retransmitted which costs airtime).
2123 A higher hop penalty will make it more unlikely that other nodes will choose this node as
2124 intermediate hop towards any given destination. The default hop penalty of '15' is a reasonable
2125 value for most setups and probably does not need to be changed. However, mobile nodes could
2126 choose a value of 255 (maximum value) to avoid being chosen as a router by other nodes.
2127 The minimum value is 0.
2128 </para>
2129 </listitem>
2130 </varlistentry>
2131 <varlistentry>
2132 <term><varname>OriginatorIntervalSec=</varname></term>
2133 <listitem>
2134 <para>The value specifies the interval in seconds, unless another time unit is specified in which
2135 batman-adv floods the network with its protocol information.
2136 See <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>
2137 for more information.</para>
2138 </listitem>
2139 </varlistentry>
2140 <varlistentry>
2141 <term><varname>GatewayBandwidthDown=</varname></term>
2142 <listitem>
2143 <para>If the node is a server, this
2144 parameter is used to inform other nodes in the network about
2145 this node's internet connection download bandwidth in bits per second. Just enter any number
2146 suffixed with K, M, G or T (base 1000) and the batman-adv
2147 module will propagate the entered value in the mesh.</para>
2148 </listitem>
2149 </varlistentry>
2150 <varlistentry>
2151 <term><varname>GatewayBandwidthUp=</varname></term>
2152 <listitem>
2153 <para>If the node is a server, this
2154 parameter is used to inform other nodes in the network about
2155 this node's internet connection upload bandwidth in bits per second. Just enter any number
2156 suffixed with K, M, G or T (base 1000) and the batman-adv
2157 module will propagate the entered value in the mesh.</para>
2158 </listitem>
2159 </varlistentry>
2160 <varlistentry>
2161 <term><varname>RoutingAlgorithm=</varname></term>
2162 <listitem>
2163 <para>This can be either <literal>batman-v</literal> or <literal>batman-iv</literal> and describes which routing_algo
2164 of <citerefentry project='mankier'><refentrytitle>batctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> to use. The algorithm
2165 cannot be changed after interface creation. Defaults to <literal>batman-v</literal>.
2166 </para>
2167 </listitem>
2168 </varlistentry>
2169 </variablelist>
2170 </refsect1>
2171
2172 <refsect1>
2173 <title>[IPoIB] Section Options</title>
2174 <para>The [IPoIB] section only applies for netdevs of kind <literal>ipoib</literal> and accepts the
2175 following keys:</para>
2176
2177 <variablelist class='network-directives'>
2178 <varlistentry>
2179 <term><varname>PartitionKey=</varname></term>
2180 <listitem>
2181 <para>Takes an integer in the range 1…0xffff, except for 0x8000. Defaults to unset, and the
2182 kernel's default is used.</para>
2183 </listitem>
2184 </varlistentry>
2185
2186 <varlistentry id='ipoib_mode'>
2187 <term><varname>Mode=</varname></term>
2188 <listitem>
2189 <para>Takes one of the special values <literal>datagram</literal> or
2190 <literal>connected</literal>. Defaults to unset, and the kernel's default is used.</para>
2191
2192 <para>When <literal>datagram</literal>, the Infiniband unreliable datagram (UD) transport is
2193 used, and so the interface MTU is equal to the IB L2 MTU minus the IPoIB encapsulation
2194 header (4 bytes). For example, in a typical IB fabric with a 2K MTU, the IPoIB MTU will be
2195 2048 - 4 = 2044 bytes.</para>
2196
2197 <para>When <literal>connected</literal>, the Infiniband reliable connected (RC) transport is
2198 used. Connected mode takes advantage of the connected nature of the IB transport and allows
2199 an MTU up to the maximal IP packet size of 64K, which reduces the number of IP packets needed
2200 for handling large UDP datagrams, TCP segments, etc and increases the performance for large
2201 messages.</para>
2202 </listitem>
2203 </varlistentry>
2204
2205 <varlistentry id='ipoib_umcast'>
2206 <term><varname>IgnoreUserspaceMulticastGroup=</varname></term>
2207 <listitem>
2208 <para>Takes an boolean value. When true, the kernel ignores multicast groups handled by
2209 userspace. Defaults to unset, and the kernel's default is used.</para>
2210 </listitem>
2211 </varlistentry>
2212 </variablelist>
2213 </refsect1>
2214
2215 <refsect1>
2216 <title>[WLAN] Section Options</title>
2217 <para>The [WLAN] section only applies to WLAN interfaces, and accepts the following keys:</para>
2218
2219 <variablelist class='network-directives'>
2220 <varlistentry>
2221 <term><varname>PhysicalDevice=</varname></term>
2222 <listitem>
2223 <para>Specifies the name or index of the physical WLAN device (e.g. <literal>0</literal> or
2224 <literal>phy0</literal>). The list of the physical WLAN devices that exist os the host can be
2225 obtained by <command>iw phy</command> command. This option is mandatory.</para>
2226 </listitem>
2227 </varlistentry>
2228
2229 <varlistentry>
2230 <term><varname>Type=</varname></term>
2231 <listitem>
2232 <para>Specifies the type of the interface. Takes one of the <literal>ad-hoc</literal>,
2233 <literal>station</literal>, <literal>ap</literal>, <literal>ap-vlan</literal>,
2234 <literal>wds</literal>, <literal>monitor</literal>, <literal>mesh-point</literal>,
2235 <literal>p2p-client</literal>, <literal>p2p-go</literal>, <literal>p2p-device</literal>,
2236 <literal>ocb</literal>, and <literal>nan</literal>. This option is mandatory.</para>
2237 </listitem>
2238 </varlistentry>
2239
2240 <varlistentry>
2241 <term><varname>WDS=</varname></term>
2242 <listitem>
2243 <para>Enables the Wireless Distribution System (WDS) mode on the interface. The mode is also
2244 known as the <literal>4 address mode</literal>. Takes a boolean value. Defaults to unset, and
2245 the kernel's default will be used.</para>
2246 </listitem>
2247 </varlistentry>
2248 </variablelist>
2249 </refsect1>
2250
2251 <refsect1>
2252 <title>Examples</title>
2253 <example>
2254 <title>/etc/systemd/network/25-bridge.netdev</title>
2255
2256 <programlisting>[NetDev]
2257 Name=bridge0
2258 Kind=bridge</programlisting>
2259 </example>
2260
2261 <example>
2262 <title>/etc/systemd/network/25-vlan1.netdev</title>
2263
2264 <programlisting>[Match]
2265 Virtualization=no
2266
2267 [NetDev]
2268 Name=vlan1
2269 Kind=vlan
2270
2271 [VLAN]
2272 Id=1</programlisting>
2273 </example>
2274 <example>
2275 <title>/etc/systemd/network/25-ipip.netdev</title>
2276 <programlisting>[NetDev]
2277 Name=ipip-tun
2278 Kind=ipip
2279 MTUBytes=1480
2280
2281 [Tunnel]
2282 Local=192.168.223.238
2283 Remote=192.169.224.239
2284 TTL=64</programlisting>
2285 </example>
2286 <example>
2287 <title>/etc/systemd/network/1-fou-tunnel.netdev</title>
2288 <programlisting>[NetDev]
2289 Name=fou-tun
2290 Kind=fou
2291
2292 [FooOverUDP]
2293 Port=5555
2294 Protocol=4
2295 </programlisting>
2296 </example>
2297 <example>
2298 <title>/etc/systemd/network/25-fou-ipip.netdev</title>
2299 <programlisting>[NetDev]
2300 Name=ipip-tun
2301 Kind=ipip
2302
2303 [Tunnel]
2304 Independent=yes
2305 Local=10.65.208.212
2306 Remote=10.65.208.211
2307 FooOverUDP=yes
2308 FOUDestinationPort=5555
2309 </programlisting>
2310 </example>
2311 <example>
2312 <title>/etc/systemd/network/25-tap.netdev</title>
2313 <programlisting>[NetDev]
2314 Name=tap-test
2315 Kind=tap
2316
2317 [Tap]
2318 MultiQueue=yes
2319 PacketInfo=yes</programlisting> </example>
2320
2321 <example>
2322 <title>/etc/systemd/network/25-sit.netdev</title>
2323 <programlisting>[NetDev]
2324 Name=sit-tun
2325 Kind=sit
2326 MTUBytes=1480
2327
2328 [Tunnel]
2329 Local=10.65.223.238
2330 Remote=10.65.223.239</programlisting>
2331 </example>
2332
2333 <example>
2334 <title>/etc/systemd/network/25-6rd.netdev</title>
2335 <programlisting>[NetDev]
2336 Name=6rd-tun
2337 Kind=sit
2338 MTUBytes=1480
2339
2340 [Tunnel]
2341 Local=10.65.223.238
2342 IPv6RapidDeploymentPrefix=2602::/24</programlisting>
2343 </example>
2344
2345 <example>
2346 <title>/etc/systemd/network/25-gre.netdev</title>
2347 <programlisting>[NetDev]
2348 Name=gre-tun
2349 Kind=gre
2350 MTUBytes=1480
2351
2352 [Tunnel]
2353 Local=10.65.223.238
2354 Remote=10.65.223.239</programlisting>
2355 </example>
2356
2357 <example>
2358 <title>/etc/systemd/network/25-ip6gre.netdev</title>
2359 <programlisting>[NetDev]
2360 Name=ip6gre-tun
2361 Kind=ip6gre
2362
2363 [Tunnel]
2364 Key=123</programlisting>
2365 </example>
2366
2367 <example>
2368 <title>/etc/systemd/network/25-vti.netdev</title>
2369
2370 <programlisting>[NetDev]
2371 Name=vti-tun
2372 Kind=vti
2373 MTUBytes=1480
2374
2375 [Tunnel]
2376 Local=10.65.223.238
2377 Remote=10.65.223.239</programlisting>
2378 </example>
2379
2380 <example>
2381 <title>/etc/systemd/network/25-veth.netdev</title>
2382 <programlisting>[NetDev]
2383 Name=veth-test
2384 Kind=veth
2385
2386 [Peer]
2387 Name=veth-peer</programlisting>
2388 </example>
2389
2390 <example>
2391 <title>/etc/systemd/network/25-bond.netdev</title>
2392 <programlisting>[NetDev]
2393 Name=bond1
2394 Kind=bond
2395
2396 [Bond]
2397 Mode=802.3ad
2398 TransmitHashPolicy=layer3+4
2399 MIIMonitorSec=1s
2400 LACPTransmitRate=fast
2401 </programlisting>
2402 </example>
2403
2404 <example>
2405 <title>/etc/systemd/network/25-dummy.netdev</title>
2406 <programlisting>[NetDev]
2407 Name=dummy-test
2408 Kind=dummy
2409 MACAddress=12:34:56:78:9a:bc</programlisting>
2410 </example>
2411 <example>
2412 <title>/etc/systemd/network/25-vrf.netdev</title>
2413 <para>Create a VRF interface with table 42.</para>
2414 <programlisting>[NetDev]
2415 Name=vrf-test
2416 Kind=vrf
2417
2418 [VRF]
2419 Table=42</programlisting>
2420 </example>
2421
2422 <example>
2423 <title>/etc/systemd/network/25-macvtap.netdev</title>
2424 <para>Create a MacVTap device.</para>
2425 <programlisting>[NetDev]
2426 Name=macvtap-test
2427 Kind=macvtap
2428 </programlisting>
2429 </example>
2430 <example>
2431 <title>/etc/systemd/network/25-wireguard.netdev</title>
2432 <programlisting>[NetDev]
2433 Name=wg0
2434 Kind=wireguard
2435
2436 [WireGuard]
2437 PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
2438 ListenPort=51820
2439
2440 [WireGuardPeer]
2441 PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
2442 AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24
2443 Endpoint=wireguard.example.com:51820</programlisting>
2444 </example>
2445
2446 <example>
2447 <title>/etc/systemd/network/27-xfrm.netdev</title>
2448 <programlisting>[NetDev]
2449 Name=xfrm0
2450 Kind=xfrm
2451
2452 [Xfrm]
2453 Independent=yes</programlisting>
2454 </example>
2455 </refsect1>
2456
2457 <refsect1>
2458 <title>See Also</title>
2459 <para>
2460 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2461 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
2462 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2463 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2464 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
2465 </para>
2466 </refsect1>
2467
2468 </refentry>