]>
Commit | Line | Data |
---|---|---|
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 ZJS |
83 | needed. As a special case, an empty file (file size 0) or symlink |
84 | with the same name pointing to <filename>/dev/null</filename>, | |
85 | disable 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> | |
a6818881 | 109 | <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 |
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> | |
151 | <entry>An ethernet tunnel between a pair of network devices.</entry></row> | |
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 | ||
280 | <refsect1> | |
281 | <title>[VLAN] Section Options</title> | |
282 | ||
283 | <para>The <literal>[VLAN]</literal> section only applies for | |
284 | netdevs of kind <literal>vlan</literal>, and accepts the | |
285 | following key:</para> | |
286 | ||
287 | <variablelist class='network-directives'> | |
288 | <varlistentry> | |
289 | <term><varname>Id=</varname></term> | |
290 | <listitem> | |
291 | <para>The VLAN ID to use. An integer in the range 0–4094. | |
292 | This option is compulsory.</para> | |
293 | </listitem> | |
294 | </varlistentry> | |
295 | </variablelist> | |
296 | ||
297 | </refsect1> | |
298 | ||
299 | <refsect1> | |
300 | <title>[MACVLAN] Section Options</title> | |
301 | ||
302 | <para>The <literal>[MACVLAN]</literal> section only applies for | |
303 | netdevs of kind <literal>macvlan</literal>, and accepts the | |
304 | following key:</para> | |
305 | ||
306 | <variablelist class='network-directives'> | |
307 | <varlistentry> | |
308 | <term><varname>Mode=</varname></term> | |
309 | <listitem> | |
310 | <para>The MACVLAN mode to use. The supported options are | |
311 | <literal>private</literal>, | |
312 | <literal>vepa</literal>, | |
313 | <literal>bridge</literal>, and | |
314 | <literal>passthru</literal>. | |
315 | </para> | |
316 | </listitem> | |
317 | </varlistentry> | |
318 | </variablelist> | |
319 | ||
320 | </refsect1> | |
321 | ||
0371f2df SS |
322 | <refsect1> |
323 | <title>[MACVTAP] Section Options</title> | |
324 | ||
325 | <para>The <literal>[MACVTAP]</literal> section applies for | |
326 | netdevs of kind <literal>macvtap</literal> and accepts the | |
327 | same key as <literal>[MACVLAN].</literal> </para> | |
328 | ||
329 | </refsect1> | |
330 | ||
798d3a52 ZJS |
331 | <refsect1> |
332 | <title>[IPVLAN] Section Options</title> | |
333 | ||
334 | <para>The <literal>[IPVLAN]</literal> section only applies for | |
335 | netdevs of kind <literal>ipvlan</literal>, and accepts the | |
336 | following key:</para> | |
337 | ||
338 | <variablelist class='network-directives'> | |
339 | <varlistentry> | |
340 | <term><varname>Mode=</varname></term> | |
341 | <listitem> | |
342 | <para>The IPVLAN mode to use. The supported options are | |
343 | <literal>L2</literal> and <literal>L3</literal>. | |
344 | </para> | |
345 | </listitem> | |
346 | </varlistentry> | |
347 | </variablelist> | |
348 | ||
349 | </refsect1> | |
350 | ||
351 | <refsect1> | |
352 | <title>[VXLAN] Section Options</title> | |
353 | <para>The <literal>[VXLAN]</literal> section only applies for | |
354 | netdevs of kind <literal>vxlan</literal>, and accepts the | |
355 | following keys:</para> | |
356 | ||
357 | <variablelist class='network-directives'> | |
358 | <varlistentry> | |
359 | <term><varname>Id=</varname></term> | |
360 | <listitem> | |
361 | <para>The VXLAN ID to use.</para> | |
362 | </listitem> | |
363 | </varlistentry> | |
364 | <varlistentry> | |
365 | <term><varname>Group=</varname></term> | |
366 | <listitem> | |
367 | <para>An assigned multicast group IP address.</para> | |
368 | </listitem> | |
369 | </varlistentry> | |
370 | <varlistentry> | |
371 | <term><varname>TOS=</varname></term> | |
372 | <listitem> | |
373 | <para>The Type Of Service byte value for a vxlan interface.</para> | |
374 | </listitem> | |
375 | </varlistentry> | |
376 | <varlistentry> | |
377 | <term><varname>TTL=</varname></term> | |
378 | <listitem> | |
379 | <para>A fixed Time To Live N on Virtual eXtensible Local | |
380 | Area Network packets. N is a number in the range 1-255. 0 | |
381 | is a special value meaning that packets inherit the TTL | |
382 | value.</para> | |
383 | </listitem> | |
384 | </varlistentry> | |
385 | <varlistentry> | |
386 | <term><varname>MacLearning=</varname></term> | |
387 | <listitem> | |
388 | <para>A boolean. When true, enables dynamic MAC learning | |
389 | to discover remote MAC addresses.</para> | |
390 | </listitem> | |
391 | </varlistentry> | |
392 | <varlistentry> | |
393 | <term><varname>FDBAgeingSec=</varname></term> | |
394 | <listitem> | |
395 | <para>The lifetime of Forwarding Database entry learnt by | |
396 | the kernel in seconds.</para> | |
397 | </listitem> | |
398 | </varlistentry> | |
399 | <varlistentry> | |
400 | <term><varname>ARPProxy=</varname></term> | |
401 | <listitem> | |
402 | <para>A boolean. When true, enables ARP proxy.</para> | |
403 | </listitem> | |
404 | </varlistentry> | |
405 | <varlistentry> | |
406 | <term><varname>L2MissNotification=</varname></term> | |
407 | <listitem> | |
408 | <para>A boolean. When true, enables netlink LLADDR miss | |
409 | notifications.</para> | |
410 | </listitem> | |
411 | </varlistentry> | |
412 | <varlistentry> | |
413 | <term><varname>L3MissNotification=</varname></term> | |
414 | <listitem> | |
415 | <para>A boolean. When true, enables netlink IP ADDR miss | |
416 | notifications.</para> | |
417 | </listitem> | |
418 | </varlistentry> | |
419 | <varlistentry> | |
420 | <term><varname>RouteShortCircuit=</varname></term> | |
421 | <listitem> | |
422 | <para>A boolean. When true route short circuit is turned | |
423 | on.</para> | |
424 | </listitem> | |
425 | </varlistentry> | |
cffacc74 SS |
426 | <varlistentry> |
427 | <term><varname>UDPCheckSum=</varname></term> | |
428 | <listitem> | |
429 | <para>A boolean. When true transmitting UDP checksums when doing VXLAN/IPv4 is turned on.</para> | |
430 | </listitem> | |
431 | </varlistentry> | |
432 | <varlistentry> | |
433 | <term><varname>UDP6ZeroChecksumTx=</varname></term> | |
434 | <listitem> | |
435 | <para>A boolean. When true sending zero checksums in VXLAN/IPv6 is turned on.</para> | |
436 | </listitem> | |
437 | </varlistentry> | |
438 | <varlistentry> | |
439 | <term><varname>UDP6ZeroCheckSumRx=</varname></term> | |
440 | <listitem> | |
441 | <para>A boolean. When true receiving zero checksums in VXLAN/IPv6 is turned on.</para> | |
442 | </listitem> | |
443 | </varlistentry> | |
8b414e52 SS |
444 | <varlistentry> |
445 | <term><varname>GroupPolicyExtension=</varname></term> | |
446 | <listitem> | |
447 | <para>A boolean. When true it enables Group Policy VXLAN extension security label mechanism | |
448 | across network peers based on VXLAN. For details about the Group Policy VXLAN see the | |
449 | <ulink url="https://tools.ietf.org/html/draft-smith-vxlan-group-policy"> | |
450 | VXLAN Group Policy </ulink> document. Defaults to false.</para> | |
451 | </listitem> | |
452 | </varlistentry> | |
798d3a52 ZJS |
453 | </variablelist> |
454 | </refsect1> | |
455 | <refsect1> | |
456 | <title>[Tunnel] Section Options</title> | |
457 | ||
458 | <para>The <literal>[Tunnel]</literal> section only applies for | |
459 | netdevs of kind | |
460 | <literal>ipip</literal>, | |
461 | <literal>sit</literal>, | |
462 | <literal>gre</literal>, | |
463 | <literal>gretap</literal>, | |
464 | <literal>ip6gre</literal>, | |
465 | <literal>ip6gretap</literal>, | |
5cc0748e SS |
466 | <literal>vti</literal>, |
467 | <literal>vti6</literal>, and | |
798d3a52 ZJS |
468 | <literal>ip6tnl</literal> and accepts |
469 | the following keys:</para> | |
470 | ||
471 | <variablelist class='network-directives'> | |
472 | <varlistentry> | |
473 | <term><varname>Local=</varname></term> | |
474 | <listitem> | |
475 | <para>A static local address for tunneled packets. It must | |
476 | be an address on another interface of this host.</para> | |
477 | </listitem> | |
478 | </varlistentry> | |
479 | <varlistentry> | |
480 | <term><varname>Remote=</varname></term> | |
481 | <listitem> | |
482 | <para>The remote endpoint of the tunnel.</para> | |
483 | </listitem> | |
484 | </varlistentry> | |
485 | <varlistentry> | |
486 | <term><varname>TOS=</varname></term> | |
487 | <listitem> | |
488 | <para>The Type Of Service byte value for a tunnel interface. | |
489 | For details about the TOS see the | |
490 | <ulink url="http://tools.ietf.org/html/rfc1349"> Type of | |
491 | Service in the Internet Protocol Suite </ulink> document. | |
492 | </para> | |
493 | </listitem> | |
494 | </varlistentry> | |
495 | <varlistentry> | |
496 | <term><varname>TTL=</varname></term> | |
497 | <listitem> | |
498 | <para>A fixed Time To Live N on tunneled packets. N is a | |
499 | number in the range 1-255. 0 is a special value meaning that | |
500 | packets inherit the TTL value. The default value for IPv4 | |
501 | tunnels is: inherit. The default value for IPv6 tunnels is: | |
502 | 64.</para> | |
503 | </listitem> | |
504 | </varlistentry> | |
505 | <varlistentry> | |
506 | <term><varname>DiscoverPathMTU=</varname></term> | |
507 | <listitem> | |
508 | <para>A boolean. When true, enables Path MTU Discovery on | |
509 | the tunnel.</para> | |
510 | </listitem> | |
511 | </varlistentry> | |
276de526 SS |
512 | <varlistentry> |
513 | <term><varname>IPv6FlowLabel=</varname></term> | |
514 | <listitem> | |
515 | <para>Configures The 20-bit Flow Label (see <ulink url="https://tools.ietf.org/html/rfc6437"> | |
516 | RFC 6437</ulink>) field in the IPv6 header (see <ulink url="https://tools.ietf.org/html/rfc2460"> | |
517 | RFC 2460</ulink>), is used by a node to label packets of a flow. | |
518 | It's only used for IPv6 Tunnels. | |
519 | A Flow Label of zero is used to indicate packets that have | |
520 | not been labeled. Takes following values. | |
521 | When <literal>inherit</literal> it uses the original flowlabel, | |
dd2b607b | 522 | or can be configured to any value between 0 to 0xFFFFF.</para> |
276de526 SS |
523 | </listitem> |
524 | </varlistentry> | |
9b0ca30a | 525 | <varlistentry> |
a9b70f9d | 526 | <term><varname>CopyDSCP=</varname></term> |
9b0ca30a | 527 | <listitem> |
3cf4bcab ZJS |
528 | <para>A boolean. When true, the Differentiated Service Code |
529 | Point (DSCP) field will be copied to the inner header from | |
a9b70f9d | 530 | outer header during the decapsulation of an IPv6 tunnel |
3cf4bcab ZJS |
531 | packet. DSCP is a field in an IP packet that enables different |
532 | levels of service to be assigned to network traffic. | |
533 | Defaults to <literal>no</literal>. | |
9b0ca30a SS |
534 | </para> |
535 | </listitem> | |
536 | </varlistentry> | |
798d3a52 ZJS |
537 | <varlistentry> |
538 | <term><varname>Mode=</varname></term> | |
539 | <listitem> | |
540 | <para>An <literal>ip6tnl</literal> tunnels can have three | |
541 | modes | |
542 | <literal>ip6ip6</literal> for IPv6 over IPv6, | |
543 | <literal>ipip6</literal> for IPv4 over IPv6 or | |
544 | <literal>any</literal> for either. | |
545 | </para> | |
546 | </listitem> | |
547 | </varlistentry> | |
548 | </variablelist> | |
549 | </refsect1> | |
550 | <refsect1> | |
551 | <title>[Peer] Section Options</title> | |
552 | ||
553 | <para>The <literal>[Peer]</literal> section only applies for | |
554 | netdevs of kind <literal>veth</literal> and accepts the | |
555 | following key:</para> | |
556 | ||
557 | <variablelist class='network-directives'> | |
558 | <varlistentry> | |
559 | <term><varname>Name=</varname></term> | |
560 | <listitem> | |
561 | <para>The interface name used when creating the netdev. | |
562 | This option is compulsory.</para> | |
563 | </listitem> | |
564 | </varlistentry> | |
565 | <varlistentry> | |
566 | <term><varname>MACAddress=</varname></term> | |
567 | <listitem> | |
568 | <para>The peer MACAddress, if not set it is generated in | |
569 | the same way as the MAC address of the main | |
570 | interface.</para> | |
571 | </listitem> | |
572 | </varlistentry> | |
573 | </variablelist> | |
574 | </refsect1> | |
575 | <refsect1> | |
576 | <title>[Tun] Section Options</title> | |
577 | ||
578 | <para>The <literal>[Tun]</literal> section only applies for | |
579 | netdevs of kind <literal>tun</literal>, and accepts the following | |
580 | keys:</para> | |
581 | ||
582 | <variablelist class='network-directives'> | |
583 | <varlistentry> | |
584 | <term><varname>OneQueue=</varname></term> | |
585 | <listitem><para>Takes a boolean argument. Configures whether | |
586 | all packets are queued at the device (enabled), or a fixed | |
587 | number of packets are queued at the device and the rest at the | |
588 | <literal>qdisc</literal>. Defaults to | |
589 | <literal>no</literal>.</para> | |
590 | </listitem> | |
591 | </varlistentry> | |
592 | <varlistentry> | |
593 | <term><varname>MultiQueue=</varname></term> | |
594 | <listitem><para>Takes a boolean argument. Configures whether | |
595 | to use multiple file descriptors (queues) to parallelize | |
596 | packets sending and receiving. Defaults to | |
597 | <literal>no</literal>.</para> | |
598 | </listitem> | |
599 | </varlistentry> | |
600 | <varlistentry> | |
601 | <term><varname>PacketInfo=</varname></term> | |
602 | <listitem><para>Takes a boolean argument. Configures whether | |
ff9b60f3 | 603 | packets should be prepended with four extra bytes (two flag |
798d3a52 ZJS |
604 | bytes and two protocol bytes). If disabled it indicates that |
605 | the packets will be pure IP packets. Defaults to | |
606 | <literal>no</literal>.</para> | |
607 | </listitem> | |
608 | </varlistentry> | |
43f78da4 | 609 | <varlistentry> |
2aba142e | 610 | <term><varname>VNetHeader=</varname></term> |
43f78da4 SS |
611 | <listitem><para>Takes a boolean argument. Configures |
612 | IFF_VNET_HDR flag for a tap device. It allows sending | |
613 | and receiving larger Generic Segmentation Offload (GSO) | |
614 | packets. This may increase throughput significantly. | |
615 | Defaults to | |
616 | <literal>no</literal>.</para> | |
617 | </listitem> | |
618 | </varlistentry> | |
798d3a52 ZJS |
619 | <varlistentry> |
620 | <term><varname>User=</varname></term> | |
621 | <listitem><para>User to grant access to the | |
622 | <filename>/dev/net/tun</filename> device.</para> | |
623 | </listitem> | |
624 | </varlistentry> | |
625 | <varlistentry> | |
626 | <term><varname>Group=</varname></term> | |
627 | <listitem><para>Group to grant access to the | |
628 | <filename>/dev/net/tun</filename> device.</para> | |
629 | </listitem> | |
630 | </varlistentry> | |
631 | ||
632 | </variablelist> | |
633 | ||
634 | </refsect1> | |
635 | ||
636 | <refsect1> | |
637 | <title>[Tap] Section Options</title> | |
638 | ||
639 | <para>The <literal>[Tap]</literal> section only applies for | |
640 | netdevs of kind <literal>tap</literal>, and accepts the same keys | |
641 | as the <literal>[Tun]</literal> section.</para> | |
642 | </refsect1> | |
643 | ||
644 | <refsect1> | |
645 | <title>[Bond] Section Options</title> | |
646 | ||
647 | <para>The <literal>[Bond]</literal> section accepts the following | |
648 | key:</para> | |
649 | ||
650 | <variablelist class='network-directives'> | |
651 | <varlistentry> | |
652 | <term><varname>Mode=</varname></term> | |
653 | <listitem> | |
654 | <para>Specifies one of the bonding policies. The default is | |
655 | <literal>balance-rr</literal> (round robin). Possible values are | |
656 | <literal>balance-rr</literal>, | |
657 | <literal>active-backup</literal>, | |
658 | <literal>balance-xor</literal>, | |
659 | <literal>broadcast</literal>, | |
660 | <literal>802.3ad</literal>, | |
661 | <literal>balance-tlb</literal>, and | |
662 | <literal>balance-alb</literal>. | |
663 | </para> | |
664 | </listitem> | |
665 | </varlistentry> | |
666 | ||
667 | <varlistentry> | |
668 | <term><varname>TransmitHashPolicy=</varname></term> | |
669 | <listitem> | |
670 | <para>Selects the transmit hash policy to use for slave | |
671 | selection in balance-xor, 802.3ad, and tlb modes. Possible | |
672 | values are | |
673 | <literal>layer2</literal>, | |
674 | <literal>layer3+4</literal>, | |
675 | <literal>layer2+3</literal>, | |
676 | <literal>encap2+3</literal>, | |
677 | <literal>802.3ad</literal>, and | |
678 | <literal>encap3+4</literal>. | |
679 | </para> | |
680 | </listitem> | |
681 | </varlistentry> | |
682 | ||
683 | <varlistentry> | |
684 | <term><varname>LACPTransmitRate=</varname></term> | |
685 | <listitem> | |
686 | <para>Specifies the rate with which link partner transmits | |
687 | Link Aggregation Control Protocol Data Unit packets in | |
688 | 802.3ad mode. Possible values are <literal>slow</literal>, | |
689 | which requests partner to transmit LACPDUs every 30 seconds, | |
690 | and <literal>fast</literal>, which requests partner to | |
691 | transmit LACPDUs every second. The default value is | |
692 | <literal>slow</literal>.</para> | |
693 | </listitem> | |
694 | </varlistentry> | |
695 | ||
696 | <varlistentry> | |
697 | <term><varname>MIIMonitorSec=</varname></term> | |
698 | <listitem> | |
699 | <para>Specifies the frequency that Media Independent | |
700 | Interface link monitoring will occur. A value of zero | |
dd2b607b | 701 | disables MII link monitoring. This value is rounded down to |
798d3a52 ZJS |
702 | the nearest millisecond. The default value is 0.</para> |
703 | </listitem> | |
704 | </varlistentry> | |
705 | ||
706 | <varlistentry> | |
707 | <term><varname>UpDelaySec=</varname></term> | |
708 | <listitem> | |
709 | <para>Specifies the delay before a link is enabled after a | |
710 | link up status has been detected. This value is rounded down | |
711 | to a multiple of MIIMonitorSec. The default value is | |
712 | 0.</para> | |
713 | </listitem> | |
714 | </varlistentry> | |
715 | ||
716 | <varlistentry> | |
717 | <term><varname>DownDelaySec=</varname></term> | |
718 | <listitem> | |
719 | <para>Specifies the delay before a link is disabled after a | |
720 | link down status has been detected. This value is rounded | |
721 | down to a multiple of MIIMonitorSec. The default value is | |
722 | 0.</para> | |
723 | </listitem> | |
724 | </varlistentry> | |
725 | ||
81bd37a8 | 726 | <varlistentry> |
38422da7 | 727 | <term><varname>LearnPacketIntervalSec=</varname></term> |
81bd37a8 SS |
728 | <listitem> |
729 | <para>Specifies the number of seconds between instances where the bonding | |
730 | driver sends learning packets to each slaves peer switch. | |
731 | The valid range is 1 - 0x7fffffff; the default value is 1. This Option | |
732 | has effect only in balance-tlb and balance-alb modes.</para> | |
733 | </listitem> | |
734 | </varlistentry> | |
735 | ||
736 | <varlistentry> | |
737 | <term><varname>AdSelect=</varname></term> | |
738 | <listitem> | |
739 | <para>Specifies the 802.3ad aggregation selection logic to use. Possible values are | |
740 | <literal>stable</literal>, | |
741 | <literal>bandwidth</literal>, | |
742 | <literal>count</literal> | |
743 | </para> | |
744 | </listitem> | |
745 | </varlistentry> | |
746 | ||
747 | <varlistentry> | |
38422da7 | 748 | <term><varname>FailOverMACPolicy=</varname></term> |
81bd37a8 SS |
749 | <listitem> |
750 | <para>Specifies whether active-backup mode should set all slaves to | |
751 | the same MAC address at enslavement or, when enabled, perform special handling of the | |
752 | bond's MAC address in accordance with the selected policy. The default policy is none. | |
753 | Possible values are | |
754 | <literal>none</literal>, | |
755 | <literal>active</literal>, | |
756 | <literal>follow</literal> | |
757 | </para> | |
758 | </listitem> | |
759 | </varlistentry> | |
760 | ||
761 | <varlistentry> | |
38422da7 | 762 | <term><varname>ARPValidate=</varname></term> |
81bd37a8 SS |
763 | <listitem> |
764 | <para>Specifies whether or not ARP probes and replies should be | |
38422da7 | 765 | validated in any mode that supports ARP monitoring, or whether |
81bd37a8 SS |
766 | non-ARP traffic should be filtered (disregarded) for link |
767 | monitoring purposes. Possible values are | |
768 | <literal>none</literal>, | |
769 | <literal>active</literal>, | |
770 | <literal>backup</literal>, | |
771 | <literal>all</literal> | |
772 | </para> | |
773 | </listitem> | |
774 | </varlistentry> | |
775 | ||
776 | <varlistentry> | |
38422da7 | 777 | <term><varname>ARPIntervalSec=</varname></term> |
81bd37a8 SS |
778 | <listitem> |
779 | <para>Specifies the ARP link monitoring frequency in milliseconds. | |
780 | A value of 0 disables ARP monitoring. The default value is 0. | |
781 | </para> | |
782 | </listitem> | |
783 | </varlistentry> | |
784 | ||
785 | <varlistentry> | |
38422da7 | 786 | <term><varname>ARPIPTargets=</varname></term> |
81bd37a8 SS |
787 | <listitem> |
788 | <para>Specifies the IP addresses to use as ARP monitoring peers when | |
38422da7 | 789 | ARPIntervalSec is greater than 0. These are the targets of the ARP request |
81bd37a8 SS |
790 | sent to determine the health of the link to the targets. |
791 | Specify these values in ipv4 dotted decimal format. At least one IP | |
792 | address must be given for ARP monitoring to function. The | |
793 | maximum number of targets that can be specified is 16. The | |
794 | default value is no IP addresses. | |
795 | </para> | |
796 | </listitem> | |
797 | </varlistentry> | |
798 | ||
799 | <varlistentry> | |
38422da7 | 800 | <term><varname>ARPAllTargets=</varname></term> |
81bd37a8 | 801 | <listitem> |
38422da7 | 802 | <para>Specifies the quantity of ARPIPTargets that must be reachable |
81bd37a8 SS |
803 | in order for the ARP monitor to consider a slave as being up. |
804 | This option affects only active-backup mode for slaves with | |
38422da7 | 805 | ARPValidate enabled. Possible values are |
81bd37a8 SS |
806 | <literal>any</literal>, |
807 | <literal>all</literal> | |
808 | </para> | |
809 | </listitem> | |
810 | </varlistentry> | |
811 | ||
812 | <varlistentry> | |
38422da7 | 813 | <term><varname>PrimaryReselectPolicy=</varname></term> |
81bd37a8 SS |
814 | <listitem> |
815 | <para>Specifies the reselection policy for the primary slave. This | |
816 | affects how the primary slave is chosen to become the active slave | |
817 | when failure of the active slave or recovery of the primary slave | |
818 | occurs. This option is designed to prevent flip-flopping between | |
819 | the primary slave and other slaves. Possible values are | |
820 | <literal>always</literal>, | |
821 | <literal>better</literal>, | |
822 | <literal>failure</literal> | |
823 | </para> | |
824 | </listitem> | |
825 | </varlistentry> | |
826 | ||
827 | <varlistentry> | |
828 | <term><varname>ResendIGMP=</varname></term> | |
829 | <listitem> | |
830 | <para>Specifies the number of IGMP membership reports to be issued after | |
831 | a failover event. One membership report is issued immediately after | |
832 | the failover, subsequent packets are sent in each 200ms interval. | |
833 | The valid range is (0 - 255). Defaults to 1. A value of 0 | |
834 | prevents the IGMP membership report from being issued in response | |
835 | to the failover event. | |
836 | </para> | |
837 | </listitem> | |
838 | </varlistentry> | |
839 | ||
840 | <varlistentry> | |
841 | <term><varname>PacketsPerSlave=</varname></term> | |
842 | <listitem> | |
843 | <para> Specify the number of packets to transmit through a slave before | |
844 | moving to the next one. When set to 0 then a slave is chosen at | |
dd2b607b | 845 | random. The valid range is (0 - 65535). Defaults to 1. This option |
81bd37a8 SS |
846 | has effect only in balance-rr mode. |
847 | </para> | |
848 | </listitem> | |
849 | </varlistentry> | |
850 | ||
851 | <varlistentry> | |
38422da7 | 852 | <term><varname>GratuitousARP=</varname></term> |
81bd37a8 SS |
853 | <listitem> |
854 | <para>Specify the number of peer notifications (gratuitous ARPs and | |
855 | unsolicited IPv6 Neighbor Advertisements) to be issued after a | |
856 | failover event. As soon as the link is up on the new slave | |
857 | a peer notification is sent on the bonding device and each | |
858 | VLAN sub-device. This is repeated at each link monitor interval | |
38422da7 | 859 | (ARPIntervalSec or MIIMonitorSec, whichever is active) if the number is |
81bd37a8 | 860 | greater than 1. The valid range is (0 - 255). Default value is 1. |
38422da7 | 861 | These options affect only the active-backup mode. |
81bd37a8 SS |
862 | </para> |
863 | </listitem> | |
864 | </varlistentry> | |
865 | ||
866 | <varlistentry> | |
867 | <term><varname>AllSlavesActive=</varname></term> | |
868 | <listitem> | |
869 | <para> A boolean. Specifies that duplicate frames (received on inactive ports) | |
870 | should be dropped false or delivered true. Normally, bonding will drop | |
871 | duplicate frames (received on inactive ports), which is desirable for | |
872 | most users. But there are some times it is nice to allow duplicate | |
873 | frames to be delivered. The default value is false (drop duplicate frames | |
874 | received on inactive ports). | |
875 | </para> | |
876 | </listitem> | |
877 | </varlistentry> | |
878 | ||
879 | <varlistentry> | |
880 | <term><varname>MinLinks=</varname></term> | |
881 | <listitem> | |
882 | <para>Specifies the minimum number of links that must be active before | |
883 | asserting carrier. The default value is 0. | |
884 | </para> | |
885 | </listitem> | |
886 | </varlistentry> | |
887 | ||
798d3a52 | 888 | </variablelist> |
81bd37a8 SS |
889 | |
890 | <para>For more detail information see | |
891 | <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt"> | |
892 | Linux Ethernet Bonding Driver HOWTO</ulink></para> | |
893 | ||
798d3a52 ZJS |
894 | </refsect1> |
895 | ||
896 | <refsect1> | |
897 | <title>Example</title> | |
898 | <example> | |
12b42c76 | 899 | <title>/etc/systemd/network/bridge.netdev</title> |
798d3a52 ZJS |
900 | |
901 | <programlisting>[NetDev] | |
eac684ef TG |
902 | Name=bridge0 |
903 | Kind=bridge</programlisting> | |
798d3a52 | 904 | </example> |
eac684ef | 905 | |
798d3a52 | 906 | <example> |
12b42c76 | 907 | <title>/etc/systemd/network/vlan1.netdev</title> |
eac684ef | 908 | |
798d3a52 | 909 | <programlisting>[Match] |
eac684ef TG |
910 | Virtualization=no |
911 | ||
912 | [NetDev] | |
913 | Name=vlan1 | |
914 | Kind=vlan | |
915 | ||
916 | [VLAN] | |
917 | Id=1</programlisting> | |
798d3a52 ZJS |
918 | </example> |
919 | <example> | |
12b42c76 | 920 | <title>/etc/systemd/network/ipip.netdev</title> |
798d3a52 | 921 | <programlisting>[NetDev] |
b35a2909 TG |
922 | Name=ipip-tun |
923 | Kind=ipip | |
924 | MTUBytes=1480 | |
925 | ||
926 | [Tunnel] | |
927 | Local=192.168.223.238 | |
928 | Remote=192.169.224.239 | |
929 | TTL=64</programlisting> | |
798d3a52 ZJS |
930 | </example> |
931 | <example> | |
12b42c76 | 932 | <title>/etc/systemd/network/tap.netdev</title> |
798d3a52 | 933 | <programlisting>[NetDev] |
30ae9dfd SS |
934 | Name=tap-test |
935 | Kind=tap | |
936 | ||
937 | [Tap] | |
938 | MultiQueue=true | |
939 | PacketInfo=true</programlisting> </example> | |
eac684ef | 940 | |
798d3a52 | 941 | <example> |
12b42c76 | 942 | <title>/etc/systemd/network/sit.netdev</title> |
798d3a52 | 943 | <programlisting>[NetDev] |
b35a2909 TG |
944 | Name=sit-tun |
945 | Kind=sit | |
946 | MTUBytes=1480 | |
947 | ||
948 | [Tunnel] | |
949 | Local=10.65.223.238 | |
950 | Remote=10.65.223.239</programlisting> | |
798d3a52 | 951 | </example> |
eac684ef | 952 | |
798d3a52 | 953 | <example> |
12b42c76 | 954 | <title>/etc/systemd/network/gre.netdev</title> |
798d3a52 | 955 | <programlisting>[NetDev] |
b35a2909 TG |
956 | Name=gre-tun |
957 | Kind=gre | |
958 | MTUBytes=1480 | |
959 | ||
960 | [Tunnel] | |
961 | Local=10.65.223.238 | |
962 | Remote=10.65.223.239</programlisting> | |
798d3a52 | 963 | </example> |
b35a2909 | 964 | |
798d3a52 | 965 | <example> |
12b42c76 | 966 | <title>/etc/systemd/network/vti.netdev</title> |
b35a2909 | 967 | |
798d3a52 | 968 | <programlisting>[NetDev] |
b35a2909 TG |
969 | Name=vti-tun |
970 | Kind=vti | |
971 | MTUBytes=1480 | |
972 | ||
973 | [Tunnel] | |
974 | Local=10.65.223.238 | |
975 | Remote=10.65.223.239</programlisting> | |
798d3a52 | 976 | </example> |
b35a2909 | 977 | |
798d3a52 | 978 | <example> |
12b42c76 | 979 | <title>/etc/systemd/network/veth.netdev</title> |
798d3a52 | 980 | <programlisting>[NetDev] |
b35a2909 TG |
981 | Name=veth-test |
982 | Kind=veth | |
983 | ||
984 | [Peer] | |
985 | Name=veth-peer</programlisting> | |
798d3a52 | 986 | </example> |
b35a2909 | 987 | |
798d3a52 | 988 | <example> |
12b42c76 | 989 | <title>/etc/systemd/network/dummy.netdev</title> |
798d3a52 | 990 | <programlisting>[NetDev] |
9e358851 TG |
991 | Name=dummy-test |
992 | Kind=dummy | |
993 | MACAddress=12:34:56:78:9a:bc</programlisting> | |
798d3a52 ZJS |
994 | </example> |
995 | ||
996 | </refsect1> | |
997 | <refsect1> | |
998 | <title>See Also</title> | |
999 | <para> | |
1000 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
1001 | <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
1002 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
1003 | <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1004 | </para> | |
1005 | </refsect1> | |
eac684ef TG |
1006 | |
1007 | </refentry> |