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