]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.netdev.xml
Merge pull request #722 from keszybz/networkd-clarifications
[thirdparty/systemd.git] / man / systemd.netdev.xml
CommitLineData
eac684ef
TG
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
eac684ef
TG
4
5<!--
6 This file is part of systemd.
7
8 Copyright 2013 Tom Gundersen
9
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.
14
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.
19
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/>.
22-->
23
24<refentry id="systemd.netdev" conditional='ENABLE_NETWORKD'>
25
798d3a52
ZJS
26 <refentryinfo>
27 <title>systemd.network</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Tom</firstname>
34 <surname>Gundersen</surname>
35 <email>teg@jklm.no</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.netdev</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.netdev</refname>
47 <refpurpose>Virtual Network Device configuration</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename><replaceable>netdev</replaceable>.netdev</filename></para>
52 </refsynopsisdiv>
53
54 <refsect1>
55 <title>Description</title>
56
57 <para>Network setup is performed by
58 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
59 </para>
60
61 <para>Virtual Network Device files must have the extension
62 <filename>.netdev</filename>; other extensions are ignored.
63 Virtual network devices are created as soon as networkd is
64 started. If a netdev with the specified name already exists,
65 networkd will use that as-is rather than create its own. Note that
66 the settings of the pre-existing netdev will not be changed by
67 networkd.</para>
68
69 <para>The <filename>.netdev</filename> files are read from the
70 files located in the system network directory
12b42c76 71 <filename>/usr/lib/systemd/network</filename>, the volatile
798d3a52
ZJS
72 runtime network directory
73 <filename>/run/systemd/network</filename> and the local
74 administration network directory
12b42c76 75 <filename>/etc/systemd/network</filename>. All configuration files
798d3a52
ZJS
76 are collectively sorted and processed in lexical order, regardless
77 of the directories in which they live. However, files with
78 identical filenames replace each other. Files in
79 <filename>/etc</filename> have the highest priority, files in
80 <filename>/run</filename> take precedence over files with the same
12b42c76 81 name in <filename>/usr/lib</filename>. This can be used to
798d3a52
ZJS
82 override a system-supplied configuration file with a local file if
83 needed; a symlink in <filename>/etc</filename> with the same name
12b42c76 84 as a configuration file in <filename>/usr/lib</filename>, pointing
798d3a52
ZJS
85 to <filename>/dev/null</filename>, disables the configuration file
86 entirely.</para>
87
88 </refsect1>
89
90 <refsect1>
91 <title>Supported netdev kinds</title>
92
93 <para>The following kinds of virtual network devices may be
94 configured in <filename>.netdev</filename> files:</para>
95
96 <table>
97 <title>Supported kinds of virtual network devices</title>
98
99 <tgroup cols='2'>
100 <colspec colname='kind' />
101 <colspec colname='explanation' />
102 <thead><row>
103 <entry>Kind</entry>
104 <entry>Description</entry>
105 </row></thead>
106 <tbody>
107 <row><entry><varname>bond</varname></entry>
108 <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>
109
110 <row><entry><varname>bridge</varname></entry>
a6818881 111 <entry>A bridge device is a software switch, each of its slave devices and the bridge itself are ports of the switch.</entry></row>
798d3a52
ZJS
112
113 <row><entry><varname>dummy</varname></entry>
114 <entry>A dummy device drops all packets sent to it.</entry></row>
115
116 <row><entry><varname>gre</varname></entry>
117 <entry>A Level 3 GRE tunnel over IPv4. See <ulink url="https://tools.ietf.org/html/rfc2784">RFC 2784</ulink> for details.</entry></row>
118
119 <row><entry><varname>gretap</varname></entry>
120 <entry>A Level 2 GRE tunnel over IPv4.</entry></row>
121
122 <row><entry><varname>ip6gre</varname></entry>
123 <entry>A Level 3 GRE tunnel over IPv6.</entry></row>
124
125 <row><entry><varname>ip6tnl</varname></entry>
126 <entry>An IPv4 or IPv6 tunnel over IPv6</entry></row>
127
128 <row><entry><varname>ip6gretap</varname></entry>
129 <entry>An Level 2 GRE tunnel over IPv6.</entry></row>
130
131 <row><entry><varname>ipip</varname></entry>
132 <entry>An IPv4 over IPv4 tunnel.</entry></row>
133
134 <row><entry><varname>ipvlan</varname></entry>
135 <entry>An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.</entry></row>
136
137 <row><entry><varname>macvlan</varname></entry>
138 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
139
140 <row><entry><varname>sit</varname></entry>
141 <entry>An IPv6 over IPv4 tunnel.</entry></row>
142
143 <row><entry><varname>tap</varname></entry>
144 <entry>A persistent Level 2 tunnel between a network device and a device node.</entry></row>
145
146 <row><entry><varname>tun</varname></entry>
147 <entry>A persistent Level 3 tunnel between a network device and a device node.</entry></row>
148
149 <row><entry><varname>veth</varname></entry>
150 <entry>An ethernet tunnel between a pair of network devices.</entry></row>
151
152 <row><entry><varname>vlan</varname></entry>
153 <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>
154
155 <row><entry><varname>vti</varname></entry>
156 <entry>An IPv4 over IPSec tunnel.</entry></row>
157
5cc0748e
SS
158 <row><entry><varname>vti6</varname></entry>
159 <entry>An IPv6 over IPSec tunnel.</entry></row>
160
798d3a52
ZJS
161 <row><entry><varname>vxlan</varname></entry>
162 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.</entry></row>
163 </tbody>
164 </tgroup>
165 </table>
166
167 </refsect1>
168
169 <refsect1>
170 <title>[Match] Section Options</title>
171
172 <para>A virtual network device is only created if the
173 <literal>[Match]</literal> section matches the current
174 environment, or if the section is empty. The following keys are
175 accepted:</para>
176
177 <variablelist class='network-directives'>
178 <varlistentry>
179 <term><varname>Host=</varname></term>
180 <listitem>
181 <para>Matches against the hostname or machine ID of the
182 host. See <literal>ConditionHost=</literal> in
183 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
184 for details.
185 </para>
186 </listitem>
187 </varlistentry>
188 <varlistentry>
189 <term><varname>Virtualization=</varname></term>
190 <listitem>
191 <para>Checks whether the system is executed in a virtualized
192 environment and optionally test whether it is a specific
193 implementation. See
194 <literal>ConditionVirtualization=</literal> in
195 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
196 for details.
197 </para>
198 </listitem>
199 </varlistentry>
200 <varlistentry>
201 <term><varname>KernelCommandLine=</varname></term>
202 <listitem>
203 <para>Checks whether a specific kernel command line option
204 is set (or if prefixed with the exclamation mark unset). See
205 <literal>ConditionKernelCommandLine=</literal> in
206 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
207 for details.
208 </para>
209 </listitem>
210 </varlistentry>
211 <varlistentry>
212 <term><varname>Architecture=</varname></term>
213 <listitem>
214 <para>Checks whether the system is running on a specific
215 architecture. See <literal>ConditionArchitecture=</literal> in
216 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
217 for details.
218 </para>
219 </listitem>
220 </varlistentry>
221 </variablelist>
222
223 </refsect1>
224
225 <refsect1>
226 <title>[NetDev] Section Options</title>
227
228 <para>The <literal>[NetDev]</literal> section accepts the
229 following keys:</para>
230
231 <variablelist class='network-directives'>
232 <varlistentry>
233 <term><varname>Description=</varname></term>
234 <listitem>
235 <para>A free-form description of the netdev.</para>
236 </listitem>
237 </varlistentry>
238 <varlistentry>
239 <term><varname>Name=</varname></term>
240 <listitem>
241 <para>The interface name used when creating the netdev.
242 This option is compulsory.</para>
243 </listitem>
244 </varlistentry>
245 <varlistentry>
246 <term><varname>Kind=</varname></term>
247 <listitem>
248 <para>The netdev kind. This option is compulsory. See the
249 <literal>Supported netdev kinds</literal> section for the
250 valid keys.</para>
251 </listitem>
252 </varlistentry>
253 <varlistentry>
254 <term><varname>MTUBytes=</varname></term>
255 <listitem>
256 <para>The maximum transmission unit in bytes to set for
257 the device. The usual suffixes K, M, G, are supported and
258 are understood to the base of 1024. This key is not
ff9b60f3 259 currently supported for <literal>tun</literal> or
798d3a52
ZJS
260 <literal>tap</literal> devices.
261 </para>
262 </listitem>
263 </varlistentry>
264 <varlistentry>
265 <term><varname>MACAddress=</varname></term>
266 <listitem>
267 <para>The MAC address to use for the device. If none is
268 given, one is generated based on the interface name and
269 the
270 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
ff9b60f3 271 This key is not currently supported for
798d3a52
ZJS
272 <literal>tun</literal> or <literal>tap</literal> devices.
273 </para>
274 </listitem>
275 </varlistentry>
276 </variablelist>
277 </refsect1>
278
279 <refsect1>
280 <title>[VLAN] Section Options</title>
281
282 <para>The <literal>[VLAN]</literal> section only applies for
283 netdevs of kind <literal>vlan</literal>, and accepts the
284 following key:</para>
285
286 <variablelist class='network-directives'>
287 <varlistentry>
288 <term><varname>Id=</varname></term>
289 <listitem>
290 <para>The VLAN ID to use. An integer in the range 0–4094.
291 This option is compulsory.</para>
292 </listitem>
293 </varlistentry>
294 </variablelist>
295
296 </refsect1>
297
298 <refsect1>
299 <title>[MACVLAN] Section Options</title>
300
301 <para>The <literal>[MACVLAN]</literal> section only applies for
302 netdevs of kind <literal>macvlan</literal>, and accepts the
303 following key:</para>
304
305 <variablelist class='network-directives'>
306 <varlistentry>
307 <term><varname>Mode=</varname></term>
308 <listitem>
309 <para>The MACVLAN mode to use. The supported options are
310 <literal>private</literal>,
311 <literal>vepa</literal>,
312 <literal>bridge</literal>, and
313 <literal>passthru</literal>.
314 </para>
315 </listitem>
316 </varlistentry>
317 </variablelist>
318
319 </refsect1>
320
321 <refsect1>
322 <title>[IPVLAN] Section Options</title>
323
324 <para>The <literal>[IPVLAN]</literal> section only applies for
325 netdevs of kind <literal>ipvlan</literal>, and accepts the
326 following key:</para>
327
328 <variablelist class='network-directives'>
329 <varlistentry>
330 <term><varname>Mode=</varname></term>
331 <listitem>
332 <para>The IPVLAN mode to use. The supported options are
333 <literal>L2</literal> and <literal>L3</literal>.
334 </para>
335 </listitem>
336 </varlistentry>
337 </variablelist>
338
339 </refsect1>
340
341 <refsect1>
342 <title>[VXLAN] Section Options</title>
343 <para>The <literal>[VXLAN]</literal> section only applies for
344 netdevs of kind <literal>vxlan</literal>, and accepts the
345 following keys:</para>
346
347 <variablelist class='network-directives'>
348 <varlistentry>
349 <term><varname>Id=</varname></term>
350 <listitem>
351 <para>The VXLAN ID to use.</para>
352 </listitem>
353 </varlistentry>
354 <varlistentry>
355 <term><varname>Group=</varname></term>
356 <listitem>
357 <para>An assigned multicast group IP address.</para>
358 </listitem>
359 </varlistentry>
360 <varlistentry>
361 <term><varname>TOS=</varname></term>
362 <listitem>
363 <para>The Type Of Service byte value for a vxlan interface.</para>
364 </listitem>
365 </varlistentry>
366 <varlistentry>
367 <term><varname>TTL=</varname></term>
368 <listitem>
369 <para>A fixed Time To Live N on Virtual eXtensible Local
370 Area Network packets. N is a number in the range 1-255. 0
371 is a special value meaning that packets inherit the TTL
372 value.</para>
373 </listitem>
374 </varlistentry>
375 <varlistentry>
376 <term><varname>MacLearning=</varname></term>
377 <listitem>
378 <para>A boolean. When true, enables dynamic MAC learning
379 to discover remote MAC addresses.</para>
380 </listitem>
381 </varlistentry>
382 <varlistentry>
383 <term><varname>FDBAgeingSec=</varname></term>
384 <listitem>
385 <para>The lifetime of Forwarding Database entry learnt by
386 the kernel in seconds.</para>
387 </listitem>
388 </varlistentry>
389 <varlistentry>
390 <term><varname>ARPProxy=</varname></term>
391 <listitem>
392 <para>A boolean. When true, enables ARP proxy.</para>
393 </listitem>
394 </varlistentry>
395 <varlistentry>
396 <term><varname>L2MissNotification=</varname></term>
397 <listitem>
398 <para>A boolean. When true, enables netlink LLADDR miss
399 notifications.</para>
400 </listitem>
401 </varlistentry>
402 <varlistentry>
403 <term><varname>L3MissNotification=</varname></term>
404 <listitem>
405 <para>A boolean. When true, enables netlink IP ADDR miss
406 notifications.</para>
407 </listitem>
408 </varlistentry>
409 <varlistentry>
410 <term><varname>RouteShortCircuit=</varname></term>
411 <listitem>
412 <para>A boolean. When true route short circuit is turned
413 on.</para>
414 </listitem>
415 </varlistentry>
cffacc74
SS
416 <varlistentry>
417 <term><varname>UDPCheckSum=</varname></term>
418 <listitem>
419 <para>A boolean. When true transmitting UDP checksums when doing VXLAN/IPv4 is turned on.</para>
420 </listitem>
421 </varlistentry>
422 <varlistentry>
423 <term><varname>UDP6ZeroChecksumTx=</varname></term>
424 <listitem>
425 <para>A boolean. When true sending zero checksums in VXLAN/IPv6 is turned on.</para>
426 </listitem>
427 </varlistentry>
428 <varlistentry>
429 <term><varname>UDP6ZeroCheckSumRx=</varname></term>
430 <listitem>
431 <para>A boolean. When true receiving zero checksums in VXLAN/IPv6 is turned on.</para>
432 </listitem>
433 </varlistentry>
798d3a52
ZJS
434 </variablelist>
435 </refsect1>
436 <refsect1>
437 <title>[Tunnel] Section Options</title>
438
439 <para>The <literal>[Tunnel]</literal> section only applies for
440 netdevs of kind
441 <literal>ipip</literal>,
442 <literal>sit</literal>,
443 <literal>gre</literal>,
444 <literal>gretap</literal>,
445 <literal>ip6gre</literal>,
446 <literal>ip6gretap</literal>,
5cc0748e
SS
447 <literal>vti</literal>,
448 <literal>vti6</literal>, and
798d3a52
ZJS
449 <literal>ip6tnl</literal> and accepts
450 the following keys:</para>
451
452 <variablelist class='network-directives'>
453 <varlistentry>
454 <term><varname>Local=</varname></term>
455 <listitem>
456 <para>A static local address for tunneled packets. It must
457 be an address on another interface of this host.</para>
458 </listitem>
459 </varlistentry>
460 <varlistentry>
461 <term><varname>Remote=</varname></term>
462 <listitem>
463 <para>The remote endpoint of the tunnel.</para>
464 </listitem>
465 </varlistentry>
466 <varlistentry>
467 <term><varname>TOS=</varname></term>
468 <listitem>
469 <para>The Type Of Service byte value for a tunnel interface.
470 For details about the TOS see the
471 <ulink url="http://tools.ietf.org/html/rfc1349"> Type of
472 Service in the Internet Protocol Suite </ulink> document.
473 </para>
474 </listitem>
475 </varlistentry>
476 <varlistentry>
477 <term><varname>TTL=</varname></term>
478 <listitem>
479 <para>A fixed Time To Live N on tunneled packets. N is a
480 number in the range 1-255. 0 is a special value meaning that
481 packets inherit the TTL value. The default value for IPv4
482 tunnels is: inherit. The default value for IPv6 tunnels is:
483 64.</para>
484 </listitem>
485 </varlistentry>
486 <varlistentry>
487 <term><varname>DiscoverPathMTU=</varname></term>
488 <listitem>
489 <para>A boolean. When true, enables Path MTU Discovery on
490 the tunnel.</para>
491 </listitem>
492 </varlistentry>
276de526
SS
493 <varlistentry>
494 <term><varname>IPv6FlowLabel=</varname></term>
495 <listitem>
496 <para>Configures The 20-bit Flow Label (see <ulink url="https://tools.ietf.org/html/rfc6437">
497 RFC 6437</ulink>) field in the IPv6 header (see <ulink url="https://tools.ietf.org/html/rfc2460">
498 RFC 2460</ulink>), is used by a node to label packets of a flow.
499 It's only used for IPv6 Tunnels.
500 A Flow Label of zero is used to indicate packets that have
501 not been labeled. Takes following values.
502 When <literal>inherit</literal> it uses the original flowlabel,
503 or can be configured to any value betwen 0 to 0xFFFFF.</para>
504 </listitem>
505 </varlistentry>
9b0ca30a 506 <varlistentry>
a9b70f9d 507 <term><varname>CopyDSCP=</varname></term>
9b0ca30a 508 <listitem>
3cf4bcab
ZJS
509 <para>A boolean. When true, the Differentiated Service Code
510 Point (DSCP) field will be copied to the inner header from
a9b70f9d 511 outer header during the decapsulation of an IPv6 tunnel
3cf4bcab
ZJS
512 packet. DSCP is a field in an IP packet that enables different
513 levels of service to be assigned to network traffic.
514 Defaults to <literal>no</literal>.
9b0ca30a
SS
515 </para>
516 </listitem>
517 </varlistentry>
798d3a52
ZJS
518 <varlistentry>
519 <term><varname>Mode=</varname></term>
520 <listitem>
521 <para>An <literal>ip6tnl</literal> tunnels can have three
522 modes
523 <literal>ip6ip6</literal> for IPv6 over IPv6,
524 <literal>ipip6</literal> for IPv4 over IPv6 or
525 <literal>any</literal> for either.
526 </para>
527 </listitem>
528 </varlistentry>
529 </variablelist>
530 </refsect1>
531 <refsect1>
532 <title>[Peer] Section Options</title>
533
534 <para>The <literal>[Peer]</literal> section only applies for
535 netdevs of kind <literal>veth</literal> and accepts the
536 following key:</para>
537
538 <variablelist class='network-directives'>
539 <varlistentry>
540 <term><varname>Name=</varname></term>
541 <listitem>
542 <para>The interface name used when creating the netdev.
543 This option is compulsory.</para>
544 </listitem>
545 </varlistentry>
546 <varlistentry>
547 <term><varname>MACAddress=</varname></term>
548 <listitem>
549 <para>The peer MACAddress, if not set it is generated in
550 the same way as the MAC address of the main
551 interface.</para>
552 </listitem>
553 </varlistentry>
554 </variablelist>
555 </refsect1>
556 <refsect1>
557 <title>[Tun] Section Options</title>
558
559 <para>The <literal>[Tun]</literal> section only applies for
560 netdevs of kind <literal>tun</literal>, and accepts the following
561 keys:</para>
562
563 <variablelist class='network-directives'>
564 <varlistentry>
565 <term><varname>OneQueue=</varname></term>
566 <listitem><para>Takes a boolean argument. Configures whether
567 all packets are queued at the device (enabled), or a fixed
568 number of packets are queued at the device and the rest at the
569 <literal>qdisc</literal>. Defaults to
570 <literal>no</literal>.</para>
571 </listitem>
572 </varlistentry>
573 <varlistentry>
574 <term><varname>MultiQueue=</varname></term>
575 <listitem><para>Takes a boolean argument. Configures whether
576 to use multiple file descriptors (queues) to parallelize
577 packets sending and receiving. Defaults to
578 <literal>no</literal>.</para>
579 </listitem>
580 </varlistentry>
581 <varlistentry>
582 <term><varname>PacketInfo=</varname></term>
583 <listitem><para>Takes a boolean argument. Configures whether
ff9b60f3 584 packets should be prepended with four extra bytes (two flag
798d3a52
ZJS
585 bytes and two protocol bytes). If disabled it indicates that
586 the packets will be pure IP packets. Defaults to
587 <literal>no</literal>.</para>
588 </listitem>
589 </varlistentry>
43f78da4
SS
590 <varlistentry>
591 <term><varname>VnetHeader=</varname></term>
592 <listitem><para>Takes a boolean argument. Configures
593 IFF_VNET_HDR flag for a tap device. It allows sending
594 and receiving larger Generic Segmentation Offload (GSO)
595 packets. This may increase throughput significantly.
596 Defaults to
597 <literal>no</literal>.</para>
598 </listitem>
599 </varlistentry>
798d3a52
ZJS
600 <varlistentry>
601 <term><varname>User=</varname></term>
602 <listitem><para>User to grant access to the
603 <filename>/dev/net/tun</filename> device.</para>
604 </listitem>
605 </varlistentry>
606 <varlistentry>
607 <term><varname>Group=</varname></term>
608 <listitem><para>Group to grant access to the
609 <filename>/dev/net/tun</filename> device.</para>
610 </listitem>
611 </varlistentry>
612
613 </variablelist>
614
615 </refsect1>
616
617 <refsect1>
618 <title>[Tap] Section Options</title>
619
620 <para>The <literal>[Tap]</literal> section only applies for
621 netdevs of kind <literal>tap</literal>, and accepts the same keys
622 as the <literal>[Tun]</literal> section.</para>
623 </refsect1>
624
625 <refsect1>
626 <title>[Bond] Section Options</title>
627
628 <para>The <literal>[Bond]</literal> section accepts the following
629 key:</para>
630
631 <variablelist class='network-directives'>
632 <varlistentry>
633 <term><varname>Mode=</varname></term>
634 <listitem>
635 <para>Specifies one of the bonding policies. The default is
636 <literal>balance-rr</literal> (round robin). Possible values are
637 <literal>balance-rr</literal>,
638 <literal>active-backup</literal>,
639 <literal>balance-xor</literal>,
640 <literal>broadcast</literal>,
641 <literal>802.3ad</literal>,
642 <literal>balance-tlb</literal>, and
643 <literal>balance-alb</literal>.
644 </para>
645 </listitem>
646 </varlistentry>
647
648 <varlistentry>
649 <term><varname>TransmitHashPolicy=</varname></term>
650 <listitem>
651 <para>Selects the transmit hash policy to use for slave
652 selection in balance-xor, 802.3ad, and tlb modes. Possible
653 values are
654 <literal>layer2</literal>,
655 <literal>layer3+4</literal>,
656 <literal>layer2+3</literal>,
657 <literal>encap2+3</literal>,
658 <literal>802.3ad</literal>, and
659 <literal>encap3+4</literal>.
660 </para>
661 </listitem>
662 </varlistentry>
663
664 <varlistentry>
665 <term><varname>LACPTransmitRate=</varname></term>
666 <listitem>
667 <para>Specifies the rate with which link partner transmits
668 Link Aggregation Control Protocol Data Unit packets in
669 802.3ad mode. Possible values are <literal>slow</literal>,
670 which requests partner to transmit LACPDUs every 30 seconds,
671 and <literal>fast</literal>, which requests partner to
672 transmit LACPDUs every second. The default value is
673 <literal>slow</literal>.</para>
674 </listitem>
675 </varlistentry>
676
677 <varlistentry>
678 <term><varname>MIIMonitorSec=</varname></term>
679 <listitem>
680 <para>Specifies the frequency that Media Independent
681 Interface link monitoring will occur. A value of zero
682 disables MII link monitoring. This values is rounded down to
683 the nearest millisecond. The default value is 0.</para>
684 </listitem>
685 </varlistentry>
686
687 <varlistentry>
688 <term><varname>UpDelaySec=</varname></term>
689 <listitem>
690 <para>Specifies the delay before a link is enabled after a
691 link up status has been detected. This value is rounded down
692 to a multiple of MIIMonitorSec. The default value is
693 0.</para>
694 </listitem>
695 </varlistentry>
696
697 <varlistentry>
698 <term><varname>DownDelaySec=</varname></term>
699 <listitem>
700 <para>Specifies the delay before a link is disabled after a
701 link down status has been detected. This value is rounded
702 down to a multiple of MIIMonitorSec. The default value is
703 0.</para>
704 </listitem>
705 </varlistentry>
706
81bd37a8 707 <varlistentry>
38422da7 708 <term><varname>LearnPacketIntervalSec=</varname></term>
81bd37a8
SS
709 <listitem>
710 <para>Specifies the number of seconds between instances where the bonding
711 driver sends learning packets to each slaves peer switch.
712 The valid range is 1 - 0x7fffffff; the default value is 1. This Option
713 has effect only in balance-tlb and balance-alb modes.</para>
714 </listitem>
715 </varlistentry>
716
717 <varlistentry>
718 <term><varname>AdSelect=</varname></term>
719 <listitem>
720 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
721 <literal>stable</literal>,
722 <literal>bandwidth</literal>,
723 <literal>count</literal>
724 </para>
725 </listitem>
726 </varlistentry>
727
728 <varlistentry>
38422da7 729 <term><varname>FailOverMACPolicy=</varname></term>
81bd37a8
SS
730 <listitem>
731 <para>Specifies whether active-backup mode should set all slaves to
732 the same MAC address at enslavement or, when enabled, perform special handling of the
733 bond's MAC address in accordance with the selected policy. The default policy is none.
734 Possible values are
735 <literal>none</literal>,
736 <literal>active</literal>,
737 <literal>follow</literal>
738 </para>
739 </listitem>
740 </varlistentry>
741
742 <varlistentry>
38422da7 743 <term><varname>ARPValidate=</varname></term>
81bd37a8
SS
744 <listitem>
745 <para>Specifies whether or not ARP probes and replies should be
38422da7 746 validated in any mode that supports ARP monitoring, or whether
81bd37a8
SS
747 non-ARP traffic should be filtered (disregarded) for link
748 monitoring purposes. Possible values are
749 <literal>none</literal>,
750 <literal>active</literal>,
751 <literal>backup</literal>,
752 <literal>all</literal>
753 </para>
754 </listitem>
755 </varlistentry>
756
757 <varlistentry>
38422da7 758 <term><varname>ARPIntervalSec=</varname></term>
81bd37a8
SS
759 <listitem>
760 <para>Specifies the ARP link monitoring frequency in milliseconds.
761 A value of 0 disables ARP monitoring. The default value is 0.
762 </para>
763 </listitem>
764 </varlistentry>
765
766 <varlistentry>
38422da7 767 <term><varname>ARPIPTargets=</varname></term>
81bd37a8
SS
768 <listitem>
769 <para>Specifies the IP addresses to use as ARP monitoring peers when
38422da7 770 ARPIntervalSec is greater than 0. These are the targets of the ARP request
81bd37a8
SS
771 sent to determine the health of the link to the targets.
772 Specify these values in ipv4 dotted decimal format. At least one IP
773 address must be given for ARP monitoring to function. The
774 maximum number of targets that can be specified is 16. The
775 default value is no IP addresses.
776 </para>
777 </listitem>
778 </varlistentry>
779
780 <varlistentry>
38422da7 781 <term><varname>ARPAllTargets=</varname></term>
81bd37a8 782 <listitem>
38422da7 783 <para>Specifies the quantity of ARPIPTargets that must be reachable
81bd37a8
SS
784 in order for the ARP monitor to consider a slave as being up.
785 This option affects only active-backup mode for slaves with
38422da7 786 ARPValidate enabled. Possible values are
81bd37a8
SS
787 <literal>any</literal>,
788 <literal>all</literal>
789 </para>
790 </listitem>
791 </varlistentry>
792
793 <varlistentry>
38422da7 794 <term><varname>PrimaryReselectPolicy=</varname></term>
81bd37a8
SS
795 <listitem>
796 <para>Specifies the reselection policy for the primary slave. This
797 affects how the primary slave is chosen to become the active slave
798 when failure of the active slave or recovery of the primary slave
799 occurs. This option is designed to prevent flip-flopping between
800 the primary slave and other slaves. Possible values are
801 <literal>always</literal>,
802 <literal>better</literal>,
803 <literal>failure</literal>
804 </para>
805 </listitem>
806 </varlistentry>
807
808 <varlistentry>
809 <term><varname>ResendIGMP=</varname></term>
810 <listitem>
811 <para>Specifies the number of IGMP membership reports to be issued after
812 a failover event. One membership report is issued immediately after
813 the failover, subsequent packets are sent in each 200ms interval.
814 The valid range is (0 - 255). Defaults to 1. A value of 0
815 prevents the IGMP membership report from being issued in response
816 to the failover event.
817 </para>
818 </listitem>
819 </varlistentry>
820
821 <varlistentry>
822 <term><varname>PacketsPerSlave=</varname></term>
823 <listitem>
824 <para> Specify the number of packets to transmit through a slave before
825 moving to the next one. When set to 0 then a slave is chosen at
826 random.The valid range is (0 - 65535). Defaults to 1. This option
827 has effect only in balance-rr mode.
828 </para>
829 </listitem>
830 </varlistentry>
831
832 <varlistentry>
38422da7 833 <term><varname>GratuitousARP=</varname></term>
81bd37a8
SS
834 <listitem>
835 <para>Specify the number of peer notifications (gratuitous ARPs and
836 unsolicited IPv6 Neighbor Advertisements) to be issued after a
837 failover event. As soon as the link is up on the new slave
838 a peer notification is sent on the bonding device and each
839 VLAN sub-device. This is repeated at each link monitor interval
38422da7 840 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
81bd37a8 841 greater than 1. The valid range is (0 - 255). Default value is 1.
38422da7 842 These options affect only the active-backup mode.
81bd37a8
SS
843 </para>
844 </listitem>
845 </varlistentry>
846
847 <varlistentry>
848 <term><varname>AllSlavesActive=</varname></term>
849 <listitem>
850 <para> A boolean. Specifies that duplicate frames (received on inactive ports)
851 should be dropped false or delivered true. Normally, bonding will drop
852 duplicate frames (received on inactive ports), which is desirable for
853 most users. But there are some times it is nice to allow duplicate
854 frames to be delivered. The default value is false (drop duplicate frames
855 received on inactive ports).
856 </para>
857 </listitem>
858 </varlistentry>
859
860 <varlistentry>
861 <term><varname>MinLinks=</varname></term>
862 <listitem>
863 <para>Specifies the minimum number of links that must be active before
864 asserting carrier. The default value is 0.
865 </para>
866 </listitem>
867 </varlistentry>
868
798d3a52 869 </variablelist>
81bd37a8
SS
870
871 <para>For more detail information see
872 <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">
873 Linux Ethernet Bonding Driver HOWTO</ulink></para>
874
798d3a52
ZJS
875 </refsect1>
876
877 <refsect1>
878 <title>Example</title>
879 <example>
12b42c76 880 <title>/etc/systemd/network/bridge.netdev</title>
798d3a52
ZJS
881
882 <programlisting>[NetDev]
eac684ef
TG
883Name=bridge0
884Kind=bridge</programlisting>
798d3a52 885 </example>
eac684ef 886
798d3a52 887 <example>
12b42c76 888 <title>/etc/systemd/network/vlan1.netdev</title>
eac684ef 889
798d3a52 890 <programlisting>[Match]
eac684ef
TG
891Virtualization=no
892
893[NetDev]
894Name=vlan1
895Kind=vlan
896
897[VLAN]
898Id=1</programlisting>
798d3a52
ZJS
899 </example>
900 <example>
12b42c76 901 <title>/etc/systemd/network/ipip.netdev</title>
798d3a52 902 <programlisting>[NetDev]
b35a2909
TG
903Name=ipip-tun
904Kind=ipip
905MTUBytes=1480
906
907[Tunnel]
908Local=192.168.223.238
909Remote=192.169.224.239
910TTL=64</programlisting>
798d3a52
ZJS
911 </example>
912 <example>
12b42c76 913 <title>/etc/systemd/network/tap.netdev</title>
798d3a52 914 <programlisting>[NetDev]
30ae9dfd
SS
915Name=tap-test
916Kind=tap
917
918[Tap]
919MultiQueue=true
920PacketInfo=true</programlisting> </example>
eac684ef 921
798d3a52 922 <example>
12b42c76 923 <title>/etc/systemd/network/sit.netdev</title>
798d3a52 924 <programlisting>[NetDev]
b35a2909
TG
925Name=sit-tun
926Kind=sit
927MTUBytes=1480
928
929[Tunnel]
930Local=10.65.223.238
931Remote=10.65.223.239</programlisting>
798d3a52 932 </example>
eac684ef 933
798d3a52 934 <example>
12b42c76 935 <title>/etc/systemd/network/gre.netdev</title>
798d3a52 936 <programlisting>[NetDev]
b35a2909
TG
937Name=gre-tun
938Kind=gre
939MTUBytes=1480
940
941[Tunnel]
942Local=10.65.223.238
943Remote=10.65.223.239</programlisting>
798d3a52 944 </example>
b35a2909 945
798d3a52 946 <example>
12b42c76 947 <title>/etc/systemd/network/vti.netdev</title>
b35a2909 948
798d3a52 949 <programlisting>[NetDev]
b35a2909
TG
950Name=vti-tun
951Kind=vti
952MTUBytes=1480
953
954[Tunnel]
955Local=10.65.223.238
956Remote=10.65.223.239</programlisting>
798d3a52 957 </example>
b35a2909 958
798d3a52 959 <example>
12b42c76 960 <title>/etc/systemd/network/veth.netdev</title>
798d3a52 961 <programlisting>[NetDev]
b35a2909
TG
962Name=veth-test
963Kind=veth
964
965[Peer]
966Name=veth-peer</programlisting>
798d3a52 967 </example>
b35a2909 968
798d3a52 969 <example>
12b42c76 970 <title>/etc/systemd/network/dummy.netdev</title>
798d3a52 971 <programlisting>[NetDev]
9e358851
TG
972Name=dummy-test
973Kind=dummy
974MACAddress=12:34:56:78:9a:bc</programlisting>
798d3a52
ZJS
975 </example>
976
977 </refsect1>
978 <refsect1>
979 <title>See Also</title>
980 <para>
981 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
982 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
983 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
984 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
985 </para>
986 </refsect1>
eac684ef
TG
987
988</refentry>