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 -->
6 <refentry id=
"systemd.netdev" conditional='ENABLE_NETWORKD'
>
9 <title>systemd.network
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>systemd.netdev
</refentrytitle>
15 <manvolnum>5</manvolnum>
19 <refname>systemd.netdev
</refname>
20 <refpurpose>Virtual Network Device configuration
</refpurpose>
24 <para><filename><replaceable>netdev
</replaceable>.netdev
</filename></para>
28 <title>Description
</title>
30 <para>A plain ini-style text file that encodes configuration about a virtual network device, used by
31 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
32 See
<citerefentry><refentrytitle>systemd.syntax
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
33 for a general description of the syntax.
</para>
35 <para>The main Virtual Network Device file must have the extension
<filename>.netdev
</filename>;
36 other extensions are ignored. Virtual network devices are created as soon as networkd is
37 started. If a netdev with the specified name already exists, networkd will use that as-is rather
38 than create its own. Note that the settings of the pre-existing netdev will not be changed by
41 <para>The
<filename>.netdev
</filename> files are read from the files located in the system
42 network directory
<filename>/usr/lib/systemd/network
</filename>, the volatile runtime network
43 directory
<filename>/run/systemd/network
</filename> and the local administration network
44 directory
<filename>/etc/systemd/network
</filename>. All configuration files are collectively
45 sorted and processed in lexical order, regardless of the directories in which they live.
46 However, files with identical filenames replace each other. Files in
<filename>/etc/
</filename>
47 have the highest priority, files in
<filename>/run/
</filename> take precedence over files with
48 the same name in
<filename>/usr/lib/
</filename>. This can be used to override a system-supplied
49 configuration file with a local file if needed. As a special case, an empty file (file size
0)
50 or symlink with the same name pointing to
<filename>/dev/null
</filename> disables the
51 configuration file entirely (it is
"masked").
</para>
53 <para>Along with the netdev file
<filename>foo.netdev
</filename>, a
"drop-in" directory
54 <filename>foo.netdev.d/
</filename> may exist. All files with the suffix
<literal>.conf
</literal>
55 from this directory will be parsed after the file itself is parsed. This is useful to alter or
56 add configuration settings, without having to modify the main configuration file. Each drop-in
57 file must have appropriate section headers.
</para>
59 <para>In addition to
<filename>/etc/systemd/network
</filename>, drop-in
<literal>.d
</literal>
60 directories can be placed in
<filename>/usr/lib/systemd/network
</filename> or
61 <filename>/run/systemd/network
</filename> directories. Drop-in files in
62 <filename>/etc/
</filename> take precedence over those in
<filename>/run/
</filename> which in turn
63 take precedence over those in
<filename>/usr/lib/
</filename>. Drop-in files under any of these
64 directories take precedence over the main netdev file wherever located. (Of course, since
65 <filename>/run/
</filename> is temporary and
<filename>/usr/lib/
</filename> is for vendors, it is
66 unlikely drop-ins should be used in either of those places.)
</para>
70 <title>Supported netdev kinds
</title>
72 <para>The following kinds of virtual network devices may be
73 configured in
<filename>.netdev
</filename> files:
</para>
76 <title>Supported kinds of virtual network devices
</title>
79 <colspec colname='kind'
/>
80 <colspec colname='explanation'
/>
83 <entry>Description
</entry>
86 <row><entry><varname>bond
</varname></entry>
87 <entry>A bond device is an aggregation of all its slave devices. See
<ulink url=
"https://www.kernel.org/doc/Documentation/networking/bonding.txt">Linux Ethernet Bonding Driver HOWTO
</ulink> for details.
</entry></row>
89 <row><entry><varname>bridge
</varname></entry>
90 <entry>A bridge device is a software switch, and each of its slave devices and the bridge itself are ports of the switch.
</entry></row>
92 <row><entry><varname>dummy
</varname></entry>
93 <entry>A dummy device drops all packets sent to it.
</entry></row>
95 <row><entry><varname>gre
</varname></entry>
96 <entry>A Level
3 GRE tunnel over IPv4. See
<ulink url=
"https://tools.ietf.org/html/rfc2784">RFC
2784</ulink> for details.
</entry></row>
98 <row><entry><varname>gretap
</varname></entry>
99 <entry>A Level
2 GRE tunnel over IPv4.
</entry></row>
101 <row><entry><varname>erspan
</varname></entry>
102 <entry>ERSPAN mirrors traffic on one or more source ports and delivers the mirrored traffic to one or more destination ports on another switch. The traffic is encapsulated in generic routing encapsulation (GRE) and is therefore routable across a layer
3 network between the source switch and the destination switch.
</entry></row>
104 <row><entry><varname>ip6gre
</varname></entry>
105 <entry>A Level
3 GRE tunnel over IPv6.
</entry></row>
107 <row><entry><varname>ip6tnl
</varname></entry>
108 <entry>An IPv4 or IPv6 tunnel over IPv6
</entry></row>
110 <row><entry><varname>ip6gretap
</varname></entry>
111 <entry>A Level
2 GRE tunnel over IPv6.
</entry></row>
113 <row><entry><varname>ipip
</varname></entry>
114 <entry>An IPv4 over IPv4 tunnel.
</entry></row>
116 <row><entry><varname>ipvlan
</varname></entry>
117 <entry>An IPVLAN device is a stacked device which receives packets from its underlying device based on IP address filtering.
</entry></row>
119 <row><entry><varname>ipvtap
</varname></entry>
120 <entry>An IPVTAP device is a stacked device which receives packets from its underlying device based on IP address filtering and can be accessed using the tap user space interface.
</entry></row>
122 <row><entry><varname>macvlan
</varname></entry>
123 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
125 <row><entry><varname>macvtap
</varname></entry>
126 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
128 <row><entry><varname>sit
</varname></entry>
129 <entry>An IPv6 over IPv4 tunnel.
</entry></row>
131 <row><entry><varname>tap
</varname></entry>
132 <entry>A persistent Level
2 tunnel between a network device and a device node.
</entry></row>
134 <row><entry><varname>tun
</varname></entry>
135 <entry>A persistent Level
3 tunnel between a network device and a device node.
</entry></row>
137 <row><entry><varname>veth
</varname></entry>
138 <entry>An Ethernet tunnel between a pair of network devices.
</entry></row>
140 <row><entry><varname>vlan
</varname></entry>
141 <entry>A VLAN is a stacked device which receives packets from its underlying device based on VLAN tagging. See
<ulink url=
"http://www.ieee802.org/1/pages/802.1Q.html">IEEE
802.1Q
</ulink> for details.
</entry></row>
143 <row><entry><varname>vti
</varname></entry>
144 <entry>An IPv4 over IPSec tunnel.
</entry></row>
146 <row><entry><varname>vti6
</varname></entry>
147 <entry>An IPv6 over IPSec tunnel.
</entry></row>
149 <row><entry><varname>vxlan
</varname></entry>
150 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.
</entry></row>
152 <row><entry><varname>geneve
</varname></entry>
153 <entry>A GEneric NEtwork Virtualization Encapsulation (GENEVE) netdev driver.
</entry></row>
155 <row><entry><varname>l2tp
</varname></entry>
156 <entry>A Layer
2 Tunneling Protocol (L2TP) is a tunneling protocol used to support virtual private networks (VPNs) or as part of the delivery of services by ISPs. It does not provide any encryption or confidentiality by itself
</entry></row>
158 <row><entry><varname>macsec
</varname></entry>
159 <entry>Media Access Control Security (MACsec) is an
802.1AE IEEE industry-standard security technology that provides secure communication for all traffic on Ethernet links. MACsec provides point-to-point security on Ethernet links between directly connected nodes and is capable of identifying and preventing most security threats.
</entry></row>
161 <row><entry><varname>vrf
</varname></entry>
162 <entry>A Virtual Routing and Forwarding (
<ulink url=
"https://www.kernel.org/doc/Documentation/networking/vrf.txt">VRF
</ulink>) interface to create separate routing and forwarding domains.
</entry></row>
164 <row><entry><varname>vcan
</varname></entry>
165 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.
</entry></row>
167 <row><entry><varname>vxcan
</varname></entry>
168 <entry>The virtual CAN tunnel driver (vxcan). Similar to the virtual ethernet driver veth, vxcan implements a local CAN traffic tunnel between two virtual CAN network devices. When creating a vxcan, two vxcan devices are created as pair. When one end receives the packet it appears on its pair and vice versa. The vxcan can be used for cross namespace communication.
171 <row><entry><varname>wireguard
</varname></entry>
172 <entry>WireGuard Secure Network Tunnel.
</entry></row>
174 <row><entry><varname>nlmon
</varname></entry>
175 <entry>A Netlink monitor device. Use an nlmon device when you want to monitor system Netlink messages.
</entry></row>
177 <row><entry><varname>fou
</varname></entry>
178 <entry>Foo-over-UDP tunneling.
</entry></row>
180 <row><entry><varname>xfrm
</varname></entry>
181 <entry>A virtual tunnel interface like vti/vti6 but with several advantages.
</entry></row>
183 <row><entry><varname>ifb
</varname></entry>
184 <entry> The Intermediate Functional Block (ifb) pseudo network interface acts as a QoS concentrator for multiple different sources of traffic.
</entry></row>
186 <row><entry><varname>bareudp
</varname></entry>
187 <entry> Bare UDP tunnels provide a generic L3 encapsulation support for tunnelling different L3 protocols like MPLS, IP etc. inside of an UDP tunnel.
</entry></row>
195 <title>[Match] Section Options
</title>
197 <para>A virtual network device is only created if the
198 [Match] section matches the current
199 environment, or if the section is empty. The following keys are
202 <variablelist class='network-directives'
>
204 <term><varname>Host=
</varname></term>
206 <para>Matches against the hostname or machine ID of the host. See
207 <literal>ConditionHost=
</literal> in
208 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
209 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
210 If an empty string is assigned, then previously assigned value is cleared.
215 <term><varname>Virtualization=
</varname></term>
217 <para>Checks whether the system is executed in a virtualized environment and optionally test
218 whether it is a specific implementation. See
<literal>ConditionVirtualization=
</literal> in
219 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
220 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
221 If an empty string is assigned, then previously assigned value is cleared.
226 <term><varname>KernelCommandLine=
</varname></term>
228 <para>Checks whether a specific kernel command line option is set. See
229 <literal>ConditionKernelCommandLine=
</literal> in
230 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
231 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
232 If an empty string is assigned, then previously assigned value is cleared.
237 <term><varname>KernelVersion=
</varname></term>
239 <para>Checks whether the kernel version (as reported by
<command>uname -r
</command>) matches a
240 certain expression. See
<literal>ConditionKernelVersion=
</literal> in
241 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
242 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
243 If an empty string is assigned, then previously assigned value is cleared.
248 <term><varname>Architecture=
</varname></term>
250 <para>Checks whether the system is running on a specific architecture. See
251 <literal>ConditionArchitecture=
</literal> in
252 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
253 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
254 If an empty string is assigned, then previously assigned value is cleared.
262 <title>[NetDev] Section Options
</title>
264 <para>The [NetDev] section accepts the
265 following keys:
</para>
267 <variablelist class='network-directives'
>
269 <term><varname>Description=
</varname></term>
271 <para>A free-form description of the netdev.
</para>
275 <term><varname>Name=
</varname></term>
277 <para>The interface name used when creating the netdev.
278 This setting is compulsory.
</para>
282 <term><varname>Kind=
</varname></term>
284 <para>The netdev kind. This setting is compulsory. See the
285 <literal>Supported netdev kinds
</literal> section for the
290 <term><varname>MTUBytes=
</varname></term>
292 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M, G
293 are supported and are understood to the base of
1024. For
<literal>tun
</literal> or
294 <literal>tap
</literal> devices,
<varname>MTUBytes=
</varname> setting is not currently supported in
295 [NetDev] section. Please specify it in [Link] section of
297 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
302 <term><varname>MACAddress=
</varname></term>
304 <para>The MAC address to use for the device. For
<literal>tun
</literal> or
<literal>tap
</literal>
305 devices, setting
<varname>MACAddress=
</varname> in the [NetDev] section is not
306 supported. Please specify it in [Link] section of the corresponding
307 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
308 file. If this option is not set,
<literal>vlan
</literal> devices inherit the MAC address of the
309 physical interface. For other kind of netdevs, if this option is not set, then MAC address is
310 generated based on the interface name and the
311 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
319 <title>[Bridge] Section Options
</title>
321 <para>The [Bridge] section only applies for
322 netdevs of kind
<literal>bridge
</literal>, and accepts the
323 following keys:
</para>
325 <variablelist class='network-directives'
>
327 <term><varname>HelloTimeSec=
</varname></term>
329 <para>HelloTimeSec specifies the number of seconds between two hello packets
330 sent out by the root bridge and the designated bridges. Hello packets are
331 used to communicate information about the topology throughout the entire
332 bridged local area network.
</para>
336 <term><varname>MaxAgeSec=
</varname></term>
338 <para>MaxAgeSec specifies the number of seconds of maximum message age.
339 If the last seen (received) hello packet is more than this number of
340 seconds old, the bridge in question will start the takeover procedure
341 in attempt to become the Root Bridge itself.
</para>
345 <term><varname>ForwardDelaySec=
</varname></term>
347 <para>ForwardDelaySec specifies the number of seconds spent in each
348 of the Listening and Learning states before the Forwarding state is entered.
</para>
352 <term><varname>AgeingTimeSec=
</varname></term>
354 <para>This specifies the number of seconds a MAC Address will be kept in
355 the forwarding database after having a packet received from this MAC Address.
</para>
359 <term><varname>Priority=
</varname></term>
361 <para>The priority of the bridge. An integer between
0 and
65535. A lower value
362 means higher priority. The bridge having the lowest priority will be elected as root bridge.
</para>
366 <term><varname>GroupForwardMask=
</varname></term>
368 <para>A
16-bit bitmask represented as an integer which allows forwarding of link
369 local frames with
802.1D reserved addresses (
01:
80:C2:
00:
00:
0X). A logical AND
370 is performed between the specified bitmask and the exponentiation of
2^X, the
371 lower nibble of the last octet of the MAC address. For example, a value of
8
372 would allow forwarding of frames addressed to
01:
80:C2:
00:
00:
03 (
802.1X PAE).
</para>
376 <term><varname>DefaultPVID=
</varname></term>
378 <para>This specifies the default port VLAN ID of a newly attached bridge port.
379 Set this to an integer in the range
1–
4094 or
<literal>none
</literal> to disable the PVID.
</para>
383 <term><varname>MulticastQuerier=
</varname></term>
385 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
386 If enabled, the kernel will send general ICMP queries from a zero source address.
387 This feature should allow faster convergence on startup, but it causes some
388 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
389 When unset, the kernel's default will be used.
394 <term><varname>MulticastSnooping=
</varname></term>
396 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
397 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
398 between hosts and multicast routers. When unset, the kernel's default will be used.
403 <term><varname>VLANFiltering=
</varname></term>
405 <para>Takes a boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
406 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's default will be used.
411 <term><varname>VLANProtocol=
</varname></term>
413 <para>Allows setting the protocol used for VLAN filtering. Takes
414 <option>802.1q
</option> or,
415 <option>802.1ad
</option>, and defaults to unset and kernel's default is used.
420 <term><varname>STP=
</varname></term>
422 <para>Takes a boolean. This enables the bridge's Spanning Tree Protocol (STP).
423 When unset, the kernel's default will be used.
428 <term><varname>MulticastIGMPVersion=
</varname></term>
430 <para>Allows changing bridge's multicast Internet Group Management Protocol (IGMP) version.
431 Takes an integer
2 or
3. When unset, the kernel's default will be used.
439 <title>[VLAN] Section Options
</title>
441 <para>The [VLAN] section only applies for
442 netdevs of kind
<literal>vlan
</literal>, and accepts the
443 following key:
</para>
445 <variablelist class='network-directives'
>
447 <term><varname>Id=
</varname></term>
449 <para>The VLAN ID to use. An integer in the range
0–
4094.
450 This setting is compulsory.
</para>
454 <term><varname>GVRP=
</varname></term>
456 <para>Takes a boolean. The Generic VLAN Registration Protocol (GVRP) is a protocol that
457 allows automatic learning of VLANs on a network.
458 When unset, the kernel's default will be used.
463 <term><varname>MVRP=
</varname></term>
465 <para>Takes a boolean. Multiple VLAN Registration Protocol (MVRP) formerly known as GARP VLAN
466 Registration Protocol (GVRP) is a standards-based Layer
2 network protocol,
467 for automatic configuration of VLAN information on switches. It was defined
468 in the
802.1ak amendment to
802.1Q-
2005. When unset, the kernel's default will be used.
473 <term><varname>LooseBinding=
</varname></term>
475 <para>Takes a boolean. The VLAN loose binding mode, in which only the operational state is passed
476 from the parent to the associated VLANs, but the VLAN device state is not changed.
477 When unset, the kernel's default will be used.
</para>
481 <term><varname>ReorderHeader=
</varname></term>
483 <para>Takes a boolean. When enabled, the VLAN reorder header is used and VLAN interfaces behave
484 like physical interfaces. When unset, the kernel's default will be used.
</para>
491 <title>[MACVLAN] Section Options
</title>
493 <para>The [MACVLAN] section only applies for
494 netdevs of kind
<literal>macvlan
</literal>, and accepts the
495 following key:
</para>
497 <variablelist class='network-directives'
>
499 <term><varname>Mode=
</varname></term>
501 <para>The MACVLAN mode to use. The supported options are
502 <literal>private
</literal>,
503 <literal>vepa
</literal>,
504 <literal>bridge
</literal>,
505 <literal>passthru
</literal>, and
506 <literal>source
</literal>.
511 <term><varname>SourceMACAddress=
</varname></term>
513 <para>A whitespace-separated list of remote hardware addresses allowed on the MACVLAN. This
514 option only has an effect in source mode. Use full colon-, hyphen- or dot-delimited
515 hexadecimal. This option may appear more than once, in which case the lists are merged. If
516 the empty string is assigned to this option, the list of hardware addresses defined prior
517 to this is reset. Defaults to unset.
</para>
524 <title>[MACVTAP] Section Options
</title>
526 <para>The [MACVTAP] section applies for netdevs of kind
<literal>macvtap
</literal> and accepts the same
527 keys as [MACVLAN].
</para>
531 <title>[IPVLAN] Section Options
</title>
533 <para>The [IPVLAN] section only applies for
534 netdevs of kind
<literal>ipvlan
</literal>, and accepts the
535 following key:
</para>
537 <variablelist class='network-directives'
>
539 <term><varname>Mode=
</varname></term>
541 <para>The IPVLAN mode to use. The supported options are
542 <literal>L2
</literal>,
<literal>L3
</literal> and
<literal>L3S
</literal>.
547 <term><varname>Flags=
</varname></term>
549 <para>The IPVLAN flags to use. The supported options are
550 <literal>bridge
</literal>,
<literal>private
</literal> and
<literal>vepa
</literal>.
558 <title>[IPVTAP] Section Options
</title>
560 <para>The [IPVTAP] section only applies for netdevs of kind
<literal>ipvtap
</literal> and accepts the
561 same keys as [IPVLAN].
</para>
565 <title>[VXLAN] Section Options
</title>
567 <para>The [VXLAN] section only applies for
568 netdevs of kind
<literal>vxlan
</literal>, and accepts the
569 following keys:
</para>
571 <variablelist class='network-directives'
>
573 <term><varname>VNI=
</varname></term>
575 <para>The VXLAN Network Identifier (or VXLAN Segment ID). Takes a number in the range
1-
16777215.
</para>
579 <term><varname>Remote=
</varname></term>
581 <para>Configures destination IP address.
</para>
585 <term><varname>Local=
</varname></term>
587 <para>Configures local IP address.
</para>
591 <term><varname>Group=
</varname></term>
593 <para>Configures VXLAN multicast group IP address. All members of a VXLAN must use the same
594 multicast group address.
</para>
598 <term><varname>TOS=
</varname></term>
600 <para>The Type Of Service byte value for a vxlan interface.
</para>
604 <term><varname>TTL=
</varname></term>
606 <para>A fixed Time To Live N on Virtual eXtensible Local Area Network packets.
607 Takes
<literal>inherit
</literal> or a number in the range
0–
255.
0 is a special
608 value meaning inherit the inner protocol's TTL value.
<literal>inherit
</literal>
609 means that it will inherit the outer protocol's TTL value.
</para>
613 <term><varname>MacLearning=
</varname></term>
615 <para>Takes a boolean. When true, enables dynamic MAC learning
616 to discover remote MAC addresses.
</para>
620 <term><varname>FDBAgeingSec=
</varname></term>
622 <para>The lifetime of Forwarding Database entry learnt by
623 the kernel, in seconds.
</para>
627 <term><varname>MaximumFDBEntries=
</varname></term>
629 <para>Configures maximum number of FDB entries.
</para>
633 <term><varname>ReduceARPProxy=
</varname></term>
635 <para>Takes a boolean. When true, bridge-connected VXLAN tunnel
636 endpoint answers ARP requests from the local bridge on behalf
637 of remote Distributed Overlay Virtual Ethernet
638 <ulink url=
"https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
639 (DVOE)
</ulink> clients. Defaults to false.
</para>
643 <term><varname>L2MissNotification=
</varname></term>
645 <para>Takes a boolean. When true, enables netlink LLADDR miss
646 notifications.
</para>
650 <term><varname>L3MissNotification=
</varname></term>
652 <para>Takes a boolean. When true, enables netlink IP address miss notifications.
</para>
656 <term><varname>RouteShortCircuit=
</varname></term>
658 <para>Takes a boolean. When true, route short circuiting is turned
663 <term><varname>UDPChecksum=
</varname></term>
665 <para>Takes a boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.
</para>
669 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
671 <para>Takes a boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.
</para>
675 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
677 <para>Takes a boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.
</para>
681 <term><varname>RemoteChecksumTx=
</varname></term>
683 <para>Takes a boolean. When true, remote transmit checksum offload of VXLAN is turned on.
</para>
687 <term><varname>RemoteChecksumRx=
</varname></term>
689 <para>Takes a boolean. When true, remote receive checksum offload in VXLAN is turned on.
</para>
693 <term><varname>GroupPolicyExtension=
</varname></term>
695 <para>Takes a boolean. When true, it enables Group Policy VXLAN extension security label mechanism
696 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
697 <ulink url=
"https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
698 VXLAN Group Policy
</ulink> document. Defaults to false.
</para>
702 <term><varname>GenericProtocolExtension=
</varname></term>
704 <para>Takes a boolean. When true, Generic Protocol Extension extends the existing VXLAN protocol
705 to provide protocol typing, OAM, and versioning capabilities. For details about the VXLAN GPE
706 Header, see the
<ulink url=
"https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07">
707 Generic Protocol Extension for VXLAN
</ulink> document. If destination port is not specified and
708 Generic Protocol Extension is set then default port of
4790 is used. Defaults to false.
</para>
712 <term><varname>DestinationPort=
</varname></term>
714 <para>Configures the default destination UDP port. If the destination port is not specified then
715 Linux kernel default will be used. Set to
4789 to get the IANA assigned value.
</para>
719 <term><varname>PortRange=
</varname></term>
721 <para>Configures the source port range for the VXLAN. The kernel assigns the source UDP port based
722 on the flow to help the receiver to do load balancing. When this option is not set, the normal
723 range of local UDP ports is used.
</para>
727 <term><varname>FlowLabel=
</varname></term>
729 <para>Specifies the flow label to use in outgoing packets.
730 The valid range is
0-
1048575.
735 <term><varname>IPDoNotFragment=
</varname></term>
737 <para>Allows setting the IPv4 Do not Fragment (DF) bit in outgoing packets, or to inherit its
738 value from the IPv4 inner header. Takes a boolean value, or
<literal>inherit
</literal>. Set
739 to
<literal>inherit
</literal> if the encapsulated protocol is IPv6. When unset, the kernel's
740 default will be used.
</para>
747 <title>[GENEVE] Section Options
</title>
749 <para>The [GENEVE] section only applies for
750 netdevs of kind
<literal>geneve
</literal>, and accepts the
751 following keys:
</para>
753 <variablelist class='network-directives'
>
755 <term><varname>Id=
</varname></term>
757 <para>Specifies the Virtual Network Identifier (VNI) to use, a number between
0 and
16777215. This
758 field is mandatory.
</para>
762 <term><varname>Remote=
</varname></term>
764 <para>Specifies the unicast destination IP address to use in outgoing packets.
</para>
768 <term><varname>TOS=
</varname></term>
770 <para>Specifies the TOS value to use in outgoing packets. Takes a number between
1 and
255.
</para>
774 <term><varname>TTL=
</varname></term>
776 <para>Accepts the same values as in the [VXLAN] section, except that when unset
777 or set to
0, the kernel's default will be used, meaning that packet TTL will be set from
778 <filename>/proc/sys/net/ipv4/ip_default_ttl
</filename>.
</para>
782 <term><varname>UDPChecksum=
</varname></term>
784 <para>Takes a boolean. When true, specifies that UDP checksum is calculated for transmitted packets
789 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
791 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.
</para>
795 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
797 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.
</para>
801 <term><varname>DestinationPort=
</varname></term>
803 <para>Specifies destination port. Defaults to
6081. If not set or assigned the empty string, the default
804 port of
6081 is used.
</para>
808 <term><varname>FlowLabel=
</varname></term>
810 <para>Specifies the flow label to use in outgoing packets.
</para>
814 <term><varname>IPDoNotFragment=
</varname></term>
816 <para>Accepts the same key as in [VXLAN] section.
</para>
820 <term><varname>Independent=
</varname></term>
822 <para>Takes a boolean. When true, the vxlan interface is created without any underlying network
823 interface. Defaults to false, which means that a .network file that requests this tunnel using
824 <varname>Tunnel=
</varname> is required for the tunnel to be created.
</para>
831 <title>[BareUDP] Section Options
</title>
833 <para>The [BareUDP] section only applies for
834 netdevs of kind
<literal>bareudp
</literal>, and accepts the
835 following keys:
</para>
837 <variablelist class='network-directives'
>
839 <term><varname>DestinationPort=
</varname></term>
841 <para>Specifies the destination UDP port (in range
1…
65535). This is mandatory.
</para>
846 <term><varname>EtherType=
</varname></term>
848 <para>Specifies the L3 protocol. Takes one of
<literal>ipv4
</literal>,
<literal>ipv6
</literal>,
<literal>mpls-uc
</literal>
849 or
<literal>mpls-mc
</literal>. This is mandatory.
</para>
856 <title>[L2TP] Section Options
</title>
858 <para>The [L2TP] section only applies for
859 netdevs of kind
<literal>l2tp
</literal>, and accepts the
860 following keys:
</para>
862 <variablelist class='network-directives'
>
864 <term><varname>TunnelId=
</varname></term>
866 <para>Specifies the tunnel identifier. Takes an number in the range
1–
4294967295. The value used
867 must match the
<literal>PeerTunnelId=
</literal> value being used at the peer. This setting is
872 <term><varname>PeerTunnelId=
</varname></term>
874 <para>Specifies the peer tunnel id. Takes a number in the range
1—
4294967295. The value used must
875 match the
<literal>TunnelId=
</literal> value being used at the peer. This setting is compulsory.
880 <term><varname>Remote=
</varname></term>
882 <para>Specifies the IP address of the remote peer. This setting is compulsory.
</para>
886 <term><varname>Local=
</varname></term>
888 <para>Specifies the IP address of the local interface. Takes an IP address, or the special values
889 <literal>auto
</literal>,
<literal>static
</literal>, or
<literal>dynamic
</literal>. When an address
890 is set, then the local interface must have the address. If
<literal>auto
</literal>, then one of the
891 addresses on the local interface is used. Similarly, if
<literal>static
</literal> or
892 <literal>dynamic
</literal> is set, then one of the static or dynamic addresses on the local
893 interface is used. Defaults to
<literal>auto
</literal>.
</para>
897 <term><varname>EncapsulationType=
</varname></term>
899 <para>Specifies the encapsulation type of the tunnel. Takes one of
<literal>udp
</literal> or
900 <literal>ip
</literal>.
</para>
904 <term><varname>UDPSourcePort=
</varname></term>
906 <para>Specifies the UDP source port to be used for the tunnel. When UDP encapsulation is selected
907 it's mandatory. Ignored when IP encapsulation is selected.
</para>
911 <term><varname>UDPDestinationPort=
</varname></term>
913 <para>Specifies destination port. When UDP encapsulation is selected it's mandatory. Ignored when IP
914 encapsulation is selected.
</para>
918 <term><varname>UDPChecksum=
</varname></term>
920 <para>Takes a boolean. When true, specifies that UDP checksum is calculated for transmitted packets
925 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
927 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.
</para>
931 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
933 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.
</para>
940 <title>[L2TPSession] Section Options
</title>
942 <para>The [L2TPSession] section only applies for
943 netdevs of kind
<literal>l2tp
</literal>, and accepts the
944 following keys:
</para>
945 <variablelist class='network-directives'
>
947 <term><varname>Name=
</varname></term>
949 <para>Specifies the name of the session. This setting is compulsory.
</para>
953 <term><varname>SessionId=
</varname></term>
955 <para>Specifies the session identifier. Takes an number in the range
1–
4294967295. The value used
956 must match the
<literal>SessionId=
</literal> value being used at the peer. This setting is
961 <term><varname>PeerSessionId=
</varname></term>
963 <para>Specifies the peer session identifier. Takes an number in the range
1–
4294967295.
964 The value used must match the
<literal>PeerSessionId=
</literal> value being used at the peer.
965 This setting is compulsory.
</para>
969 <term><varname>Layer2SpecificHeader=
</varname></term>
971 <para>Specifies layer2specific header type of the session. One of
<literal>none
</literal> or
<literal>default
</literal>. Defaults to
<literal>default
</literal>.
</para>
978 <title>[MACsec] Section Options
</title>
980 <para>The [MACsec] section only applies for network devices of kind
981 <literal>macsec
</literal>, and accepts the following keys:
</para>
983 <variablelist class='network-directives'
>
985 <term><varname>Port=
</varname></term>
987 <para>Specifies the port to be used for the MACsec transmit channel. The port is used to make
988 secure channel identifier (SCI). Takes a value between
1 and
65535. Defaults to unset.
993 <term><varname>Encrypt=
</varname></term>
995 <para>Takes a boolean. When true, enable encryption. Defaults to unset.
</para>
1002 <title>[MACsecReceiveChannel] Section Options
</title>
1003 <para>The [MACsecReceiveChannel] section only applies for network devices of
1004 kind
<literal>macsec
</literal>, and accepts the following keys:
</para>
1006 <variablelist class='network-directives'
>
1008 <term><varname>Port=
</varname></term>
1010 <para>Specifies the port to be used for the MACsec receive channel. The port is used to make
1011 secure channel identifier (SCI). Takes a value between
1 and
65535. This option is
1012 compulsory, and is not set by default.
</para>
1016 <term><varname>MACAddress=
</varname></term>
1018 <para>Specifies the MAC address to be used for the MACsec receive channel. The MAC address
1019 used to make secure channel identifier (SCI). This setting is compulsory, and is not set by
1027 <title>[MACsecTransmitAssociation] Section Options
</title>
1029 <para>The [MACsecTransmitAssociation] section only applies for network devices
1030 of kind
<literal>macsec
</literal>, and accepts the following keys:
</para>
1032 <variablelist class='network-directives'
>
1034 <term><varname>PacketNumber=
</varname></term>
1036 <para>Specifies the packet number to be used for replay protection and the construction of
1037 the initialization vector (along with the secure channel identifier [SCI]). Takes a value
1038 between
1-
4,
294,
967,
295. Defaults to unset.
1043 <term><varname>KeyId=
</varname></term>
1045 <para>Specifies the identification for the key. Takes a number between
0-
255. This option
1046 is compulsory, and is not set by default.
</para>
1050 <term><varname>Key=
</varname></term>
1052 <para>Specifies the encryption key used in the transmission channel. The same key must be
1053 configured on the peer’s matching receive channel. This setting is compulsory, and is not set
1054 by default. Takes a
128-bit key encoded in a hexadecimal string, for example
1055 <literal>dffafc8d7b9a43d5b9a3dfbbf6a30c16
</literal>.
</para>
1059 <term><varname>KeyFile=
</varname></term>
1061 <para>Takes a absolute path to a file which contains a
128-bit key encoded in a hexadecimal string,
1062 which will be used in the transmission channel. When this option is specified,
1063 <varname>Key=
</varname> is ignored. Note that the file must be readable by the user
1064 <literal>systemd-network
</literal>, so it should be, e.g., owned by
1065 <literal>root:systemd-network
</literal> with a
<literal>0640</literal> file mode. If the path
1066 refers to an
<constant>AF_UNIX
</constant> stream socket in the file system a connection is made to
1067 it and the key read from it.
</para>
1071 <term><varname>Activate=
</varname></term>
1073 <para>Takes a boolean. If enabled, then the security association is activated. Defaults to
1078 <term><varname>UseForEncoding=
</varname></term>
1080 <para>Takes a boolean. If enabled, then the security association is used for encoding. Only
1081 one [MACsecTransmitAssociation] section can enable this option. When enabled,
1082 <varname>Activate=yes
</varname> is implied. Defaults to unset.
</para>
1089 <title>[MACsecReceiveAssociation] Section Options
</title>
1091 <para>The [MACsecReceiveAssociation] section only applies for
1092 network devices of kind
<literal>macsec
</literal>, and accepts the
1093 following keys:
</para>
1095 <variablelist class='network-directives'
>
1097 <term><varname>Port=
</varname></term>
1099 <para>Accepts the same key as in [MACsecReceiveChannel] section.
</para>
1103 <term><varname>MACAddress=
</varname></term>
1105 <para>Accepts the same key as in [MACsecReceiveChannel] section.
</para>
1109 <term><varname>PacketNumber=
</varname></term>
1111 <para>Accepts the same key as in [MACsecTransmitAssociation] section.
</para>
1115 <term><varname>KeyId=
</varname></term>
1117 <para>Accepts the same key as in [MACsecTransmitAssociation] section.
</para>
1121 <term><varname>Key=
</varname></term>
1123 <para>Accepts the same key as in [MACsecTransmitAssociation] section.
</para>
1127 <term><varname>KeyFile=
</varname></term>
1129 <para>Accepts the same key as in [MACsecTransmitAssociation] section.
</para>
1133 <term><varname>Activate=
</varname></term>
1135 <para>Accepts the same key as in [MACsecTransmitAssociation] section.
</para>
1142 <title>[Tunnel] Section Options
</title>
1144 <para>The [Tunnel] section only applies for
1146 <literal>ipip
</literal>,
1147 <literal>sit
</literal>,
1148 <literal>gre
</literal>,
1149 <literal>gretap
</literal>,
1150 <literal>ip6gre
</literal>,
1151 <literal>ip6gretap
</literal>,
1152 <literal>vti
</literal>,
1153 <literal>vti6
</literal>,
1154 <literal>ip6tnl
</literal>, and
1155 <literal>erspan
</literal> and accepts
1156 the following keys:
</para>
1158 <variablelist class='network-directives'
>
1160 <term><varname>Local=
</varname></term>
1162 <para>A static local address for tunneled packets. It must be an address on another interface of
1163 this host, or the special value
<literal>any
</literal>.
</para>
1167 <term><varname>Remote=
</varname></term>
1169 <para>The remote endpoint of the tunnel. Takes an IP address or the special value
1170 <literal>any
</literal>.
</para>
1174 <term><varname>TOS=
</varname></term>
1176 <para>The Type Of Service byte value for a tunnel interface.
1177 For details about the TOS, see the
1178 <ulink url=
"http://tools.ietf.org/html/rfc1349"> Type of
1179 Service in the Internet Protocol Suite
</ulink> document.
1184 <term><varname>TTL=
</varname></term>
1186 <para>A fixed Time To Live N on tunneled packets. N is a
1187 number in the range
1–
255.
0 is a special value meaning that
1188 packets inherit the TTL value. The default value for IPv4
1189 tunnels is
0 (inherit). The default value for IPv6 tunnels is
1194 <term><varname>DiscoverPathMTU=
</varname></term>
1196 <para>Takes a boolean. When true, enables Path MTU Discovery on
1201 <term><varname>IPv6FlowLabel=
</varname></term>
1203 <para>Configures the
20-bit flow label (see
<ulink url=
"https://tools.ietf.org/html/rfc6437">
1204 RFC
6437</ulink>) field in the IPv6 header (see
<ulink url=
"https://tools.ietf.org/html/rfc2460">
1205 RFC
2460</ulink>), which is used by a node to label packets of a flow.
1206 It is only used for IPv6 tunnels.
1207 A flow label of zero is used to indicate packets that have
1209 It can be configured to a value in the range
0–
0xFFFFF, or be
1210 set to
<literal>inherit
</literal>, in which case the original flowlabel is used.
</para>
1214 <term><varname>CopyDSCP=
</varname></term>
1216 <para>Takes a boolean. When true, the Differentiated Service Code
1217 Point (DSCP) field will be copied to the inner header from
1218 outer header during the decapsulation of an IPv6 tunnel
1219 packet. DSCP is a field in an IP packet that enables different
1220 levels of service to be assigned to network traffic.
1221 Defaults to
<literal>no
</literal>.
1226 <term><varname>EncapsulationLimit=
</varname></term>
1228 <para>The Tunnel Encapsulation Limit option specifies how many additional
1229 levels of encapsulation are permitted to be prepended to the packet.
1230 For example, a Tunnel Encapsulation Limit option containing a limit
1231 value of zero means that a packet carrying that option may not enter
1232 another tunnel before exiting the current tunnel.
1233 (see
<ulink url=
"https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC
2473</ulink>).
1234 The valid range is
0–
255 and
<literal>none
</literal>. Defaults to
4.
1239 <term><varname>Key=
</varname></term>
1241 <para>The
<varname>Key=
</varname> parameter specifies the same key to use in
1242 both directions (
<varname>InputKey=
</varname> and
<varname>OutputKey=
</varname>).
1243 The
<varname>Key=
</varname> is either a number or an IPv4 address-like dotted quad.
1244 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
1245 and control path) in IP XFRM (framework used to implement IPsec protocol).
1246 See
<ulink url=
"http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
1247 ip-xfrm — transform configuration
</ulink> for details. It is only used for VTI/VTI6,
1248 GRE, GRETAP, and ERSPAN tunnels.
</para>
1252 <term><varname>InputKey=
</varname></term>
1254 <para>The
<varname>InputKey=
</varname> parameter specifies the key to use for input.
1255 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1256 and ERSPAN tunnels.
</para>
1260 <term><varname>OutputKey=
</varname></term>
1262 <para>The
<varname>OutputKey=
</varname> parameter specifies the key to use for output.
1263 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1264 and ERSPAN tunnels.
</para>
1268 <term><varname>Mode=
</varname></term>
1270 <para>An
<literal>ip6tnl
</literal> tunnel can be in one of three
1272 <literal>ip6ip6
</literal> for IPv6 over IPv6,
1273 <literal>ipip6
</literal> for IPv4 over IPv6 or
1274 <literal>any
</literal> for either.
1279 <term><varname>Independent=
</varname></term>
1281 <para>Takes a boolean. When false (the default), the tunnel is always created over some network
1282 device, and a .network file that requests this tunnel using
<varname>Tunnel=
</varname> is required
1283 for the tunnel to be created. When true, the tunnel is created independently of any network as
1284 "tunnel@NONE".
</para>
1288 <term><varname>AssignToLoopback=
</varname></term>
1290 <para>Takes a boolean. If set to
<literal>yes
</literal>, the loopback interface
<literal>lo
</literal>
1291 is used as the underlying device of the tunnel interface. Defaults to
<literal>no
</literal>.
</para>
1295 <term><varname>AllowLocalRemote=
</varname></term>
1297 <para>Takes a boolean. When true allows tunnel traffic on
<varname>ip6tnl
</varname> devices where the remote endpoint is a local host address.
1298 When unset, the kernel's default will be used.
1303 <term><varname>FooOverUDP=
</varname></term>
1305 <para>Takes a boolean. Specifies whether
<varname>FooOverUDP=
</varname> tunnel is to be configured.
1306 Defaults to false. This takes effects only for IPIP, SIT, GRE, and GRETAP tunnels.
1307 For more detail information see
1308 <ulink url=
"https://lwn.net/Articles/614348">Foo over UDP
</ulink></para>
1312 <term><varname>FOUDestinationPort=
</varname></term>
1314 <para>This setting specifies the UDP destination port for encapsulation.
1315 This field is mandatory when
<varname>FooOverUDP=yes
</varname>, and is not set by default.
</para>
1319 <term><varname>FOUSourcePort=
</varname></term>
1321 <para>This setting specifies the UDP source port for encapsulation. Defaults to
<constant>0</constant>
1322 — that is, the source port for packets is left to the network stack to decide.
</para>
1326 <term><varname>Encapsulation=
</varname></term>
1328 <para>Accepts the same key as in the [FooOverUDP] section.
</para>
1332 <term><varname>IPv6RapidDeploymentPrefix=
</varname></term>
1334 <para>Reconfigure the tunnel for
<ulink url=
"https://tools.ietf.org/html/rfc5569">IPv6 Rapid
1335 Deployment
</ulink>, also known as
6rd. The value is an ISP-specific IPv6 prefix with a non-zero length. Only
1336 applicable to SIT tunnels.
</para>
1340 <term><varname>ISATAP=
</varname></term>
1342 <para>Takes a boolean. If set, configures the tunnel as Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) tunnel.
1343 Only applicable to SIT tunnels. When unset, the kernel's default will be used.
</para>
1347 <term><varname>SerializeTunneledPackets=
</varname></term>
1349 <para>Takes a boolean. If set to yes, then packets are serialized. Only applies for GRE,
1350 GRETAP, and ERSPAN tunnels. When unset, the kernel's default will be used.
1355 <term><varname>ERSPANIndex=
</varname></term>
1357 <para>Specifies the ERSPAN index field for the interface, an integer in the range
1-
1048575 associated with
1358 the ERSPAN traffic's source port and direction. This field is mandatory.
1366 <title>[FooOverUDP] Section Options
</title>
1368 <para>The [FooOverUDP] section only applies for
1369 netdevs of kind
<literal>fou
</literal> and accepts the
1370 following keys:
</para>
1372 <variablelist class='network-directives'
>
1374 <term><varname>Encapsulation=
</varname></term>
1376 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols
1377 inside the UDP packets. Supports the following values:
1379 <literal>FooOverUDP
</literal> provides the simplest no-frills model of UDP encapsulation, it simply
1380 encapsulates packets directly in the UDP payload.
<literal>GenericUDPEncapsulation
</literal> is a
1381 generic and extensible encapsulation, it allows encapsulation of packets for any IP protocol and
1382 optional data as part of the encapsulation. For more detailed information see
<ulink
1383 url=
"https://lwn.net/Articles/615044">Generic UDP Encapsulation
</ulink>. Defaults to
1384 <literal>FooOverUDP
</literal>.
1389 <term><varname>Port=
</varname></term>
1391 <para>Specifies the port number where the encapsulated packets will arrive. Those packets will be
1392 removed and manually fed back into the network stack with the encapsulation removed to be sent to
1393 the real destination. This option is mandatory.
</para>
1397 <term><varname>PeerPort=
</varname></term>
1399 <para>Specifies the peer port number. Defaults to unset. Note that when peer port is set
1400 <literal>Peer=
</literal> address is mandatory.
</para>
1404 <term><varname>Protocol=
</varname></term>
1406 <para>The
<varname>Protocol=
</varname> specifies the protocol number of the packets arriving
1407 at the UDP port. When
<varname>Encapsulation=FooOverUDP
</varname>, this field is mandatory
1408 and is not set by default. Takes an IP protocol name such as
<literal>gre
</literal> or
1409 <literal>ipip
</literal>, or an integer within the range
1-
255. When
1410 <varname>Encapsulation=GenericUDPEncapsulation
</varname>, this must not be specified.
</para>
1414 <term><varname>Peer=
</varname></term>
1416 <para>Configures peer IP address. Note that when peer address is set
<literal>PeerPort=
</literal>
1417 is mandatory.
</para>
1421 <term><varname>Local=
</varname></term>
1423 <para>Configures local IP address.
</para>
1430 <title>[Peer] Section Options
</title>
1432 <para>The [Peer] section only applies for
1433 netdevs of kind
<literal>veth
</literal> and accepts the
1434 following keys:
</para>
1436 <variablelist class='network-directives'
>
1438 <term><varname>Name=
</varname></term>
1440 <para>The interface name used when creating the netdev.
1441 This setting is compulsory.
</para>
1445 <term><varname>MACAddress=
</varname></term>
1447 <para>The peer MACAddress, if not set, it is generated in
1448 the same way as the MAC address of the main
1456 <title>[VXCAN] Section Options
</title>
1458 <para>The [VXCAN] section only applies for
1459 netdevs of kind
<literal>vxcan
</literal> and accepts the
1460 following key:
</para>
1462 <variablelist class='network-directives'
>
1464 <term><varname>Peer=
</varname></term>
1466 <para>The peer interface name used when creating the netdev.
1467 This setting is compulsory.
</para>
1474 <title>[Tun] Section Options
</title>
1476 <para>The [Tun] section only applies for
1477 netdevs of kind
<literal>tun
</literal>, and accepts the following
1480 <variablelist class='network-directives'
>
1482 <term><varname>MultiQueue=
</varname></term>
1483 <listitem><para>Takes a boolean. Configures whether
1484 to use multiple file descriptors (queues) to parallelize
1485 packets sending and receiving. Defaults to
1486 <literal>no
</literal>.
</para>
1490 <term><varname>PacketInfo=
</varname></term>
1491 <listitem><para>Takes a boolean. Configures whether
1492 packets should be prepended with four extra bytes (two flag
1493 bytes and two protocol bytes). If disabled, it indicates that
1494 the packets will be pure IP packets. Defaults to
1495 <literal>no
</literal>.
</para>
1499 <term><varname>VNetHeader=
</varname></term>
1500 <listitem><para>Takes a boolean. Configures
1501 IFF_VNET_HDR flag for a tun or tap device. It allows sending
1502 and receiving larger Generic Segmentation Offload (GSO)
1503 packets. This may increase throughput significantly.
1505 <literal>no
</literal>.
</para>
1509 <term><varname>User=
</varname></term>
1510 <listitem><para>User to grant access to the
1511 <filename>/dev/net/tun
</filename> device.
</para>
1515 <term><varname>Group=
</varname></term>
1516 <listitem><para>Group to grant access to the
1517 <filename>/dev/net/tun
</filename> device.
</para>
1524 <title>[Tap] Section Options
</title>
1526 <para>The [Tap] section only applies for
1527 netdevs of kind
<literal>tap
</literal>, and accepts the same keys
1528 as the [Tun] section.
</para>
1532 <title>[WireGuard] Section Options
</title>
1534 <para>The [WireGuard] section accepts the following
1537 <variablelist class='network-directives'
>
1539 <term><varname>PrivateKey=
</varname></term>
1541 <para>The Base64 encoded private key for the interface. It can be
1542 generated using the
<command>wg genkey
</command> command
1543 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
1544 This option or
<varname>PrivateKeyFile=
</varname> is mandatory to use WireGuard.
1545 Note that because this information is secret, you may want to set
1546 the permissions of the .netdev file to be owned by
<literal>root:systemd-network
</literal>
1547 with a
<literal>0640</literal> file mode.
</para>
1551 <term><varname>PrivateKeyFile=
</varname></term>
1553 <para>Takes an absolute path to a file which contains the Base64 encoded private key for the
1554 interface. When this option is specified, then
<varname>PrivateKey=
</varname> is ignored. Note
1555 that the file must be readable by the user
<literal>systemd-network
</literal>, so it should be,
1556 e.g., owned by
<literal>root:systemd-network
</literal> with a
<literal>0640</literal> file mode. If
1557 the path refers to an
<constant>AF_UNIX
</constant> stream socket in the file system a connection is
1558 made to it and the key read from it.
</para>
1562 <term><varname>ListenPort=
</varname></term>
1564 <para>Sets UDP port for listening. Takes either value between
1 and
65535
1565 or
<literal>auto
</literal>. If
<literal>auto
</literal> is specified,
1566 the port is automatically generated based on interface name.
1567 Defaults to
<literal>auto
</literal>.
</para>
1571 <term><varname>FirewallMark=
</varname></term>
1573 <para>Sets a firewall mark on outgoing WireGuard packets from this interface. Takes a number between
1 and
4294967295.
</para>
1580 <title>[WireGuardPeer] Section Options
</title>
1582 <para>The [WireGuardPeer] section accepts the following
1585 <variablelist class='network-directives'
>
1587 <term><varname>PublicKey=
</varname></term>
1589 <para>Sets a Base64 encoded public key calculated by
<command>wg pubkey
</command>
1590 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1591 from a private key, and usually transmitted out of band to the
1592 author of the configuration file. This option is mandatory for this
1597 <term><varname>PresharedKey=
</varname></term>
1599 <para>Optional preshared key for the interface. It can be generated
1600 by the
<command>wg genpsk
</command> command. This option adds an
1601 additional layer of symmetric-key cryptography to be mixed into the
1602 already existing public-key cryptography, for post-quantum
1604 Note that because this information is secret, you may want to set
1605 the permissions of the .netdev file to be owned by
<literal>root:systemd-network
</literal>
1606 with a
<literal>0640</literal> file mode.
</para>
1610 <term><varname>PresharedKeyFile=
</varname></term>
1612 <para>Takes an absolute path to a file which contains the Base64 encoded preshared key for the
1613 peer. When this option is specified, then
<varname>PresharedKey=
</varname> is ignored. Note that
1614 the file must be readable by the user
<literal>systemd-network
</literal>, so it should be, e.g.,
1615 owned by
<literal>root:systemd-network
</literal> with a
<literal>0640</literal> file mode. If the
1616 path refers to an
<constant>AF_UNIX
</constant> stream socket in the file system a connection is
1617 made to it and the key read from it.
</para>
1621 <term><varname>AllowedIPs=
</varname></term>
1623 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1624 from which this peer is allowed to send incoming traffic and to
1625 which outgoing traffic for this peer is directed. The catch-all
1626 0.0.0.0/
0 may be specified for matching all IPv4 addresses, and
1627 ::/
0 may be specified for matching all IPv6 addresses.
</para>
1631 <term><varname>Endpoint=
</varname></term>
1633 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1634 a port number. This endpoint will be updated automatically once to
1635 the most recent source IP address and port of correctly
1636 authenticated packets from the peer at configuration time.
</para>
1640 <term><varname>PersistentKeepalive=
</varname></term>
1642 <para>Sets a seconds interval, between
1 and
65535 inclusive, of how often
1643 to send an authenticated empty packet to the peer for the purpose
1644 of keeping a stateful firewall or NAT mapping valid persistently.
1645 For example, if the interface very rarely sends traffic, but it
1646 might at anytime receive traffic from a peer, and it is behind NAT,
1647 the interface might benefit from having a persistent keepalive
1648 interval of
25 seconds. If set to
0 or
"off", this option is
1649 disabled. By default or when unspecified, this option is off.
1650 Most users will not need this.
</para>
1657 <title>[Bond] Section Options
</title>
1659 <para>The [Bond] section accepts the following
1662 <variablelist class='network-directives'
>
1664 <term><varname>Mode=
</varname></term>
1666 <para>Specifies one of the bonding policies. The default is
1667 <literal>balance-rr
</literal> (round robin). Possible values are
1668 <literal>balance-rr
</literal>,
1669 <literal>active-backup
</literal>,
1670 <literal>balance-xor
</literal>,
1671 <literal>broadcast
</literal>,
1672 <literal>802.3ad
</literal>,
1673 <literal>balance-tlb
</literal>, and
1674 <literal>balance-alb
</literal>.
1680 <term><varname>TransmitHashPolicy=
</varname></term>
1682 <para>Selects the transmit hash policy to use for slave
1683 selection in balance-xor,
802.3ad, and tlb modes. Possible
1685 <literal>layer2
</literal>,
1686 <literal>layer3+
4</literal>,
1687 <literal>layer2+
3</literal>,
1688 <literal>encap2+
3</literal>, and
1689 <literal>encap3+
4</literal>.
1695 <term><varname>LACPTransmitRate=
</varname></term>
1697 <para>Specifies the rate with which link partner transmits
1698 Link Aggregation Control Protocol Data Unit packets in
1699 802.3ad mode. Possible values are
<literal>slow
</literal>,
1700 which requests partner to transmit LACPDUs every
30 seconds,
1701 and
<literal>fast
</literal>, which requests partner to
1702 transmit LACPDUs every second. The default value is
1703 <literal>slow
</literal>.
</para>
1708 <term><varname>MIIMonitorSec=
</varname></term>
1710 <para>Specifies the frequency that Media Independent
1711 Interface link monitoring will occur. A value of zero
1712 disables MII link monitoring. This value is rounded down to
1713 the nearest millisecond. The default value is
0.
</para>
1718 <term><varname>UpDelaySec=
</varname></term>
1720 <para>Specifies the delay before a link is enabled after a
1721 link up status has been detected. This value is rounded down
1722 to a multiple of MIIMonitorSec. The default value is
1728 <term><varname>DownDelaySec=
</varname></term>
1730 <para>Specifies the delay before a link is disabled after a
1731 link down status has been detected. This value is rounded
1732 down to a multiple of MIIMonitorSec. The default value is
1738 <term><varname>LearnPacketIntervalSec=
</varname></term>
1740 <para>Specifies the number of seconds between instances where the bonding
1741 driver sends learning packets to each slave peer switch.
1742 The valid range is
1–
0x7fffffff; the default value is
1. This option
1743 has an effect only for the balance-tlb and balance-alb modes.
</para>
1748 <term><varname>AdSelect=
</varname></term>
1750 <para>Specifies the
802.3ad aggregation selection logic to use. Possible values are
1751 <literal>stable
</literal>,
1752 <literal>bandwidth
</literal> and
1753 <literal>count
</literal>.
1759 <term><varname>AdActorSystemPriority=
</varname></term>
1761 <para>Specifies the
802.3ad actor system priority. Takes a number in the range
1—
65535.
</para>
1766 <term><varname>AdUserPortKey=
</varname></term>
1768 <para>Specifies the
802.3ad user defined portion of the port key. Takes a number in the range
1774 <term><varname>AdActorSystem=
</varname></term>
1776 <para>Specifies the
802.3ad system MAC address. This cannot be a null or multicast address.
1782 <term><varname>FailOverMACPolicy=
</varname></term>
1784 <para>Specifies whether the active-backup mode should set all slaves to
1785 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
1786 bond's MAC address in accordance with the selected policy. The default policy is none.
1788 <literal>none
</literal>,
1789 <literal>active
</literal> and
1790 <literal>follow
</literal>.
1796 <term><varname>ARPValidate=
</varname></term>
1798 <para>Specifies whether or not ARP probes and replies should be
1799 validated in any mode that supports ARP monitoring, or whether
1800 non-ARP traffic should be filtered (disregarded) for link
1801 monitoring purposes. Possible values are
1802 <literal>none
</literal>,
1803 <literal>active
</literal>,
1804 <literal>backup
</literal> and
1805 <literal>all
</literal>.
1811 <term><varname>ARPIntervalSec=
</varname></term>
1813 <para>Specifies the ARP link monitoring frequency. A value of
0 disables ARP monitoring. The
1814 default value is
0, and the default unit seconds.
1820 <term><varname>ARPIPTargets=
</varname></term>
1822 <para>Specifies the IP addresses to use as ARP monitoring peers when
1823 ARPIntervalSec is greater than
0. These are the targets of the ARP request
1824 sent to determine the health of the link to the targets.
1825 Specify these values in IPv4 dotted decimal format. At least one IP
1826 address must be given for ARP monitoring to function. The
1827 maximum number of targets that can be specified is
16. The
1828 default value is no IP addresses.
1834 <term><varname>ARPAllTargets=
</varname></term>
1836 <para>Specifies the quantity of ARPIPTargets that must be reachable
1837 in order for the ARP monitor to consider a slave as being up.
1838 This option affects only active-backup mode for slaves with
1839 ARPValidate enabled. Possible values are
1840 <literal>any
</literal> and
1841 <literal>all
</literal>.
1847 <term><varname>PrimaryReselectPolicy=
</varname></term>
1849 <para>Specifies the reselection policy for the primary slave. This
1850 affects how the primary slave is chosen to become the active slave
1851 when failure of the active slave or recovery of the primary slave
1852 occurs. This option is designed to prevent flip-flopping between
1853 the primary slave and other slaves. Possible values are
1854 <literal>always
</literal>,
1855 <literal>better
</literal> and
1856 <literal>failure
</literal>.
1862 <term><varname>ResendIGMP=
</varname></term>
1864 <para>Specifies the number of IGMP membership reports to be issued after
1865 a failover event. One membership report is issued immediately after
1866 the failover, subsequent packets are sent in each
200ms interval.
1867 The valid range is
0–
255. Defaults to
1. A value of
0
1868 prevents the IGMP membership report from being issued in response
1869 to the failover event.
1875 <term><varname>PacketsPerSlave=
</varname></term>
1877 <para>Specify the number of packets to transmit through a slave before
1878 moving to the next one. When set to
0, then a slave is chosen at
1879 random. The valid range is
0–
65535. Defaults to
1. This option
1880 only has effect when in balance-rr mode.
1886 <term><varname>GratuitousARP=
</varname></term>
1888 <para>Specify the number of peer notifications (gratuitous ARPs and
1889 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1890 failover event. As soon as the link is up on the new slave,
1891 a peer notification is sent on the bonding device and each
1892 VLAN sub-device. This is repeated at each link monitor interval
1893 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1894 greater than
1. The valid range is
0–
255. The default value is
1.
1895 These options affect only the active-backup mode.
1901 <term><varname>AllSlavesActive=
</varname></term>
1903 <para>Takes a boolean. Specifies that duplicate frames (received on inactive ports)
1904 should be dropped when false, or delivered when true. Normally, bonding will drop
1905 duplicate frames (received on inactive ports), which is desirable for
1906 most users. But there are some times it is nice to allow duplicate
1907 frames to be delivered. The default value is false (drop duplicate frames
1908 received on inactive ports).
1914 <term><varname>DynamicTransmitLoadBalancing=
</varname></term>
1916 <para>Takes a boolean. Specifies if dynamic shuffling of flows is enabled. Applies only
1917 for balance-tlb mode. Defaults to unset.
1923 <term><varname>MinLinks=
</varname></term>
1925 <para>Specifies the minimum number of links that must be active before
1926 asserting carrier. The default value is
0.
1932 <para>For more detail information see
1933 <ulink url=
"https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1934 Linux Ethernet Bonding Driver HOWTO
</ulink></para>
1938 <title>[Xfrm] Section Options
</title>
1940 <para>The [Xfrm] section accepts the following
1943 <variablelist class='network-directives'
>
1945 <term><varname>InterfaceId=
</varname></term>
1947 <para>Sets the ID/key of the xfrm interface which needs to be associated with a SA/policy.
1948 Can be decimal or hexadecimal, valid range is
0-
0xffffffff, defaults to
0.
</para>
1952 <term><varname>Independent=
</varname></term>
1954 <para>Takes a boolean. If false (the default), the xfrm interface must have an underlying device
1955 which can be used for hardware offloading.
</para>
1960 <para>For more detail information see
1961 <ulink url=
"https://lwn.net/Articles/757391">Virtual XFRM Interfaces
</ulink>.
</para>
1965 <title>[VRF] Section Options
</title>
1966 <para>The [VRF] section only applies for
1967 netdevs of kind
<literal>vrf
</literal> and accepts the
1968 following key:
</para>
1970 <variablelist class='network-directives'
>
1972 <term><varname>Table=
</varname></term>
1974 <para>The numeric routing table identifier. This setting is compulsory.
</para>
1981 <title>Examples
</title>
1983 <title>/etc/systemd/network/
25-bridge.netdev
</title>
1985 <programlisting>[NetDev]
1987 Kind=bridge
</programlisting>
1991 <title>/etc/systemd/network/
25-vlan1.netdev
</title>
1993 <programlisting>[Match]
2001 Id=
1</programlisting>
2004 <title>/etc/systemd/network/
25-ipip.netdev
</title>
2005 <programlisting>[NetDev]
2011 Local=
192.168.223.238
2012 Remote=
192.169.224.239
2013 TTL=
64</programlisting>
2016 <title>/etc/systemd/network/
1-fou-tunnel.netdev
</title>
2017 <programlisting>[NetDev]
2027 <title>/etc/systemd/network/
25-fou-ipip.netdev
</title>
2028 <programlisting>[NetDev]
2035 Remote=
10.65.208.211
2037 FOUDestinationPort=
5555
2041 <title>/etc/systemd/network/
25-tap.netdev
</title>
2042 <programlisting>[NetDev]
2048 PacketInfo=yes
</programlisting> </example>
2051 <title>/etc/systemd/network/
25-sit.netdev
</title>
2052 <programlisting>[NetDev]
2059 Remote=
10.65.223.239</programlisting>
2063 <title>/etc/systemd/network/
25-
6rd.netdev
</title>
2064 <programlisting>[NetDev]
2071 IPv6RapidDeploymentPrefix=
2602::/
24</programlisting>
2075 <title>/etc/systemd/network/
25-gre.netdev
</title>
2076 <programlisting>[NetDev]
2083 Remote=
10.65.223.239</programlisting>
2087 <title>/etc/systemd/network/
25-ip6gre.netdev
</title>
2088 <programlisting>[NetDev]
2093 Key=
123</programlisting>
2097 <title>/etc/systemd/network/
25-vti.netdev
</title>
2099 <programlisting>[NetDev]
2106 Remote=
10.65.223.239</programlisting>
2110 <title>/etc/systemd/network/
25-veth.netdev
</title>
2111 <programlisting>[NetDev]
2116 Name=veth-peer
</programlisting>
2120 <title>/etc/systemd/network/
25-bond.netdev
</title>
2121 <programlisting>[NetDev]
2127 TransmitHashPolicy=layer3+
4
2129 LACPTransmitRate=fast
2134 <title>/etc/systemd/network/
25-dummy.netdev
</title>
2135 <programlisting>[NetDev]
2138 MACAddress=
12:
34:
56:
78:
9a:bc
</programlisting>
2141 <title>/etc/systemd/network/
25-vrf.netdev
</title>
2142 <para>Create a VRF interface with table
42.
</para>
2143 <programlisting>[NetDev]
2148 Table=
42</programlisting>
2152 <title>/etc/systemd/network/
25-macvtap.netdev
</title>
2153 <para>Create a MacVTap device.
</para>
2154 <programlisting>[NetDev]
2160 <title>/etc/systemd/network/
25-wireguard.netdev
</title>
2161 <programlisting>[NetDev]
2166 PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
2170 PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
2171 AllowedIPs=fd31:bf08:
57cb::/
48,
192.168.26.0/
24
2172 Endpoint=wireguard.example.com:
51820</programlisting>
2176 <title>/etc/systemd/network/
27-xfrm.netdev
</title>
2177 <programlisting>[NetDev]
2182 Independent=yes
</programlisting>
2187 <title>See Also
</title>
2189 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2190 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
2191 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2192 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>