1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
9 <refentry id=
"systemd.netdev" conditional='ENABLE_NETWORKD'
>
12 <title>systemd.network
</title>
13 <productname>systemd
</productname>
17 <refentrytitle>systemd.netdev
</refentrytitle>
18 <manvolnum>5</manvolnum>
22 <refname>systemd.netdev
</refname>
23 <refpurpose>Virtual Network Device configuration
</refpurpose>
27 <para><filename><replaceable>netdev
</replaceable>.netdev
</filename></para>
31 <title>Description
</title>
33 <para>Network setup is performed by
34 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
37 <para>The main Virtual Network Device file must have the extension
<filename>.netdev
</filename>;
38 other extensions are ignored. Virtual network devices are created as soon as networkd is
39 started. If a netdev with the specified name already exists, networkd will use that as-is rather
40 than create its own. Note that the settings of the pre-existing netdev will not be changed by
43 <para>The
<filename>.netdev
</filename> files are read from the files located in the system
44 network directory
<filename>/usr/lib/systemd/network
</filename>, the volatile runtime network
45 directory
<filename>/run/systemd/network
</filename> and the local administration network
46 directory
<filename>/etc/systemd/network
</filename>. All configuration files are collectively
47 sorted and processed in lexical order, regardless of the directories in which they live.
48 However, files with identical filenames replace each other. Files in
<filename>/etc
</filename>
49 have the highest priority, files in
<filename>/run
</filename> take precedence over files with
50 the same name in
<filename>/usr/lib
</filename>. This can be used to override a system-supplied
51 configuration file with a local file if needed. As a special case, an empty file (file size
0)
52 or symlink with the same name pointing to
<filename>/dev/null
</filename> disables the
53 configuration file entirely (it is
"masked").
</para>
55 <para>Along with the netdev file
<filename>foo.netdev
</filename>, a
"drop-in" directory
56 <filename>foo.netdev.d/
</filename> may exist. All files with the suffix
<literal>.conf
</literal>
57 from this directory will be parsed after the file itself is parsed. This is useful to alter or
58 add configuration settings, without having to modify the main configuration file. Each drop-in
59 file must have appropriate section headers.
</para>
61 <para>In addition to
<filename>/etc/systemd/network
</filename>, drop-in
<literal>.d
</literal>
62 directories can be placed in
<filename>/usr/lib/systemd/network
</filename> or
63 <filename>/run/systemd/network
</filename> directories. Drop-in files in
64 <filename>/etc
</filename> take precedence over those in
<filename>/run
</filename> which in turn
65 take precedence over those in
<filename>/usr/lib
</filename>. Drop-in files under any of these
66 directories take precedence over the main netdev file wherever located. (Of course, since
67 <filename>/run
</filename> is temporary and
<filename>/usr/lib
</filename> is for vendors, it is
68 unlikely drop-ins should be used in either of those places.)
</para>
72 <title>Supported netdev kinds
</title>
74 <para>The following kinds of virtual network devices may be
75 configured in
<filename>.netdev
</filename> files:
</para>
78 <title>Supported kinds of virtual network devices
</title>
81 <colspec colname='kind'
/>
82 <colspec colname='explanation'
/>
85 <entry>Description
</entry>
88 <row><entry><varname>bond
</varname></entry>
89 <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>
91 <row><entry><varname>bridge
</varname></entry>
92 <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>
94 <row><entry><varname>dummy
</varname></entry>
95 <entry>A dummy device drops all packets sent to it.
</entry></row>
97 <row><entry><varname>gre
</varname></entry>
98 <entry>A Level
3 GRE tunnel over IPv4. See
<ulink url=
"https://tools.ietf.org/html/rfc2784">RFC
2784</ulink> for details.
</entry></row>
100 <row><entry><varname>gretap
</varname></entry>
101 <entry>A Level
2 GRE tunnel over IPv4.
</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>vrf
</varname></entry>
152 <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>
154 <row><entry><varname>vcan
</varname></entry>
155 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.
</entry></row>
157 <row><entry><varname>vxcan
</varname></entry>
158 <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.
161 <row><entry><varname>wireguard
</varname></entry>
162 <entry>WireGuard Secure Network Tunnel.
</entry></row>
164 <row><entry><varname>netdevsim
</varname></entry>
165 <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>
167 <row><entry><varname>fou
</varname></entry>
168 <entry>Foo-over-UDP tunneling.
</entry></row>
177 <title>[Match] Section Options
</title>
179 <para>A virtual network device is only created if the
180 <literal>[Match]
</literal> section matches the current
181 environment, or if the section is empty. The following keys are
184 <variablelist class='network-directives'
>
186 <term><varname>Host=
</varname></term>
188 <para>Matches against the hostname or machine ID of the
189 host. See
<literal>ConditionHost=
</literal> in
190 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
196 <term><varname>Virtualization=
</varname></term>
198 <para>Checks whether the system is executed in a virtualized
199 environment and optionally test whether it is a specific
201 <literal>ConditionVirtualization=
</literal> in
202 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
208 <term><varname>KernelCommandLine=
</varname></term>
210 <para>Checks whether a specific kernel command line option
211 is set (or if prefixed with the exclamation mark unset). See
212 <literal>ConditionKernelCommandLine=
</literal> in
213 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
219 <term><varname>KernelVersion=
</varname></term>
221 <para>Checks whether the kernel version (as reported by
<command>uname -r
</command>) matches a certain
222 expression (or if prefixed with the exclamation mark does not match it). See
223 <literal>ConditionKernelVersion=
</literal> in
224 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details.
229 <term><varname>Architecture=
</varname></term>
231 <para>Checks whether the system is running on a specific
232 architecture. See
<literal>ConditionArchitecture=
</literal> in
233 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
243 <title>[NetDev] Section Options
</title>
245 <para>The
<literal>[NetDev]
</literal> section accepts the
246 following keys:
</para>
248 <variablelist class='network-directives'
>
250 <term><varname>Description=
</varname></term>
252 <para>A free-form description of the netdev.
</para>
256 <term><varname>Name=
</varname></term>
258 <para>The interface name used when creating the netdev.
259 This option is compulsory.
</para>
263 <term><varname>Kind=
</varname></term>
265 <para>The netdev kind. This option is compulsory. See the
266 <literal>Supported netdev kinds
</literal> section for the
271 <term><varname>MTUBytes=
</varname></term>
273 <para>The maximum transmission unit in bytes to set for the device. The usual suffixes K, M, G,
274 are supported and are understood to the base of
1024. For
<literal>tun
</literal> or
275 <literal>tap
</literal> devices,
<varname>MTUBytes=
</varname> setting is not currently supported in
276 <literal>[NetDev]
</literal> section. Please specify it in
<literal>[Link]
</literal> section of
278 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
283 <term><varname>MACAddress=
</varname></term>
285 <para>The MAC address to use for the device. If none is
286 given, one is generated based on the interface name and
288 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
289 For
<literal>tun
</literal> or
<literal>tap
</literal> devices,
<varname>MACAddress=
</varname> setting
290 is not currently supported in
<literal>[NetDev]
</literal> section. Please specify it in
291 <literal>[Link]
</literal> section of corresponding
292 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
300 <title>[Bridge] Section Options
</title>
302 <para>The
<literal>[Bridge]
</literal> section only applies for
303 netdevs of kind
<literal>bridge
</literal>, and accepts the
304 following keys:
</para>
306 <variablelist class='network-directives'
>
308 <term><varname>HelloTimeSec=
</varname></term>
310 <para>HelloTimeSec specifies the number of seconds between two hello packets
311 sent out by the root bridge and the designated bridges. Hello packets are
312 used to communicate information about the topology throughout the entire
313 bridged local area network.
</para>
317 <term><varname>MaxAgeSec=
</varname></term>
319 <para>MaxAgeSec specifies the number of seconds of maximum message age.
320 If the last seen (received) hello packet is more than this number of
321 seconds old, the bridge in question will start the takeover procedure
322 in attempt to become the Root Bridge itself.
</para>
326 <term><varname>ForwardDelaySec=
</varname></term>
328 <para>ForwardDelaySec specifies the number of seconds spent in each
329 of the Listening and Learning states before the Forwarding state is entered.
</para>
333 <term><varname>AgeingTimeSec=
</varname></term>
335 <para>This specifies the number of seconds a MAC Address will be kept in
336 the forwarding database after having a packet received from this MAC Address.
</para>
340 <term><varname>Priority=
</varname></term>
342 <para>The priority of the bridge. An integer between
0 and
65535. A lower value
343 means higher priority. The bridge having the lowest priority will be elected as root bridge.
</para>
347 <term><varname>GroupForwardMask=
</varname></term>
349 <para>A
16-bit bitmask represented as an integer which allows forwarding of link
350 local frames with
802.1D reserved addresses (
01:
80:C2:
00:
00:
0X). A logical AND
351 is performed between the specified bitmask and the exponentiation of
2^X, the
352 lower nibble of the last octet of the MAC address. For example, a value of
8
353 would allow forwarding of frames addressed to
01:
80:C2:
00:
00:
03 (
802.1X PAE).
</para>
357 <term><varname>DefaultPVID=
</varname></term>
359 <para>This specifies the default port VLAN ID of a newly attached bridge port.
360 Set this to an integer in the range
1–
4094 or
<literal>none
</literal> to disable the PVID.
</para>
364 <term><varname>MulticastQuerier=
</varname></term>
366 <para>A boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
367 If enabled, the kernel will send general ICMP queries from a zero source address.
368 This feature should allow faster convergence on startup, but it causes some
369 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
370 When unset, the kernel's default setting applies.
375 <term><varname>MulticastSnooping=
</varname></term>
377 <para>A boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
378 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
379 between hosts and multicast routers. When unset, the kernel's default setting applies.
384 <term><varname>VLANFiltering=
</varname></term>
386 <para>A boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
387 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's
388 default setting applies.
393 <term><varname>STP=
</varname></term>
395 <para>A boolean. This enables the bridge's Spanning Tree Protocol (STP). When unset,
396 the kernel's default setting applies.
404 <title>[VLAN] Section Options
</title>
406 <para>The
<literal>[VLAN]
</literal> section only applies for
407 netdevs of kind
<literal>vlan
</literal>, and accepts the
408 following key:
</para>
410 <variablelist class='network-directives'
>
412 <term><varname>Id=
</varname></term>
414 <para>The VLAN ID to use. An integer in the range
0–
4094.
415 This option is compulsory.
</para>
419 <term><varname>GVRP=
</varname></term>
421 <para>The Generic VLAN Registration Protocol (GVRP) is a protocol that
422 allows automatic learning of VLANs on a network. A boolean. When unset,
423 the kernel's default setting applies.
</para>
427 <term><varname>MVRP=
</varname></term>
429 <para>Multiple VLAN Registration Protocol (MVRP) formerly known as GARP VLAN
430 Registration Protocol (GVRP) is a standards-based Layer
2 network protocol,
431 for automatic configuration of VLAN information on switches. It was defined
432 in the
802.1ak amendment to
802.1Q-
2005. A boolean. When unset, the kernel's
433 default setting applies.
</para>
437 <term><varname>LooseBinding=
</varname></term>
439 <para>The VLAN loose binding mode, in which only the operational state is passed
440 from the parent to the associated VLANs, but the VLAN device state is not changed.
441 A boolean. When unset, the kernel's default setting applies.
</para>
445 <term><varname>ReorderHeader=
</varname></term>
447 <para>The VLAN reorder header is set VLAN interfaces behave like physical interfaces.
448 A boolean. When unset, the kernel's default setting applies.
</para>
455 <title>[MACVLAN] Section Options
</title>
457 <para>The
<literal>[MACVLAN]
</literal> section only applies for
458 netdevs of kind
<literal>macvlan
</literal>, and accepts the
459 following key:
</para>
461 <variablelist class='network-directives'
>
463 <term><varname>Mode=
</varname></term>
465 <para>The MACVLAN mode to use. The supported options are
466 <literal>private
</literal>,
467 <literal>vepa
</literal>,
468 <literal>bridge
</literal>, and
469 <literal>passthru
</literal>.
478 <title>[MACVTAP] Section Options
</title>
480 <para>The
<literal>[MACVTAP]
</literal> section applies for
481 netdevs of kind
<literal>macvtap
</literal> and accepts the
482 same key as
<literal>[MACVLAN]
</literal>.
</para>
487 <title>[IPVLAN] Section Options
</title>
489 <para>The
<literal>[IPVLAN]
</literal> section only applies for
490 netdevs of kind
<literal>ipvlan
</literal>, and accepts the
491 following key:
</para>
493 <variablelist class='network-directives'
>
495 <term><varname>Mode=
</varname></term>
497 <para>The IPVLAN mode to use. The supported options are
498 <literal>L2
</literal>,
<literal>L3
</literal> and
<literal>L3S
</literal>.
503 <term><varname>Flags=
</varname></term>
505 <para>The IPVLAN flags to use. The supported options are
506 <literal>bridge
</literal>,
<literal>private
</literal> and
<literal>vepa
</literal>.
515 <title>[VXLAN] Section Options
</title>
516 <para>The
<literal>[VXLAN]
</literal> section only applies for
517 netdevs of kind
<literal>vxlan
</literal>, and accepts the
518 following keys:
</para>
520 <variablelist class='network-directives'
>
522 <term><varname>Id=
</varname></term>
524 <para>The VXLAN ID to use.
</para>
528 <term><varname>Remote=
</varname></term>
530 <para>Configures destination IP address.
</para>
534 <term><varname>Local=
</varname></term>
536 <para>Configures local IP address.
</para>
540 <term><varname>TOS=
</varname></term>
542 <para>The Type Of Service byte value for a vxlan interface.
</para>
546 <term><varname>TTL=
</varname></term>
548 <para>A fixed Time To Live N on Virtual eXtensible Local
549 Area Network packets. N is a number in the range
1–
255.
0
550 is a special value meaning that packets inherit the TTL
555 <term><varname>MacLearning=
</varname></term>
557 <para>A boolean. When true, enables dynamic MAC learning
558 to discover remote MAC addresses.
</para>
562 <term><varname>FDBAgeingSec=
</varname></term>
564 <para>The lifetime of Forwarding Database entry learnt by
565 the kernel, in seconds.
</para>
569 <term><varname>MaximumFDBEntries=
</varname></term>
571 <para>Configures maximum number of FDB entries.
</para>
575 <term><varname>ReduceARPProxy=
</varname></term>
577 <para>A boolean. When true, bridge-connected VXLAN tunnel
578 endpoint answers ARP requests from the local bridge on behalf
579 of remote Distributed Overlay Virtual Ethernet
580 <ulink url=
"https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
581 (DVOE)
</ulink> clients. Defaults to false.
</para>
585 <term><varname>L2MissNotification=
</varname></term>
587 <para>A boolean. When true, enables netlink LLADDR miss
588 notifications.
</para>
592 <term><varname>L3MissNotification=
</varname></term>
594 <para>A boolean. When true, enables netlink IP address miss
595 notifications.
</para>
599 <term><varname>RouteShortCircuit=
</varname></term>
601 <para>A boolean. When true, route short circuiting is turned
606 <term><varname>UDPChecksum=
</varname></term>
608 <para>A boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.
</para>
612 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
614 <para>A boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.
</para>
618 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
620 <para>A boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.
</para>
624 <term><varname>RemoteChecksumTx=
</varname></term>
626 <para>A boolean. When true, remote transmit checksum offload of VXLAN is turned on.
</para>
630 <term><varname>RemoteChecksumRx=
</varname></term>
632 <para>A boolean. When true, remote receive checksum offload in VXLAN is turned on.
</para>
636 <term><varname>GroupPolicyExtension=
</varname></term>
638 <para>A boolean. When true, it enables Group Policy VXLAN extension security label mechanism
639 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
640 <ulink url=
"https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
641 VXLAN Group Policy
</ulink> document. Defaults to false.
</para>
645 <term><varname>DestinationPort=
</varname></term>
647 <para>Configures the default destination UDP port on a per-device basis.
648 If destination port is not specified then Linux kernel default will be used.
649 Set destination port
4789 to get the IANA assigned value. If not set or if the
650 destination port is assigned the empty string the default port of
4789 is used.
</para>
654 <term><varname>PortRange=
</varname></term>
656 <para>Configures VXLAN port range. VXLAN bases source
657 UDP port based on flow to help the receiver to be able
658 to load balance based on outer header flow. It
659 restricts the port range to the normal UDP local
660 ports, and allows overriding via configuration.
</para>
664 <term><varname>FlowLabel=
</varname></term>
666 <para>Specifies the flow label to use in outgoing packets.
667 The valid range is
0-
1048575.
674 <title>[GENEVE] Section Options
</title>
675 <para>The
<literal>[GENEVE]
</literal> section only applies for
676 netdevs of kind
<literal>geneve
</literal>, and accepts the
677 following keys:
</para>
679 <variablelist class='network-directives'
>
681 <term><varname>Id=
</varname></term>
683 <para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [
0-
16777215].
</para>
687 <term><varname>Remote=
</varname></term>
689 <para>Specifies the unicast destination IP address to use in outgoing packets.
</para>
693 <term><varname>TOS=
</varname></term>
695 <para>Specifies the TOS value to use in outgoing packets. Ranges [
1-
255].
</para>
699 <term><varname>TTL=
</varname></term>
701 <para>Specifies the TTL value to use in outgoing packets. Ranges [
1-
255].
</para>
705 <term><varname>UDPChecksum=
</varname></term>
707 <para>A boolean. When true, specifies if UDP checksum is calculated for transmitted packets over IPv4.
</para>
711 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
713 <para>A boolean. When true, skip UDP checksum calculation for transmitted packets over IPv6.
</para>
717 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
719 <para>A boolean. When true, allows incoming UDP packets over IPv6 with zero checksum field.
</para>
723 <term><varname>DestinationPort=
</varname></term>
725 <para>Specifies destination port. Defaults to
6081. If not set or assigned the empty string, the default
726 port of
6081 is used.
</para>
730 <term><varname>FlowLabel=
</varname></term>
732 <para>Specifies the flow label to use in outgoing packets.
</para>
738 <title>[Tunnel] Section Options
</title>
740 <para>The
<literal>[Tunnel]
</literal> section only applies for
742 <literal>ipip
</literal>,
743 <literal>sit
</literal>,
744 <literal>gre
</literal>,
745 <literal>gretap
</literal>,
746 <literal>ip6gre
</literal>,
747 <literal>ip6gretap
</literal>,
748 <literal>vti
</literal>,
749 <literal>vti6
</literal>, and
750 <literal>ip6tnl
</literal> and accepts
751 the following keys:
</para>
753 <variablelist class='network-directives'
>
755 <term><varname>Local=
</varname></term>
757 <para>A static local address for tunneled packets. It must
758 be an address on another interface of this host.
</para>
762 <term><varname>Remote=
</varname></term>
764 <para>The remote endpoint of the tunnel.
</para>
768 <term><varname>TOS=
</varname></term>
770 <para>The Type Of Service byte value for a tunnel interface.
771 For details about the TOS, see the
772 <ulink url=
"http://tools.ietf.org/html/rfc1349"> Type of
773 Service in the Internet Protocol Suite
</ulink> document.
778 <term><varname>TTL=
</varname></term>
780 <para>A fixed Time To Live N on tunneled packets. N is a
781 number in the range
1–
255.
0 is a special value meaning that
782 packets inherit the TTL value. The default value for IPv4
783 tunnels is: inherit. The default value for IPv6 tunnels is
788 <term><varname>DiscoverPathMTU=
</varname></term>
790 <para>A boolean. When true, enables Path MTU Discovery on
795 <term><varname>IPv6FlowLabel=
</varname></term>
797 <para>Configures the
20-bit flow label (see
<ulink url=
"https://tools.ietf.org/html/rfc6437">
798 RFC
6437</ulink>) field in the IPv6 header (see
<ulink url=
"https://tools.ietf.org/html/rfc2460">
799 RFC
2460</ulink>), which is used by a node to label packets of a flow.
800 It is only used for IPv6 tunnels.
801 A flow label of zero is used to indicate packets that have
803 It can be configured to a value in the range
0–
0xFFFFF, or be
804 set to
<literal>inherit
</literal>, in which case the original flowlabel is used.
</para>
808 <term><varname>CopyDSCP=
</varname></term>
810 <para>A boolean. When true, the Differentiated Service Code
811 Point (DSCP) field will be copied to the inner header from
812 outer header during the decapsulation of an IPv6 tunnel
813 packet. DSCP is a field in an IP packet that enables different
814 levels of service to be assigned to network traffic.
815 Defaults to
<literal>no
</literal>.
820 <term><varname>EncapsulationLimit=
</varname></term>
822 <para>The Tunnel Encapsulation Limit option specifies how many additional
823 levels of encapsulation are permitted to be prepended to the packet.
824 For example, a Tunnel Encapsulation Limit option containing a limit
825 value of zero means that a packet carrying that option may not enter
826 another tunnel before exiting the current tunnel.
827 (see
<ulink url=
"https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC
2473</ulink>).
828 The valid range is
0–
255 and
<literal>none
</literal>. Defaults to
4.
833 <term><varname>Key=
</varname></term>
835 <para>The
<varname>Key=
</varname> parameter specifies the same key to use in
836 both directions (
<varname>InputKey=
</varname> and
<varname>OutputKey=
</varname>).
837 The
<varname>Key=
</varname> is either a number or an IPv4 address-like dotted quad.
838 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
839 and control path) in ip xfrm (framework used to implement IPsec protocol).
840 See
<ulink url=
"http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
841 ip-xfrm — transform configuration
</ulink> for details. It is only used for VTI/VTI6
846 <term><varname>InputKey=
</varname></term>
848 <para>The
<varname>InputKey=
</varname> parameter specifies the key to use for input.
849 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6 tunnels.
</para>
853 <term><varname>OutputKey=
</varname></term>
855 <para>The
<varname>OutputKey=
</varname> parameter specifies the key to use for output.
856 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6 tunnels.
</para>
860 <term><varname>Mode=
</varname></term>
862 <para>An
<literal>ip6tnl
</literal> tunnel can be in one of three
864 <literal>ip6ip6
</literal> for IPv6 over IPv6,
865 <literal>ipip6
</literal> for IPv4 over IPv6 or
866 <literal>any
</literal> for either.
871 <term><varname>Independent=
</varname></term>
873 <para>A boolean. When true tunnel does not require .network file. Created as
"tunnel@NONE".
874 Defaults to
<literal>false
</literal>.
879 <term><varname>AllowLocalRemote=
</varname></term>
881 <para>A boolean. When true allows tunnel traffic on
<varname>ip6tnl
</varname> devices where the remote endpoint is a local host address.
887 <term><varname>FooOverUDP=
</varname></term>
889 <para>A boolean. Specifies whether
<varname>FooOverUDP=
</varname> tunnel is to be configured.
890 Defaults to false. For more detail information see
891 <ulink url=
"https://lwn.net/Articles/614348">Foo over UDP
</ulink></para>
895 <term><varname>FOUDestinationPort=
</varname></term>
897 <para>The
<varname>FOUDestinationPort=
</varname> specifies the UDP destination port for encapsulation.
898 This field is mandatory and is not set by default.
</para>
902 <term><varname>FOUSourcePort=
</varname></term>
904 <para>The
<constant>FOUSourcePort=
</constant> specifies the UDP source port for encapsulation. Defaults to
<varname>0</varname>,
905 that is, the source port for packets is left to the network stack to decide.
</para>
909 <term><varname>Encapsulation=
</varname></term>
911 <para>Accepts the same key as
<literal>[FooOverUDP]
</literal></para>
918 <title>[FooOverUDP] Section Options
</title>
920 <para>The
<literal>[FooOverUDP]
</literal> section only applies for
921 netdevs of kind
<literal>fou
</literal> and accepts the
922 following keys:
</para>
924 <variablelist class='network-directives'
>
926 <term><varname>Protocol=
</varname></term>
928 <para>The
<varname>Protocol=
</varname> specifies the protocol number of the
929 packets arriving at the UDP port. This field is mandatory and is not set by default. Valid range is
1-
255.
</para>
933 <term><varname>Encapsulation=
</varname></term>
935 <para>Specifies the encapsulation mechanism used to store networking packets of various protocols inside the UDP packets. Supports the following values:
937 <literal>FooOverUDP
</literal> provides the simplest no frills model of UDP encapsulation, it simply encapsulates
938 packets directly in the UDP payload.
939 <literal>GenericUDPEncapsulation
</literal> is a generic and extensible encapsulation, it allows encapsulation of packets for any IP
940 protocol and optional data as part of the encapsulation.
941 For more detailed information see
<ulink url=
"https://lwn.net/Articles/615044">Generic UDP Encapsulation
</ulink>.
942 Defaults to
<literal>FooOverUDP
</literal>.
947 <term><varname>Port=
</varname></term>
949 <para>Specifies the port number, where the IP encapsulation packets will arrive. Please take note that the packets
950 will arrive with the encapsulation will be removed. Then they will be manually fed back into the network stack, and sent ahead
951 for delivery to the real destination. This option is mandatory.
</para>
957 <title>[Peer] Section Options
</title>
959 <para>The
<literal>[Peer]
</literal> section only applies for
960 netdevs of kind
<literal>veth
</literal> and accepts the
961 following keys:
</para>
963 <variablelist class='network-directives'
>
965 <term><varname>Name=
</varname></term>
967 <para>The interface name used when creating the netdev.
968 This option is compulsory.
</para>
972 <term><varname>MACAddress=
</varname></term>
974 <para>The peer MACAddress, if not set, it is generated in
975 the same way as the MAC address of the main
982 <title>[VXCAN] Section Options
</title>
983 <para>The
<literal>[VXCAN]
</literal> section only applies for
984 netdevs of kind
<literal>vxcan
</literal> and accepts the
985 following key:
</para>
987 <variablelist class='network-directives'
>
989 <term><varname>Peer=
</varname></term>
991 <para>The peer interface name used when creating the netdev.
992 This option is compulsory.
</para>
998 <title>[Tun] Section Options
</title>
1000 <para>The
<literal>[Tun]
</literal> section only applies for
1001 netdevs of kind
<literal>tun
</literal>, and accepts the following
1004 <variablelist class='network-directives'
>
1006 <term><varname>OneQueue=
</varname></term>
1007 <listitem><para>Takes a boolean argument. Configures whether
1008 all packets are queued at the device (enabled), or a fixed
1009 number of packets are queued at the device and the rest at the
1010 <literal>qdisc
</literal>. Defaults to
1011 <literal>no
</literal>.
</para>
1015 <term><varname>MultiQueue=
</varname></term>
1016 <listitem><para>Takes a boolean argument. Configures whether
1017 to use multiple file descriptors (queues) to parallelize
1018 packets sending and receiving. Defaults to
1019 <literal>no
</literal>.
</para>
1023 <term><varname>PacketInfo=
</varname></term>
1024 <listitem><para>Takes a boolean argument. Configures whether
1025 packets should be prepended with four extra bytes (two flag
1026 bytes and two protocol bytes). If disabled, it indicates that
1027 the packets will be pure IP packets. Defaults to
1028 <literal>no
</literal>.
</para>
1032 <term><varname>VNetHeader=
</varname></term>
1033 <listitem><para>Takes a boolean argument. Configures
1034 IFF_VNET_HDR flag for a tap device. It allows sending
1035 and receiving larger Generic Segmentation Offload (GSO)
1036 packets. This may increase throughput significantly.
1038 <literal>no
</literal>.
</para>
1042 <term><varname>User=
</varname></term>
1043 <listitem><para>User to grant access to the
1044 <filename>/dev/net/tun
</filename> device.
</para>
1048 <term><varname>Group=
</varname></term>
1049 <listitem><para>Group to grant access to the
1050 <filename>/dev/net/tun
</filename> device.
</para>
1059 <title>[Tap] Section Options
</title>
1061 <para>The
<literal>[Tap]
</literal> section only applies for
1062 netdevs of kind
<literal>tap
</literal>, and accepts the same keys
1063 as the
<literal>[Tun]
</literal> section.
</para>
1067 <title>[WireGuard] Section Options
</title>
1069 <para>The
<literal>[WireGuard]
</literal> section accepts the following
1072 <variablelist class='network-directives'
>
1074 <term><varname>PrivateKey=
</varname></term>
1076 <para>The Base64 encoded private key for the interface. It can be
1077 generated using the
<command>wg genkey
</command> command
1078 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
1079 This option is mandatory to use WireGuard.
1080 Note that because this information is secret, you may want to set
1081 the permissions of the .netdev file to be owned by
<literal>root:systemd-network
</literal>
1082 with a
<literal>0640</literal> file mode.
</para>
1086 <term><varname>ListenPort=
</varname></term>
1088 <para>Sets UDP port for listening. Takes either value between
1 and
65535
1089 or
<literal>auto
</literal>. If
<literal>auto
</literal> is specified,
1090 the port is automatically generated based on interface name.
1091 Defaults to
<literal>auto
</literal>.
</para>
1095 <term><varname>FwMark=
</varname></term>
1097 <para>Sets a firewall mark on outgoing WireGuard packets from this interface.
</para>
1104 <title>[WireGuardPeer] Section Options
</title>
1106 <para>The
<literal>[WireGuardPeer]
</literal> section accepts the following
1109 <variablelist class='network-directives'
>
1111 <term><varname>PublicKey=
</varname></term>
1113 <para>Sets a Base64 encoded public key calculated by
<command>wg pubkey
</command>
1114 (see
<citerefentry project=
"wireguard"><refentrytitle>wg
</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
1115 from a private key, and usually transmitted out of band to the
1116 author of the configuration file. This option is mandatory for this
1121 <term><varname>PresharedKey=
</varname></term>
1123 <para>Optional preshared key for the interface. It can be generated
1124 by the
<command>wg genpsk
</command> command. This option adds an
1125 additional layer of symmetric-key cryptography to be mixed into the
1126 already existing public-key cryptography, for post-quantum
1128 Note that because this information is secret, you may want to set
1129 the permissions of the .netdev file to be owned by
<literal>root:systemd-networkd
</literal>
1130 with a
<literal>0640</literal> file mode.
</para>
1134 <term><varname>AllowedIPs=
</varname></term>
1136 <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
1137 from which this peer is allowed to send incoming traffic and to
1138 which outgoing traffic for this peer is directed. The catch-all
1139 0.0.0.0/
0 may be specified for matching all IPv4 addresses, and
1140 ::/
0 may be specified for matching all IPv6 addresses.
</para>
1144 <term><varname>Endpoint=
</varname></term>
1146 <para>Sets an endpoint IP address or hostname, followed by a colon, and then
1147 a port number. This endpoint will be updated automatically once to
1148 the most recent source IP address and port of correctly
1149 authenticated packets from the peer at configuration time.
</para>
1153 <term><varname>PersistentKeepalive=
</varname></term>
1155 <para>Sets a seconds interval, between
1 and
65535 inclusive, of how often
1156 to send an authenticated empty packet to the peer for the purpose
1157 of keeping a stateful firewall or NAT mapping valid persistently.
1158 For example, if the interface very rarely sends traffic, but it
1159 might at anytime receive traffic from a peer, and it is behind NAT,
1160 the interface might benefit from having a persistent keepalive
1161 interval of
25 seconds. If set to
0 or
"off", this option is
1162 disabled. By default or when unspecified, this option is off.
1163 Most users will not need this.
</para>
1170 <title>[Bond] Section Options
</title>
1172 <para>The
<literal>[Bond]
</literal> section accepts the following
1175 <variablelist class='network-directives'
>
1177 <term><varname>Mode=
</varname></term>
1179 <para>Specifies one of the bonding policies. The default is
1180 <literal>balance-rr
</literal> (round robin). Possible values are
1181 <literal>balance-rr
</literal>,
1182 <literal>active-backup
</literal>,
1183 <literal>balance-xor
</literal>,
1184 <literal>broadcast
</literal>,
1185 <literal>802.3ad
</literal>,
1186 <literal>balance-tlb
</literal>, and
1187 <literal>balance-alb
</literal>.
1193 <term><varname>TransmitHashPolicy=
</varname></term>
1195 <para>Selects the transmit hash policy to use for slave
1196 selection in balance-xor,
802.3ad, and tlb modes. Possible
1198 <literal>layer2
</literal>,
1199 <literal>layer3+
4</literal>,
1200 <literal>layer2+
3</literal>,
1201 <literal>encap2+
3</literal>, and
1202 <literal>encap3+
4</literal>.
1208 <term><varname>LACPTransmitRate=
</varname></term>
1210 <para>Specifies the rate with which link partner transmits
1211 Link Aggregation Control Protocol Data Unit packets in
1212 802.3ad mode. Possible values are
<literal>slow
</literal>,
1213 which requests partner to transmit LACPDUs every
30 seconds,
1214 and
<literal>fast
</literal>, which requests partner to
1215 transmit LACPDUs every second. The default value is
1216 <literal>slow
</literal>.
</para>
1221 <term><varname>MIIMonitorSec=
</varname></term>
1223 <para>Specifies the frequency that Media Independent
1224 Interface link monitoring will occur. A value of zero
1225 disables MII link monitoring. This value is rounded down to
1226 the nearest millisecond. The default value is
0.
</para>
1231 <term><varname>UpDelaySec=
</varname></term>
1233 <para>Specifies the delay before a link is enabled after a
1234 link up status has been detected. This value is rounded down
1235 to a multiple of MIIMonitorSec. The default value is
1241 <term><varname>DownDelaySec=
</varname></term>
1243 <para>Specifies the delay before a link is disabled after a
1244 link down status has been detected. This value is rounded
1245 down to a multiple of MIIMonitorSec. The default value is
1251 <term><varname>LearnPacketIntervalSec=
</varname></term>
1253 <para>Specifies the number of seconds between instances where the bonding
1254 driver sends learning packets to each slave peer switch.
1255 The valid range is
1–
0x7fffffff; the default value is
1. This option
1256 has an effect only for the balance-tlb and balance-alb modes.
</para>
1261 <term><varname>AdSelect=
</varname></term>
1263 <para>Specifies the
802.3ad aggregation selection logic to use. Possible values are
1264 <literal>stable
</literal>,
1265 <literal>bandwidth
</literal> and
1266 <literal>count
</literal>.
1272 <term><varname>AdActorSystemPriority=
</varname></term>
1274 <para>Specifies the
802.3ad actor system priority. Ranges [
1-
65535].
</para>
1279 <term><varname>AdUserPortKey=
</varname></term>
1281 <para>Specifies the
802.3ad user defined portion of the port key. Ranges [
0-
1023].
</para>
1286 <term><varname>AdActorSystem=
</varname></term>
1288 <para>Specifies the
802.3ad system mac address. This can not be either NULL or Multicast.
</para>
1293 <term><varname>FailOverMACPolicy=
</varname></term>
1295 <para>Specifies whether the active-backup mode should set all slaves to
1296 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
1297 bond's MAC address in accordance with the selected policy. The default policy is none.
1299 <literal>none
</literal>,
1300 <literal>active
</literal> and
1301 <literal>follow
</literal>.
1307 <term><varname>ARPValidate=
</varname></term>
1309 <para>Specifies whether or not ARP probes and replies should be
1310 validated in any mode that supports ARP monitoring, or whether
1311 non-ARP traffic should be filtered (disregarded) for link
1312 monitoring purposes. Possible values are
1313 <literal>none
</literal>,
1314 <literal>active
</literal>,
1315 <literal>backup
</literal> and
1316 <literal>all
</literal>.
1322 <term><varname>ARPIntervalSec=
</varname></term>
1324 <para>Specifies the ARP link monitoring frequency in milliseconds.
1325 A value of
0 disables ARP monitoring. The default value is
0.
1331 <term><varname>ARPIPTargets=
</varname></term>
1333 <para>Specifies the IP addresses to use as ARP monitoring peers when
1334 ARPIntervalSec is greater than
0. These are the targets of the ARP request
1335 sent to determine the health of the link to the targets.
1336 Specify these values in IPv4 dotted decimal format. At least one IP
1337 address must be given for ARP monitoring to function. The
1338 maximum number of targets that can be specified is
16. The
1339 default value is no IP addresses.
1345 <term><varname>ARPAllTargets=
</varname></term>
1347 <para>Specifies the quantity of ARPIPTargets that must be reachable
1348 in order for the ARP monitor to consider a slave as being up.
1349 This option affects only active-backup mode for slaves with
1350 ARPValidate enabled. Possible values are
1351 <literal>any
</literal> and
1352 <literal>all
</literal>.
1358 <term><varname>PrimaryReselectPolicy=
</varname></term>
1360 <para>Specifies the reselection policy for the primary slave. This
1361 affects how the primary slave is chosen to become the active slave
1362 when failure of the active slave or recovery of the primary slave
1363 occurs. This option is designed to prevent flip-flopping between
1364 the primary slave and other slaves. Possible values are
1365 <literal>always
</literal>,
1366 <literal>better
</literal> and
1367 <literal>failure
</literal>.
1373 <term><varname>ResendIGMP=
</varname></term>
1375 <para>Specifies the number of IGMP membership reports to be issued after
1376 a failover event. One membership report is issued immediately after
1377 the failover, subsequent packets are sent in each
200ms interval.
1378 The valid range is
0–
255. Defaults to
1. A value of
0
1379 prevents the IGMP membership report from being issued in response
1380 to the failover event.
1386 <term><varname>PacketsPerSlave=
</varname></term>
1388 <para>Specify the number of packets to transmit through a slave before
1389 moving to the next one. When set to
0, then a slave is chosen at
1390 random. The valid range is
0–
65535. Defaults to
1. This option
1391 only has effect when in balance-rr mode.
1397 <term><varname>GratuitousARP=
</varname></term>
1399 <para>Specify the number of peer notifications (gratuitous ARPs and
1400 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1401 failover event. As soon as the link is up on the new slave,
1402 a peer notification is sent on the bonding device and each
1403 VLAN sub-device. This is repeated at each link monitor interval
1404 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1405 greater than
1. The valid range is
0–
255. The default value is
1.
1406 These options affect only the active-backup mode.
1412 <term><varname>AllSlavesActive=
</varname></term>
1414 <para>A boolean. Specifies that duplicate frames (received on inactive ports)
1415 should be dropped when false, or delivered when true. Normally, bonding will drop
1416 duplicate frames (received on inactive ports), which is desirable for
1417 most users. But there are some times it is nice to allow duplicate
1418 frames to be delivered. The default value is false (drop duplicate frames
1419 received on inactive ports).
1425 <term><varname>MinLinks=
</varname></term>
1427 <para>Specifies the minimum number of links that must be active before
1428 asserting carrier. The default value is
0.
1434 <para>For more detail information see
1435 <ulink url=
"https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1436 Linux Ethernet Bonding Driver HOWTO
</ulink></para>
1441 <title>Examples
</title>
1443 <title>/etc/systemd/network/
25-bridge.netdev
</title>
1445 <programlisting>[NetDev]
1447 Kind=bridge
</programlisting>
1451 <title>/etc/systemd/network/
25-vlan1.netdev
</title>
1453 <programlisting>[Match]
1461 Id=
1</programlisting>
1464 <title>/etc/systemd/network/
25-ipip.netdev
</title>
1465 <programlisting>[NetDev]
1471 Local=
192.168.223.238
1472 Remote=
192.169.224.239
1473 TTL=
64</programlisting>
1476 <title>/etc/systemd/network/
1-fou-tunnel.netdev
</title>
1477 <programlisting>[NetDev]
1487 <title>/etc/systemd/network/
25-fou-ipip.netdev
</title>
1488 <programlisting>[NetDev]
1495 Remote=
10.65.208.211
1497 FOUDestinationPort=
5555
1501 <title>/etc/systemd/network/
25-tap.netdev
</title>
1502 <programlisting>[NetDev]
1508 PacketInfo=yes
</programlisting> </example>
1511 <title>/etc/systemd/network/
25-sit.netdev
</title>
1512 <programlisting>[NetDev]
1519 Remote=
10.65.223.239</programlisting>
1523 <title>/etc/systemd/network/
25-gre.netdev
</title>
1524 <programlisting>[NetDev]
1531 Remote=
10.65.223.239</programlisting>
1535 <title>/etc/systemd/network/
25-vti.netdev
</title>
1537 <programlisting>[NetDev]
1544 Remote=
10.65.223.239</programlisting>
1548 <title>/etc/systemd/network/
25-veth.netdev
</title>
1549 <programlisting>[NetDev]
1554 Name=veth-peer
</programlisting>
1558 <title>/etc/systemd/network/
25-bond.netdev
</title>
1559 <programlisting>[NetDev]
1565 TransmitHashPolicy=layer3+
4
1567 LACPTransmitRate=fast
1572 <title>/etc/systemd/network/
25-dummy.netdev
</title>
1573 <programlisting>[NetDev]
1576 MACAddress=
12:
34:
56:
78:
9a:bc
</programlisting>
1579 <title>/etc/systemd/network/
25-vrf.netdev
</title>
1580 <para>Create a VRF interface with table
42.
</para>
1581 <programlisting>[NetDev]
1586 Table=
42</programlisting>
1590 <title>/etc/systemd/network/
25-macvtap.netdev
</title>
1591 <para>Create a MacVTap device.
</para>
1592 <programlisting>[NetDev]
1598 <title>/etc/systemd/network/
25-wireguard.netdev
</title>
1599 <programlisting>[NetDev]
1604 PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=
1608 PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=
1609 AllowedIPs=fd31:bf08:
57cb::/
48,
192.168.26.0/
24
1610 Endpoint=wireguard.example.com:
51820</programlisting>
1614 <title>See Also
</title>
1616 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1617 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1618 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1619 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>