]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.netdev.xml
networkd: bridge add support to configure VLAN filtering (#3344)
[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>
798d3a52
ZJS
641 <varlistentry>
642 <term><varname>Mode=</varname></term>
643 <listitem>
a8eaaee7 644 <para>An <literal>ip6tnl</literal> tunnel can be in one of three
798d3a52
ZJS
645 modes
646 <literal>ip6ip6</literal> for IPv6 over IPv6,
647 <literal>ipip6</literal> for IPv4 over IPv6 or
648 <literal>any</literal> for either.
649 </para>
650 </listitem>
651 </varlistentry>
652 </variablelist>
653 </refsect1>
654 <refsect1>
655 <title>[Peer] Section Options</title>
656
657 <para>The <literal>[Peer]</literal> section only applies for
658 netdevs of kind <literal>veth</literal> and accepts the
a8eaaee7 659 following keys:</para>
798d3a52
ZJS
660
661 <variablelist class='network-directives'>
662 <varlistentry>
663 <term><varname>Name=</varname></term>
664 <listitem>
665 <para>The interface name used when creating the netdev.
666 This option is compulsory.</para>
667 </listitem>
668 </varlistentry>
669 <varlistentry>
670 <term><varname>MACAddress=</varname></term>
671 <listitem>
b938cb90 672 <para>The peer MACAddress, if not set, it is generated in
798d3a52
ZJS
673 the same way as the MAC address of the main
674 interface.</para>
675 </listitem>
676 </varlistentry>
677 </variablelist>
678 </refsect1>
679 <refsect1>
680 <title>[Tun] Section Options</title>
681
682 <para>The <literal>[Tun]</literal> section only applies for
683 netdevs of kind <literal>tun</literal>, and accepts the following
684 keys:</para>
685
686 <variablelist class='network-directives'>
687 <varlistentry>
688 <term><varname>OneQueue=</varname></term>
689 <listitem><para>Takes a boolean argument. Configures whether
690 all packets are queued at the device (enabled), or a fixed
691 number of packets are queued at the device and the rest at the
692 <literal>qdisc</literal>. Defaults to
693 <literal>no</literal>.</para>
694 </listitem>
695 </varlistentry>
696 <varlistentry>
697 <term><varname>MultiQueue=</varname></term>
698 <listitem><para>Takes a boolean argument. Configures whether
699 to use multiple file descriptors (queues) to parallelize
700 packets sending and receiving. Defaults to
701 <literal>no</literal>.</para>
702 </listitem>
703 </varlistentry>
704 <varlistentry>
705 <term><varname>PacketInfo=</varname></term>
706 <listitem><para>Takes a boolean argument. Configures whether
ff9b60f3 707 packets should be prepended with four extra bytes (two flag
b938cb90 708 bytes and two protocol bytes). If disabled, it indicates that
798d3a52
ZJS
709 the packets will be pure IP packets. Defaults to
710 <literal>no</literal>.</para>
711 </listitem>
712 </varlistentry>
43f78da4 713 <varlistentry>
2aba142e 714 <term><varname>VNetHeader=</varname></term>
43f78da4
SS
715 <listitem><para>Takes a boolean argument. Configures
716 IFF_VNET_HDR flag for a tap device. It allows sending
717 and receiving larger Generic Segmentation Offload (GSO)
718 packets. This may increase throughput significantly.
719 Defaults to
720 <literal>no</literal>.</para>
721 </listitem>
722 </varlistentry>
798d3a52
ZJS
723 <varlistentry>
724 <term><varname>User=</varname></term>
725 <listitem><para>User to grant access to the
726 <filename>/dev/net/tun</filename> device.</para>
727 </listitem>
728 </varlistentry>
729 <varlistentry>
730 <term><varname>Group=</varname></term>
731 <listitem><para>Group to grant access to the
732 <filename>/dev/net/tun</filename> device.</para>
733 </listitem>
734 </varlistentry>
735
736 </variablelist>
737
738 </refsect1>
739
740 <refsect1>
741 <title>[Tap] Section Options</title>
742
743 <para>The <literal>[Tap]</literal> section only applies for
744 netdevs of kind <literal>tap</literal>, and accepts the same keys
745 as the <literal>[Tun]</literal> section.</para>
746 </refsect1>
747
748 <refsect1>
749 <title>[Bond] Section Options</title>
750
751 <para>The <literal>[Bond]</literal> section accepts the following
752 key:</para>
753
754 <variablelist class='network-directives'>
755 <varlistentry>
756 <term><varname>Mode=</varname></term>
757 <listitem>
758 <para>Specifies one of the bonding policies. The default is
759 <literal>balance-rr</literal> (round robin). Possible values are
760 <literal>balance-rr</literal>,
761 <literal>active-backup</literal>,
762 <literal>balance-xor</literal>,
763 <literal>broadcast</literal>,
764 <literal>802.3ad</literal>,
765 <literal>balance-tlb</literal>, and
766 <literal>balance-alb</literal>.
767 </para>
768 </listitem>
769 </varlistentry>
770
771 <varlistentry>
772 <term><varname>TransmitHashPolicy=</varname></term>
773 <listitem>
774 <para>Selects the transmit hash policy to use for slave
775 selection in balance-xor, 802.3ad, and tlb modes. Possible
776 values are
777 <literal>layer2</literal>,
778 <literal>layer3+4</literal>,
779 <literal>layer2+3</literal>,
780 <literal>encap2+3</literal>,
781 <literal>802.3ad</literal>, and
782 <literal>encap3+4</literal>.
783 </para>
784 </listitem>
785 </varlistentry>
786
787 <varlistentry>
788 <term><varname>LACPTransmitRate=</varname></term>
789 <listitem>
790 <para>Specifies the rate with which link partner transmits
791 Link Aggregation Control Protocol Data Unit packets in
792 802.3ad mode. Possible values are <literal>slow</literal>,
793 which requests partner to transmit LACPDUs every 30 seconds,
794 and <literal>fast</literal>, which requests partner to
795 transmit LACPDUs every second. The default value is
796 <literal>slow</literal>.</para>
797 </listitem>
798 </varlistentry>
799
800 <varlistentry>
801 <term><varname>MIIMonitorSec=</varname></term>
802 <listitem>
803 <para>Specifies the frequency that Media Independent
804 Interface link monitoring will occur. A value of zero
dd2b607b 805 disables MII link monitoring. This value is rounded down to
798d3a52
ZJS
806 the nearest millisecond. The default value is 0.</para>
807 </listitem>
808 </varlistentry>
809
810 <varlistentry>
811 <term><varname>UpDelaySec=</varname></term>
812 <listitem>
813 <para>Specifies the delay before a link is enabled after a
814 link up status has been detected. This value is rounded down
815 to a multiple of MIIMonitorSec. The default value is
816 0.</para>
817 </listitem>
818 </varlistentry>
819
820 <varlistentry>
821 <term><varname>DownDelaySec=</varname></term>
822 <listitem>
823 <para>Specifies the delay before a link is disabled after a
824 link down status has been detected. This value is rounded
825 down to a multiple of MIIMonitorSec. The default value is
826 0.</para>
827 </listitem>
828 </varlistentry>
829
81bd37a8 830 <varlistentry>
38422da7 831 <term><varname>LearnPacketIntervalSec=</varname></term>
81bd37a8
SS
832 <listitem>
833 <para>Specifies the number of seconds between instances where the bonding
a8eaaee7
JE
834 driver sends learning packets to each slave peer switch.
835 The valid range is 1–0x7fffffff; the default value is 1. This option
836 has an effect only for the balance-tlb and balance-alb modes.</para>
81bd37a8
SS
837 </listitem>
838 </varlistentry>
839
840 <varlistentry>
841 <term><varname>AdSelect=</varname></term>
842 <listitem>
843 <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are
844 <literal>stable</literal>,
a8eaaee7
JE
845 <literal>bandwidth</literal> and
846 <literal>count</literal>.
81bd37a8
SS
847 </para>
848 </listitem>
849 </varlistentry>
850
851 <varlistentry>
38422da7 852 <term><varname>FailOverMACPolicy=</varname></term>
81bd37a8 853 <listitem>
a8eaaee7
JE
854 <para>Specifies whether the active-backup mode should set all slaves to
855 the same MAC address at the time of enslavement or, when enabled, to perform special handling of the
81bd37a8
SS
856 bond's MAC address in accordance with the selected policy. The default policy is none.
857 Possible values are
858 <literal>none</literal>,
a8eaaee7
JE
859 <literal>active</literal> and
860 <literal>follow</literal>.
81bd37a8
SS
861 </para>
862 </listitem>
863 </varlistentry>
864
865 <varlistentry>
38422da7 866 <term><varname>ARPValidate=</varname></term>
81bd37a8
SS
867 <listitem>
868 <para>Specifies whether or not ARP probes and replies should be
38422da7 869 validated in any mode that supports ARP monitoring, or whether
81bd37a8
SS
870 non-ARP traffic should be filtered (disregarded) for link
871 monitoring purposes. Possible values are
872 <literal>none</literal>,
873 <literal>active</literal>,
a8eaaee7
JE
874 <literal>backup</literal> and
875 <literal>all</literal>.
81bd37a8
SS
876 </para>
877 </listitem>
878 </varlistentry>
879
880 <varlistentry>
38422da7 881 <term><varname>ARPIntervalSec=</varname></term>
81bd37a8
SS
882 <listitem>
883 <para>Specifies the ARP link monitoring frequency in milliseconds.
884 A value of 0 disables ARP monitoring. The default value is 0.
885 </para>
886 </listitem>
887 </varlistentry>
888
889 <varlistentry>
38422da7 890 <term><varname>ARPIPTargets=</varname></term>
81bd37a8
SS
891 <listitem>
892 <para>Specifies the IP addresses to use as ARP monitoring peers when
38422da7 893 ARPIntervalSec is greater than 0. These are the targets of the ARP request
81bd37a8 894 sent to determine the health of the link to the targets.
a8eaaee7 895 Specify these values in IPv4 dotted decimal format. At least one IP
81bd37a8
SS
896 address must be given for ARP monitoring to function. The
897 maximum number of targets that can be specified is 16. The
898 default value is no IP addresses.
899 </para>
900 </listitem>
901 </varlistentry>
902
903 <varlistentry>
38422da7 904 <term><varname>ARPAllTargets=</varname></term>
81bd37a8 905 <listitem>
38422da7 906 <para>Specifies the quantity of ARPIPTargets that must be reachable
81bd37a8
SS
907 in order for the ARP monitor to consider a slave as being up.
908 This option affects only active-backup mode for slaves with
38422da7 909 ARPValidate enabled. Possible values are
a8eaaee7
JE
910 <literal>any</literal> and
911 <literal>all</literal>.
81bd37a8
SS
912 </para>
913 </listitem>
914 </varlistentry>
915
916 <varlistentry>
38422da7 917 <term><varname>PrimaryReselectPolicy=</varname></term>
81bd37a8
SS
918 <listitem>
919 <para>Specifies the reselection policy for the primary slave. This
920 affects how the primary slave is chosen to become the active slave
921 when failure of the active slave or recovery of the primary slave
922 occurs. This option is designed to prevent flip-flopping between
923 the primary slave and other slaves. Possible values are
924 <literal>always</literal>,
a8eaaee7
JE
925 <literal>better</literal> and
926 <literal>failure</literal>.
81bd37a8
SS
927 </para>
928 </listitem>
929 </varlistentry>
930
931 <varlistentry>
932 <term><varname>ResendIGMP=</varname></term>
933 <listitem>
934 <para>Specifies the number of IGMP membership reports to be issued after
935 a failover event. One membership report is issued immediately after
936 the failover, subsequent packets are sent in each 200ms interval.
b938cb90 937 The valid range is 0–255. Defaults to 1. A value of 0
81bd37a8
SS
938 prevents the IGMP membership report from being issued in response
939 to the failover event.
940 </para>
941 </listitem>
942 </varlistentry>
943
944 <varlistentry>
945 <term><varname>PacketsPerSlave=</varname></term>
946 <listitem>
b938cb90
JE
947 <para>Specify the number of packets to transmit through a slave before
948 moving to the next one. When set to 0, then a slave is chosen at
949 random. The valid range is 0–65535. Defaults to 1. This option
a8eaaee7 950 only has effect when in balance-rr mode.
81bd37a8
SS
951 </para>
952 </listitem>
953 </varlistentry>
954
955 <varlistentry>
38422da7 956 <term><varname>GratuitousARP=</varname></term>
81bd37a8
SS
957 <listitem>
958 <para>Specify the number of peer notifications (gratuitous ARPs and
959 unsolicited IPv6 Neighbor Advertisements) to be issued after a
b938cb90 960 failover event. As soon as the link is up on the new slave,
81bd37a8
SS
961 a peer notification is sent on the bonding device and each
962 VLAN sub-device. This is repeated at each link monitor interval
38422da7 963 (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is
a8eaaee7 964 greater than 1. The valid range is 0–255. The default value is 1.
38422da7 965 These options affect only the active-backup mode.
81bd37a8
SS
966 </para>
967 </listitem>
968 </varlistentry>
969
970 <varlistentry>
971 <term><varname>AllSlavesActive=</varname></term>
972 <listitem>
a8eaaee7
JE
973 <para>A boolean. Specifies that duplicate frames (received on inactive ports)
974 should be dropped when false, or delivered when true. Normally, bonding will drop
81bd37a8
SS
975 duplicate frames (received on inactive ports), which is desirable for
976 most users. But there are some times it is nice to allow duplicate
977 frames to be delivered. The default value is false (drop duplicate frames
978 received on inactive ports).
979 </para>
980 </listitem>
981 </varlistentry>
982
983 <varlistentry>
984 <term><varname>MinLinks=</varname></term>
985 <listitem>
986 <para>Specifies the minimum number of links that must be active before
987 asserting carrier. The default value is 0.
988 </para>
989 </listitem>
990 </varlistentry>
991
798d3a52 992 </variablelist>
81bd37a8
SS
993
994 <para>For more detail information see
995 <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">
996 Linux Ethernet Bonding Driver HOWTO</ulink></para>
997
798d3a52
ZJS
998 </refsect1>
999
1000 <refsect1>
1001 <title>Example</title>
1002 <example>
6c1695be 1003 <title>/etc/systemd/network/25-bridge.netdev</title>
798d3a52
ZJS
1004
1005 <programlisting>[NetDev]
eac684ef
TG
1006Name=bridge0
1007Kind=bridge</programlisting>
798d3a52 1008 </example>
eac684ef 1009
798d3a52 1010 <example>
6c1695be 1011 <title>/etc/systemd/network/25-vlan1.netdev</title>
eac684ef 1012
798d3a52 1013 <programlisting>[Match]
eac684ef
TG
1014Virtualization=no
1015
1016[NetDev]
1017Name=vlan1
1018Kind=vlan
1019
1020[VLAN]
1021Id=1</programlisting>
798d3a52
ZJS
1022 </example>
1023 <example>
6c1695be 1024 <title>/etc/systemd/network/25-ipip.netdev</title>
798d3a52 1025 <programlisting>[NetDev]
b35a2909
TG
1026Name=ipip-tun
1027Kind=ipip
1028MTUBytes=1480
1029
1030[Tunnel]
1031Local=192.168.223.238
1032Remote=192.169.224.239
1033TTL=64</programlisting>
798d3a52
ZJS
1034 </example>
1035 <example>
6c1695be 1036 <title>/etc/systemd/network/25-tap.netdev</title>
798d3a52 1037 <programlisting>[NetDev]
30ae9dfd
SS
1038Name=tap-test
1039Kind=tap
1040
1041[Tap]
1042MultiQueue=true
1043PacketInfo=true</programlisting> </example>
eac684ef 1044
798d3a52 1045 <example>
6c1695be 1046 <title>/etc/systemd/network/25-sit.netdev</title>
798d3a52 1047 <programlisting>[NetDev]
b35a2909
TG
1048Name=sit-tun
1049Kind=sit
1050MTUBytes=1480
1051
1052[Tunnel]
1053Local=10.65.223.238
1054Remote=10.65.223.239</programlisting>
798d3a52 1055 </example>
eac684ef 1056
798d3a52 1057 <example>
6c1695be 1058 <title>/etc/systemd/network/25-gre.netdev</title>
798d3a52 1059 <programlisting>[NetDev]
b35a2909
TG
1060Name=gre-tun
1061Kind=gre
1062MTUBytes=1480
1063
1064[Tunnel]
1065Local=10.65.223.238
1066Remote=10.65.223.239</programlisting>
798d3a52 1067 </example>
b35a2909 1068
798d3a52 1069 <example>
6c1695be 1070 <title>/etc/systemd/network/25-vti.netdev</title>
b35a2909 1071
798d3a52 1072 <programlisting>[NetDev]
b35a2909
TG
1073Name=vti-tun
1074Kind=vti
1075MTUBytes=1480
1076
1077[Tunnel]
1078Local=10.65.223.238
1079Remote=10.65.223.239</programlisting>
798d3a52 1080 </example>
b35a2909 1081
798d3a52 1082 <example>
6c1695be 1083 <title>/etc/systemd/network/25-veth.netdev</title>
798d3a52 1084 <programlisting>[NetDev]
b35a2909
TG
1085Name=veth-test
1086Kind=veth
1087
1088[Peer]
1089Name=veth-peer</programlisting>
798d3a52 1090 </example>
b35a2909 1091
d94facdc 1092 <example>
6c1695be 1093 <title>/etc/systemd/network/25-bond.netdev</title>
d94facdc
MH
1094 <programlisting>[NetDev]
1095Name=bond1
1096Kind=bond
1097
1098[Bond]
1099Mode=802.3ad
1100TransmitHashPolicy=layer3+4
1101MIIMonitorSec=1s
1102LACPTransmitRate=fast
1103</programlisting>
1104 </example>
1105
798d3a52 1106 <example>
6c1695be 1107 <title>/etc/systemd/network/25-dummy.netdev</title>
798d3a52 1108 <programlisting>[NetDev]
9e358851
TG
1109Name=dummy-test
1110Kind=dummy
1111MACAddress=12:34:56:78:9a:bc</programlisting>
798d3a52
ZJS
1112 </example>
1113
1114 </refsect1>
1115 <refsect1>
1116 <title>See Also</title>
1117 <para>
1118 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1119 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1120 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1121 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1122 </para>
1123 </refsect1>
eac684ef
TG
1124
1125</refentry>