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 This file is part of systemd.
8 Copyright 2013 Tom Gundersen
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id=
"systemd.netdev" conditional='ENABLE_NETWORKD'
>
27 <title>systemd.network
</title>
28 <productname>systemd
</productname>
32 <contrib>Developer
</contrib>
33 <firstname>Tom
</firstname>
34 <surname>Gundersen
</surname>
35 <email>teg@jklm.no
</email>
41 <refentrytitle>systemd.netdev
</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>systemd.netdev
</refname>
47 <refpurpose>Virtual Network Device configuration
</refpurpose>
51 <para><filename><replaceable>netdev
</replaceable>.netdev
</filename></para>
55 <title>Description
</title>
57 <para>Network setup is performed by
58 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
61 <para>The main Virtual Network Device file must have the extension
<filename>.netdev
</filename>;
62 other extensions are ignored. Virtual network devices are created as soon as networkd is
63 started. If a netdev with the specified name already exists, networkd will use that as-is rather
64 than create its own. Note that the settings of the pre-existing netdev will not be changed by
67 <para>The
<filename>.netdev
</filename> files are read from the files located in the system
68 network directory
<filename>/usr/lib/systemd/network
</filename>, the volatile runtime network
69 directory
<filename>/run/systemd/network
</filename> and the local administration network
70 directory
<filename>/etc/systemd/network
</filename>. All configuration files are collectively
71 sorted and processed in lexical order, regardless of the directories in which they live.
72 However, files with identical filenames replace each other. Files in
<filename>/etc
</filename>
73 have the highest priority, files in
<filename>/run
</filename> take precedence over files with
74 the same name in
<filename>/usr/lib
</filename>. This can be used to override a system-supplied
75 configuration file with a local file if needed. As a special case, an empty file (file size
0)
76 or symlink with the same name pointing to
<filename>/dev/null
</filename> disables the
77 configuration file entirely (it is
"masked").
</para>
79 <para>Along with the netdev file
<filename>foo.netdev
</filename>, a
"drop-in" directory
80 <filename>foo.netdev.d/
</filename> may exist. All files with the suffix
<literal>.conf
</literal>
81 from this directory will be parsed after the file itself is parsed. This is useful to alter or
82 add configuration settings, without having to modify the main configuration file. Each drop-in
83 file must have appropriate section headers.
</para>
85 <para>In addition to
<filename>/etc/systemd/network
</filename>, drop-in
<literal>.d
</literal>
86 directories can be placed in
<filename>/usr/lib/systemd/network
</filename> or
87 <filename>/run/systemd/network
</filename> directories. Drop-in files in
88 <filename>/etc
</filename> take precedence over those in
<filename>/run
</filename> which in turn
89 take precedence over those in
<filename>/usr/lib
</filename>. Drop-in files under any of these
90 directories take precedence over the main netdev file wherever located. (Of course, since
91 <filename>/run
</filename> is temporary and
<filename>/usr/lib
</filename> is for vendors, it is
92 unlikely drop-ins should be used in either of those places.)
</para>
96 <title>Supported netdev kinds
</title>
98 <para>The following kinds of virtual network devices may be
99 configured in
<filename>.netdev
</filename> files:
</para>
102 <title>Supported kinds of virtual network devices
</title>
105 <colspec colname='kind'
/>
106 <colspec colname='explanation'
/>
109 <entry>Description
</entry>
112 <row><entry><varname>bond
</varname></entry>
113 <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>
115 <row><entry><varname>bridge
</varname></entry>
116 <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>
118 <row><entry><varname>dummy
</varname></entry>
119 <entry>A dummy device drops all packets sent to it.
</entry></row>
121 <row><entry><varname>gre
</varname></entry>
122 <entry>A Level
3 GRE tunnel over IPv4. See
<ulink url=
"https://tools.ietf.org/html/rfc2784">RFC
2784</ulink> for details.
</entry></row>
124 <row><entry><varname>gretap
</varname></entry>
125 <entry>A Level
2 GRE tunnel over IPv4.
</entry></row>
127 <row><entry><varname>ip6gre
</varname></entry>
128 <entry>A Level
3 GRE tunnel over IPv6.
</entry></row>
130 <row><entry><varname>ip6tnl
</varname></entry>
131 <entry>An IPv4 or IPv6 tunnel over IPv6
</entry></row>
133 <row><entry><varname>ip6gretap
</varname></entry>
134 <entry>A Level
2 GRE tunnel over IPv6.
</entry></row>
136 <row><entry><varname>ipip
</varname></entry>
137 <entry>An IPv4 over IPv4 tunnel.
</entry></row>
139 <row><entry><varname>ipvlan
</varname></entry>
140 <entry>An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.
</entry></row>
142 <row><entry><varname>macvlan
</varname></entry>
143 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
145 <row><entry><varname>macvtap
</varname></entry>
146 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.
</entry></row>
148 <row><entry><varname>sit
</varname></entry>
149 <entry>An IPv6 over IPv4 tunnel.
</entry></row>
151 <row><entry><varname>tap
</varname></entry>
152 <entry>A persistent Level
2 tunnel between a network device and a device node.
</entry></row>
154 <row><entry><varname>tun
</varname></entry>
155 <entry>A persistent Level
3 tunnel between a network device and a device node.
</entry></row>
157 <row><entry><varname>veth
</varname></entry>
158 <entry>An Ethernet tunnel between a pair of network devices.
</entry></row>
160 <row><entry><varname>vlan
</varname></entry>
161 <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>
163 <row><entry><varname>vti
</varname></entry>
164 <entry>An IPv4 over IPSec tunnel.
</entry></row>
166 <row><entry><varname>vti6
</varname></entry>
167 <entry>An IPv6 over IPSec tunnel.
</entry></row>
169 <row><entry><varname>vxlan
</varname></entry>
170 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.
</entry></row>
172 <row><entry><varname>vrf
</varname></entry>
173 <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>
175 <row><entry><varname>vcan
</varname></entry>
176 <entry>The virtual CAN driver (vcan). Similar to the network loopback devices, vcan offers a virtual local CAN interface.
</entry></row>
185 <title>[Match] Section Options
</title>
187 <para>A virtual network device is only created if the
188 <literal>[Match]
</literal> section matches the current
189 environment, or if the section is empty. The following keys are
192 <variablelist class='network-directives'
>
194 <term><varname>Host=
</varname></term>
196 <para>Matches against the hostname or machine ID of the
197 host. See
<literal>ConditionHost=
</literal> in
198 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
204 <term><varname>Virtualization=
</varname></term>
206 <para>Checks whether the system is executed in a virtualized
207 environment and optionally test whether it is a specific
209 <literal>ConditionVirtualization=
</literal> in
210 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
216 <term><varname>KernelCommandLine=
</varname></term>
218 <para>Checks whether a specific kernel command line option
219 is set (or if prefixed with the exclamation mark unset). See
220 <literal>ConditionKernelCommandLine=
</literal> in
221 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
227 <term><varname>Architecture=
</varname></term>
229 <para>Checks whether the system is running on a specific
230 architecture. See
<literal>ConditionArchitecture=
</literal> in
231 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
241 <title>[NetDev] Section Options
</title>
243 <para>The
<literal>[NetDev]
</literal> section accepts the
244 following keys:
</para>
246 <variablelist class='network-directives'
>
248 <term><varname>Description=
</varname></term>
250 <para>A free-form description of the netdev.
</para>
254 <term><varname>Name=
</varname></term>
256 <para>The interface name used when creating the netdev.
257 This option is compulsory.
</para>
261 <term><varname>Kind=
</varname></term>
263 <para>The netdev kind. This option is compulsory. See the
264 <literal>Supported netdev kinds
</literal> section for the
269 <term><varname>MTUBytes=
</varname></term>
271 <para>The maximum transmission unit in bytes to set for
272 the device. The usual suffixes K, M, G, are supported and
273 are understood to the base of
1024. This key is not
274 currently supported for
<literal>tun
</literal> or
275 <literal>tap
</literal> devices.
280 <term><varname>MACAddress=
</varname></term>
282 <para>The MAC address to use for the device. If none is
283 given, one is generated based on the interface name and
285 <citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
286 This key is not currently supported for
287 <literal>tun
</literal> or
<literal>tap
</literal> devices.
295 <title>[Bridge] Section Options
</title>
297 <para>The
<literal>[Bridge]
</literal> section only applies for
298 netdevs of kind
<literal>bridge
</literal>, and accepts the
299 following keys:
</para>
301 <variablelist class='network-directives'
>
303 <term><varname>HelloTimeSec=
</varname></term>
305 <para>HelloTimeSec specifies the number of seconds between two hello packets
306 sent out by the root bridge and the designated bridges. Hello packets are
307 used to communicate information about the topology throughout the entire
308 bridged local area network.
</para>
312 <term><varname>MaxAgeSec=
</varname></term>
314 <para>MaxAgeSec specifies the number of seconds of maximum message age.
315 If the last seen (received) hello packet is more than this number of
316 seconds old, the bridge in question will start the takeover procedure
317 in attempt to become the Root Bridge itself.
</para>
321 <term><varname>ForwardDelaySec=
</varname></term>
323 <para>ForwardDelaySec specifies the number of seconds spent in each
324 of the Listening and Learning states before the Forwarding state is entered.
</para>
328 <term><varname>AgeingTimeSec=
</varname></term>
330 <para>This specifies the number of seconds a MAC Address will be kept in
331 the forwarding database after having a packet received from this MAC Address.
</para>
335 <term><varname>Priority=
</varname></term>
337 <para>The priority of the bridge. An integer between
0 and
65535. A lower value
338 means higher priority. The bridge having the lowest priority will be elected as root bridge.
</para>
342 <term><varname>DefaultPVID=
</varname></term>
344 <para>This specifies the default port VLAN ID of a newly attached bridge port.
</para>
348 <term><varname>MulticastQuerier=
</varname></term>
350 <para>A boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
351 If enabled, the kernel will send general ICMP queries from a zero source address.
352 This feature should allow faster convergence on startup, but it causes some
353 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
354 When unset, the kernel's default setting applies.
359 <term><varname>MulticastSnooping=
</varname></term>
361 <para>A boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
362 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
363 between hosts and multicast routers. When unset, the kernel's default setting applies.
368 <term><varname>VLANFiltering=
</varname></term>
370 <para>A boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
371 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's
372 default setting applies.
377 <term><varname>STP=
</varname></term>
379 <para>A boolean. This enables the bridge's Spanning Tree Protocol (STP). When unset,
380 the kernel's default setting applies.
388 <title>[VLAN] Section Options
</title>
390 <para>The
<literal>[VLAN]
</literal> section only applies for
391 netdevs of kind
<literal>vlan
</literal>, and accepts the
392 following key:
</para>
394 <variablelist class='network-directives'
>
396 <term><varname>Id=
</varname></term>
398 <para>The VLAN ID to use. An integer in the range
0–
4094.
399 This option is compulsory.
</para>
407 <title>[MACVLAN] Section Options
</title>
409 <para>The
<literal>[MACVLAN]
</literal> section only applies for
410 netdevs of kind
<literal>macvlan
</literal>, and accepts the
411 following key:
</para>
413 <variablelist class='network-directives'
>
415 <term><varname>Mode=
</varname></term>
417 <para>The MACVLAN mode to use. The supported options are
418 <literal>private
</literal>,
419 <literal>vepa
</literal>,
420 <literal>bridge
</literal>, and
421 <literal>passthru
</literal>.
430 <title>[MACVTAP] Section Options
</title>
432 <para>The
<literal>[MACVTAP]
</literal> section applies for
433 netdevs of kind
<literal>macvtap
</literal> and accepts the
434 same key as
<literal>[MACVLAN]
</literal>.
</para>
439 <title>[IPVLAN] Section Options
</title>
441 <para>The
<literal>[IPVLAN]
</literal> section only applies for
442 netdevs of kind
<literal>ipvlan
</literal>, and accepts the
443 following key:
</para>
445 <variablelist class='network-directives'
>
447 <term><varname>Mode=
</varname></term>
449 <para>The IPVLAN mode to use. The supported options are
450 <literal>L2
</literal> and
<literal>L3
</literal>.
459 <title>[VXLAN] Section Options
</title>
460 <para>The
<literal>[VXLAN]
</literal> section only applies for
461 netdevs of kind
<literal>vxlan
</literal>, and accepts the
462 following keys:
</para>
464 <variablelist class='network-directives'
>
466 <term><varname>Id=
</varname></term>
468 <para>The VXLAN ID to use.
</para>
472 <term><varname>Remote=
</varname></term>
474 <para>Configures destination multicast group IP address.
</para>
478 <term><varname>Local=
</varname></term>
480 <para>Configures local IP address.
</para>
484 <term><varname>TOS=
</varname></term>
486 <para>The Type Of Service byte value for a vxlan interface.
</para>
490 <term><varname>TTL=
</varname></term>
492 <para>A fixed Time To Live N on Virtual eXtensible Local
493 Area Network packets. N is a number in the range
1–
255.
0
494 is a special value meaning that packets inherit the TTL
499 <term><varname>MacLearning=
</varname></term>
501 <para>A boolean. When true, enables dynamic MAC learning
502 to discover remote MAC addresses.
</para>
506 <term><varname>FDBAgeingSec=
</varname></term>
508 <para>The lifetime of Forwarding Database entry learnt by
509 the kernel, in seconds.
</para>
513 <term><varname>MaximumFDBEntries=
</varname></term>
515 <para>Configures maximum number of FDB entries.
</para>
519 <term><varname>ReduceARPProxy=
</varname></term>
521 <para>A boolean. When true, bridge-connected VXLAN tunnel
522 endpoint answers ARP requests from the local bridge on behalf
523 of remote Distributed Overlay Virtual Ethernet
524 <ulink url=
"https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
525 (DVOE)
</ulink> clients. Defaults to false.
</para>
529 <term><varname>L2MissNotification=
</varname></term>
531 <para>A boolean. When true, enables netlink LLADDR miss
532 notifications.
</para>
536 <term><varname>L3MissNotification=
</varname></term>
538 <para>A boolean. When true, enables netlink IP address miss
539 notifications.
</para>
543 <term><varname>RouteShortCircuit=
</varname></term>
545 <para>A boolean. When true, route short circuiting is turned
550 <term><varname>UDPChecksum=
</varname></term>
552 <para>A boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.
</para>
556 <term><varname>UDP6ZeroChecksumTx=
</varname></term>
558 <para>A boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.
</para>
562 <term><varname>UDP6ZeroChecksumRx=
</varname></term>
564 <para>A boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.
</para>
568 <term><varname>RemoteChecksumTx=
</varname></term>
570 <para>A boolean. When true, remote transmit checksum offload of VXLAN is turned on.
</para>
574 <term><varname>RemoteChecksumRx=
</varname></term>
576 <para>A boolean. When true, remote receive checksum offload in VXLAN is turned on.
</para>
580 <term><varname>GroupPolicyExtension=
</varname></term>
582 <para>A boolean. When true, it enables Group Policy VXLAN extension security label mechanism
583 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
584 <ulink url=
"https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
585 VXLAN Group Policy
</ulink> document. Defaults to false.
</para>
589 <term><varname>DestinationPort=
</varname></term>
591 <para>Configures the default destination UDP port on a per-device basis.
592 If destination port is not specified then Linux kernel default will be used.
593 Set destination port
4789 to get the IANA assigned value,
594 and destination port
0 to get default values.
</para>
598 <term><varname>PortRange=
</varname></term>
600 <para>Configures VXLAN port range. VXLAN bases source
601 UDP port based on flow to help the receiver to be able
602 to load balance based on outer header flow. It
603 restricts the port range to the normal UDP local
604 ports, and allows overriding via configuration.
</para>
610 <title>[Tunnel] Section Options
</title>
612 <para>The
<literal>[Tunnel]
</literal> section only applies for
614 <literal>ipip
</literal>,
615 <literal>sit
</literal>,
616 <literal>gre
</literal>,
617 <literal>gretap
</literal>,
618 <literal>ip6gre
</literal>,
619 <literal>ip6gretap
</literal>,
620 <literal>vti
</literal>,
621 <literal>vti6
</literal>, and
622 <literal>ip6tnl
</literal> and accepts
623 the following keys:
</para>
625 <variablelist class='network-directives'
>
627 <term><varname>Local=
</varname></term>
629 <para>A static local address for tunneled packets. It must
630 be an address on another interface of this host.
</para>
634 <term><varname>Remote=
</varname></term>
636 <para>The remote endpoint of the tunnel.
</para>
640 <term><varname>TOS=
</varname></term>
642 <para>The Type Of Service byte value for a tunnel interface.
643 For details about the TOS, see the
644 <ulink url=
"http://tools.ietf.org/html/rfc1349"> Type of
645 Service in the Internet Protocol Suite
</ulink> document.
650 <term><varname>TTL=
</varname></term>
652 <para>A fixed Time To Live N on tunneled packets. N is a
653 number in the range
1–
255.
0 is a special value meaning that
654 packets inherit the TTL value. The default value for IPv4
655 tunnels is: inherit. The default value for IPv6 tunnels is
660 <term><varname>DiscoverPathMTU=
</varname></term>
662 <para>A boolean. When true, enables Path MTU Discovery on
667 <term><varname>IPv6FlowLabel=
</varname></term>
669 <para>Configures the
20-bit flow label (see
<ulink url=
"https://tools.ietf.org/html/rfc6437">
670 RFC
6437</ulink>) field in the IPv6 header (see
<ulink url=
"https://tools.ietf.org/html/rfc2460">
671 RFC
2460</ulink>), which is used by a node to label packets of a flow.
672 It is only used for IPv6 tunnels.
673 A flow label of zero is used to indicate packets that have
675 It can be configured to a value in the range
0–
0xFFFFF, or be
676 set to
<literal>inherit
</literal>, in which case the original flowlabel is used.
</para>
680 <term><varname>CopyDSCP=
</varname></term>
682 <para>A boolean. When true, the Differentiated Service Code
683 Point (DSCP) field will be copied to the inner header from
684 outer header during the decapsulation of an IPv6 tunnel
685 packet. DSCP is a field in an IP packet that enables different
686 levels of service to be assigned to network traffic.
687 Defaults to
<literal>no
</literal>.
692 <term><varname>EncapsulationLimit=
</varname></term>
694 <para>The Tunnel Encapsulation Limit option specifies how many additional
695 levels of encapsulation are permitted to be prepended to the packet.
696 For example, a Tunnel Encapsulation Limit option containing a limit
697 value of zero means that a packet carrying that option may not enter
698 another tunnel before exiting the current tunnel.
699 (see
<ulink url=
"https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC
2473</ulink>).
700 The valid range is
0–
255 and
<literal>none
</literal>. Defaults to
4.
705 <term><varname>Key=
</varname></term>
707 <para>The
<varname>Key=
</varname> parameter specifies the same key to use in
708 both directions (
<varname>InputKey=
</varname> and
<varname>OutputKey=
</varname>).
709 The
<varname>Key=
</varname> is either a number or an IPv4 address-like dotted quad.
710 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
711 and control path) in ip xfrm (framework used to implement IPsec protocol).
712 See
<ulink url=
"http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
713 ip-xfrm — transform configuration
</ulink> for details. It is only used for VTI/VTI6
718 <term><varname>InputKey=
</varname></term>
720 <para>The
<varname>InputKey=
</varname> parameter specifies the key to use for input.
721 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6 tunnels.
</para>
725 <term><varname>OutputKey=
</varname></term>
727 <para>The
<varname>OutputKey=
</varname> parameter specifies the key to use for output.
728 The format is same as
<varname>Key=
</varname>. It is only used for VTI/VTI6 tunnels.
</para>
732 <term><varname>Mode=
</varname></term>
734 <para>An
<literal>ip6tnl
</literal> tunnel can be in one of three
736 <literal>ip6ip6
</literal> for IPv6 over IPv6,
737 <literal>ipip6
</literal> for IPv4 over IPv6 or
738 <literal>any
</literal> for either.
745 <title>[Peer] Section Options
</title>
747 <para>The
<literal>[Peer]
</literal> section only applies for
748 netdevs of kind
<literal>veth
</literal> and accepts the
749 following keys:
</para>
751 <variablelist class='network-directives'
>
753 <term><varname>Name=
</varname></term>
755 <para>The interface name used when creating the netdev.
756 This option is compulsory.
</para>
760 <term><varname>MACAddress=
</varname></term>
762 <para>The peer MACAddress, if not set, it is generated in
763 the same way as the MAC address of the main
770 <title>[Tun] Section Options
</title>
772 <para>The
<literal>[Tun]
</literal> section only applies for
773 netdevs of kind
<literal>tun
</literal>, and accepts the following
776 <variablelist class='network-directives'
>
778 <term><varname>OneQueue=
</varname></term>
779 <listitem><para>Takes a boolean argument. Configures whether
780 all packets are queued at the device (enabled), or a fixed
781 number of packets are queued at the device and the rest at the
782 <literal>qdisc
</literal>. Defaults to
783 <literal>no
</literal>.
</para>
787 <term><varname>MultiQueue=
</varname></term>
788 <listitem><para>Takes a boolean argument. Configures whether
789 to use multiple file descriptors (queues) to parallelize
790 packets sending and receiving. Defaults to
791 <literal>no
</literal>.
</para>
795 <term><varname>PacketInfo=
</varname></term>
796 <listitem><para>Takes a boolean argument. Configures whether
797 packets should be prepended with four extra bytes (two flag
798 bytes and two protocol bytes). If disabled, it indicates that
799 the packets will be pure IP packets. Defaults to
800 <literal>no
</literal>.
</para>
804 <term><varname>VNetHeader=
</varname></term>
805 <listitem><para>Takes a boolean argument. Configures
806 IFF_VNET_HDR flag for a tap device. It allows sending
807 and receiving larger Generic Segmentation Offload (GSO)
808 packets. This may increase throughput significantly.
810 <literal>no
</literal>.
</para>
814 <term><varname>User=
</varname></term>
815 <listitem><para>User to grant access to the
816 <filename>/dev/net/tun
</filename> device.
</para>
820 <term><varname>Group=
</varname></term>
821 <listitem><para>Group to grant access to the
822 <filename>/dev/net/tun
</filename> device.
</para>
831 <title>[Tap] Section Options
</title>
833 <para>The
<literal>[Tap]
</literal> section only applies for
834 netdevs of kind
<literal>tap
</literal>, and accepts the same keys
835 as the
<literal>[Tun]
</literal> section.
</para>
839 <title>[Bond] Section Options
</title>
841 <para>The
<literal>[Bond]
</literal> section accepts the following
844 <variablelist class='network-directives'
>
846 <term><varname>Mode=
</varname></term>
848 <para>Specifies one of the bonding policies. The default is
849 <literal>balance-rr
</literal> (round robin). Possible values are
850 <literal>balance-rr
</literal>,
851 <literal>active-backup
</literal>,
852 <literal>balance-xor
</literal>,
853 <literal>broadcast
</literal>,
854 <literal>802.3ad
</literal>,
855 <literal>balance-tlb
</literal>, and
856 <literal>balance-alb
</literal>.
862 <term><varname>TransmitHashPolicy=
</varname></term>
864 <para>Selects the transmit hash policy to use for slave
865 selection in balance-xor,
802.3ad, and tlb modes. Possible
867 <literal>layer2
</literal>,
868 <literal>layer3+
4</literal>,
869 <literal>layer2+
3</literal>,
870 <literal>encap2+
3</literal>, and
871 <literal>encap3+
4</literal>.
877 <term><varname>LACPTransmitRate=
</varname></term>
879 <para>Specifies the rate with which link partner transmits
880 Link Aggregation Control Protocol Data Unit packets in
881 802.3ad mode. Possible values are
<literal>slow
</literal>,
882 which requests partner to transmit LACPDUs every
30 seconds,
883 and
<literal>fast
</literal>, which requests partner to
884 transmit LACPDUs every second. The default value is
885 <literal>slow
</literal>.
</para>
890 <term><varname>MIIMonitorSec=
</varname></term>
892 <para>Specifies the frequency that Media Independent
893 Interface link monitoring will occur. A value of zero
894 disables MII link monitoring. This value is rounded down to
895 the nearest millisecond. The default value is
0.
</para>
900 <term><varname>UpDelaySec=
</varname></term>
902 <para>Specifies the delay before a link is enabled after a
903 link up status has been detected. This value is rounded down
904 to a multiple of MIIMonitorSec. The default value is
910 <term><varname>DownDelaySec=
</varname></term>
912 <para>Specifies the delay before a link is disabled after a
913 link down status has been detected. This value is rounded
914 down to a multiple of MIIMonitorSec. The default value is
920 <term><varname>LearnPacketIntervalSec=
</varname></term>
922 <para>Specifies the number of seconds between instances where the bonding
923 driver sends learning packets to each slave peer switch.
924 The valid range is
1–
0x7fffffff; the default value is
1. This option
925 has an effect only for the balance-tlb and balance-alb modes.
</para>
930 <term><varname>AdSelect=
</varname></term>
932 <para>Specifies the
802.3ad aggregation selection logic to use. Possible values are
933 <literal>stable
</literal>,
934 <literal>bandwidth
</literal> and
935 <literal>count
</literal>.
941 <term><varname>FailOverMACPolicy=
</varname></term>
943 <para>Specifies whether the active-backup mode should set all slaves to
944 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
945 bond's MAC address in accordance with the selected policy. The default policy is none.
947 <literal>none
</literal>,
948 <literal>active
</literal> and
949 <literal>follow
</literal>.
955 <term><varname>ARPValidate=
</varname></term>
957 <para>Specifies whether or not ARP probes and replies should be
958 validated in any mode that supports ARP monitoring, or whether
959 non-ARP traffic should be filtered (disregarded) for link
960 monitoring purposes. Possible values are
961 <literal>none
</literal>,
962 <literal>active
</literal>,
963 <literal>backup
</literal> and
964 <literal>all
</literal>.
970 <term><varname>ARPIntervalSec=
</varname></term>
972 <para>Specifies the ARP link monitoring frequency in milliseconds.
973 A value of
0 disables ARP monitoring. The default value is
0.
979 <term><varname>ARPIPTargets=
</varname></term>
981 <para>Specifies the IP addresses to use as ARP monitoring peers when
982 ARPIntervalSec is greater than
0. These are the targets of the ARP request
983 sent to determine the health of the link to the targets.
984 Specify these values in IPv4 dotted decimal format. At least one IP
985 address must be given for ARP monitoring to function. The
986 maximum number of targets that can be specified is
16. The
987 default value is no IP addresses.
993 <term><varname>ARPAllTargets=
</varname></term>
995 <para>Specifies the quantity of ARPIPTargets that must be reachable
996 in order for the ARP monitor to consider a slave as being up.
997 This option affects only active-backup mode for slaves with
998 ARPValidate enabled. Possible values are
999 <literal>any
</literal> and
1000 <literal>all
</literal>.
1006 <term><varname>PrimaryReselectPolicy=
</varname></term>
1008 <para>Specifies the reselection policy for the primary slave. This
1009 affects how the primary slave is chosen to become the active slave
1010 when failure of the active slave or recovery of the primary slave
1011 occurs. This option is designed to prevent flip-flopping between
1012 the primary slave and other slaves. Possible values are
1013 <literal>always
</literal>,
1014 <literal>better
</literal> and
1015 <literal>failure
</literal>.
1021 <term><varname>ResendIGMP=
</varname></term>
1023 <para>Specifies the number of IGMP membership reports to be issued after
1024 a failover event. One membership report is issued immediately after
1025 the failover, subsequent packets are sent in each
200ms interval.
1026 The valid range is
0–
255. Defaults to
1. A value of
0
1027 prevents the IGMP membership report from being issued in response
1028 to the failover event.
1034 <term><varname>PacketsPerSlave=
</varname></term>
1036 <para>Specify the number of packets to transmit through a slave before
1037 moving to the next one. When set to
0, then a slave is chosen at
1038 random. The valid range is
0–
65535. Defaults to
1. This option
1039 only has effect when in balance-rr mode.
1045 <term><varname>GratuitousARP=
</varname></term>
1047 <para>Specify the number of peer notifications (gratuitous ARPs and
1048 unsolicited IPv6 Neighbor Advertisements) to be issued after a
1049 failover event. As soon as the link is up on the new slave,
1050 a peer notification is sent on the bonding device and each
1051 VLAN sub-device. This is repeated at each link monitor interval
1052 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
1053 greater than
1. The valid range is
0–
255. The default value is
1.
1054 These options affect only the active-backup mode.
1060 <term><varname>AllSlavesActive=
</varname></term>
1062 <para>A boolean. Specifies that duplicate frames (received on inactive ports)
1063 should be dropped when false, or delivered when true. Normally, bonding will drop
1064 duplicate frames (received on inactive ports), which is desirable for
1065 most users. But there are some times it is nice to allow duplicate
1066 frames to be delivered. The default value is false (drop duplicate frames
1067 received on inactive ports).
1073 <term><varname>MinLinks=
</varname></term>
1075 <para>Specifies the minimum number of links that must be active before
1076 asserting carrier. The default value is
0.
1082 <term><varname>ActiveSlave=
</varname></term>
1084 <para>A boolean. Specifies the new active slave. The
<literal>ActiveSlave=
</literal>
1085 option is only valid for following modes:
1086 <literal>active-backup
</literal>,
1087 <literal>balance-alb
</literal> and
1088 <literal>balance-tlb
</literal>. Defaults to false.
1094 <term><varname>PrimarySlave=
</varname></term>
1096 <para>A boolean. Specifies which slave is the primary device. The specified
1097 device will always be the active slave while it is available. Only when the
1098 primary is off-line will alternate devices be used. This is useful when
1099 one slave is preferred over another, e.g. when one slave has higher throughput
1100 than another. The
<literal>PrimarySlave=
</literal> option is only valid for
1102 <literal>active-backup
</literal>,
1103 <literal>balance-alb
</literal> and
1104 <literal>balance-tlb
</literal>. Defaults to false.
1110 <para>For more detail information see
1111 <ulink url=
"https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1112 Linux Ethernet Bonding Driver HOWTO
</ulink></para>
1117 <title>Example
</title>
1119 <title>/etc/systemd/network/
25-bridge.netdev
</title>
1121 <programlisting>[NetDev]
1123 Kind=bridge
</programlisting>
1127 <title>/etc/systemd/network/
25-vlan1.netdev
</title>
1129 <programlisting>[Match]
1137 Id=
1</programlisting>
1140 <title>/etc/systemd/network/
25-ipip.netdev
</title>
1141 <programlisting>[NetDev]
1147 Local=
192.168.223.238
1148 Remote=
192.169.224.239
1149 TTL=
64</programlisting>
1152 <title>/etc/systemd/network/
25-tap.netdev
</title>
1153 <programlisting>[NetDev]
1159 PacketInfo=true
</programlisting> </example>
1162 <title>/etc/systemd/network/
25-sit.netdev
</title>
1163 <programlisting>[NetDev]
1170 Remote=
10.65.223.239</programlisting>
1174 <title>/etc/systemd/network/
25-gre.netdev
</title>
1175 <programlisting>[NetDev]
1182 Remote=
10.65.223.239</programlisting>
1186 <title>/etc/systemd/network/
25-vti.netdev
</title>
1188 <programlisting>[NetDev]
1195 Remote=
10.65.223.239</programlisting>
1199 <title>/etc/systemd/network/
25-veth.netdev
</title>
1200 <programlisting>[NetDev]
1205 Name=veth-peer
</programlisting>
1209 <title>/etc/systemd/network/
25-bond.netdev
</title>
1210 <programlisting>[NetDev]
1216 TransmitHashPolicy=layer3+
4
1218 LACPTransmitRate=fast
1223 <title>/etc/systemd/network/
25-dummy.netdev
</title>
1224 <programlisting>[NetDev]
1227 MACAddress=
12:
34:
56:
78:
9a:bc
</programlisting>
1230 <title>/etc/systemd/network/
25-vrf.netdev
</title>
1231 <para>Create a VRF interface with table
42.
</para>
1232 <programlisting>[NetDev]
1237 TableId=
42</programlisting>
1241 <title>/etc/systemd/network/
25-macvtap.netdev
</title>
1242 <para>Create a MacVTap device.
</para>
1243 <programlisting>[NetDev]
1250 <title>See Also
</title>
1252 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1253 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1254 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1255 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>