]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.netdev.xml
networkd: Tunnel add support to configure key for VTI/VTI6 (#3532)
[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 82 override a system-supplied configuration file with a local file if
57e27ec0 83 needed. As a special case, an empty file (file size 0) or symlink
b938cb90 84 with the same name pointing to <filename>/dev/null</filename>
a8eaaee7 85 disables the configuration file entirely (it is "masked").</para>
798d3a52
ZJS
86 </refsect1>
87
88 <refsect1>
89 <title>Supported netdev kinds</title>
90
91 <para>The following kinds of virtual network devices may be
92 configured in <filename>.netdev</filename> files:</para>
93
94 <table>
95 <title>Supported kinds of virtual network devices</title>
96
97 <tgroup cols='2'>
98 <colspec colname='kind' />
99 <colspec colname='explanation' />
100 <thead><row>
101 <entry>Kind</entry>
102 <entry>Description</entry>
103 </row></thead>
104 <tbody>
105 <row><entry><varname>bond</varname></entry>
106 <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>
107
108 <row><entry><varname>bridge</varname></entry>
a8eaaee7 109 <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>
798d3a52
ZJS
110
111 <row><entry><varname>dummy</varname></entry>
112 <entry>A dummy device drops all packets sent to it.</entry></row>
113
114 <row><entry><varname>gre</varname></entry>
115 <entry>A Level 3 GRE tunnel over IPv4. See <ulink url="https://tools.ietf.org/html/rfc2784">RFC 2784</ulink> for details.</entry></row>
116
117 <row><entry><varname>gretap</varname></entry>
118 <entry>A Level 2 GRE tunnel over IPv4.</entry></row>
119
120 <row><entry><varname>ip6gre</varname></entry>
121 <entry>A Level 3 GRE tunnel over IPv6.</entry></row>
122
123 <row><entry><varname>ip6tnl</varname></entry>
124 <entry>An IPv4 or IPv6 tunnel over IPv6</entry></row>
125
126 <row><entry><varname>ip6gretap</varname></entry>
127 <entry>An Level 2 GRE tunnel over IPv6.</entry></row>
128
129 <row><entry><varname>ipip</varname></entry>
130 <entry>An IPv4 over IPv4 tunnel.</entry></row>
131
132 <row><entry><varname>ipvlan</varname></entry>
133 <entry>An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.</entry></row>
134
135 <row><entry><varname>macvlan</varname></entry>
136 <entry>A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
137
0371f2df
SS
138 <row><entry><varname>macvtap</varname></entry>
139 <entry>A macvtap device is a stacked device which receives packets from its underlying device based on MAC address filtering.</entry></row>
140
798d3a52
ZJS
141 <row><entry><varname>sit</varname></entry>
142 <entry>An IPv6 over IPv4 tunnel.</entry></row>
143
144 <row><entry><varname>tap</varname></entry>
145 <entry>A persistent Level 2 tunnel between a network device and a device node.</entry></row>
146
147 <row><entry><varname>tun</varname></entry>
148 <entry>A persistent Level 3 tunnel between a network device and a device node.</entry></row>
149
150 <row><entry><varname>veth</varname></entry>
a8eaaee7 151 <entry>An Ethernet tunnel between a pair of network devices.</entry></row>
798d3a52
ZJS
152
153 <row><entry><varname>vlan</varname></entry>
154 <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>
155
156 <row><entry><varname>vti</varname></entry>
157 <entry>An IPv4 over IPSec tunnel.</entry></row>
158
5cc0748e
SS
159 <row><entry><varname>vti6</varname></entry>
160 <entry>An IPv6 over IPSec tunnel.</entry></row>
161
798d3a52
ZJS
162 <row><entry><varname>vxlan</varname></entry>
163 <entry>A virtual extensible LAN (vxlan), for connecting Cloud computing deployments.</entry></row>
164 </tbody>
165 </tgroup>
166 </table>
167
168 </refsect1>
169
170 <refsect1>
171 <title>[Match] Section Options</title>
172
173 <para>A virtual network device is only created if the
174 <literal>[Match]</literal> section matches the current
175 environment, or if the section is empty. The following keys are
176 accepted:</para>
177
178 <variablelist class='network-directives'>
179 <varlistentry>
180 <term><varname>Host=</varname></term>
181 <listitem>
182 <para>Matches against the hostname or machine ID of the
183 host. See <literal>ConditionHost=</literal> in
184 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
185 for details.
186 </para>
187 </listitem>
188 </varlistentry>
189 <varlistentry>
190 <term><varname>Virtualization=</varname></term>
191 <listitem>
192 <para>Checks whether the system is executed in a virtualized
193 environment and optionally test whether it is a specific
194 implementation. See
195 <literal>ConditionVirtualization=</literal> in
196 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
197 for details.
198 </para>
199 </listitem>
200 </varlistentry>
201 <varlistentry>
202 <term><varname>KernelCommandLine=</varname></term>
203 <listitem>
204 <para>Checks whether a specific kernel command line option
205 is set (or if prefixed with the exclamation mark unset). See
206 <literal>ConditionKernelCommandLine=</literal> in
207 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
208 for details.
209 </para>
210 </listitem>
211 </varlistentry>
212 <varlistentry>
213 <term><varname>Architecture=</varname></term>
214 <listitem>
215 <para>Checks whether the system is running on a specific
216 architecture. See <literal>ConditionArchitecture=</literal> in
217 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
218 for details.
219 </para>
220 </listitem>
221 </varlistentry>
222 </variablelist>
223
224 </refsect1>
225
226 <refsect1>
227 <title>[NetDev] Section Options</title>
228
229 <para>The <literal>[NetDev]</literal> section accepts the
230 following keys:</para>
231
232 <variablelist class='network-directives'>
233 <varlistentry>
234 <term><varname>Description=</varname></term>
235 <listitem>
236 <para>A free-form description of the netdev.</para>
237 </listitem>
238 </varlistentry>
239 <varlistentry>
240 <term><varname>Name=</varname></term>
241 <listitem>
242 <para>The interface name used when creating the netdev.
243 This option is compulsory.</para>
244 </listitem>
245 </varlistentry>
246 <varlistentry>
247 <term><varname>Kind=</varname></term>
248 <listitem>
249 <para>The netdev kind. This option is compulsory. See the
250 <literal>Supported netdev kinds</literal> section for the
251 valid keys.</para>
252 </listitem>
253 </varlistentry>
254 <varlistentry>
255 <term><varname>MTUBytes=</varname></term>
256 <listitem>
257 <para>The maximum transmission unit in bytes to set for
258 the device. The usual suffixes K, M, G, are supported and
259 are understood to the base of 1024. This key is not
ff9b60f3 260 currently supported for <literal>tun</literal> or
798d3a52
ZJS
261 <literal>tap</literal> devices.
262 </para>
263 </listitem>
264 </varlistentry>
265 <varlistentry>
266 <term><varname>MACAddress=</varname></term>
267 <listitem>
268 <para>The MAC address to use for the device. If none is
269 given, one is generated based on the interface name and
270 the
271 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
ff9b60f3 272 This key is not currently supported for
798d3a52
ZJS
273 <literal>tun</literal> or <literal>tap</literal> devices.
274 </para>
275 </listitem>
276 </varlistentry>
277 </variablelist>
278 </refsect1>
279
3428fe07
SS
280 <refsect1>
281 <title>[Bridge] Section Options</title>
282
283 <para>The <literal>[Bridge]</literal> section only applies for
284 netdevs of kind <literal>bridge</literal>, and accepts the
a8eaaee7 285 following keys:</para>
3428fe07
SS
286
287 <variablelist class='network-directives'>
288 <varlistentry>
289 <term><varname>HelloTimeSec=</varname></term>
290 <listitem>
a8eaaee7 291 <para>HelloTimeSec specifies the number of seconds between two hello packets
3428fe07
SS
292 sent out by the root bridge and the designated bridges. Hello packets are
293 used to communicate information about the topology throughout the entire
294 bridged local area network.</para>
295 </listitem>
296 </varlistentry>
297 <varlistentry>
298 <term><varname>MaxAgeSec=</varname></term>
299 <listitem>
300 <para>MaxAgeSec specifies the number of seconds of maximum message age.
301 If the last seen (received) hello packet is more than this number of
302 seconds old, the bridge in question will start the takeover procedure
303 in attempt to become the Root Bridge itself.</para>
304 </listitem>
305 </varlistentry>
306 <varlistentry>
307 <term><varname>ForwardDelaySec=</varname></term>
308 <listitem>
309 <para>ForwardDelaySec specifies the number of seconds spent in each
310 of the Listening and Learning states before the Forwarding state is entered.</para>
311 </listitem>
312 </varlistentry>
3fef7a3f
SS
313 <varlistentry>
314 <term><varname>MulticastQuerier=</varname></term>
315 <listitem>
316 <para>A boolean. This setting controls the IFLA_BR_MCAST_QUERIER option in the kernel.
317 If enabled, the kernel will send general ICMP queries from a zero source address.
318 This feature should allow faster convergence on startup, but it causes some
319 multicast-aware switches to misbehave and disrupt forwarding of multicast packets.
320 When unset, the kernel's default setting applies.
321 </para>
322 </listitem>
323 </varlistentry>
6df6d898
SS
324 <varlistentry>
325 <term><varname>MulticastSnooping=</varname></term>
326 <listitem>
327 <para>A boolean. This setting controls the IFLA_BR_MCAST_SNOOPING option in the kernel.
328 If enabled, IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic
329 between hosts and multicast routers. When unset, the kernel's default setting applies.
330 </para>
331 </listitem>
332 </varlistentry>
c6f8d17d
TJ
333 <varlistentry>
334 <term><varname>VLANFiltering=</varname></term>
335 <listitem>
336 <para>A boolean. This setting controls the IFLA_BR_VLAN_FILTERING option in the kernel.
337 If enabled, the bridge will be started in VLAN-filtering mode. When unset, the kernel's
338 default setting applies.
339 </para>
340 </listitem>
341 </varlistentry>
3428fe07
SS
342 </variablelist>
343
344 </refsect1>
345
798d3a52
ZJS
346 <refsect1>
347 <title>[VLAN] Section Options</title>
348
349 <para>The <literal>[VLAN]</literal> section only applies for
350 netdevs of kind <literal>vlan</literal>, and accepts the
351 following key:</para>
352
353 <variablelist class='network-directives'>
354 <varlistentry>
355 <term><varname>Id=</varname></term>
356 <listitem>
357 <para>The VLAN ID to use. An integer in the range 0–4094.
358 This option is compulsory.</para>
359 </listitem>
360 </varlistentry>
361 </variablelist>
362
363 </refsect1>
364
365 <refsect1>
366 <title>[MACVLAN] Section Options</title>
367
368 <para>The <literal>[MACVLAN]</literal> section only applies for
369 netdevs of kind <literal>macvlan</literal>, and accepts the
370 following key:</para>
371
372 <variablelist class='network-directives'>
373 <varlistentry>
374 <term><varname>Mode=</varname></term>
375 <listitem>
376 <para>The MACVLAN mode to use. The supported options are
377 <literal>private</literal>,
378 <literal>vepa</literal>,
379 <literal>bridge</literal>, and
380 <literal>passthru</literal>.
381 </para>
382 </listitem>
383 </varlistentry>
384 </variablelist>
385
386 </refsect1>
387
0371f2df
SS
388 <refsect1>
389 <title>[MACVTAP] Section Options</title>
390
391 <para>The <literal>[MACVTAP]</literal> section applies for
392 netdevs of kind <literal>macvtap</literal> and accepts the
96d49011 393 same key as <literal>[MACVLAN]</literal>.</para>
0371f2df
SS
394
395 </refsect1>
396
798d3a52
ZJS
397 <refsect1>
398 <title>[IPVLAN] Section Options</title>
399
400 <para>The <literal>[IPVLAN]</literal> section only applies for
401 netdevs of kind <literal>ipvlan</literal>, and accepts the
402 following key:</para>
403
404 <variablelist class='network-directives'>
405 <varlistentry>
406 <term><varname>Mode=</varname></term>
407 <listitem>
408 <para>The IPVLAN mode to use. The supported options are
409 <literal>L2</literal> and <literal>L3</literal>.
410 </para>
411 </listitem>
412 </varlistentry>
413 </variablelist>
414
415 </refsect1>
416
417 <refsect1>
418 <title>[VXLAN] Section Options</title>
419 <para>The <literal>[VXLAN]</literal> section only applies for
420 netdevs of kind <literal>vxlan</literal>, and accepts the
421 following keys:</para>
422
423 <variablelist class='network-directives'>
424 <varlistentry>
425 <term><varname>Id=</varname></term>
426 <listitem>
427 <para>The VXLAN ID to use.</para>
428 </listitem>
429 </varlistentry>
430 <varlistentry>
431 <term><varname>Group=</varname></term>
432 <listitem>
433 <para>An assigned multicast group IP address.</para>
434 </listitem>
435 </varlistentry>
436 <varlistentry>
437 <term><varname>TOS=</varname></term>
438 <listitem>
439 <para>The Type Of Service byte value for a vxlan interface.</para>
440 </listitem>
441 </varlistentry>
442 <varlistentry>
443 <term><varname>TTL=</varname></term>
444 <listitem>
445 <para>A fixed Time To Live N on Virtual eXtensible Local
b938cb90 446 Area Network packets. N is a number in the range 1–255. 0
798d3a52
ZJS
447 is a special value meaning that packets inherit the TTL
448 value.</para>
449 </listitem>
450 </varlistentry>
451 <varlistentry>
452 <term><varname>MacLearning=</varname></term>
453 <listitem>
454 <para>A boolean. When true, enables dynamic MAC learning
455 to discover remote MAC addresses.</para>
456 </listitem>
457 </varlistentry>
458 <varlistentry>
459 <term><varname>FDBAgeingSec=</varname></term>
460 <listitem>
461 <para>The lifetime of Forwarding Database entry learnt by
b938cb90 462 the kernel, in seconds.</para>
798d3a52
ZJS
463 </listitem>
464 </varlistentry>
465 <varlistentry>
3d276dd2
SS
466 <term><varname>MaximumFDBEntries=</varname></term>
467 <listitem>
468 <para>Configures maximum number of FDB entries.</para>
469 </listitem>
470 </varlistentry>
798d3a52
ZJS
471 <varlistentry>
472 <term><varname>ARPProxy=</varname></term>
473 <listitem>
a8eaaee7 474 <para>A boolean. When true, enables ARP proxying.</para>
798d3a52
ZJS
475 </listitem>
476 </varlistentry>
477 <varlistentry>
478 <term><varname>L2MissNotification=</varname></term>
479 <listitem>
480 <para>A boolean. When true, enables netlink LLADDR miss
481 notifications.</para>
482 </listitem>
483 </varlistentry>
484 <varlistentry>
485 <term><varname>L3MissNotification=</varname></term>
486 <listitem>
a8eaaee7 487 <para>A boolean. When true, enables netlink IP address miss
798d3a52
ZJS
488 notifications.</para>
489 </listitem>
490 </varlistentry>
491 <varlistentry>
492 <term><varname>RouteShortCircuit=</varname></term>
493 <listitem>
a8eaaee7 494 <para>A boolean. When true, route short circuiting is turned
798d3a52
ZJS
495 on.</para>
496 </listitem>
497 </varlistentry>
cffacc74
SS
498 <varlistentry>
499 <term><varname>UDPCheckSum=</varname></term>
500 <listitem>
b938cb90 501 <para>A boolean. When true, transmitting UDP checksums when doing VXLAN/IPv4 is turned on.</para>
cffacc74
SS
502 </listitem>
503 </varlistentry>
504 <varlistentry>
505 <term><varname>UDP6ZeroChecksumTx=</varname></term>
506 <listitem>
b938cb90 507 <para>A boolean. When true, sending zero checksums in VXLAN/IPv6 is turned on.</para>
cffacc74
SS
508 </listitem>
509 </varlistentry>
510 <varlistentry>
511 <term><varname>UDP6ZeroCheckSumRx=</varname></term>
512 <listitem>
b938cb90 513 <para>A boolean. When true, receiving zero checksums in VXLAN/IPv6 is turned on.</para>
cffacc74
SS
514 </listitem>
515 </varlistentry>
8b414e52
SS
516 <varlistentry>
517 <term><varname>GroupPolicyExtension=</varname></term>
518 <listitem>
b938cb90
JE
519 <para>A boolean. When true, it enables Group Policy VXLAN extension security label mechanism
520 across network peers based on VXLAN. For details about the Group Policy VXLAN, see the
8b414e52
SS
521 <ulink url="https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
522 VXLAN Group Policy </ulink> document. Defaults to false.</para>
523 </listitem>
524 </varlistentry>
ea0288d1
SS
525 <varlistentry>
526 <term><varname>DestinationPort=</varname></term>
527 <listitem>
528 <para>Configures the default destination UDP port on a per-device basis.
529 If destination port is not specified then Linux kernel default will be used.
530 Set destination port 4789 to get the IANA assigned value,
531 and destination port 0 to get default values.</para>
532 </listitem>
533 </varlistentry>
534 <varlistentry>
535 <term><varname>PortRange=</varname></term>
536 <listitem>
537 <para>Configures VXLAN port range. VXLAN bases source
538 UDP port based on flow to help the receiver to be able
539 to load balance based on outer header flow. It
540 restricts the port range to the normal UDP local
541 ports, and allows overriding via configuration.</para>
542 </listitem>
543 </varlistentry>
798d3a52
ZJS
544 </variablelist>
545 </refsect1>
546 <refsect1>
547 <title>[Tunnel] Section Options</title>
548
549 <para>The <literal>[Tunnel]</literal> section only applies for
550 netdevs of kind
551 <literal>ipip</literal>,
552 <literal>sit</literal>,
553 <literal>gre</literal>,
554 <literal>gretap</literal>,
555 <literal>ip6gre</literal>,
556 <literal>ip6gretap</literal>,
5cc0748e
SS
557 <literal>vti</literal>,
558 <literal>vti6</literal>, and
798d3a52
ZJS
559 <literal>ip6tnl</literal> and accepts
560 the following keys:</para>
561
562 <variablelist class='network-directives'>
563 <varlistentry>
564 <term><varname>Local=</varname></term>
565 <listitem>
566 <para>A static local address for tunneled packets. It must
567 be an address on another interface of this host.</para>
568 </listitem>
569 </varlistentry>
570 <varlistentry>
571 <term><varname>Remote=</varname></term>
572 <listitem>
573 <para>The remote endpoint of the tunnel.</para>
574 </listitem>
575 </varlistentry>
576 <varlistentry>
577 <term><varname>TOS=</varname></term>
578 <listitem>
579 <para>The Type Of Service byte value for a tunnel interface.
b938cb90 580 For details about the TOS, see the
798d3a52
ZJS
581 <ulink url="http://tools.ietf.org/html/rfc1349"> Type of
582 Service in the Internet Protocol Suite </ulink> document.
583 </para>
584 </listitem>
585 </varlistentry>
586 <varlistentry>
587 <term><varname>TTL=</varname></term>
588 <listitem>
589 <para>A fixed Time To Live N on tunneled packets. N is a
b938cb90 590 number in the range 1–255. 0 is a special value meaning that
798d3a52 591 packets inherit the TTL value. The default value for IPv4
b938cb90 592 tunnels is: inherit. The default value for IPv6 tunnels is
798d3a52
ZJS
593 64.</para>
594 </listitem>
595 </varlistentry>
596 <varlistentry>
597 <term><varname>DiscoverPathMTU=</varname></term>
598 <listitem>
599 <para>A boolean. When true, enables Path MTU Discovery on
600 the tunnel.</para>
601 </listitem>
602 </varlistentry>
276de526
SS
603 <varlistentry>
604 <term><varname>IPv6FlowLabel=</varname></term>
605 <listitem>
a8eaaee7 606 <para>Configures the 20-bit flow label (see <ulink url="https://tools.ietf.org/html/rfc6437">
276de526 607 RFC 6437</ulink>) field in the IPv6 header (see <ulink url="https://tools.ietf.org/html/rfc2460">
a8eaaee7
JE
608 RFC 2460</ulink>), which is used by a node to label packets of a flow.
609 It is only used for IPv6 tunnels.
610 A flow label of zero is used to indicate packets that have
611 not been labeled.
612 It can be configured to a value in the range 0–0xFFFFF, or be
613 set to <literal>inherit</literal>, in which case the original flowlabel is used.</para>
276de526
SS
614 </listitem>
615 </varlistentry>
9b0ca30a 616 <varlistentry>
a9b70f9d 617 <term><varname>CopyDSCP=</varname></term>
9b0ca30a 618 <listitem>
3cf4bcab
ZJS
619 <para>A boolean. When true, the Differentiated Service Code
620 Point (DSCP) field will be copied to the inner header from
a9b70f9d 621 outer header during the decapsulation of an IPv6 tunnel
3cf4bcab
ZJS
622 packet. DSCP is a field in an IP packet that enables different
623 levels of service to be assigned to network traffic.
624 Defaults to <literal>no</literal>.
9b0ca30a
SS
625 </para>
626 </listitem>
627 </varlistentry>
dae398a8
SS
628 <varlistentry>
629 <term><varname>EncapsulationLimit=</varname></term>
630 <listitem>
631 <para>The Tunnel Encapsulation Limit option specifies how many additional
632 levels of encapsulation are permitted to be prepended to the packet.
633 For example, a Tunnel Encapsulation Limit option containing a limit
634 value of zero means that a packet carrying that option may not enter
635 another tunnel before exiting the current tunnel.
636 (see <ulink url="https://tools.ietf.org/html/rfc2473#section-4.1.1"> RFC 2473</ulink>).
b938cb90 637 The valid range is 0–255 and <literal>none</literal>. Defaults to 4.
dae398a8
SS
638 </para>
639 </listitem>
640 </varlistentry>
1d710029
SS
641 <varlistentry>
642 <term><varname>Key=</varname></term>
643 <listitem>
644 <para>The <varname>Key=</varname> parameter specifies the same key to use in
645 both directions (<varname>InputKey=</varname> and <varname>OutputKey=</varname>).
646 The <varname>Key=</varname> is either a number or an IPv4 address-like dotted quad.
647 It is used as mark-configured SAD/SPD entry as part of the lookup key (both in data
648 and control path) in ip xfrm (framework used to implement IPsec protocol).
649 See <ulink url="http://man7.org/linux/man-pages/man8/ip-xfrm.8.html">
650 ip-xfrm - transform configuration</ulink> for details. It is only used for VTI/VTI6
651 tunnels.</para>
652 </listitem>
653 </varlistentry>
654 <varlistentry>
655 <term><varname>InputKey=</varname></term>
656 <listitem>
657 <para>The <varname>InputKey=</varname> parameter specifies the key to use for input.
658 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6 tunnels.</para>
659 </listitem>
660 </varlistentry>
661 <varlistentry>
662 <term><varname>OutputKey=</varname></term>
663 <listitem>
664 <para>The <varname>OutputKey=</varname> parameter specifies the key to use for output.
665 The format is same as <varname>Key=</varname>. It is only used for VTI/VTI6 tunnels.</para>
666 </listitem>
667 </varlistentry>
798d3a52
ZJS
668 <varlistentry>
669 <term><varname>Mode=</varname></term>
670 <listitem>
a8eaaee7 671 <para>An <literal>ip6tnl</literal> tunnel can be in one of three
798d3a52
ZJS
672 modes
673 <literal>ip6ip6</literal> for IPv6 over IPv6,
674 <literal>ipip6</literal> for IPv4 over IPv6 or
675 <literal>any</literal> for either.
676 </para>
677 </listitem>
678 </varlistentry>
679 </variablelist>
680 </refsect1>
681 <refsect1>
682 <title>[Peer] Section Options</title>
683
684 <para>The <literal>[Peer]</literal> section only applies for
685 netdevs of kind <literal>veth</literal> and accepts the
a8eaaee7 686 following keys:</para>
798d3a52
ZJS
687
688 <variablelist class='network-directives'>
689 <varlistentry>
690 <term><varname>Name=</varname></term>
691 <listitem>
692 <para>The interface name used when creating the netdev.
693 This option is compulsory.</para>
694 </listitem>
695 </varlistentry>
696 <varlistentry>
697 <term><varname>MACAddress=</varname></term>
698 <listitem>
b938cb90 699 <para>The peer MACAddress, if not set, it is generated in
798d3a52
ZJS
700 the same way as the MAC address of the main
701 interface.</para>
702 </listitem>
703 </varlistentry>
704 </variablelist>
705 </refsect1>
706 <refsect1>
707 <title>[Tun] Section Options</title>
708
709 <para>The <literal>[Tun]</literal> section only applies for
710 netdevs of kind <literal>tun</literal>, and accepts the following
711 keys:</para>
712
713 <variablelist class='network-directives'>
714 <varlistentry>
715 <term><varname>OneQueue=</varname></term>
716 <listitem><para>Takes a boolean argument. Configures whether
717 all packets are queued at the device (enabled), or a fixed
718 number of packets are queued at the device and the rest at the
719 <literal>qdisc</literal>. Defaults to
720 <literal>no</literal>.</para>
721 </listitem>
722 </varlistentry>
723 <varlistentry>
724 <term><varname>MultiQueue=</varname></term>
725 <listitem><para>Takes a boolean argument. Configures whether
726 to use multiple file descriptors (queues) to parallelize
727 packets sending and receiving. Defaults to
728 <literal>no</literal>.</para>
729 </listitem>
730 </varlistentry>
731 <varlistentry>
732 <term><varname>PacketInfo=</varname></term>
733 <listitem><para>Takes a boolean argument. Configures whether
ff9b60f3 734 packets should be prepended with four extra bytes (two flag
b938cb90 735 bytes and two protocol bytes). If disabled, it indicates that
798d3a52
ZJS
736 the packets will be pure IP packets. Defaults to
737 <literal>no</literal>.</para>
738 </listitem>
739 </varlistentry>
43f78da4 740 <varlistentry>
2aba142e 741 <term><varname>VNetHeader=</varname></term>
43f78da4
SS
742 <listitem><para>Takes a boolean argument. Configures
743 IFF_VNET_HDR flag for a tap device. It allows sending
744 and receiving larger Generic Segmentation Offload (GSO)
745 packets. This may increase throughput significantly.
746 Defaults to
747 <literal>no</literal>.</para>
748 </listitem>
749 </varlistentry>
798d3a52
ZJS
750 <varlistentry>
751 <term><varname>User=</varname></term>
752 <listitem><para>User to grant access to the
753 <filename>/dev/net/tun</filename> device.</para>
754 </listitem>
755 </varlistentry>
756 <varlistentry>
757 <term><varname>Group=</varname></term>
758 <listitem><para>Group to grant access to the
759 <filename>/dev/net/tun</filename> device.</para>
760 </listitem>
761 </varlistentry>
762
763 </variablelist>
764
765 </refsect1>
766
767 <refsect1>
768 <title>[Tap] Section Options</title>
769
770 <para>The <literal>[Tap]</literal> section only applies for
771 netdevs of kind <literal>tap</literal>, and accepts the same keys
772 as the <literal>[Tun]</literal> section.</para>
773 </refsect1>
774
775 <refsect1>
776 <title>[Bond] Section Options</title>
777
778 <para>The <literal>[Bond]</literal> section accepts the following
779 key:</para>
780
781 <variablelist class='network-directives'>
782 <varlistentry>
783 <term><varname>Mode=</varname></term>
784 <listitem>
785 <para>Specifies one of the bonding policies. The default is
786 <literal>balance-rr</literal> (round robin). Possible values are
787 <literal>balance-rr</literal>,
788 <literal>active-backup</literal>,
789 <literal>balance-xor</literal>,
790 <literal>broadcast</literal>,
791 <literal>802.3ad</literal>,
792 <literal>balance-tlb</literal>, and
793 <literal>balance-alb</literal>.
794 </para>
795 </listitem>
796 </varlistentry>
797
798 <varlistentry>
799 <term><varname>TransmitHashPolicy=</varname></term>
800 <listitem>
801 <para>Selects the transmit hash policy to use for slave
802 selection in balance-xor, 802.3ad, and tlb modes. Possible
803 values are
804 <literal>layer2</literal>,
805 <literal>layer3+4</literal>,
806 <literal>layer2+3</literal>,
807 <literal>encap2+3</literal>,
808 <literal>802.3ad</literal>, and
809 <literal>encap3+4</literal>.
810 </para>
811 </listitem>
812 </varlistentry>
813
814 <varlistentry>
815 <term><varname>LACPTransmitRate=</varname></term>
816 <listitem>
817 <para>Specifies the rate with which link partner transmits
818 Link Aggregation Control Protocol Data Unit packets in
819 802.3ad mode. Possible values are <literal>slow</literal>,
820 which requests partner to transmit LACPDUs every 30 seconds,
821 and <literal>fast</literal>, which requests partner to
822 transmit LACPDUs every second. The default value is
823 <literal>slow</literal>.</para>
824 </listitem>
825 </varlistentry>
826
827 <varlistentry>
828 <term><varname>MIIMonitorSec=</varname></term>
829 <listitem>
830 <para>Specifies the frequency that Media Independent
831 Interface link monitoring will occur. A value of zero
dd2b607b 832 disables MII link monitoring. This value is rounded down to
798d3a52
ZJS
833 the nearest millisecond. The default value is 0.</para>
834 </listitem>
835 </varlistentry>
836
837 <varlistentry>
838 <term><varname>UpDelaySec=</varname></term>
839 <listitem>
840 <para>Specifies the delay before a link is enabled after a
841 link up status has been detected. This value is rounded down
842 to a multiple of MIIMonitorSec. The default value is
843 0.</para>
844 </listitem>
845 </varlistentry>
846
847 <varlistentry>
848 <term><varname>DownDelaySec=</varname></term>
849 <listitem>
850 <para>Specifies the delay before a link is disabled after a
851 link down status has been detected. This value is rounded
852 down to a multiple of MIIMonitorSec. The default value is
853 0.</para>
854 </listitem>
855 </varlistentry>
856
81bd37a8 857 <varlistentry>
38422da7 858 <term><varname>LearnPacketIntervalSec=</varname></term>
81bd37a8
SS
859 <listitem>
860 <para>Specifies the number of seconds between instances where the bonding
a8eaaee7
JE
861 driver sends learning packets to each slave peer switch.
862 The valid range is 1–0x7fffffff; the default value is 1. This option
863 has an effect only for the balance-tlb and balance-alb modes.</para>
81bd37a8
SS
864 </listitem>
865 </varlistentry>
866
867 <varlistentry>
868 <term><varname>AdSelect=</varname></term>
869 <listitem>
870 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
871 <literal>stable</literal>,
a8eaaee7
JE
872 <literal>bandwidth</literal> and
873 <literal>count</literal>.
81bd37a8
SS
874 </para>
875 </listitem>
876 </varlistentry>
877
878 <varlistentry>
38422da7 879 <term><varname>FailOverMACPolicy=</varname></term>
81bd37a8 880 <listitem>
a8eaaee7
JE
881 <para>Specifies whether the active-backup mode should set all slaves to
882 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
81bd37a8
SS
883 bond's MAC address in accordance with the selected policy. The default policy is none.
884 Possible values are
885 <literal>none</literal>,
a8eaaee7
JE
886 <literal>active</literal> and
887 <literal>follow</literal>.
81bd37a8
SS
888 </para>
889 </listitem>
890 </varlistentry>
891
892 <varlistentry>
38422da7 893 <term><varname>ARPValidate=</varname></term>
81bd37a8
SS
894 <listitem>
895 <para>Specifies whether or not ARP probes and replies should be
38422da7 896 validated in any mode that supports ARP monitoring, or whether
81bd37a8
SS
897 non-ARP traffic should be filtered (disregarded) for link
898 monitoring purposes. Possible values are
899 <literal>none</literal>,
900 <literal>active</literal>,
a8eaaee7
JE
901 <literal>backup</literal> and
902 <literal>all</literal>.
81bd37a8
SS
903 </para>
904 </listitem>
905 </varlistentry>
906
907 <varlistentry>
38422da7 908 <term><varname>ARPIntervalSec=</varname></term>
81bd37a8
SS
909 <listitem>
910 <para>Specifies the ARP link monitoring frequency in milliseconds.
911 A value of 0 disables ARP monitoring. The default value is 0.
912 </para>
913 </listitem>
914 </varlistentry>
915
916 <varlistentry>
38422da7 917 <term><varname>ARPIPTargets=</varname></term>
81bd37a8
SS
918 <listitem>
919 <para>Specifies the IP addresses to use as ARP monitoring peers when
38422da7 920 ARPIntervalSec is greater than 0. These are the targets of the ARP request
81bd37a8 921 sent to determine the health of the link to the targets.
a8eaaee7 922 Specify these values in IPv4 dotted decimal format. At least one IP
81bd37a8
SS
923 address must be given for ARP monitoring to function. The
924 maximum number of targets that can be specified is 16. The
925 default value is no IP addresses.
926 </para>
927 </listitem>
928 </varlistentry>
929
930 <varlistentry>
38422da7 931 <term><varname>ARPAllTargets=</varname></term>
81bd37a8 932 <listitem>
38422da7 933 <para>Specifies the quantity of ARPIPTargets that must be reachable
81bd37a8
SS
934 in order for the ARP monitor to consider a slave as being up.
935 This option affects only active-backup mode for slaves with
38422da7 936 ARPValidate enabled. Possible values are
a8eaaee7
JE
937 <literal>any</literal> and
938 <literal>all</literal>.
81bd37a8
SS
939 </para>
940 </listitem>
941 </varlistentry>
942
943 <varlistentry>
38422da7 944 <term><varname>PrimaryReselectPolicy=</varname></term>
81bd37a8
SS
945 <listitem>
946 <para>Specifies the reselection policy for the primary slave. This
947 affects how the primary slave is chosen to become the active slave
948 when failure of the active slave or recovery of the primary slave
949 occurs. This option is designed to prevent flip-flopping between
950 the primary slave and other slaves. Possible values are
951 <literal>always</literal>,
a8eaaee7
JE
952 <literal>better</literal> and
953 <literal>failure</literal>.
81bd37a8
SS
954 </para>
955 </listitem>
956 </varlistentry>
957
958 <varlistentry>
959 <term><varname>ResendIGMP=</varname></term>
960 <listitem>
961 <para>Specifies the number of IGMP membership reports to be issued after
962 a failover event. One membership report is issued immediately after
963 the failover, subsequent packets are sent in each 200ms interval.
b938cb90 964 The valid range is 0–255. Defaults to 1. A value of 0
81bd37a8
SS
965 prevents the IGMP membership report from being issued in response
966 to the failover event.
967 </para>
968 </listitem>
969 </varlistentry>
970
971 <varlistentry>
972 <term><varname>PacketsPerSlave=</varname></term>
973 <listitem>
b938cb90
JE
974 <para>Specify the number of packets to transmit through a slave before
975 moving to the next one. When set to 0, then a slave is chosen at
976 random. The valid range is 0–65535. Defaults to 1. This option
a8eaaee7 977 only has effect when in balance-rr mode.
81bd37a8
SS
978 </para>
979 </listitem>
980 </varlistentry>
981
982 <varlistentry>
38422da7 983 <term><varname>GratuitousARP=</varname></term>
81bd37a8
SS
984 <listitem>
985 <para>Specify the number of peer notifications (gratuitous ARPs and
986 unsolicited IPv6 Neighbor Advertisements) to be issued after a
b938cb90 987 failover event. As soon as the link is up on the new slave,
81bd37a8
SS
988 a peer notification is sent on the bonding device and each
989 VLAN sub-device. This is repeated at each link monitor interval
38422da7 990 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
a8eaaee7 991 greater than 1. The valid range is 0–255. The default value is 1.
38422da7 992 These options affect only the active-backup mode.
81bd37a8
SS
993 </para>
994 </listitem>
995 </varlistentry>
996
997 <varlistentry>
998 <term><varname>AllSlavesActive=</varname></term>
999 <listitem>
a8eaaee7
JE
1000 <para>A boolean. Specifies that duplicate frames (received on inactive ports)
1001 should be dropped when false, or delivered when true. Normally, bonding will drop
81bd37a8
SS
1002 duplicate frames (received on inactive ports), which is desirable for
1003 most users. But there are some times it is nice to allow duplicate
1004 frames to be delivered. The default value is false (drop duplicate frames
1005 received on inactive ports).
1006 </para>
1007 </listitem>
1008 </varlistentry>
1009
1010 <varlistentry>
1011 <term><varname>MinLinks=</varname></term>
1012 <listitem>
1013 <para>Specifies the minimum number of links that must be active before
1014 asserting carrier. The default value is 0.
1015 </para>
1016 </listitem>
1017 </varlistentry>
1018
798d3a52 1019 </variablelist>
81bd37a8
SS
1020
1021 <para>For more detail information see
1022 <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">
1023 Linux Ethernet Bonding Driver HOWTO</ulink></para>
1024
798d3a52
ZJS
1025 </refsect1>
1026
1027 <refsect1>
1028 <title>Example</title>
1029 <example>
6c1695be 1030 <title>/etc/systemd/network/25-bridge.netdev</title>
798d3a52
ZJS
1031
1032 <programlisting>[NetDev]
eac684ef
TG
1033Name=bridge0
1034Kind=bridge</programlisting>
798d3a52 1035 </example>
eac684ef 1036
798d3a52 1037 <example>
6c1695be 1038 <title>/etc/systemd/network/25-vlan1.netdev</title>
eac684ef 1039
798d3a52 1040 <programlisting>[Match]
eac684ef
TG
1041Virtualization=no
1042
1043[NetDev]
1044Name=vlan1
1045Kind=vlan
1046
1047[VLAN]
1048Id=1</programlisting>
798d3a52
ZJS
1049 </example>
1050 <example>
6c1695be 1051 <title>/etc/systemd/network/25-ipip.netdev</title>
798d3a52 1052 <programlisting>[NetDev]
b35a2909
TG
1053Name=ipip-tun
1054Kind=ipip
1055MTUBytes=1480
1056
1057[Tunnel]
1058Local=192.168.223.238
1059Remote=192.169.224.239
1060TTL=64</programlisting>
798d3a52
ZJS
1061 </example>
1062 <example>
6c1695be 1063 <title>/etc/systemd/network/25-tap.netdev</title>
798d3a52 1064 <programlisting>[NetDev]
30ae9dfd
SS
1065Name=tap-test
1066Kind=tap
1067
1068[Tap]
1069MultiQueue=true
1070PacketInfo=true</programlisting> </example>
eac684ef 1071
798d3a52 1072 <example>
6c1695be 1073 <title>/etc/systemd/network/25-sit.netdev</title>
798d3a52 1074 <programlisting>[NetDev]
b35a2909
TG
1075Name=sit-tun
1076Kind=sit
1077MTUBytes=1480
1078
1079[Tunnel]
1080Local=10.65.223.238
1081Remote=10.65.223.239</programlisting>
798d3a52 1082 </example>
eac684ef 1083
798d3a52 1084 <example>
6c1695be 1085 <title>/etc/systemd/network/25-gre.netdev</title>
798d3a52 1086 <programlisting>[NetDev]
b35a2909
TG
1087Name=gre-tun
1088Kind=gre
1089MTUBytes=1480
1090
1091[Tunnel]
1092Local=10.65.223.238
1093Remote=10.65.223.239</programlisting>
798d3a52 1094 </example>
b35a2909 1095
798d3a52 1096 <example>
6c1695be 1097 <title>/etc/systemd/network/25-vti.netdev</title>
b35a2909 1098
798d3a52 1099 <programlisting>[NetDev]
b35a2909
TG
1100Name=vti-tun
1101Kind=vti
1102MTUBytes=1480
1103
1104[Tunnel]
1105Local=10.65.223.238
1106Remote=10.65.223.239</programlisting>
798d3a52 1107 </example>
b35a2909 1108
798d3a52 1109 <example>
6c1695be 1110 <title>/etc/systemd/network/25-veth.netdev</title>
798d3a52 1111 <programlisting>[NetDev]
b35a2909
TG
1112Name=veth-test
1113Kind=veth
1114
1115[Peer]
1116Name=veth-peer</programlisting>
798d3a52 1117 </example>
b35a2909 1118
d94facdc 1119 <example>
6c1695be 1120 <title>/etc/systemd/network/25-bond.netdev</title>
d94facdc
MH
1121 <programlisting>[NetDev]
1122Name=bond1
1123Kind=bond
1124
1125[Bond]
1126Mode=802.3ad
1127TransmitHashPolicy=layer3+4
1128MIIMonitorSec=1s
1129LACPTransmitRate=fast
1130</programlisting>
1131 </example>
1132
798d3a52 1133 <example>
6c1695be 1134 <title>/etc/systemd/network/25-dummy.netdev</title>
798d3a52 1135 <programlisting>[NetDev]
9e358851
TG
1136Name=dummy-test
1137Kind=dummy
1138MACAddress=12:34:56:78:9a:bc</programlisting>
798d3a52
ZJS
1139 </example>
1140
1141 </refsect1>
1142 <refsect1>
1143 <title>See Also</title>
1144 <para>
1145 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1146 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1147 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1148 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1149 </para>
1150 </refsect1>
eac684ef
TG
1151
1152</refentry>