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