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+ -->
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>Network setup is performed by
31 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
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
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>
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>
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>
69 <title>Supported netdev kinds
</title>
71 <para>The following kinds of virtual network devices may be
72 configured in
<filename>.netdev
</filename> files:
</para>
75 <title>Supported kinds of virtual network devices
</title>
78 <colspec colname='kind'
/>
79 <colspec colname='explanation'
/>
82 <entry>Description
</entry>
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>
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>
91 <row><entry><varname>dummy
</varname></entry>
92 <entry>A dummy device drops all packets sent to it.
</entry></row>
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>
97 <row><entry><varname>gretap
</varname></entry>
98 <entry>A Level
2 GRE tunnel over IPv4.
</entry></row>
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. The traffic is encapsulated in generic routing encapsulation (GRE) and is therefore routable across a layer
3 network between the source switch and the destination switch.
</entry></row>
103 <row><entry><varname>ip6gre
</varname></entry>
104 <entry>A Level
3 GRE tunnel over IPv6.
</entry></row>
106 <row><entry><varname>ip6tnl
</varname></entry>
107 <entry>An IPv4 or IPv6 tunnel over IPv6
</entry></row>
109 <row><entry><varname>ip6gretap
</varname></entry>
110 <entry>A Level
2 GRE tunnel over IPv6.
</entry></row>
112 <row><entry><varname>ipip
</varname></entry>
113 <entry>An IPv4 over IPv4 tunnel.
</entry></row>
115 <row><entry><varname>ipvlan
</varname></entry>
116 <entry>An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.
</entry></row>
118 <row><entry><varname>macvlan
</varname></entry>
119 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
121 <row><entry><varname>macvtap
</varname></entry>
122 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
124 <row><entry><varname>sit
</varname></entry>
125 <entry>An IPv6 over IPv4 tunnel.
</entry></row>
127 <row><entry><varname>tap
</varname></entry>
128 <entry>A persistent Level
2 tunnel between a network device and a device node.
</entry></row>
130 <row><entry><varname>tun
</varname></entry>
131 <entry>A persistent Level
3 tunnel between a network device and a device node.
</entry></row>
133 <row><entry><varname>veth
</varname></entry>
134 <entry>An Ethernet tunnel between a pair of network devices.
</entry></row>
136 <row><entry><varname>vlan
</varname></entry>
137 <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>
139 <row><entry><varname>vti
</varname></entry>
140 <entry>An IPv4 over IPSec tunnel.
</entry></row>
142 <row><entry><varname>vti6
</varname></entry>
143 <entry>An IPv6 over IPSec tunnel.
</entry></row>
145 <row><entry><varname>vxlan
</varname></entry>
146 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.
</entry></row>
148 <row><entry><varname>geneve
</varname></entry>
149 <entry>A GEneric NEtwork Virtualization Encapsulation (GENEVE) netdev driver.
</entry></row>
151 <row><entry><varname>l2tp
</varname></entry>
152 <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>
154 <row><entry><varname>macsec
</varname></entry>
155 <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>
157 <row><entry><varname>vrf
</varname></entry>
158 <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>
160 <row><entry><varname>vcan
</varname></entry>
161 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.
</entry></row>
163 <row><entry><varname>vxcan
</varname></entry>
164 <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.
167 <row><entry><varname>wireguard
</varname></entry>
168 <entry>WireGuard Secure Network Tunnel.
</entry></row>
170 <row><entry><varname>netdevsim
</varname></entry>
171 <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>
173 <row><entry><varname>fou
</varname></entry>
174 <entry>Foo-over-UDP tunneling.
</entry></row>
183 <title>[Match] Section Options
</title>
185 <para>A virtual network device is only created if the
186 <literal>[Match]
</literal> section matches the current
187 environment, or if the section is empty. The following keys are
190 <variablelist class='network-directives'
>
192 <term><varname>Host=
</varname></term>
194 <para>Matches against the hostname or machine ID of the host. See
195 <literal>ConditionHost=
</literal> in
196 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
197 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
198 If an empty string is assigned, then previously assigned value is cleared.
203 <term><varname>Virtualization=
</varname></term>
205 <para>Checks whether the system is executed in a virtualized environment and optionally test
206 whether it is a specific implementation. See
<literal>ConditionVirtualization=
</literal> in
207 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
208 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
209 If an empty string is assigned, then previously assigned value is cleared.
214 <term><varname>KernelCommandLine=
</varname></term>
216 <para>Checks whether a specific kernel command line option is set. See
217 <literal>ConditionKernelCommandLine=
</literal> in
218 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
219 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
220 If an empty string is assigned, then previously assigned value is cleared.
225 <term><varname>KernelVersion=
</varname></term>
227 <para>Checks whether the kernel version (as reported by
<command>uname -r
</command>) matches a
228 certain expression. See
<literal>ConditionKernelVersion=
</literal> in
229 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
230 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
231 If an empty string is assigned, then previously assigned value is cleared.
236 <term><varname>Architecture=
</varname></term>
238 <para>Checks whether the system is running on a specific architecture. See
239 <literal>ConditionArchitecture=
</literal> in
240 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
241 for details. When prefixed with an exclamation mark (
<literal>!
</literal>), the result is negated.
242 If an empty string is assigned, then previously assigned value is cleared.
251 <title>[NetDev] Section Options
</title>
253 <para>The
<literal>[NetDev]
</literal> section accepts the
254 following keys:
</para>
256 <variablelist class='network-directives'
>
258 <term><varname>Description=
</varname></term>
260 <para>A free-form description of the netdev.
</para>
264 <term><varname>Name=
</varname></term>
266 <para>The interface name used when creating the netdev.
267 This option is compulsory.
</para>
271 <term><varname>Kind=
</varname></term>
273 <para>The netdev kind. This option is compulsory. See the
274 <literal>Supported netdev kinds
</literal> section for the
279 <term><varname>MTUBytes=
</varname></term>
281 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M, G,
282 are supported and are understood to the base of
1024. For
<literal>tun
</literal> or
283 <literal>tap
</literal> devices,
<varname>MTUBytes=
</varname> setting is not currently supported in
284 <literal>[NetDev]
</literal> section. Please specify it in
<literal>[Link]
</literal> section of
286 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
291 <term><varname>MACAddress=
</varname></term>
293 <para>The MAC address to use for the device. For
<literal>tun
</literal> or
<literal>tap
</literal>
294 devices, setting
<varname>MACAddress=
</varname> in the
<literal>[NetDev]
</literal> section is not
295 supported. Please specify it in
<literal>[Link]
</literal> section of the corresponding
296 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
297 file. If this option is not set,
<literal>vlan
</literal> devices inherit the MAC address of the
298 physical interface. For other kind of netdevs, if this option is not set, then MAC address is
299 generated based on the interface name and the
300 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
308 <title>[Bridge] Section Options
</title>
310 <para>The
<literal>[Bridge]
</literal> section only applies for
311 netdevs of kind
<literal>bridge
</literal>, and accepts the
312 following keys:
</para>
314 <variablelist class='network-directives'
>
316 <term><varname>HelloTimeSec=
</varname></term>
318 <para>HelloTimeSec specifies the number of seconds between two hello packets
319 sent out by the root bridge and the designated bridges. Hello packets are
320 used to communicate information about the topology throughout the entire
321 bridged local area network.
</para>
325 <term><varname>MaxAgeSec=
</varname></term>
327 <para>MaxAgeSec specifies the number of seconds of maximum message age.
328 If the last seen (received) hello packet is more than this number of
329 seconds old, the bridge in question will start the takeover procedure
330 in attempt to become the Root Bridge itself.
</para>
334 <term><varname>ForwardDelaySec=
</varname></term>
336 <para>ForwardDelaySec specifies the number of seconds spent in each
337 of the Listening and Learning states before the Forwarding state is entered.
</para>
341 <term><varname>AgeingTimeSec=
</varname></term>
343 <para>This specifies the number of seconds a MAC Address will be kept in
344 the forwarding database after having a packet received from this MAC Address.
</para>
348 <term><varname>Priority=
</varname></term>
350 <para>The priority of the bridge. An integer between
0 and
65535. A lower value
351 means higher priority. The bridge having the lowest priority will be elected as root bridge.
</para>
355 <term><varname>GroupForwardMask=
</varname></term>
357 <para>A
16-bit bitmask represented as an integer which allows forwarding of link
358 local frames with
802.1D reserved addresses (
01:
80:C2:
00:
00:
0X). A logical AND
359 is performed between the specified bitmask and the exponentiation of
2^X, the
360 lower nibble of the last octet of the MAC address. For example, a value of
8
361 would allow forwarding of frames addressed to
01:
80:C2:
00:
00:
03 (
802.1X PAE).
</para>
365 <term><varname>DefaultPVID=
</varname></term>
367 <para>This specifies the default port VLAN ID of a newly attached bridge port.
368 Set this to an integer in the range
1–
4094 or
<literal>none
</literal> to disable the PVID.
</para>
372 <term><varname>MulticastQuerier=
</varname></term>
374 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
375 If enabled, the kernel will send general ICMP queries from a zero source address.
376 This feature should allow faster convergence on startup, but it causes some
377 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
378 When unset, the kernel's default will be used.
383 <term><varname>MulticastSnooping=
</varname></term>
385 <para>Takes a boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
386 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
387 between hosts and multicast routers. When unset, the kernel's default will be used.
392 <term><varname>VLANFiltering=
</varname></term>
394 <para>Takes a boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
395 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's default will be used.
400 <term><varname>STP=
</varname></term>
402 <para>Takes a boolean. This enables the bridge's Spanning Tree Protocol (STP).
403 When unset, the kernel's default will be used.
411 <title>[VLAN] Section Options
</title>
413 <para>The
<literal>[VLAN]
</literal> section only applies for
414 netdevs of kind
<literal>vlan
</literal>, and accepts the
415 following key:
</para>
417 <variablelist class='network-directives'
>
419 <term><varname>Id=
</varname></term>
421 <para>The VLAN ID to use. An integer in the range
0–
4094.
422 This option is compulsory.
</para>
426 <term><varname>GVRP=
</varname></term>
428 <para>Takes a boolean. The Generic VLAN Registration Protocol (GVRP) is a protocol that
429 allows automatic learning of VLANs on a network.
430 When unset, the kernel's default will be used.
435 <term><varname>MVRP=
</varname></term>
437 <para>Takes a boolean. Multiple VLAN Registration Protocol (MVRP) formerly known as GARP VLAN
438 Registration Protocol (GVRP) is a standards-based Layer
2 network protocol,
439 for automatic configuration of VLAN information on switches. It was defined
440 in the
802.1ak amendment to
802.1Q-
2005. When unset, the kernel's default will be used.
445 <term><varname>LooseBinding=
</varname></term>
447 <para>Takes a boolean. The VLAN loose binding mode, in which only the operational state is passed
448 from the parent to the associated VLANs, but the VLAN device state is not changed.
449 When unset, the kernel's default will be used.
</para>
453 <term><varname>ReorderHeader=
</varname></term>
455 <para>Takes a boolean. The VLAN reorder header is set VLAN interfaces behave like physical interfaces.
456 When unset, the kernel's default will be used.
</para>
463 <title>[MACVLAN] Section Options
</title>
465 <para>The
<literal>[MACVLAN]
</literal> section only applies for
466 netdevs of kind
<literal>macvlan
</literal>, and accepts the
467 following key:
</para>
469 <variablelist class='network-directives'
>
471 <term><varname>Mode=
</varname></term>
473 <para>The MACVLAN mode to use. The supported options are
474 <literal>private
</literal>,
475 <literal>vepa
</literal>,
476 <literal>bridge
</literal>, and
477 <literal>passthru
</literal>.
486 <title>[MACVTAP] Section Options
</title>
488 <para>The
<literal>[MACVTAP]
</literal> section applies for
489 netdevs of kind
<literal>macvtap
</literal> and accepts the
490 same key as
<literal>[MACVLAN]
</literal>.
</para>
495 <title>[IPVLAN] Section Options
</title>
497 <para>The
<literal>[IPVLAN]
</literal> section only applies for
498 netdevs of kind
<literal>ipvlan
</literal>, and accepts the
499 following key:
</para>
501 <variablelist class='network-directives'
>
503 <term><varname>Mode=
</varname></term>
505 <para>The IPVLAN mode to use. The supported options are
506 <literal>L2
</literal>,
<literal>L3
</literal> and
<literal>L3S
</literal>.
511 <term><varname>Flags=
</varname></term>
513 <para>The IPVLAN flags to use. The supported options are
514 <literal>bridge
</literal>,
<literal>private
</literal> and
<literal>vepa
</literal>.
523 <title>[VXLAN] Section Options
</title>
524 <para>The
<literal>[VXLAN]
</literal> section only applies for
525 netdevs of kind
<literal>vxlan
</literal>, and accepts the
526 following keys:
</para>
528 <variablelist class='network-directives'
>
530 <term><varname>Id=
</varname></term>
532 <para>The VXLAN ID to use.
</para>
536 <term><varname>Remote=
</varname></term>
538 <para>Configures destination IP address.
</para>
542 <term><varname>Local=
</varname></term>
544 <para>Configures local IP address.
</para>
548 <term><varname>TOS=
</varname></term>
550 <para>The Type Of Service byte value for a vxlan interface.
</para>
554 <term><varname>TTL=
</varname></term>
556 <para>A fixed Time To Live N on Virtual eXtensible Local
557 Area Network packets. N is a number in the range
1–
255.
0
558 is a special value meaning that packets inherit the TTL
563 <term><varname>MacLearning=
</varname></term>
565 <para>Takes a boolean. When true, enables dynamic MAC learning
566 to discover remote MAC addresses.
</para>
570 <term><varname>FDBAgeingSec=
</varname></term>
572 <para>The lifetime of Forwarding Database entry learnt by
573 the kernel, in seconds.
</para>
577 <term><varname>MaximumFDBEntries=
</varname></term>
579 <para>Configures maximum number of FDB entries.
</para>
583 <term><varname>ReduceARPProxy=
</varname></term>
585 <para>Takes a boolean. When true, bridge-connected VXLAN tunnel
586 endpoint answers ARP requests from the local bridge on behalf
587 of remote Distributed Overlay Virtual Ethernet
588 <ulink url=
"https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
589 (DVOE)
</ulink> clients. Defaults to false.
</para>
593 <term><varname>L2MissNotification=
</varname></term>
595 <para>Takes a boolean. When true, enables netlink LLADDR miss
596 notifications.
</para>
600 <term><varname>L3MissNotification=
</varname></term>
602 <para>Takes a boolean. When true, enables netlink IP address miss
603 notifications.
</para>
607 <term><varname>RouteShortCircuit=
</varname></term>
609 <para>Takes a boolean. When true, route short circuiting is turned
614 <term><varname>UDPChecksum=
</varname></term>
616 <para>Takes a boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.
</para>
620 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
622 <para>Takes a boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.
</para>
626 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
628 <para>Takes a boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.
</para>
632 <term><varname>RemoteChecksumTx=
</varname></term>
634 <para>Takes a boolean. When true, remote transmit checksum offload of VXLAN is turned on.
</para>
638 <term><varname>RemoteChecksumRx=
</varname></term>
640 <para>Takes a boolean. When true, remote receive checksum offload in VXLAN is turned on.
</para>
644 <term><varname>GroupPolicyExtension=
</varname></term>
646 <para>Takes a boolean. When true, it enables Group Policy VXLAN extension security label mechanism
647 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
648 <ulink url=
"https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
649 VXLAN Group Policy
</ulink> document. Defaults to false.
</para>
653 <term><varname>DestinationPort=
</varname></term>
655 <para>Configures the default destination UDP port on a per-device basis.
656 If destination port is not specified then Linux kernel default will be used.
657 Set destination port
4789 to get the IANA assigned value. If not set or if the
658 destination port is assigned the empty string the default port of
4789 is used.
</para>
662 <term><varname>PortRange=
</varname></term>
664 <para>Configures VXLAN port range. VXLAN bases source
665 UDP port based on flow to help the receiver to be able
666 to load balance based on outer header flow. It
667 restricts the port range to the normal UDP local
668 ports, and allows overriding via configuration.
</para>
672 <term><varname>FlowLabel=
</varname></term>
674 <para>Specifies the flow label to use in outgoing packets.
675 The valid range is
0-
1048575.
682 <title>[GENEVE] Section Options
</title>
683 <para>The
<literal>[GENEVE]
</literal> section only applies for
684 netdevs of kind
<literal>geneve
</literal>, and accepts the
685 following keys:
</para>
687 <variablelist class='network-directives'
>
689 <term><varname>Id=
</varname></term>
691 <para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [
0-
16777215].
</para>
695 <term><varname>Remote=
</varname></term>
697 <para>Specifies the unicast destination IP address to use in outgoing packets.
</para>
701 <term><varname>TOS=
</varname></term>
703 <para>Specifies the TOS value to use in outgoing packets. Ranges [
1-
255].
</para>
707 <term><varname>TTL=
</varname></term>
709 <para>Specifies the TTL value to use in outgoing packets. Ranges [
1-
255].
</para>
713 <term><varname>UDPChecksum=
</varname></term>
715 <para>Takes a boolean. When true, specifies if UDP checksum is calculated for transmitted packets over IPv4.
</para>
719 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
721 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.
</para>
725 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
727 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.
</para>
731 <term><varname>DestinationPort=
</varname></term>
733 <para>Specifies destination port. Defaults to
6081. If not set or assigned the empty string, the default
734 port of
6081 is used.
</para>
738 <term><varname>FlowLabel=
</varname></term>
740 <para>Specifies the flow label to use in outgoing packets.
</para>
746 <title>[L2TP] Section Options
</title>
747 <para>The
<literal>[L2TP]
</literal> section only applies for
748 netdevs of kind
<literal>l2tp
</literal>, and accepts the
749 following keys:
</para>
751 <variablelist class='network-directives'
>
753 <term><varname>TunnelId=
</varname></term>
755 <para>Specifies the tunnel id. The value used must match the
<literal>PeerTunnelId=
</literal> value being used at the peer.
756 Ranges a number between
1 and
4294967295). This option is compulsory.
</para>
760 <term><varname>PeerTunnelId=
</varname></term>
762 <para>Specifies the peer tunnel id. The value used must match the
<literal>PeerTunnelId=
</literal> value being used at the peer.
763 Ranges a number between
1 and
4294967295). This option is compulsory.
</para>
767 <term><varname>Remote=
</varname></term>
769 <para>Specifies the IP address of the remote peer. This option is compulsory.
</para>
773 <term><varname>Local=
</varname></term>
775 <para>Specifies the IP address of the local interface. Takes an IP address, or the special values
776 <literal>auto
</literal>,
<literal>static
</literal>, or
<literal>dynamic
</literal>. When an address
777 is set, then the local interface must have the address. If
<literal>auto
</literal>, then one of the
778 addresses on the local interface is used. Similarly, if
<literal>static
</literal> or
779 <literal>dynamic
</literal> is set, then one of the static or dynamic addresses on the local
780 interface is used. Defaults to
<literal>auto
</literal>.
</para>
784 <term><varname>EncapsulationType=
</varname></term>
786 <para>Specifies the encapsulation type of the tunnel. Takes one of
<literal>udp
</literal> or
<literal>ip
</literal>.
</para>
790 <term><varname>UDPSourcePort=
</varname></term>
792 <para>Specifies the UDP source port to be used for the tunnel. When UDP encapsulation is selected it's mandotory. Ignored when ip
793 encapsulation is selected.
</para>
797 <term><varname>DestinationPort=
</varname></term>
799 <para>Specifies destination port. When UDP encapsulation is selected it's mandotory. Ignored when ip
800 encapsulation is selected.
</para>
804 <term><varname>UDPChecksum=
</varname></term>
806 <para>Takes a boolean. When true, specifies if UDP checksum is calculated for transmitted packets over IPv4.
</para>
810 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
812 <para>Takes a boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.
</para>
816 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
818 <para>Takes a boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.
</para>
824 <title>[L2TPSession] Section Options
</title>
825 <para>The
<literal>[L2TPSession]
</literal> section only applies for
826 netdevs of kind
<literal>l2tp
</literal>, and accepts the
827 following keys:
</para>
828 <variablelist class='network-directives'
>
830 <term><varname>Name=
</varname></term>
832 <para>Specifies the name of the sesssion. This option is compulsory.
</para>
836 <term><varname>SessionId=
</varname></term>
838 <para>Specifies the sesssion id. The value used must match the
<literal>SessionId=
</literal> value being used at the peer.
839 Ranges a number between
1 and
4294967295). This option is compulsory.
</para>
843 <term><varname>PeerSessionId=
</varname></term>
845 <para>Specifies the peer session id. The value used must match the
<literal>PeerSessionId=
</literal> value being used at the peer.
846 Ranges a number between
1 and
4294967295). This option is compulsory.
</para>
850 <term><varname>Layer2SpecificHeader=
</varname></term>
852 <para>Specifies layer2specific header type of the session. One of
<literal>none
</literal> or
<literal>default
</literal>. Defaults to
<literal>default
</literal>.
</para>
858 <title>[MACsec] Section Options
</title>
859 <para>The
<literal>[MACsec]
</literal> section only applies for network devices of kind
860 <literal>macsec
</literal>, and accepts the following keys:
</para>
862 <variablelist class='network-directives'
>
864 <term><varname>Port=
</varname></term>
866 <para>Specifies the port to be used for the MACsec transmit channel. The port is used to make
867 secure channel identifier (SCI). Takes a value between
1 and
65535. Defaults to unset.
872 <term><varname>Encrypt=
</varname></term>
874 <para>Takes a boolean. When true, enable encryption. Defaults to unset.
</para>
880 <title>[MACsecReceiveChannel] Section Options
</title>
881 <para>The
<literal>[MACsecReceiveChannel]
</literal> section only applies for network devices of
882 kind
<literal>macsec
</literal>, and accepts the following keys:
</para>
884 <variablelist class='network-directives'
>
886 <term><varname>Port=
</varname></term>
888 <para>Specifies the port to be used for the MACsec receive channel. The port is used to make
889 secure channel identifier (SCI). Takes a value between
1 and
65535. This option is
890 compulsory, and is not set by default.
</para>
894 <term><varname>MACAddress=
</varname></term>
896 <para>Specifies the MAC address to be used for the MACsec receive channel. The MAC address
897 used to make secure channel identifier (SCI). This option is compulsory, and is not set by
904 <title>[MACsecTransmitAssociation] Section Options
</title>
905 <para>The
<literal>[MACsecTransmitAssociation]
</literal> section only applies for network devices
906 of kind
<literal>macsec
</literal>, and accepts the following keys:
</para>
908 <variablelist class='network-directives'
>
910 <term><varname>PacketNumber=
</varname></term>
912 <para>Specifies the packet number to be used for replay protection and the construction of
913 the initialization vector (along with the secure channel identifier [SCI]). Takes a value
914 between
1-
4,
294,
967,
295. Defaults to unset.
919 <term><varname>KeyId=
</varname></term>
921 <para>Specifies the identification for the key. Takes a number between
0-
255. This option
922 is compulsory, and is not set by default.
</para>
926 <term><varname>Key=
</varname></term>
928 <para>Specifies the encryption key used in the transmission channel. The same key must be
929 configured on the peer’s matching receive channel. This option is compulsory, and is not set
930 by default. Takes a
128-bit key encoded in a hexadecimal string, for example
931 <literal>dffafc8d7b9a43d5b9a3dfbbf6a30c16
</literal>.
</para>
935 <term><varname>KeyFile=
</varname></term>
937 <para>Takes a absolute path to a file which contains a
128-bit key encoded in a hexadecimal
938 string, which will be used in the transmission channel. When this option is specified,
939 <varname>Key=
</varname> is ignored. Note that the file must be readable by the user
940 <literal>systemd-network
</literal>, so it should be, e.g., owned by
941 <literal>root:systemd-network
</literal> with a
<literal>0640</literal> file mode.
</para>
945 <term><varname>Activate=
</varname></term>
947 <para>Takes a boolean. If enabled, then the security association is activated. Defaults to
952 <term><varname>UseForEncoding=
</varname></term>
954 <para>Takes a boolean. If enabled, then the security association is used for encoding. Only
955 one
<literal>[MACsecTransmitAssociation]
</literal> section can enable this option. When enabled,
956 <varname>Activate=yes
</varname> is implied. Defaults to unset.
</para>
962 <title>[MACsecReceiveAssociation] Section Options
</title>
963 <para>The
<literal>[MACsecReceiveAssociation]
</literal> section only applies for
964 network devices of kind
<literal>macsec
</literal>, and accepts the
965 following keys:
</para>
967 <variablelist class='network-directives'
>
969 <term><varname>Port=
</varname></term>
971 <para>Accepts the same key in
<literal>[MACsecReceiveChannel]
</literal> section.
</para>
975 <term><varname>MACAddress=
</varname></term>
977 <para>Accepts the same key in
<literal>[MACsecReceiveChannel]
</literal> section.
</para>
981 <term><varname>PacketNumber=
</varname></term>
983 <para>Accepts the same key in
<literal>[MACsecTransmitAssociation]
</literal> section.
</para>
987 <term><varname>KeyId=
</varname></term>
989 <para>Accepts the same key in
<literal>[MACsecTransmitAssociation]
</literal> section.
</para>
993 <term><varname>Key=
</varname></term>
995 <para>Accepts the same key in
<literal>[MACsecTransmitAssociation]
</literal> section.
</para>
999 <term><varname>KeyFile=
</varname></term>
1001 <para>Accepts the same key in
<literal>[MACsecTransmitAssociation]
</literal> section.
</para>
1005 <term><varname>Activate=
</varname></term>
1007 <para>Accepts the same key in
<literal>[MACsecTransmitAssociation]
</literal> section.
</para>
1013 <title>[Tunnel] Section Options
</title>
1015 <para>The
<literal>[Tunnel]
</literal> section only applies for
1017 <literal>ipip
</literal>,
1018 <literal>sit
</literal>,
1019 <literal>gre
</literal>,
1020 <literal>gretap
</literal>,
1021 <literal>ip6gre
</literal>,
1022 <literal>ip6gretap
</literal>,
1023 <literal>vti
</literal>,
1024 <literal>vti6
</literal>,
1025 <literal>ip6tnl
</literal>, and
1026 <literal>erspan
</literal> and accepts
1027 the following keys:
</para>
1029 <variablelist class='network-directives'
>
1031 <term><varname>Local=
</varname></term>
1033 <para>A static local address for tunneled packets. It must be an address on another interface of
1034 this host, or the special value
<literal>any
</literal>.
</para>
1038 <term><varname>Remote=
</varname></term>
1040 <para>The remote endpoint of the tunnel. Takes an IP address or the special value
1041 <literal>any
</literal>.
</para>
1045 <term><varname>TOS=
</varname></term>
1047 <para>The Type Of Service byte value for a tunnel interface.
1048 For details about the TOS, see the
1049 <ulink url=
"http://tools.ietf.org/html/rfc1349"> Type of
1050 Service in the Internet Protocol Suite
</ulink> document.
1055 <term><varname>TTL=
</varname></term>
1057 <para>A fixed Time To Live N on tunneled packets. N is a
1058 number in the range
1–
255.
0 is a special value meaning that
1059 packets inherit the TTL value. The default value for IPv4
1060 tunnels is: inherit. The default value for IPv6 tunnels is
1065 <term><varname>DiscoverPathMTU=
</varname></term>
1067 <para>Takes a boolean. When true, enables Path MTU Discovery on
1072 <term><varname>IPv6FlowLabel=
</varname></term>
1074 <para>Configures the
20-bit flow label (see
<ulink url=
"https://tools.ietf.org/html/rfc6437">
1075 RFC
6437</ulink>) field in the IPv6 header (see
<ulink url=
"https://tools.ietf.org/html/rfc2460">
1076 RFC
2460</ulink>), which is used by a node to label packets of a flow.
1077 It is only used for IPv6 tunnels.
1078 A flow label of zero is used to indicate packets that have
1080 It can be configured to a value in the range
0–
0xFFFFF, or be
1081 set to
<literal>inherit
</literal>, in which case the original flowlabel is used.
</para>
1085 <term><varname>CopyDSCP=
</varname></term>
1087 <para>Takes a boolean. When true, the Differentiated Service Code
1088 Point (DSCP) field will be copied to the inner header from
1089 outer header during the decapsulation of an IPv6 tunnel
1090 packet. DSCP is a field in an IP packet that enables different
1091 levels of service to be assigned to network traffic.
1092 Defaults to
<literal>no
</literal>.
1097 <term><varname>EncapsulationLimit=
</varname></term>
1099 <para>The Tunnel Encapsulation Limit option specifies how many additional
1100 levels of encapsulation are permitted to be prepended to the packet.
1101 For example, a Tunnel Encapsulation Limit option containing a limit
1102 value of zero means that a packet carrying that option may not enter
1103 another tunnel before exiting the current tunnel.
1104 (see
<ulink url=
"https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC
2473</ulink>).
1105 The valid range is
0–
255 and
<literal>none
</literal>. Defaults to
4.
1110 <term><varname>Key=
</varname></term>
1112 <para>The
<varname>Key=
</varname> parameter specifies the same key to use in
1113 both directions (
<varname>InputKey=
</varname> and
<varname>OutputKey=
</varname>).
1114 The
<varname>Key=
</varname> is either a number or an IPv4 address-like dotted quad.
1115 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
1116 and control path) in ip xfrm (framework used to implement IPsec protocol).
1117 See
<ulink url=
"http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
1118 ip-xfrm — transform configuration
</ulink> for details. It is only used for VTI/VTI6,
1119 GRE, GRETAP, and ERSPAN tunnels.
</para>
1123 <term><varname>InputKey=
</varname></term>
1125 <para>The
<varname>InputKey=
</varname> parameter specifies the key to use for input.
1126 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1127 and ERSPAN tunnels.
</para>
1131 <term><varname>OutputKey=
</varname></term>
1133 <para>The
<varname>OutputKey=
</varname> parameter specifies the key to use for output.
1134 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6, GRE, GRETAP,
1135 and ERSPAN tunnels.
</para>
1139 <term><varname>Mode=
</varname></term>
1141 <para>An
<literal>ip6tnl
</literal> tunnel can be in one of three
1143 <literal>ip6ip6
</literal> for IPv6 over IPv6,
1144 <literal>ipip6
</literal> for IPv4 over IPv6 or
1145 <literal>any
</literal> for either.
1150 <term><varname>Independent=
</varname></term>
1152 <para>Takes a boolean. When true tunnel does not require .network file. Created as
"tunnel@NONE".
1153 Defaults to
<literal>false
</literal>.
1158 <term><varname>AllowLocalRemote=
</varname></term>
1160 <para>Takes a boolean. When true allows tunnel traffic on
<varname>ip6tnl
</varname> devices where the remote endpoint is a local host address.
1161 When unset, the kernel's default will be used.
1166 <term><varname>FooOverUDP=
</varname></term>
1168 <para>Takes a boolean. Specifies whether
<varname>FooOverUDP=
</varname> tunnel is to be configured.
1169 Defaults to false. This takes effects only for IPIP, SIT, GRE, and GRETAP tunnels.
1170 For more detail information see
1171 <ulink url=
"https://lwn.net/Articles/614348">Foo over UDP
</ulink></para>
1175 <term><varname>FOUDestinationPort=
</varname></term>
1177 <para>This setting specifies the UDP destination port for encapsulation.
1178 This field is mandatory when
<varname>FooOverUDP=yes
</varname>, and is not set by default.
</para>
1182 <term><varname>FOUSourcePort=
</varname></term>
1184 <para>This setting specifies the UDP source port for encapsulation. Defaults to
<constant>0</constant>
1185 — that is, the source port for packets is left to the network stack to decide.
</para>
1189 <term><varname>Encapsulation=
</varname></term>
1191 <para>Accepts the same key as in the
<literal>[FooOverUDP]
</literal> section.
</para>
1195 <term><varname>IPv6RapidDeploymentPrefix=
</varname></term>
1197 <para>Reconfigure the tunnel for
<ulink url=
"https://tools.ietf.org/html/rfc5569">IPv6 Rapid
1198 Deployment
</ulink>, also known as
6rd. The value is an ISP-specific IPv6 prefix with a non-zero length. Only
1199 applicable to SIT tunnels.
</para>
1203 <term><varname>ISATAP=
</varname></term>
1205 <para>Takes a boolean. If set, configures the tunnel as Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) tunnel.
1206 Only applicable to SIT tunnels. When unset, the kernel's default will be used.
</para>
1210 <term><varname>SerializeTunneledPackets=
</varname></term>
1212 <para>Takes a boolean. If set to yes, then packets are serialized. Only applies for GRE,
1213 GRETAP, and ERSPAN tunnels. When unset, the kernel's default will be used.
1218 <term><varname>ERSPANIndex=
</varname></term>
1220 <para>Specifies the ERSPAN index field for the interface, an integer in the range
1-
1048575 associated with
1221 the ERSPAN traffic's source port and direction. This field is mandatory.
1229 <title>[FooOverUDP] Section Options
</title>
1231 <para>The
<literal>[FooOverUDP]
</literal> section only applies for
1232 netdevs of kind
<literal>fou
</literal> and accepts the
1233 following keys:
</para>
1235 <variablelist class='network-directives'
>
1237 <term><varname>Encapsulation=
</varname></term>
1239 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols inside the UDP packets. Supports the following values:
1241 <literal>FooOverUDP
</literal> provides the simplest no frills model of UDP encapsulation, it simply encapsulates
1242 packets directly in the UDP payload.
1243 <literal>GenericUDPEncapsulation
</literal> is a generic and extensible encapsulation, it allows encapsulation of packets for any IP
1244 protocol and optional data as part of the encapsulation.
1245 For more detailed information see
<ulink url=
"https://lwn.net/Articles/615044">Generic UDP Encapsulation
</ulink>.
1246 Defaults to
<literal>FooOverUDP
</literal>.
1251 <term><varname>Port=
</varname></term>
1253 <para>Specifies the port number, where the IP encapsulation packets will arrive. Please take note that the packets
1254 will arrive with the encapsulation will be removed. Then they will be manually fed back into the network stack, and sent ahead
1255 for delivery to the real destination. This option is mandatory.
</para>
1259 <term><varname>Protocol=
</varname></term>
1261 <para>The
<varname>Protocol=
</varname> specifies the protocol number of the packets arriving
1262 at the UDP port. When
<varname>Encapsulation=FooOverUDP
</varname>, this field is mandatory
1263 and is not set by default. Takes an IP protocol name such as
<literal>gre
</literal> or
1264 <literal>ipip
</literal>, or an integer within the range
1-
255. When
1265 <varname>Encapsulation=GenericUDPEncapsulation
</varname>, this must not be specified.
</para>
1271 <title>[Peer] Section Options
</title>
1273 <para>The
<literal>[Peer]
</literal> section only applies for
1274 netdevs of kind
<literal>veth
</literal> and accepts the
1275 following keys:
</para>
1277 <variablelist class='network-directives'
>
1279 <term><varname>Name=
</varname></term>
1281 <para>The interface name used when creating the netdev.
1282 This option is compulsory.
</para>
1286 <term><varname>MACAddress=
</varname></term>
1288 <para>The peer MACAddress, if not set, it is generated in
1289 the same way as the MAC address of the main
1296 <title>[VXCAN] Section Options
</title>
1297 <para>The
<literal>[VXCAN]
</literal> section only applies for
1298 netdevs of kind
<literal>vxcan
</literal> and accepts the
1299 following key:
</para>
1301 <variablelist class='network-directives'
>
1303 <term><varname>Peer=
</varname></term>
1305 <para>The peer interface name used when creating the netdev.
1306 This option is compulsory.
</para>
1312 <title>[Tun] Section Options
</title>
1314 <para>The
<literal>[Tun]
</literal> section only applies for
1315 netdevs of kind
<literal>tun
</literal>, and accepts the following
1318 <variablelist class='network-directives'
>
1320 <term><varname>OneQueue=
</varname></term>
1321 <listitem><para>Takes a boolean. Configures whether
1322 all packets are queued at the device (enabled), or a fixed
1323 number of packets are queued at the device and the rest at the
1324 <literal>qdisc
</literal>. Defaults to
1325 <literal>no
</literal>.
</para>
1329 <term><varname>MultiQueue=
</varname></term>
1330 <listitem><para>Takes a boolean. Configures whether
1331 to use multiple file descriptors (queues) to parallelize
1332 packets sending and receiving. Defaults to
1333 <literal>no
</literal>.
</para>
1337 <term><varname>PacketInfo=
</varname></term>
1338 <listitem><para>Takes a boolean. Configures whether
1339 packets should be prepended with four extra bytes (two flag
1340 bytes and two protocol bytes). If disabled, it indicates that
1341 the packets will be pure IP packets. Defaults to
1342 <literal>no
</literal>.
</para>
1346 <term><varname>VNetHeader=
</varname></term>
1347 <listitem><para>Takes a boolean. Configures
1348 IFF_VNET_HDR flag for a tap device. It allows sending
1349 and receiving larger Generic Segmentation Offload (GSO)
1350 packets. This may increase throughput significantly.
1352 <literal>no
</literal>.
</para>
1356 <term><varname>User=
</varname></term>
1357 <listitem><para>User to grant access to the
1358 <filename>/dev/net/tun
</filename> device.
</para>
1362 <term><varname>Group=
</varname></term>
1363 <listitem><para>Group to grant access to the
1364 <filename>/dev/net/tun
</filename> device.
</para>
1373 <title>[Tap] Section Options
</title>
1375 <para>The
<literal>[Tap]
</literal> section only applies for
1376 netdevs of kind
<literal>tap
</literal>, and accepts the same keys
1377 as the
<literal>[Tun]
</literal> section.
</para>
1381 <title>[WireGuard] Section Options
</title>
1383 <para>The
<literal>[WireGuard]
</literal> section accepts the following
1386 <variablelist class='network-directives'
>
1388 <term><varname>PrivateKey=
</varname></term>
1390 <para>The Base64 encoded private key for the interface. It can be
1391 generated using the
<command>wg genkey
</command> command
1392 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
1393 This option or
<varname>PrivateKeyFile=
</varname> is mandatory to use WireGuard.
1394 Note that because this information is secret, you may want to set
1395 the permissions of the .netdev file to be owned by
<literal>root:systemd-network
</literal>
1396 with a
<literal>0640</literal> file mode.
</para>
1400 <term><varname>PrivateKeyFile=
</varname></term>
1402 <para>Takes an absolute path to a file which contains the Base64 encoded private key for the interface.
1403 When this option is specified, then
<varname>PrivateKey=
</varname> is ignored.
1404 Note that the file must be readable by the user
<literal>systemd-network
</literal>, so it
1405 should be, e.g., owned by
<literal>root:systemd-network
</literal> with a
1406 <literal>0640</literal> file mode.
</para>
1410 <term><varname>ListenPort=
</varname></term>
1412 <para>Sets UDP port for listening. Takes either value between
1 and
65535
1413 or
<literal>auto
</literal>. If
<literal>auto
</literal> is specified,
1414 the port is automatically generated based on interface name.
1415 Defaults to
<literal>auto
</literal>.
</para>
1419 <term><varname>FwMark=
</varname></term>
1421 <para>Sets a firewall mark on outgoing WireGuard packets from this interface.
</para>
1428 <title>[WireGuardPeer] Section Options
</title>
1430 <para>The
<literal>[WireGuardPeer]
</literal> section accepts the following
1433 <variablelist class='network-directives'
>
1435 <term><varname>PublicKey=
</varname></term>
1437 <para>Sets a Base64 encoded public key calculated by
<command>wg pubkey
</command>
1438 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1439 from a private key, and usually transmitted out of band to the
1440 author of the configuration file. This option is mandatory for this
1445 <term><varname>PresharedKey=
</varname></term>
1447 <para>Optional preshared key for the interface. It can be generated
1448 by the
<command>wg genpsk
</command> command. This option adds an
1449 additional layer of symmetric-key cryptography to be mixed into the
1450 already existing public-key cryptography, for post-quantum
1452 Note that because this information is secret, you may want to set
1453 the permissions of the .netdev file to be owned by
<literal>root:systemd-networkd
</literal>
1454 with a
<literal>0640</literal> file mode.
</para>
1458 <term><varname>PresharedKeyFile=
</varname></term>
1460 <para>Takes an absolute path to a file which contains the Base64 encoded preshared key for the
1461 peer. When this option is specified, then
<varname>PresharedKey=
</varname> is ignored.
1462 Note that the file must be readable by the user
<literal>systemd-network
</literal>, so it
1463 should be, e.g., owned by
<literal>root:systemd-network
</literal> with a
1464 <literal>0640</literal> file mode.
</para>
1468 <term><varname>AllowedIPs=
</varname></term>
1470 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1471 from which this peer is allowed to send incoming traffic and to
1472 which outgoing traffic for this peer is directed. The catch-all
1473 0.0.0.0/
0 may be specified for matching all IPv4 addresses, and
1474 ::/
0 may be specified for matching all IPv6 addresses.
</para>
1478 <term><varname>Endpoint=
</varname></term>
1480 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1481 a port number. This endpoint will be updated automatically once to
1482 the most recent source IP address and port of correctly
1483 authenticated packets from the peer at configuration time.
</para>
1487 <term><varname>PersistentKeepalive=
</varname></term>
1489 <para>Sets a seconds interval, between
1 and
65535 inclusive, of how often
1490 to send an authenticated empty packet to the peer for the purpose
1491 of keeping a stateful firewall or NAT mapping valid persistently.
1492 For example, if the interface very rarely sends traffic, but it
1493 might at anytime receive traffic from a peer, and it is behind NAT,
1494 the interface might benefit from having a persistent keepalive
1495 interval of
25 seconds. If set to
0 or
"off", this option is
1496 disabled. By default or when unspecified, this option is off.
1497 Most users will not need this.
</para>
1504 <title>[Bond] Section Options
</title>
1506 <para>The
<literal>[Bond]
</literal> section accepts the following
1509 <variablelist class='network-directives'
>
1511 <term><varname>Mode=
</varname></term>
1513 <para>Specifies one of the bonding policies. The default is
1514 <literal>balance-rr
</literal> (round robin). Possible values are
1515 <literal>balance-rr
</literal>,
1516 <literal>active-backup
</literal>,
1517 <literal>balance-xor
</literal>,
1518 <literal>broadcast
</literal>,
1519 <literal>802.3ad
</literal>,
1520 <literal>balance-tlb
</literal>, and
1521 <literal>balance-alb
</literal>.
1527 <term><varname>TransmitHashPolicy=
</varname></term>
1529 <para>Selects the transmit hash policy to use for slave
1530 selection in balance-xor,
802.3ad, and tlb modes. Possible
1532 <literal>layer2
</literal>,
1533 <literal>layer3+
4</literal>,
1534 <literal>layer2+
3</literal>,
1535 <literal>encap2+
3</literal>, and
1536 <literal>encap3+
4</literal>.
1542 <term><varname>LACPTransmitRate=
</varname></term>
1544 <para>Specifies the rate with which link partner transmits
1545 Link Aggregation Control Protocol Data Unit packets in
1546 802.3ad mode. Possible values are
<literal>slow
</literal>,
1547 which requests partner to transmit LACPDUs every
30 seconds,
1548 and
<literal>fast
</literal>, which requests partner to
1549 transmit LACPDUs every second. The default value is
1550 <literal>slow
</literal>.
</para>
1555 <term><varname>MIIMonitorSec=
</varname></term>
1557 <para>Specifies the frequency that Media Independent
1558 Interface link monitoring will occur. A value of zero
1559 disables MII link monitoring. This value is rounded down to
1560 the nearest millisecond. The default value is
0.
</para>
1565 <term><varname>UpDelaySec=
</varname></term>
1567 <para>Specifies the delay before a link is enabled after a
1568 link up status has been detected. This value is rounded down
1569 to a multiple of MIIMonitorSec. The default value is
1575 <term><varname>DownDelaySec=
</varname></term>
1577 <para>Specifies the delay before a link is disabled after a
1578 link down status has been detected. This value is rounded
1579 down to a multiple of MIIMonitorSec. The default value is
1585 <term><varname>LearnPacketIntervalSec=
</varname></term>
1587 <para>Specifies the number of seconds between instances where the bonding
1588 driver sends learning packets to each slave peer switch.
1589 The valid range is
1–
0x7fffffff; the default value is
1. This option
1590 has an effect only for the balance-tlb and balance-alb modes.
</para>
1595 <term><varname>AdSelect=
</varname></term>
1597 <para>Specifies the
802.3ad aggregation selection logic to use. Possible values are
1598 <literal>stable
</literal>,
1599 <literal>bandwidth
</literal> and
1600 <literal>count
</literal>.
1606 <term><varname>AdActorSystemPriority=
</varname></term>
1608 <para>Specifies the
802.3ad actor system priority. Ranges [
1-
65535].
</para>
1613 <term><varname>AdUserPortKey=
</varname></term>
1615 <para>Specifies the
802.3ad user defined portion of the port key. Ranges [
0-
1023].
</para>
1620 <term><varname>AdActorSystem=
</varname></term>
1622 <para>Specifies the
802.3ad system mac address. This can not be either NULL or Multicast.
</para>
1627 <term><varname>FailOverMACPolicy=
</varname></term>
1629 <para>Specifies whether the active-backup mode should set all slaves to
1630 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
1631 bond's MAC address in accordance with the selected policy. The default policy is none.
1633 <literal>none
</literal>,
1634 <literal>active
</literal> and
1635 <literal>follow
</literal>.
1641 <term><varname>ARPValidate=
</varname></term>
1643 <para>Specifies whether or not ARP probes and replies should be
1644 validated in any mode that supports ARP monitoring, or whether
1645 non-ARP traffic should be filtered (disregarded) for link
1646 monitoring purposes. Possible values are
1647 <literal>none
</literal>,
1648 <literal>active
</literal>,
1649 <literal>backup
</literal> and
1650 <literal>all
</literal>.
1656 <term><varname>ARPIntervalSec=
</varname></term>
1658 <para>Specifies the ARP link monitoring frequency in milliseconds.
1659 A value of
0 disables ARP monitoring. The default value is
0.
1665 <term><varname>ARPIPTargets=
</varname></term>
1667 <para>Specifies the IP addresses to use as ARP monitoring peers when
1668 ARPIntervalSec is greater than
0. These are the targets of the ARP request
1669 sent to determine the health of the link to the targets.
1670 Specify these values in IPv4 dotted decimal format. At least one IP
1671 address must be given for ARP monitoring to function. The
1672 maximum number of targets that can be specified is
16. The
1673 default value is no IP addresses.
1679 <term><varname>ARPAllTargets=
</varname></term>
1681 <para>Specifies the quantity of ARPIPTargets that must be reachable
1682 in order for the ARP monitor to consider a slave as being up.
1683 This option affects only active-backup mode for slaves with
1684 ARPValidate enabled. Possible values are
1685 <literal>any
</literal> and
1686 <literal>all
</literal>.
1692 <term><varname>PrimaryReselectPolicy=
</varname></term>
1694 <para>Specifies the reselection policy for the primary slave. This
1695 affects how the primary slave is chosen to become the active slave
1696 when failure of the active slave or recovery of the primary slave
1697 occurs. This option is designed to prevent flip-flopping between
1698 the primary slave and other slaves. Possible values are
1699 <literal>always
</literal>,
1700 <literal>better
</literal> and
1701 <literal>failure
</literal>.
1707 <term><varname>ResendIGMP=
</varname></term>
1709 <para>Specifies the number of IGMP membership reports to be issued after
1710 a failover event. One membership report is issued immediately after
1711 the failover, subsequent packets are sent in each
200ms interval.
1712 The valid range is
0–
255. Defaults to
1. A value of
0
1713 prevents the IGMP membership report from being issued in response
1714 to the failover event.
1720 <term><varname>PacketsPerSlave=
</varname></term>
1722 <para>Specify the number of packets to transmit through a slave before
1723 moving to the next one. When set to
0, then a slave is chosen at
1724 random. The valid range is
0–
65535. Defaults to
1. This option
1725 only has effect when in balance-rr mode.
1731 <term><varname>GratuitousARP=
</varname></term>
1733 <para>Specify the number of peer notifications (gratuitous ARPs and
1734 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1735 failover event. As soon as the link is up on the new slave,
1736 a peer notification is sent on the bonding device and each
1737 VLAN sub-device. This is repeated at each link monitor interval
1738 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1739 greater than
1. The valid range is
0–
255. The default value is
1.
1740 These options affect only the active-backup mode.
1746 <term><varname>AllSlavesActive=
</varname></term>
1748 <para>Takes a boolean. Specifies that duplicate frames (received on inactive ports)
1749 should be dropped when false, or delivered when true. Normally, bonding will drop
1750 duplicate frames (received on inactive ports), which is desirable for
1751 most users. But there are some times it is nice to allow duplicate
1752 frames to be delivered. The default value is false (drop duplicate frames
1753 received on inactive ports).
1759 <term><varname>DynamicTransmitLoadBalancing=
</varname></term>
1761 <para>Takes a boolean. Specifies if dynamic shuffling of flows is enabled. Applies only
1762 for balance-tlb mode. Defaults to unset.
1768 <term><varname>MinLinks=
</varname></term>
1770 <para>Specifies the minimum number of links that must be active before
1771 asserting carrier. The default value is
0.
1777 <para>For more detail information see
1778 <ulink url=
"https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1779 Linux Ethernet Bonding Driver HOWTO
</ulink></para>
1784 <title>Examples
</title>
1786 <title>/etc/systemd/network/
25-bridge.netdev
</title>
1788 <programlisting>[NetDev]
1790 Kind=bridge
</programlisting>
1794 <title>/etc/systemd/network/
25-vlan1.netdev
</title>
1796 <programlisting>[Match]
1804 Id=
1</programlisting>
1807 <title>/etc/systemd/network/
25-ipip.netdev
</title>
1808 <programlisting>[NetDev]
1814 Local=
192.168.223.238
1815 Remote=
192.169.224.239
1816 TTL=
64</programlisting>
1819 <title>/etc/systemd/network/
1-fou-tunnel.netdev
</title>
1820 <programlisting>[NetDev]
1830 <title>/etc/systemd/network/
25-fou-ipip.netdev
</title>
1831 <programlisting>[NetDev]
1838 Remote=
10.65.208.211
1840 FOUDestinationPort=
5555
1844 <title>/etc/systemd/network/
25-tap.netdev
</title>
1845 <programlisting>[NetDev]
1851 PacketInfo=yes
</programlisting> </example>
1854 <title>/etc/systemd/network/
25-sit.netdev
</title>
1855 <programlisting>[NetDev]
1862 Remote=
10.65.223.239</programlisting>
1866 <title>/etc/systemd/network/
25-
6rd.netdev
</title>
1867 <programlisting>[NetDev]
1874 IPv6RapidDeploymentPrefix=
2602::/
24</programlisting>
1878 <title>/etc/systemd/network/
25-gre.netdev
</title>
1879 <programlisting>[NetDev]
1886 Remote=
10.65.223.239</programlisting>
1890 <title>/etc/systemd/network/
25-vti.netdev
</title>
1892 <programlisting>[NetDev]
1899 Remote=
10.65.223.239</programlisting>
1903 <title>/etc/systemd/network/
25-veth.netdev
</title>
1904 <programlisting>[NetDev]
1909 Name=veth-peer
</programlisting>
1913 <title>/etc/systemd/network/
25-bond.netdev
</title>
1914 <programlisting>[NetDev]
1920 TransmitHashPolicy=layer3+
4
1922 LACPTransmitRate=fast
1927 <title>/etc/systemd/network/
25-dummy.netdev
</title>
1928 <programlisting>[NetDev]
1931 MACAddress=
12:
34:
56:
78:
9a:bc
</programlisting>
1934 <title>/etc/systemd/network/
25-vrf.netdev
</title>
1935 <para>Create a VRF interface with table
42.
</para>
1936 <programlisting>[NetDev]
1941 Table=
42</programlisting>
1945 <title>/etc/systemd/network/
25-macvtap.netdev
</title>
1946 <para>Create a MacVTap device.
</para>
1947 <programlisting>[NetDev]
1953 <title>/etc/systemd/network/
25-wireguard.netdev
</title>
1954 <programlisting>[NetDev]
1959 PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
1963 PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
1964 AllowedIPs=fd31:bf08:
57cb::/
48,
192.168.26.0/
24
1965 Endpoint=wireguard.example.com:
51820</programlisting>
1969 <title>See Also
</title>
1971 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1972 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1973 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1974 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>