]>
Commit | Line | Data |
---|---|---|
1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> | |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | SPDX-License-Identifier: LGPL-2.1+ | |
7 | ||
8 | This file is part of systemd. | |
9 | ||
10 | Copyright 2013 Tom Gundersen | |
11 | --> | |
12 | ||
13 | <refentry id="systemd.network" conditional='ENABLE_NETWORKD'> | |
14 | ||
15 | <refentryinfo> | |
16 | <title>systemd.network</title> | |
17 | <productname>systemd</productname> | |
18 | ||
19 | <authorgroup> | |
20 | <author> | |
21 | <contrib>Developer</contrib> | |
22 | <firstname>Tom</firstname> | |
23 | <surname>Gundersen</surname> | |
24 | <email>teg@jklm.no</email> | |
25 | </author> | |
26 | </authorgroup> | |
27 | </refentryinfo> | |
28 | ||
29 | <refmeta> | |
30 | <refentrytitle>systemd.network</refentrytitle> | |
31 | <manvolnum>5</manvolnum> | |
32 | </refmeta> | |
33 | ||
34 | <refnamediv> | |
35 | <refname>systemd.network</refname> | |
36 | <refpurpose>Network configuration</refpurpose> | |
37 | </refnamediv> | |
38 | ||
39 | <refsynopsisdiv> | |
40 | <para><filename><replaceable>network</replaceable>.network</filename></para> | |
41 | </refsynopsisdiv> | |
42 | ||
43 | <refsect1> | |
44 | <title>Description</title> | |
45 | ||
46 | <para>Network setup is performed by | |
47 | <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
48 | </para> | |
49 | ||
50 | <para>The main network file must have the extension <filename>.network</filename>; other | |
51 | extensions are ignored. Networks are applied to links whenever the links appear.</para> | |
52 | ||
53 | <para>The <filename>.network</filename> files are read from the files located in the system | |
54 | network directory <filename>/usr/lib/systemd/network</filename>, the volatile runtime network | |
55 | directory <filename>/run/systemd/network</filename> and the local administration network | |
56 | directory <filename>/etc/systemd/network</filename>. All configuration files are collectively | |
57 | sorted and processed in lexical order, regardless of the directories in which they live. | |
58 | However, files with identical filenames replace each other. Files in <filename>/etc</filename> | |
59 | have the highest priority, files in <filename>/run</filename> take precedence over files with | |
60 | the same name in <filename>/usr/lib</filename>. This can be used to override a system-supplied | |
61 | configuration file with a local file if needed. As a special case, an empty file (file size 0) | |
62 | or symlink with the same name pointing to <filename>/dev/null</filename> disables the | |
63 | configuration file entirely (it is "masked").</para> | |
64 | ||
65 | <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory | |
66 | <filename>foo.network.d/</filename> may exist. All files with the suffix | |
67 | <literal>.conf</literal> from this directory will be parsed after the file itself is | |
68 | parsed. This is useful to alter or add configuration settings, without having to modify the main | |
69 | configuration file. Each drop-in file must have appropriate section headers.</para> | |
70 | ||
71 | <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal> | |
72 | directories can be placed in <filename>/usr/lib/systemd/network</filename> or | |
73 | <filename>/run/systemd/network</filename> directories. Drop-in files in | |
74 | <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn | |
75 | take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these | |
76 | directories take precedence over the main netdev file wherever located. (Of course, since | |
77 | <filename>/run</filename> is temporary and <filename>/usr/lib</filename> is for vendors, it is | |
78 | unlikely drop-ins should be used in either of those places.)</para> | |
79 | ||
80 | <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6 | |
81 | nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically | |
82 | disabled for that interface by writing "1" to | |
83 | <filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>. | |
84 | </para> | |
85 | </refsect1> | |
86 | ||
87 | <refsect1> | |
88 | <title>[Match] Section Options</title> | |
89 | ||
90 | <para>The network file contains a <literal>[Match]</literal> | |
91 | section, which determines if a given network file may be applied | |
92 | to a given device; and a <literal>[Network]</literal> section | |
93 | specifying how the device should be configured. The first (in | |
94 | lexical order) of the network files that matches a given device | |
95 | is applied, all later files are ignored, even if they match as | |
96 | well.</para> | |
97 | ||
98 | <para>A network file is said to match a device if each of the | |
99 | entries in the <literal>[Match]</literal> section matches, or if | |
100 | the section is empty. The following keys are accepted:</para> | |
101 | ||
102 | <variablelist class='network-directives'> | |
103 | <varlistentry> | |
104 | <term><varname>MACAddress=</varname></term> | |
105 | <listitem> | |
106 | <para>A whitespace-separated list of hardware addresses. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example below. | |
107 | This option may appear more than one, in which case the lists are merged. If the empty string is assigned to this option, the list | |
108 | of hardware addresses defined prior to this is reset.</para> | |
109 | ||
110 | <para>Example: | |
111 | <programlisting>MACAddress=01:23:45:67:89:ab 00-11-22-33-44-55 AABB.CCDD.EEFF</programlisting></para> | |
112 | </listitem> | |
113 | </varlistentry> | |
114 | <varlistentry> | |
115 | <term><varname>Path=</varname></term> | |
116 | <listitem> | |
117 | <para>A whitespace-separated list of shell-style globs | |
118 | matching the persistent path, as exposed by the udev | |
119 | property <literal>ID_PATH</literal>. If the list is | |
120 | prefixed with a "!", the test is inverted; i.e. it is | |
121 | true when <literal>ID_PATH</literal> does not match any | |
122 | item in the list.</para> | |
123 | </listitem> | |
124 | </varlistentry> | |
125 | <varlistentry> | |
126 | <term><varname>Driver=</varname></term> | |
127 | <listitem> | |
128 | <para>A whitespace-separated list of shell-style globs | |
129 | matching the driver currently bound to the device, as | |
130 | exposed by the udev property <literal>DRIVER</literal> | |
131 | of its parent device, or if that is not set the driver | |
132 | as exposed by <literal>ethtool -i</literal> of the | |
133 | device itself. If the list is prefixed with a "!", the | |
134 | test is inverted.</para> | |
135 | </listitem> | |
136 | </varlistentry> | |
137 | <varlistentry> | |
138 | <term><varname>Type=</varname></term> | |
139 | <listitem> | |
140 | <para>A whitespace-separated list of shell-style globs | |
141 | matching the device type, as exposed by the udev property | |
142 | <literal>DEVTYPE</literal>. If the list is prefixed with | |
143 | a "!", the test is inverted.</para> | |
144 | </listitem> | |
145 | </varlistentry> | |
146 | <varlistentry> | |
147 | <term><varname>Name=</varname></term> | |
148 | <listitem> | |
149 | <para>A whitespace-separated list of shell-style globs | |
150 | matching the device name, as exposed by the udev property | |
151 | <literal>INTERFACE</literal>. If the list is prefixed | |
152 | with a "!", the test is inverted.</para> | |
153 | </listitem> | |
154 | </varlistentry> | |
155 | <varlistentry> | |
156 | <term><varname>Host=</varname></term> | |
157 | <listitem> | |
158 | <para>Matches against the hostname or machine ID of the | |
159 | host. See <literal>ConditionHost=</literal> in | |
160 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
161 | for details. | |
162 | </para> | |
163 | </listitem> | |
164 | </varlistentry> | |
165 | <varlistentry> | |
166 | <term><varname>Virtualization=</varname></term> | |
167 | <listitem> | |
168 | <para>Checks whether the system is executed in a virtualized | |
169 | environment and optionally test whether it is a specific | |
170 | implementation. See <literal>ConditionVirtualization=</literal> in | |
171 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
172 | for details. | |
173 | </para> | |
174 | </listitem> | |
175 | </varlistentry> | |
176 | <varlistentry> | |
177 | <term><varname>KernelCommandLine=</varname></term> | |
178 | <listitem> | |
179 | <para>Checks whether a specific kernel command line option is | |
180 | set (or if prefixed with the exclamation mark unset). See | |
181 | <literal>ConditionKernelCommandLine=</literal> in | |
182 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
183 | for details. | |
184 | </para> | |
185 | </listitem> | |
186 | </varlistentry> | |
187 | <varlistentry> | |
188 | <term><varname>KernelVersion=</varname></term> | |
189 | <listitem> | |
190 | <para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain | |
191 | expression (or if prefixed with the exclamation mark does not match it). See | |
192 | <literal>ConditionKernelVersion=</literal> in | |
193 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for | |
194 | details. | |
195 | </para> | |
196 | </listitem> | |
197 | </varlistentry> | |
198 | <varlistentry> | |
199 | <term><varname>Architecture=</varname></term> | |
200 | <listitem> | |
201 | <para>Checks whether the system is running on a specific | |
202 | architecture. See <literal>ConditionArchitecture=</literal> in | |
203 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
204 | for details. | |
205 | </para> | |
206 | </listitem> | |
207 | </varlistentry> | |
208 | </variablelist> | |
209 | ||
210 | </refsect1> | |
211 | ||
212 | <refsect1> | |
213 | <title>[Link] Section Options</title> | |
214 | ||
215 | <para> The <literal>[Link]</literal> section accepts the following keys:</para> | |
216 | ||
217 | <variablelist class='network-directives'> | |
218 | <varlistentry> | |
219 | <term><varname>MACAddress=</varname></term> | |
220 | <listitem> | |
221 | <para>The hardware address to set for the device.</para> | |
222 | </listitem> | |
223 | </varlistentry> | |
224 | <varlistentry> | |
225 | <term><varname>MTUBytes=</varname></term> | |
226 | <listitem> | |
227 | <para>The maximum transmission unit in bytes to set for the | |
228 | device. The usual suffixes K, M, G, are supported and are | |
229 | understood to the base of 1024.</para> | |
230 | <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen | |
231 | below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para> | |
232 | </listitem> | |
233 | </varlistentry> | |
234 | <varlistentry> | |
235 | <term><varname>ARP=</varname></term> | |
236 | <listitem> | |
237 | <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol) | |
238 | for this interface. Defaults to unset, which means that the kernel default will be used.</para> | |
239 | <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual | |
240 | interfaces atop a single lower-level physical interface, which will then only serve as a | |
241 | link/"bridge" device aggregating traffic to the same physical link and not participate in | |
242 | the network otherwise.</para> | |
243 | </listitem> | |
244 | </varlistentry> | |
245 | <varlistentry> | |
246 | <term><varname>Unmanaged=</varname></term> | |
247 | <listitem> | |
248 | <para>A boolean. When <literal>yes</literal>, no attempts are | |
249 | made to bring up or configure matching links, equivalent to | |
250 | when there are no matching network files. Defaults to | |
251 | <literal>no</literal>.</para> | |
252 | <para>This is useful for preventing later matching network | |
253 | files from interfering with certain interfaces that are fully | |
254 | controlled by other applications.</para> | |
255 | </listitem> | |
256 | </varlistentry> | |
257 | <varlistentry> | |
258 | <term><varname>RequiredForOnline=</varname></term> | |
259 | <listitem> | |
260 | <para>A boolean. When <literal>yes</literal>, the network is deemed | |
261 | required when determining whether the system is online when running | |
262 | <literal>systemd-networkd-wait-online</literal>. | |
263 | When <literal>no</literal>, the network is ignored when checking for | |
264 | online state. Defaults to <literal>yes</literal>.</para> | |
265 | <para>The network will be brought up normally in all cases, but in | |
266 | the event that there is no address being assigned by DHCP or the | |
267 | cable is not plugged in, the link will simply remain offline and be | |
268 | skipped automatically by <literal>systemd-networkd-wait-online</literal> | |
269 | if <literal>RequiredForOnline=true</literal>.</para> | |
270 | </listitem> | |
271 | </varlistentry> | |
272 | </variablelist> | |
273 | </refsect1> | |
274 | ||
275 | <refsect1> | |
276 | <title>[Network] Section Options</title> | |
277 | ||
278 | <para>The <literal>[Network]</literal> section accepts the following keys:</para> | |
279 | ||
280 | <variablelist class='network-directives'> | |
281 | <varlistentry> | |
282 | <term><varname>Description=</varname></term> | |
283 | <listitem> | |
284 | <para>A description of the device. This is only used for | |
285 | presentation purposes.</para> | |
286 | </listitem> | |
287 | </varlistentry> | |
288 | <varlistentry> | |
289 | <term><varname>DHCP=</varname></term> | |
290 | <listitem> | |
291 | <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts | |
292 | <literal>yes</literal>, <literal>no</literal>, | |
293 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults | |
294 | to <literal>no</literal>.</para> | |
295 | ||
296 | <para>Note that DHCPv6 will by default be triggered by Router | |
297 | Advertisement, if that is enabled, regardless of this parameter. | |
298 | By enabling DHCPv6 support explicitly, the DHCPv6 client will | |
299 | be started regardless of the presence of routers on the link, | |
300 | or what flags the routers pass. See | |
301 | <literal>IPv6AcceptRA=</literal>.</para> | |
302 | ||
303 | <para>Furthermore, note that by default the domain name | |
304 | specified through DHCP is not used for name resolution. | |
305 | See option <option>UseDomains=</option> below.</para> | |
306 | ||
307 | <para>See the <literal>[DHCP]</literal> section below for further configuration options for the DHCP client | |
308 | support.</para> | |
309 | </listitem> | |
310 | </varlistentry> | |
311 | <varlistentry> | |
312 | <term><varname>DHCPServer=</varname></term> | |
313 | <listitem> | |
314 | <para>A boolean. Enables DHCPv4 server support. Defaults | |
315 | to <literal>no</literal>. Further settings for the DHCP | |
316 | server may be set in the <literal>[DHCPServer]</literal> | |
317 | section described below.</para> | |
318 | </listitem> | |
319 | </varlistentry> | |
320 | <varlistentry> | |
321 | <term><varname>LinkLocalAddressing=</varname></term> | |
322 | <listitem> | |
323 | <para>Enables link-local address autoconfiguration. Accepts | |
324 | <literal>yes</literal>, <literal>no</literal>, | |
325 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to | |
326 | <literal>ipv6</literal>.</para> | |
327 | </listitem> | |
328 | </varlistentry> | |
329 | <varlistentry> | |
330 | <term><varname>IPv4LLRoute=</varname></term> | |
331 | <listitem> | |
332 | <para>A boolean. When true, sets up the route needed for | |
333 | non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults | |
334 | to false. | |
335 | </para> | |
336 | </listitem> | |
337 | </varlistentry> | |
338 | <varlistentry> | |
339 | <term><varname>IPv6Token=</varname></term> | |
340 | <listitem> | |
341 | <para>An IPv6 address with the top 64 bits unset. When set, indicates the | |
342 | 64-bit interface part of SLAAC IPv6 addresses for this link. Note that | |
343 | the token is only ever used for SLAAC, and not for DHCPv6 addresses, even | |
344 | in the case DHCP is requested by router advertisement. By default, the | |
345 | token is autogenerated.</para> | |
346 | </listitem> | |
347 | </varlistentry> | |
348 | <varlistentry> | |
349 | <term><varname>LLMNR=</varname></term> | |
350 | <listitem> | |
351 | <para>A boolean or <literal>resolve</literal>. When true, | |
352 | enables <ulink | |
353 | url="https://tools.ietf.org/html/rfc4795">Link-Local | |
354 | Multicast Name Resolution</ulink> on the link. When set to | |
355 | <literal>resolve</literal>, only resolution is enabled, | |
356 | but not host registration and announcement. Defaults to | |
357 | true. This setting is read by | |
358 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
359 | </listitem> | |
360 | </varlistentry> | |
361 | <varlistentry> | |
362 | <term><varname>MulticastDNS=</varname></term> | |
363 | <listitem> | |
364 | <para>A boolean or <literal>resolve</literal>. When true, | |
365 | enables <ulink | |
366 | url="https://tools.ietf.org/html/rfc6762">Multicast | |
367 | DNS</ulink> support on the link. When set to | |
368 | <literal>resolve</literal>, only resolution is enabled, | |
369 | but not host or service registration and | |
370 | announcement. Defaults to false. This setting is read by | |
371 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
372 | </listitem> | |
373 | </varlistentry> | |
374 | <varlistentry> | |
375 | <term><varname>DNSSEC=</varname></term> | |
376 | <listitem> | |
377 | <para>A boolean or | |
378 | <literal>allow-downgrade</literal>. When true, enables | |
379 | <ulink | |
380 | url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink> | |
381 | DNS validation support on the link. When set to | |
382 | <literal>allow-downgrade</literal>, compatibility with | |
383 | non-DNSSEC capable networks is increased, by automatically | |
384 | turning off DNSSEC in this case. This option defines a | |
385 | per-interface setting for | |
386 | <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s | |
387 | global <varname>DNSSEC=</varname> option. Defaults to | |
388 | false. This setting is read by | |
389 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
390 | </listitem> | |
391 | </varlistentry> | |
392 | <varlistentry> | |
393 | <term><varname>DNSSECNegativeTrustAnchors=</varname></term> | |
394 | <listitem><para>A space-separated list of DNSSEC negative | |
395 | trust anchor domains. If specified and DNSSEC is enabled, | |
396 | look-ups done via the interface's DNS server will be subject | |
397 | to the list of negative trust anchors, and not require | |
398 | authentication for the specified domains, or anything below | |
399 | it. Use this to disable DNSSEC authentication for specific | |
400 | private domains, that cannot be proven valid using the | |
401 | Internet DNS hierarchy. Defaults to the empty list. This | |
402 | setting is read by | |
403 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
404 | </listitem> | |
405 | </varlistentry> | |
406 | <varlistentry> | |
407 | <term><varname>LLDP=</varname></term> | |
408 | <listitem> | |
409 | <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly | |
410 | implemented on professional routers and bridges which announces which physical port a system is connected | |
411 | to, as well as other related data. Accepts a boolean or the special value | |
412 | <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP | |
413 | neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers | |
414 | is collected and LLDP data about other types of devices ignored (such as stations, telephones and | |
415 | others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use | |
416 | <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the | |
417 | collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below | |
418 | for enabling LLDP packet emission from the local system. | |
419 | </para> | |
420 | </listitem> | |
421 | </varlistentry> | |
422 | <varlistentry> | |
423 | <term><varname>EmitLLDP=</varname></term> | |
424 | <listitem> | |
425 | <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values | |
426 | <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and | |
427 | <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false, | |
428 | a short LLDP packet with information about the local system is sent out in regular intervals on the | |
429 | link. The LLDP packet will contain information about the local host name, the local machine ID (as stored | |
430 | in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the | |
431 | local interface name, as well as the pretty hostname of the system (as set in | |
432 | <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP | |
433 | emission is only available on Ethernet links. Note that this setting passes data suitable for | |
434 | identification of host to the network and should thus not be enabled on untrusted networks, where such | |
435 | identification data should not be made available. Use this option to permit other systems to identify on | |
436 | which interfaces they are connected to this system. The three special values control propagation of the | |
437 | LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest | |
438 | connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but | |
439 | not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge | |
440 | is reached. For details about these concepts, see <ulink | |
441 | url="http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE 802.1AB-2009</ulink>. Note that | |
442 | configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and | |
443 | most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP | |
444 | reception.</para> | |
445 | </listitem> | |
446 | </varlistentry> | |
447 | <varlistentry> | |
448 | <term><varname>BindCarrier=</varname></term> | |
449 | <listitem> | |
450 | <para>A link name or a list of link names. When set, controls the behavior of the current | |
451 | link. When all links in the list are in an operational down state, the current link is brought | |
452 | down. When at least one link has carrier, the current interface is brought up. | |
453 | </para> | |
454 | </listitem> | |
455 | </varlistentry> | |
456 | <varlistentry> | |
457 | <term><varname>Address=</varname></term> | |
458 | <listitem> | |
459 | <para>A static IPv4 or IPv6 address and its prefix length, | |
460 | separated by a <literal>/</literal> character. Specify | |
461 | this key more than once to configure several addresses. | |
462 | The format of the address must be as described in | |
463 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
464 | This is a short-hand for an [Address] section only | |
465 | containing an Address key (see below). This option may be | |
466 | specified more than once. | |
467 | </para> | |
468 | ||
469 | <para>If the specified address is 0.0.0.0 (for IPv4) or | |
470 | [::] (for IPv6), a new address range of the requested size | |
471 | is automatically allocated from a system-wide pool of | |
472 | unused ranges. The allocated range is checked against all | |
473 | current network interfaces and all known network | |
474 | configuration files to avoid address range conflicts. The | |
475 | default system-wide pool consists of 192.168.0.0/16, | |
476 | 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for | |
477 | IPv6. This functionality is useful to manage a large | |
478 | number of dynamically created network interfaces with the | |
479 | same network configuration and automatic address range | |
480 | assignment.</para> | |
481 | ||
482 | </listitem> | |
483 | </varlistentry> | |
484 | <varlistentry> | |
485 | <term><varname>Gateway=</varname></term> | |
486 | <listitem> | |
487 | <para>The gateway address, which must be in the format | |
488 | described in | |
489 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
490 | This is a short-hand for a [Route] section only containing | |
491 | a Gateway key. This option may be specified more than | |
492 | once.</para> | |
493 | </listitem> | |
494 | </varlistentry> | |
495 | <varlistentry> | |
496 | <term><varname>DNS=</varname></term> | |
497 | <listitem> | |
498 | <para>A DNS server address, which must be in the format | |
499 | described in | |
500 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
501 | This option may be specified more than once. This setting is read by | |
502 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
503 | </listitem> | |
504 | </varlistentry> | |
505 | <varlistentry> | |
506 | <term><varname>Domains=</varname></term> | |
507 | <listitem> | |
508 | <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list | |
509 | should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the | |
510 | prefix are called "routing-only domains". The domains without the prefix are called "search domains" and | |
511 | are first used as search suffixes for extending single-label host names (host names containing no dots) to | |
512 | become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface, | |
513 | each of the specified search domains are appended to it in turn, converting it into a fully qualified | |
514 | domain name, until one of them may be successfully resolved.</para> | |
515 | ||
516 | <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names | |
517 | ending in those domains (hence also single label names, if any "search domains" are listed), are routed to | |
518 | the DNS servers configured for this interface. The domain routing logic is particularly useful on | |
519 | multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para> | |
520 | ||
521 | <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain, | |
522 | the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special | |
523 | effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed | |
524 | to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers | |
525 | if a link on which they are connected is available.</para> | |
526 | ||
527 | <para>This setting is read by | |
528 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
529 | "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in | |
530 | <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
531 | Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain | |
532 | name servers limited to a specific link.</para> | |
533 | </listitem> | |
534 | </varlistentry> | |
535 | <varlistentry> | |
536 | <term><varname>NTP=</varname></term> | |
537 | <listitem> | |
538 | <para>An NTP server address. This option may be specified more than once. This setting is read by | |
539 | <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
540 | </listitem> | |
541 | </varlistentry> | |
542 | <varlistentry> | |
543 | <term><varname>IPForward=</varname></term> | |
544 | <listitem><para>Configures IP packet forwarding for the | |
545 | system. If enabled, incoming packets on any network | |
546 | interface will be forwarded to any other interfaces | |
547 | according to the routing table. Takes either a boolean | |
548 | argument, or the values <literal>ipv4</literal> or | |
549 | <literal>ipv6</literal>, which only enable IP packet | |
550 | forwarding for the specified address family. This controls | |
551 | the <filename>net.ipv4.ip_forward</filename> and | |
552 | <filename>net.ipv6.conf.all.forwarding</filename> sysctl | |
553 | options of the network interface (see <ulink | |
554 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> | |
555 | for details about sysctl options). Defaults to | |
556 | <literal>no</literal>.</para> | |
557 | ||
558 | <para>Note: this setting controls a global kernel option, | |
559 | and does so one way only: if a network that has this setting | |
560 | enabled is set up the global setting is turned on. However, | |
561 | it is never turned off again, even after all networks with | |
562 | this setting enabled are shut down again.</para> | |
563 | ||
564 | <para>To allow IP packet forwarding only between specific | |
565 | network interfaces use a firewall.</para> | |
566 | </listitem> | |
567 | </varlistentry> | |
568 | <varlistentry> | |
569 | <term><varname>IPMasquerade=</varname></term> | |
570 | <listitem><para>Configures IP masquerading for the network | |
571 | interface. If enabled, packets forwarded from the network | |
572 | interface will be appear as coming from the local host. | |
573 | Takes a boolean argument. Implies | |
574 | <varname>IPForward=ipv4</varname>. Defaults to | |
575 | <literal>no</literal>.</para></listitem> | |
576 | </varlistentry> | |
577 | <varlistentry> | |
578 | <term><varname>IPv6PrivacyExtensions=</varname></term> | |
579 | <listitem><para>Configures use of stateless temporary | |
580 | addresses that change over time (see <ulink | |
581 | url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>, | |
582 | Privacy Extensions for Stateless Address Autoconfiguration | |
583 | in IPv6). Takes a boolean or the special values | |
584 | <literal>prefer-public</literal> and | |
585 | <literal>kernel</literal>. When true, enables the privacy | |
586 | extensions and prefers temporary addresses over public | |
587 | addresses. When <literal>prefer-public</literal>, enables the | |
588 | privacy extensions, but prefers public addresses over | |
589 | temporary addresses. When false, the privacy extensions | |
590 | remain disabled. When <literal>kernel</literal>, the kernel's | |
591 | default setting will be left in place. Defaults to | |
592 | <literal>no</literal>.</para></listitem> | |
593 | </varlistentry> | |
594 | <varlistentry> | |
595 | <term><varname>IPv6AcceptRA=</varname></term> | |
596 | <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes | |
597 | a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local | |
598 | forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding | |
599 | is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if | |
600 | the relevant flags are set in the RA data, or if no routers are found on the link.</para> | |
601 | ||
602 | <para>Further settings for the IPv6 RA support may be configured in the | |
603 | <literal>[IPv6AcceptRA]</literal> section, see below.</para> | |
604 | ||
605 | <para>Also see <ulink | |
606 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel | |
607 | documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of | |
608 | <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para> | |
609 | </listitem> | |
610 | </varlistentry> | |
611 | <varlistentry> | |
612 | <term><varname>IPv6DuplicateAddressDetection=</varname></term> | |
613 | <listitem><para>Configures the amount of IPv6 Duplicate | |
614 | Address Detection (DAD) probes to send. Defaults to unset. | |
615 | </para></listitem> | |
616 | </varlistentry> | |
617 | <varlistentry> | |
618 | <term><varname>IPv6HopLimit=</varname></term> | |
619 | <listitem><para>Configures IPv6 Hop Limit. For each router that | |
620 | forwards the packet, the hop limit is decremented by 1. When the | |
621 | hop limit field reaches zero, the packet is discarded. | |
622 | Defaults to unset. | |
623 | </para></listitem> | |
624 | </varlistentry> | |
625 | <varlistentry> | |
626 | <term><varname>IPv4ProxyARP=</varname></term> | |
627 | <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host, | |
628 | usually a router, answers ARP requests intended for another machine. By "faking" its identity, | |
629 | the router accepts responsibility for routing packets to the "real" destination. (see <ulink | |
630 | url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>. | |
631 | Defaults to unset. | |
632 | </para></listitem> | |
633 | </varlistentry> | |
634 | <varlistentry> | |
635 | <term><varname>IPv6ProxyNDP=</varname></term> | |
636 | <listitem><para>A boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery | |
637 | Protocol) is a technique for IPv6 to allow routing of addresses to a different | |
638 | destination when peers expect them to be present on a certain physical link. | |
639 | In this case a router answers Neighbour Advertisement messages intended for | |
640 | another machine by offering its own MAC address as destination. | |
641 | Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour | |
642 | Advertisement messages for addresses in the IPv6 neighbor proxy table, | |
643 | which can also be shown by <command>ip -6 neighbour show proxy</command>. | |
644 | systemd-networkd will control the per-interface `proxy_ndp` switch for each configured | |
645 | interface depending on this option. | |
646 | Defautls to unset. | |
647 | </para></listitem> | |
648 | </varlistentry> | |
649 | <varlistentry> | |
650 | <term><varname>IPv6ProxyNDPAddress=</varname></term> | |
651 | <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be | |
652 | proxied. This option may be specified more than once. systemd-networkd will add the | |
653 | <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table. | |
654 | This option implies <option>IPv6ProxyNDP=true</option> but has no effect if | |
655 | <option>IPv6ProxyNDP</option> has been set to false. Defaults to unset. | |
656 | </para></listitem> | |
657 | </varlistentry> | |
658 | <varlistentry> | |
659 | <term><varname>IPv6PrefixDelegation=</varname></term> | |
660 | <listitem><para>Whether to enable or disable Router Advertisement sending on a link. | |
661 | Allowed values are <literal>static</literal> which distributes prefixes as defined in | |
662 | the <literal>[IPv6PrefixDelegation]</literal> and any <literal>[IPv6Prefix]</literal> | |
663 | sections, <literal>dhcpv6</literal> which requests prefixes using a DHCPv6 client | |
664 | configured for another link and any values configured in the | |
665 | <literal>[IPv6PrefixDelegation]</literal> section while ignoring all static prefix | |
666 | configuration sections, <literal>yes</literal> which uses both static configuration | |
667 | and DHCPv6, and <literal>false</literal> which turns off IPv6 prefix delegation | |
668 | altogether. Defaults to <literal>false</literal>. See the | |
669 | <literal>[IPv6PrefixDelegation]</literal> and the <literal>[IPv6Prefix]</literal> | |
670 | sections for more configuration options. | |
671 | </para></listitem> | |
672 | </varlistentry> | |
673 | <varlistentry> | |
674 | <term><varname>IPv6MTUBytes=</varname></term> | |
675 | <listitem><para>Configures IPv6 maximum transmission unit (MTU). | |
676 | An integer greater than or equal to 1280 bytes. Defaults to unset. | |
677 | </para></listitem> | |
678 | </varlistentry> | |
679 | <varlistentry> | |
680 | <term><varname>Bridge=</varname></term> | |
681 | <listitem> | |
682 | <para>The name of the bridge to add the link to. See | |
683 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
684 | </para> | |
685 | </listitem> | |
686 | </varlistentry> | |
687 | <varlistentry> | |
688 | <term><varname>Bond=</varname></term> | |
689 | <listitem> | |
690 | <para>The name of the bond to add the link to. See | |
691 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
692 | </para> | |
693 | </listitem> | |
694 | </varlistentry> | |
695 | <varlistentry> | |
696 | <term><varname>VRF=</varname></term> | |
697 | <listitem> | |
698 | <para>The name of the VRF to add the link to. See | |
699 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
700 | </para> | |
701 | </listitem> | |
702 | </varlistentry> | |
703 | <varlistentry> | |
704 | <term><varname>VLAN=</varname></term> | |
705 | <listitem> | |
706 | <para>The name of a VLAN to create on the link. See | |
707 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
708 | This option may be specified more than once.</para> | |
709 | </listitem> | |
710 | </varlistentry> | |
711 | <varlistentry> | |
712 | <term><varname>MACVLAN=</varname></term> | |
713 | <listitem> | |
714 | <para>The name of a MACVLAN to create on the link. See | |
715 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
716 | This option may be specified more than once.</para> | |
717 | </listitem> | |
718 | </varlistentry> | |
719 | <varlistentry> | |
720 | <term><varname>VXLAN=</varname></term> | |
721 | <listitem> | |
722 | <para>The name of a VXLAN to create on the link. See | |
723 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
724 | This option may be specified more than once.</para> | |
725 | </listitem> | |
726 | </varlistentry> | |
727 | <varlistentry> | |
728 | <term><varname>Tunnel=</varname></term> | |
729 | <listitem> | |
730 | <para>The name of a Tunnel to create on the link. See | |
731 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
732 | This option may be specified more than once.</para> | |
733 | </listitem> | |
734 | </varlistentry> | |
735 | <varlistentry> | |
736 | <term><varname>ActiveSlave=</varname></term> | |
737 | <listitem> | |
738 | <para>A boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal> | |
739 | option is only valid for following modes: | |
740 | <literal>active-backup</literal>, | |
741 | <literal>balance-alb</literal> and | |
742 | <literal>balance-tlb</literal>. Defaults to false. | |
743 | </para> | |
744 | </listitem> | |
745 | </varlistentry> | |
746 | <varlistentry> | |
747 | <term><varname>PrimarySlave=</varname></term> | |
748 | <listitem> | |
749 | <para>A boolean. Specifies which slave is the primary device. The specified | |
750 | device will always be the active slave while it is available. Only when the | |
751 | primary is off-line will alternate devices be used. This is useful when | |
752 | one slave is preferred over another, e.g. when one slave has higher throughput | |
753 | than another. The <literal>PrimarySlave=</literal> option is only valid for | |
754 | following modes: | |
755 | <literal>active-backup</literal>, | |
756 | <literal>balance-alb</literal> and | |
757 | <literal>balance-tlb</literal>. Defaults to false. | |
758 | </para> | |
759 | </listitem> | |
760 | </varlistentry> | |
761 | <varlistentry> | |
762 | <term><varname>ConfigureWithoutCarrier=</varname></term> | |
763 | <listitem> | |
764 | <para>A boolean. Allows networkd to configure a specific link even if it has no carrier. | |
765 | Defaults to false. | |
766 | </para> | |
767 | </listitem> | |
768 | </varlistentry> | |
769 | </variablelist> | |
770 | ||
771 | </refsect1> | |
772 | ||
773 | <refsect1> | |
774 | <title>[Address] Section Options</title> | |
775 | ||
776 | <para>An <literal>[Address]</literal> section accepts the | |
777 | following keys. Specify several <literal>[Address]</literal> | |
778 | sections to configure several addresses.</para> | |
779 | ||
780 | <variablelist class='network-directives'> | |
781 | <varlistentry> | |
782 | <term><varname>Address=</varname></term> | |
783 | <listitem> | |
784 | <para>As in the <literal>[Network]</literal> section. This | |
785 | key is mandatory.</para> | |
786 | </listitem> | |
787 | </varlistentry> | |
788 | <varlistentry> | |
789 | <term><varname>Peer=</varname></term> | |
790 | <listitem> | |
791 | <para>The peer address in a point-to-point connection. | |
792 | Accepts the same format as the <literal>Address</literal> | |
793 | key.</para> | |
794 | </listitem> | |
795 | </varlistentry> | |
796 | <varlistentry> | |
797 | <term><varname>Broadcast=</varname></term> | |
798 | <listitem> | |
799 | <para>The broadcast address, which must be in the format | |
800 | described in | |
801 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
802 | This key only applies to IPv4 addresses. If it is not | |
803 | given, it is derived from the <literal>Address</literal> | |
804 | key.</para> | |
805 | </listitem> | |
806 | </varlistentry> | |
807 | <varlistentry> | |
808 | <term><varname>Label=</varname></term> | |
809 | <listitem> | |
810 | <para>An address label.</para> | |
811 | </listitem> | |
812 | </varlistentry> | |
813 | <varlistentry> | |
814 | <term><varname>PreferredLifetime=</varname></term> | |
815 | <listitem> | |
816 | <para>Allows the default "preferred lifetime" of the address to be overridden. | |
817 | Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal> | |
818 | which is the default and means that the address never expires, and <literal>0</literal> which means | |
819 | that the address is considered immediately "expired" and will not be used, | |
820 | unless explicitly requested. A setting of PreferredLifetime=0 is useful for | |
821 | addresses which are added to be used only by a specific application, | |
822 | which is then configured to use them explicitly.</para> | |
823 | </listitem> | |
824 | </varlistentry> | |
825 | <varlistentry> | |
826 | <term><varname>Scope=</varname></term> | |
827 | <listitem> | |
828 | <para>The scope of the address, which can be <literal>global</literal>, | |
829 | <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255. | |
830 | Defaults to <literal>global</literal>.</para> | |
831 | </listitem> | |
832 | </varlistentry> | |
833 | <varlistentry> | |
834 | <term><varname>HomeAddress=</varname></term> | |
835 | <listitem> | |
836 | <para>Takes a boolean argument. Designates this address the "home address" as defined in | |
837 | <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>. | |
838 | Supported only on IPv6. Defaults to false.</para> | |
839 | </listitem> | |
840 | </varlistentry> | |
841 | <varlistentry> | |
842 | <term><varname>DuplicateAddressDetection=</varname></term> | |
843 | <listitem> | |
844 | <para>Takes a boolean argument. Do not perform Duplicate Address Detection | |
845 | <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink> when adding this address. | |
846 | Supported only on IPv6. Defaults to false.</para> | |
847 | </listitem> | |
848 | </varlistentry> | |
849 | <varlistentry> | |
850 | <term><varname>ManageTemporaryAddress=</varname></term> | |
851 | <listitem> | |
852 | <para>Takes a boolean argument. If true the kernel manage temporary addresses created | |
853 | from this one as template on behalf of Privacy Extensions | |
854 | <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become | |
855 | active, the use_tempaddr sysctl setting has to be set to a value greater than zero. | |
856 | The given address needs to have a prefix length of 64. This flag allows to use privacy | |
857 | extensions in a manually configured network, just like if stateless auto-configuration | |
858 | was active. Defaults to false. </para> | |
859 | </listitem> | |
860 | </varlistentry> | |
861 | <varlistentry> | |
862 | <term><varname>PrefixRoute=</varname></term> | |
863 | <listitem> | |
864 | <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace | |
865 | application needs a way to suppress adding a prefix route. This is for example relevant | |
866 | together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses, | |
867 | but depending on on-link, no route for the prefix should be added. Defaults to false.</para> | |
868 | </listitem> | |
869 | </varlistentry> | |
870 | <varlistentry> | |
871 | <term><varname>AutoJoin=</varname></term> | |
872 | <listitem> | |
873 | <para>Takes a boolean argument. Joining multicast group on ethernet level via | |
874 | <command>ip maddr</command> command would not work if we have an Ethernet switch that does | |
875 | IGMP snooping since the switch would not replicate multicast packets on ports that did not | |
876 | have IGMP reports for the multicast addresses. Linux vxlan interfaces created via | |
877 | <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option | |
878 | that enables then to do the required join. By extending ip address command with option | |
879 | <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan | |
880 | interfaces as well as other tunneling mechanisms that need to receive multicast traffic. | |
881 | Defaults to <literal>no</literal>.</para> | |
882 | </listitem> | |
883 | </varlistentry> | |
884 | </variablelist> | |
885 | </refsect1> | |
886 | ||
887 | <refsect1> | |
888 | <title>[IPv6AddressLabel] Section Options</title> | |
889 | ||
890 | <para>An <literal>[IPv6AddressLabel]</literal> section accepts the | |
891 | following keys. Specify several <literal>[IPv6AddressLabel]</literal> | |
892 | sections to configure several address labels. IPv6 address labels are | |
893 | used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. | |
894 | Precedence is managed by userspace, and only the label itself is stored in the kernel</para> | |
895 | ||
896 | <variablelist class='network-directives'> | |
897 | <varlistentry> | |
898 | <term><varname>Label=</varname></term> | |
899 | <listitem> | |
900 | <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294. | |
901 | 0xffffffff is reserved. This key is mandatory.</para> | |
902 | </listitem> | |
903 | </varlistentry> | |
904 | <varlistentry> | |
905 | <term><varname>Prefix=</varname></term> | |
906 | <listitem> | |
907 | <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character. | |
908 | This key is mandatory. </para> | |
909 | </listitem> | |
910 | </varlistentry> | |
911 | </variablelist> | |
912 | </refsect1> | |
913 | ||
914 | <refsect1> | |
915 | <title>[RoutingPolicyRule] Section Options</title> | |
916 | ||
917 | <para>An <literal>[RoutingPolicyRule]</literal> section accepts the | |
918 | following keys. Specify several <literal>[RoutingPolicyRule]</literal> | |
919 | sections to configure several rules.</para> | |
920 | ||
921 | <variablelist class='network-directives'> | |
922 | <varlistentry> | |
923 | <term><varname>TypeOfService=</varname></term> | |
924 | <listitem> | |
925 | <para>Specifies the type of service to match a number between 0 to 255.</para> | |
926 | </listitem> | |
927 | </varlistentry> | |
928 | <varlistentry> | |
929 | <term><varname>From=</varname></term> | |
930 | <listitem> | |
931 | <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
932 | </listitem> | |
933 | </varlistentry> | |
934 | <varlistentry> | |
935 | <term><varname>To=</varname></term> | |
936 | <listitem> | |
937 | <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
938 | </listitem> | |
939 | </varlistentry> | |
940 | <varlistentry> | |
941 | <term><varname>FirewallMark=</varname></term> | |
942 | <listitem> | |
943 | <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para> | |
944 | </listitem> | |
945 | </varlistentry> | |
946 | <varlistentry> | |
947 | <term><varname>Table=</varname></term> | |
948 | <listitem> | |
949 | <para>Specifies the routing table identifier to lookup if the rule | |
950 | selector matches. The table identifier for a route (a number between 1 and 4294967295).</para> | |
951 | </listitem> | |
952 | </varlistentry> | |
953 | <varlistentry> | |
954 | <term><varname>Priority=</varname></term> | |
955 | <listitem> | |
956 | <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned | |
957 | integer. Higher number means lower priority, and rules get processed in order of increasing number.</para> | |
958 | </listitem> | |
959 | </varlistentry> | |
960 | <varlistentry> | |
961 | <term><varname>IncomingInterface=</varname></term> | |
962 | <listitem> | |
963 | <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para> | |
964 | </listitem> | |
965 | </varlistentry> | |
966 | <varlistentry> | |
967 | <term><varname>OutgoingInterface=</varname></term> | |
968 | <listitem> | |
969 | <para>Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device.</para> | |
970 | </listitem> | |
971 | </varlistentry> | |
972 | </variablelist> | |
973 | </refsect1> | |
974 | ||
975 | <refsect1> | |
976 | <title>[Route] Section Options</title> | |
977 | <para>The <literal>[Route]</literal> section accepts the | |
978 | following keys. Specify several <literal>[Route]</literal> | |
979 | sections to configure several routes.</para> | |
980 | ||
981 | <variablelist class='network-directives'> | |
982 | <varlistentry> | |
983 | <term><varname>Gateway=</varname></term> | |
984 | <listitem> | |
985 | <para>As in the <literal>[Network]</literal> section.</para> | |
986 | </listitem> | |
987 | </varlistentry> | |
988 | <varlistentry> | |
989 | <term><varname>GatewayOnlink=</varname></term> | |
990 | <listitem> | |
991 | <para>The <literal>GatewayOnlink</literal> option tells the kernel that it does not have | |
992 | to check if the gateway is reachable directly by the current machine (i.e., the kernel does | |
993 | not need to check if the gateway is attached to the local network), so that we can insert the | |
994 | route in the kernel table without it being complained about. A boolean, defaults to <literal>no</literal>. | |
995 | </para> | |
996 | </listitem> | |
997 | </varlistentry> | |
998 | <varlistentry> | |
999 | <term><varname>Destination=</varname></term> | |
1000 | <listitem> | |
1001 | <para>The destination prefix of the route. Possibly | |
1002 | followed by a slash and the prefix length. If omitted, a | |
1003 | full-length host route is assumed.</para> | |
1004 | </listitem> | |
1005 | </varlistentry> | |
1006 | <varlistentry> | |
1007 | <term><varname>Source=</varname></term> | |
1008 | <listitem> | |
1009 | <para>The source prefix of the route. Possibly followed by | |
1010 | a slash and the prefix length. If omitted, a full-length | |
1011 | host route is assumed.</para> | |
1012 | </listitem> | |
1013 | </varlistentry> | |
1014 | <varlistentry> | |
1015 | <term><varname>Metric=</varname></term> | |
1016 | <listitem> | |
1017 | <para>The metric of the route (an unsigned integer).</para> | |
1018 | </listitem> | |
1019 | </varlistentry> | |
1020 | <varlistentry> | |
1021 | <term><varname>IPv6Preference=</varname></term> | |
1022 | <listitem> | |
1023 | <para>Specifies the route preference as defined in <ulink | |
1024 | url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages. | |
1025 | Which can be one of <literal>low</literal> the route has a lowest priority, | |
1026 | <literal>medium</literal> the route has a default priority or | |
1027 | <literal>high</literal> the route has a highest priority.</para> | |
1028 | </listitem> | |
1029 | </varlistentry> | |
1030 | <varlistentry> | |
1031 | <term><varname>Scope=</varname></term> | |
1032 | <listitem> | |
1033 | <para>The scope of the route, which can be <literal>global</literal>, | |
1034 | <literal>link</literal> or <literal>host</literal>. Defaults to | |
1035 | <literal>global</literal>.</para> | |
1036 | </listitem> | |
1037 | </varlistentry> | |
1038 | <varlistentry> | |
1039 | <term><varname>PreferredSource=</varname></term> | |
1040 | <listitem> | |
1041 | <para>The preferred source address of the route. The address | |
1042 | must be in the format described in | |
1043 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> | |
1044 | </listitem> | |
1045 | </varlistentry> | |
1046 | <varlistentry> | |
1047 | <term><varname>Table=<replaceable>num</replaceable></varname></term> | |
1048 | <listitem> | |
1049 | <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset). | |
1050 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. | |
1051 | </para> | |
1052 | </listitem> | |
1053 | </varlistentry> | |
1054 | <varlistentry> | |
1055 | <term><varname>Protocol=</varname></term> | |
1056 | <listitem> | |
1057 | <para>The Protocol identifier for the route. Takes a number between 0 and 255 or the special values | |
1058 | <literal>kernel</literal>, <literal>boot</literal> and <literal>static</literal>. Defaults to | |
1059 | <literal>static</literal>. | |
1060 | </para> | |
1061 | </listitem> | |
1062 | </varlistentry> | |
1063 | <varlistentry> | |
1064 | <term><varname>Type=</varname></term> | |
1065 | <listitem> | |
1066 | <para>The Type identifier for special route types, which can be | |
1067 | <literal>unicast</literal> route to a destination network address which describes the path to the destination, | |
1068 | <literal>blackhole</literal> packets are discarded silently, | |
1069 | <literal>unreachable</literal> packets are discarded and the ICMP message host unreachable is generated, | |
1070 | <literal>prohibit</literal> packets are discarded and the ICMP message communication administratively | |
1071 | prohibited is generated. Defaults to <literal>unicast</literal>. | |
1072 | </para> | |
1073 | </listitem> | |
1074 | </varlistentry> | |
1075 | <varlistentry> | |
1076 | <term><varname>InitialCongestionWindow=</varname></term> | |
1077 | <listitem> | |
1078 | <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP | |
1079 | session, when a client requests a resource, the server's initial congestion window determines how many data bytes | |
1080 | will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual | |
1081 | suffixes K, M, G are supported and are understood to the base of 1024. Defaults to unset. | |
1082 | </para> | |
1083 | </listitem> | |
1084 | </varlistentry> | |
1085 | <varlistentry> | |
1086 | <term><varname>InitialAdvertisedReceiveWindow=</varname></term> | |
1087 | <listitem> | |
1088 | <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initally be buffered at one time | |
1089 | on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update | |
1090 | from the receiving host. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual suffixes K, M, G are supported | |
1091 | and are understood to the base of 1024. Defaults to unset. | |
1092 | </para> | |
1093 | </listitem> | |
1094 | </varlistentry> | |
1095 | <varlistentry> | |
1096 | <term><varname>QuickAck=</varname></term> | |
1097 | <listitem> | |
1098 | <para>Takes a boolean argument. When true enables TCP quick ack mode for the route. Defaults to unset. | |
1099 | </para> | |
1100 | </listitem> | |
1101 | </varlistentry> | |
1102 | <varlistentry> | |
1103 | <term><varname>MTUBytes=</varname></term> | |
1104 | <listitem> | |
1105 | <para>The maximum transmission unit in bytes to set for the | |
1106 | route. The usual suffixes K, M, G, are supported and are | |
1107 | understood to the base of 1024.</para> | |
1108 | <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen | |
1109 | below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para> | |
1110 | </listitem> | |
1111 | </varlistentry> | |
1112 | </variablelist> | |
1113 | </refsect1> | |
1114 | ||
1115 | <refsect1> | |
1116 | <title>[DHCP] Section Options</title> | |
1117 | <para>The <literal>[DHCP]</literal> section configures the | |
1118 | DHCPv4 and DHCP6 client, if it is enabled with the | |
1119 | <varname>DHCP=</varname> setting described above:</para> | |
1120 | ||
1121 | <variablelist class='network-directives'> | |
1122 | <varlistentry> | |
1123 | <term><varname>UseDNS=</varname></term> | |
1124 | <listitem> | |
1125 | <para>When true (the default), the DNS servers received | |
1126 | from the DHCP server will be used and take precedence over | |
1127 | any statically configured ones.</para> | |
1128 | ||
1129 | <para>This corresponds to the <option>nameserver</option> | |
1130 | option in <citerefentry | |
1131 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1132 | </listitem> | |
1133 | </varlistentry> | |
1134 | <varlistentry> | |
1135 | <term><varname>UseNTP=</varname></term> | |
1136 | <listitem> | |
1137 | <para>When true (the default), the NTP servers received | |
1138 | from the DHCP server will be used by systemd-timesyncd | |
1139 | and take precedence over any statically configured ones.</para> | |
1140 | </listitem> | |
1141 | </varlistentry> | |
1142 | <varlistentry> | |
1143 | <term><varname>UseMTU=</varname></term> | |
1144 | <listitem> | |
1145 | <para>When true, the interface maximum transmission unit | |
1146 | from the DHCP server will be used on the current link. | |
1147 | Defaults to false.</para> | |
1148 | </listitem> | |
1149 | </varlistentry> | |
1150 | <varlistentry> | |
1151 | <term><varname>Anonymize=</varname></term> | |
1152 | <listitem> | |
1153 | <para>Takes a boolean argument. When true, the options sent to the DHCP server will | |
1154 | follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink> | |
1155 | (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information. | |
1156 | Defaults to false.</para> | |
1157 | ||
1158 | <para>This option should only be set to true when | |
1159 | <varname>MACAddressPolicy=</varname> is set to <literal>random</literal> | |
1160 | (see <citerefentry | |
1161 | project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para> | |
1162 | ||
1163 | <para>Note that this configuration will overwrite others. | |
1164 | In concrete, the following variables will be ignored: | |
1165 | <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>, | |
1166 | <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>, | |
1167 | <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>, | |
1168 | <varname>UseTimezone=</varname>.</para> | |
1169 | </listitem> | |
1170 | </varlistentry> | |
1171 | <varlistentry> | |
1172 | <term><varname>SendHostname=</varname></term> | |
1173 | <listitem> | |
1174 | <para>When true (the default), the machine's hostname will | |
1175 | be sent to the DHCP server.</para> | |
1176 | </listitem> | |
1177 | </varlistentry> | |
1178 | <varlistentry> | |
1179 | <term><varname>UseHostname=</varname></term> | |
1180 | <listitem> | |
1181 | <para>When true (the default), the hostname received from | |
1182 | the DHCP server will be set as the transient hostname of the system | |
1183 | </para> | |
1184 | </listitem> | |
1185 | </varlistentry> | |
1186 | <varlistentry> | |
1187 | <term><varname>Hostname=</varname></term> | |
1188 | <listitem> | |
1189 | <para>Use this value for the hostname which is sent to the | |
1190 | DHCP server, instead of machine's hostname.</para> | |
1191 | </listitem> | |
1192 | </varlistentry> | |
1193 | <varlistentry> | |
1194 | <term><varname>UseDomains=</varname></term> | |
1195 | <listitem> | |
1196 | <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name | |
1197 | received from the DHCP server will be used as DNS search domain over this link, similar to the effect of | |
1198 | the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from | |
1199 | the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of | |
1200 | the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to | |
1201 | false.</para> | |
1202 | ||
1203 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1204 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain | |
1205 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of | |
1206 | single-label names.</para> | |
1207 | ||
1208 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1209 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1210 | </listitem> | |
1211 | </varlistentry> | |
1212 | <varlistentry> | |
1213 | <term><varname>UseRoutes=</varname></term> | |
1214 | <listitem> | |
1215 | <para>When true (the default), the static routes will be requested from the DHCP server and added to the | |
1216 | routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's | |
1217 | destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the | |
1218 | link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a | |
1219 | "link" scope will be used. For anything else, scope defaults to "global".</para> | |
1220 | </listitem> | |
1221 | </varlistentry> | |
1222 | ||
1223 | <varlistentry> | |
1224 | <term><varname>UseTimezone=</varname></term> | |
1225 | ||
1226 | <listitem><para>When true, the timezone received from the | |
1227 | DHCP server will be set as timezone of the local | |
1228 | system. Defaults to <literal>no</literal>.</para></listitem> | |
1229 | </varlistentry> | |
1230 | ||
1231 | <varlistentry> | |
1232 | <term><varname>CriticalConnection=</varname></term> | |
1233 | <listitem> | |
1234 | <para>When true, the connection will never be torn down | |
1235 | even if the DHCP lease expires. This is contrary to the | |
1236 | DHCP specification, but may be the best choice if, say, | |
1237 | the root filesystem relies on this connection. Defaults to | |
1238 | false.</para> | |
1239 | </listitem> | |
1240 | </varlistentry> | |
1241 | ||
1242 | <varlistentry> | |
1243 | <term><varname>ClientIdentifier=</varname></term> | |
1244 | <listitem> | |
1245 | <para>The DHCPv4 client identifier to use. Takes one of <literal>mac</literal>, <literal>duid</literal> or <literal>duid-only</literal>. | |
1246 | If set to <literal>mac</literal>, the MAC address of the link is used. | |
1247 | If set to <literal>duid</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used. | |
1248 | If set to <literal>duid-only</literal>, only DUID is used, this may not be RFC compliant, but some setups may require to use this. | |
1249 | Defaults to <literal>duid</literal>.</para> | |
1250 | </listitem> | |
1251 | </varlistentry> | |
1252 | ||
1253 | <varlistentry> | |
1254 | <term><varname>VendorClassIdentifier=</varname></term> | |
1255 | <listitem> | |
1256 | <para>The vendor class identifier used to identify vendor | |
1257 | type and configuration.</para> | |
1258 | </listitem> | |
1259 | </varlistentry> | |
1260 | ||
1261 | <varlistentry> | |
1262 | <term><varname>UserClass=</varname></term> | |
1263 | <listitem> | |
1264 | <para>A DHCPv4 client can use UserClass option to identify the type or category of user or applications | |
1265 | it represents. The information contained in this option is a string that represents the user class of which | |
1266 | the client is a member. Each class sets an identifying string of information to be used by the DHCP | |
1267 | service to classify clients. Takes a whitespace-separated list of strings.</para> | |
1268 | </listitem> | |
1269 | </varlistentry> | |
1270 | ||
1271 | <varlistentry> | |
1272 | <term><varname>DUIDType=</varname></term> | |
1273 | <listitem> | |
1274 | <para>Override the global <varname>DUIDType</varname> setting for this network. See | |
1275 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1276 | for a description of possible values.</para> | |
1277 | </listitem> | |
1278 | </varlistentry> | |
1279 | ||
1280 | <varlistentry> | |
1281 | <term><varname>DUIDRawData=</varname></term> | |
1282 | <listitem> | |
1283 | <para>Override the global <varname>DUIDRawData</varname> setting for this network. See | |
1284 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1285 | for a description of possible values.</para> | |
1286 | </listitem> | |
1287 | </varlistentry> | |
1288 | ||
1289 | <varlistentry> | |
1290 | <term><varname>IAID=</varname></term> | |
1291 | <listitem> | |
1292 | <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para> | |
1293 | </listitem> | |
1294 | </varlistentry> | |
1295 | ||
1296 | <varlistentry> | |
1297 | <term><varname>RequestBroadcast=</varname></term> | |
1298 | <listitem> | |
1299 | <para>Request the server to use broadcast messages before | |
1300 | the IP address has been configured. This is necessary for | |
1301 | devices that cannot receive RAW packets, or that cannot | |
1302 | receive packets at all before an IP address has been | |
1303 | configured. On the other hand, this must not be enabled on | |
1304 | networks where broadcasts are filtered out.</para> | |
1305 | </listitem> | |
1306 | </varlistentry> | |
1307 | ||
1308 | <varlistentry> | |
1309 | <term><varname>RouteMetric=</varname></term> | |
1310 | <listitem> | |
1311 | <para>Set the routing metric for routes specified by the | |
1312 | DHCP server.</para> | |
1313 | </listitem> | |
1314 | </varlistentry> | |
1315 | ||
1316 | <varlistentry> | |
1317 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1318 | <listitem> | |
1319 | <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset). | |
1320 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. | |
1321 | </para> | |
1322 | <para>When used in combination with <varname>VRF=</varname> the | |
1323 | VRF's routing table is used unless this parameter is specified. | |
1324 | </para> | |
1325 | </listitem> | |
1326 | </varlistentry> | |
1327 | ||
1328 | <varlistentry> | |
1329 | <term><varname>ListenPort=</varname></term> | |
1330 | <listitem> | |
1331 | <para>Allow setting custom port for the DHCP client to listen on.</para> | |
1332 | </listitem> | |
1333 | </varlistentry> | |
1334 | ||
1335 | <varlistentry> | |
1336 | <term><varname>RapidCommit=</varname></term> | |
1337 | <listitem> | |
1338 | <para>A boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through | |
1339 | a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both | |
1340 | the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default | |
1341 | four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides | |
1342 | faster client configuration and is beneficial in environments in which networks are under a heavy load. | |
1343 | See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details. | |
1344 | Defaults to true.</para> | |
1345 | </listitem> | |
1346 | </varlistentry> | |
1347 | ||
1348 | </variablelist> | |
1349 | </refsect1> | |
1350 | ||
1351 | <refsect1> | |
1352 | <title>[IPv6AcceptRA] Section Options</title> | |
1353 | <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement | |
1354 | (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described | |
1355 | above:</para> | |
1356 | ||
1357 | <variablelist class='network-directives'> | |
1358 | <varlistentry> | |
1359 | <term><varname>UseDNS=</varname></term> | |
1360 | <listitem> | |
1361 | <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take | |
1362 | precedence over any statically configured ones.</para> | |
1363 | ||
1364 | <para>This corresponds to the <option>nameserver</option> option in <citerefentry | |
1365 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1366 | </listitem> | |
1367 | </varlistentry> | |
1368 | ||
1369 | <varlistentry> | |
1370 | <term><varname>UseDomains=</varname></term> | |
1371 | <listitem> | |
1372 | <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name | |
1373 | received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to | |
1374 | the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name | |
1375 | received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the | |
1376 | effect of the <option>Domains=</option> setting when the argument is prefixed with | |
1377 | <literal>~</literal>. Defaults to false.</para> | |
1378 | ||
1379 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1380 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain | |
1381 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of | |
1382 | single-label names.</para> | |
1383 | ||
1384 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1385 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1386 | </listitem> | |
1387 | </varlistentry> | |
1388 | ||
1389 | <varlistentry> | |
1390 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1391 | <listitem> | |
1392 | <para>The table identifier for the routes received in the Router Advertisement | |
1393 | (a number between 1 and 4294967295, or 0 to unset). | |
1394 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. | |
1395 | </para> | |
1396 | </listitem> | |
1397 | </varlistentry> | |
1398 | </variablelist> | |
1399 | </refsect1> | |
1400 | ||
1401 | <refsect1> | |
1402 | <title>[DHCPServer] Section Options</title> | |
1403 | <para>The <literal>[DHCPServer]</literal> section contains | |
1404 | settings for the DHCP server, if enabled via the | |
1405 | <varname>DHCPServer=</varname> option described above:</para> | |
1406 | ||
1407 | <variablelist class='network-directives'> | |
1408 | ||
1409 | <varlistentry> | |
1410 | <term><varname>PoolOffset=</varname></term> | |
1411 | <term><varname>PoolSize=</varname></term> | |
1412 | ||
1413 | <listitem><para>Configures the pool of addresses to hand out. The pool | |
1414 | is a contiguous sequence of IP addresses in the subnet configured for | |
1415 | the server address, which does not include the subnet nor the broadcast | |
1416 | address. <varname>PoolOffset=</varname> takes the offset of the pool | |
1417 | from the start of subnet, or zero to use the default value. | |
1418 | <varname>PoolSize=</varname> takes the number of IP addresses in the | |
1419 | pool or zero to use the default value. By default, the pool starts at | |
1420 | the first address after the subnet address and takes up the rest of | |
1421 | the subnet, excluding the broadcast address. If the pool includes | |
1422 | the server address (the default), this is reserved and not handed | |
1423 | out to clients.</para></listitem> | |
1424 | </varlistentry> | |
1425 | ||
1426 | <varlistentry> | |
1427 | <term><varname>DefaultLeaseTimeSec=</varname></term> | |
1428 | <term><varname>MaxLeaseTimeSec=</varname></term> | |
1429 | ||
1430 | <listitem><para>Control the default and maximum DHCP lease | |
1431 | time to pass to clients. These settings take time values in seconds or | |
1432 | another common time unit, depending on the suffix. The default | |
1433 | lease time is used for clients that did not ask for a specific | |
1434 | lease time. If a client asks for a lease time longer than the | |
1435 | maximum lease time, it is automatically shortened to the | |
1436 | specified time. The default lease time defaults to 1h, the | |
1437 | maximum lease time to 12h. Shorter lease times are beneficial | |
1438 | if the configuration data in DHCP leases changes frequently | |
1439 | and clients shall learn the new settings with shorter | |
1440 | latencies. Longer lease times reduce the generated DHCP | |
1441 | network traffic.</para></listitem> | |
1442 | </varlistentry> | |
1443 | ||
1444 | <varlistentry> | |
1445 | <term><varname>EmitDNS=</varname></term> | |
1446 | <term><varname>DNS=</varname></term> | |
1447 | ||
1448 | <listitem><para>Configures whether the DHCP leases handed out | |
1449 | to clients shall contain DNS server information. The | |
1450 | <varname>EmitDNS=</varname> setting takes a boolean argument | |
1451 | and defaults to <literal>yes</literal>. The DNS servers to | |
1452 | pass to clients may be configured with the | |
1453 | <varname>DNS=</varname> option, which takes a list of IPv4 | |
1454 | addresses. If the <varname>EmitDNS=</varname> option is | |
1455 | enabled but no servers configured, the servers are | |
1456 | automatically propagated from an "uplink" interface that has | |
1457 | appropriate servers set. The "uplink" interface is determined | |
1458 | by the default route of the system with the highest | |
1459 | priority. Note that this information is acquired at the time | |
1460 | the lease is handed out, and does not take uplink interfaces | |
1461 | into account that acquire DNS or NTP server information at a | |
1462 | later point. DNS server propagation does not take | |
1463 | <filename>/etc/resolv.conf</filename> into account. Also, note | |
1464 | that the leases are not refreshed if the uplink network | |
1465 | configuration changes. To ensure clients regularly acquire the | |
1466 | most current uplink DNS server information, it is thus | |
1467 | advisable to shorten the DHCP lease time via | |
1468 | <varname>MaxLeaseTimeSec=</varname> described | |
1469 | above.</para></listitem> | |
1470 | </varlistentry> | |
1471 | ||
1472 | <varlistentry> | |
1473 | <term><varname>EmitNTP=</varname></term> | |
1474 | <term><varname>NTP=</varname></term> | |
1475 | ||
1476 | <listitem><para>Similar to the <varname>EmitDNS=</varname> and | |
1477 | <varname>DNS=</varname> settings described above, these | |
1478 | settings configure whether and what NTP server information | |
1479 | shall be emitted as part of the DHCP lease. The same syntax, | |
1480 | propagation semantics and defaults apply as for | |
1481 | <varname>EmitDNS=</varname> and | |
1482 | <varname>DNS=</varname>.</para></listitem> | |
1483 | </varlistentry> | |
1484 | ||
1485 | <varlistentry> | |
1486 | <term><varname>EmitRouter=</varname></term> | |
1487 | ||
1488 | <listitem><para>Similar to the <varname>EmitDNS=</varname> | |
1489 | setting described above, this setting configures whether the | |
1490 | DHCP lease should contain the router option. The same syntax, | |
1491 | propagation semantics and defaults apply as for | |
1492 | <varname>EmitDNS=</varname>.</para></listitem> | |
1493 | </varlistentry> | |
1494 | ||
1495 | <varlistentry> | |
1496 | <term><varname>EmitTimezone=</varname></term> | |
1497 | <term><varname>Timezone=</varname></term> | |
1498 | ||
1499 | <listitem><para>Configures whether the DHCP leases handed out | |
1500 | to clients shall contain timezone information. The | |
1501 | <varname>EmitTimezone=</varname> setting takes a boolean | |
1502 | argument and defaults to <literal>yes</literal>. The | |
1503 | <varname>Timezone=</varname> setting takes a timezone string | |
1504 | (such as <literal>Europe/Berlin</literal> or | |
1505 | <literal>UTC</literal>) to pass to clients. If no explicit | |
1506 | timezone is set, the system timezone of the local host is | |
1507 | propagated, as determined by the | |
1508 | <filename>/etc/localtime</filename> symlink.</para></listitem> | |
1509 | </varlistentry> | |
1510 | ||
1511 | </variablelist> | |
1512 | </refsect1> | |
1513 | ||
1514 | <refsect1> | |
1515 | <title>[IPv6PrefixDelegation] Section Options</title> | |
1516 | <para>The <literal>[IPv6PrefixDelegation]</literal> section contains | |
1517 | settings for sending IPv6 Router Advertisements and whether to act as | |
1518 | a router, if enabled via the <varname>IPv6PrefixDelegation=</varname> | |
1519 | option described above. IPv6 network prefixes are defined with one or | |
1520 | more <literal>[IPv6Prefix]</literal> sections.</para> | |
1521 | ||
1522 | <variablelist class='network-directives'> | |
1523 | ||
1524 | <varlistentry> | |
1525 | <term><varname>Managed=</varname></term> | |
1526 | <term><varname>OtherInformation=</varname></term> | |
1527 | ||
1528 | <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6 | |
1529 | addresses on the network link when <varname>Managed=</varname> boolean | |
1530 | is set to <literal>true</literal> or if only additional network | |
1531 | information can be obtained via DHCPv6 for the network link when | |
1532 | <varname>OtherInformation=</varname> boolean is set to | |
1533 | <literal>true</literal>. Both settings default to | |
1534 | <literal>false</literal>, which means that a DHCPv6 server is not being | |
1535 | used.</para></listitem> | |
1536 | </varlistentry> | |
1537 | ||
1538 | <varlistentry> | |
1539 | <term><varname>RouterLifetimeSec=</varname></term> | |
1540 | ||
1541 | <listitem><para>Configures the IPv6 router lifetime in seconds. If set, | |
1542 | this host also announces itself in Router Advertisements as an IPv6 | |
1543 | router for the network link. Defaults to unset, which means the host is | |
1544 | not acting as a router.</para> | |
1545 | </listitem> | |
1546 | </varlistentry> | |
1547 | ||
1548 | <varlistentry> | |
1549 | <term><varname>RouterPreference=</varname></term> | |
1550 | ||
1551 | <listitem><para>Configures IPv6 router preference if | |
1552 | <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are | |
1553 | <literal>high</literal>, <literal>medium</literal> and | |
1554 | <literal>low</literal>, with <literal>normal</literal> and | |
1555 | <literal>default</literal> added as synonyms for | |
1556 | <literal>medium</literal> just to make configuration easier. See | |
1557 | <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink> | |
1558 | for details. Defaults to <literal>medium</literal>.</para></listitem> | |
1559 | </varlistentry> | |
1560 | ||
1561 | <varlistentry> | |
1562 | <term><varname>EmitDNS=</varname></term> | |
1563 | <term><varname>DNS=</varname></term> | |
1564 | ||
1565 | <listitem><para><varname>DNS=</varname> specifies a list of recursive | |
1566 | DNS server IPv6 addresses that distributed via Router Advertisement | |
1567 | messages when <varname>EmitDNS=</varname> is true. If <varname>DNS= | |
1568 | </varname> is empty, DNS servers are read from the | |
1569 | <literal>[Network]</literal> section. If the | |
1570 | <literal>[Network]</literal> section does not contain any DNS servers | |
1571 | either, DNS servers from the uplink with the highest priority default | |
1572 | route are used. When <varname>EmitDNS=</varname> is false, no DNS server | |
1573 | information is sent in Router Advertisement messages. | |
1574 | <varname>EmitDNS=</varname> defaults to true. | |
1575 | </para></listitem> | |
1576 | </varlistentry> | |
1577 | ||
1578 | <varlistentry> | |
1579 | <term><varname>EmitDomains=</varname></term> | |
1580 | <term><varname>Domains=</varname></term> | |
1581 | ||
1582 | <listitem><para>A list of DNS search domains distributed via Router | |
1583 | Advertisement messages when <varname>EmitDomains=</varname> is true. If | |
1584 | <varname>Domains=</varname> is empty, DNS search domains are read from the | |
1585 | <literal>[Network]</literal> section. If the <literal>[Network]</literal> | |
1586 | section does not contain any DNS search domains either, DNS search | |
1587 | domains from the uplink with the highest priority default route are | |
1588 | used. When <varname>EmitDomains=</varname> is false, no DNS search domain | |
1589 | information is sent in Router Advertisement messages. | |
1590 | <varname>EmitDomains=</varname> defaults to true. | |
1591 | </para></listitem> | |
1592 | </varlistentry> | |
1593 | ||
1594 | <varlistentry> | |
1595 | <term><varname>DNSLifetimeSec=</varname></term> | |
1596 | ||
1597 | <listitem><para>Lifetime in seconds for the DNS server addresses listed | |
1598 | in <varname>DNS=</varname> and search domains listed in | |
1599 | <varname>Domains=</varname>.</para></listitem> | |
1600 | </varlistentry> | |
1601 | ||
1602 | </variablelist> | |
1603 | </refsect1> | |
1604 | ||
1605 | <refsect1> | |
1606 | <title>[IPv6Prefix] Section Options</title> | |
1607 | <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6 | |
1608 | prefixes that are announced via Router Advertisements. See | |
1609 | <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink> | |
1610 | for further details.</para> | |
1611 | ||
1612 | <variablelist class='network-directives'> | |
1613 | ||
1614 | <varlistentry> | |
1615 | <term><varname>AddressAutoconfiguration=</varname></term> | |
1616 | <term><varname>OnLink=</varname></term> | |
1617 | ||
1618 | <listitem><para>Boolean values to specify whether IPv6 addresses can be | |
1619 | autoconfigured with this prefix and whether the prefix can be used for | |
1620 | onlink determination. Both settings default to <literal>true</literal> | |
1621 | in order to ease configuration. | |
1622 | </para></listitem> | |
1623 | </varlistentry> | |
1624 | ||
1625 | <varlistentry> | |
1626 | <term><varname>Prefix=</varname></term> | |
1627 | ||
1628 | <listitem><para>The IPv6 prefix that is to be distributed to hosts. | |
1629 | Similarly to configuring static IPv6 addresses, the setting is | |
1630 | configured as an IPv6 prefix and its prefix length, separated by a | |
1631 | <literal>/</literal> character. Use multiple | |
1632 | <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6 | |
1633 | prefixes since prefix lifetimes, address autoconfiguration and onlink | |
1634 | status may differ from one prefix to another.</para></listitem> | |
1635 | </varlistentry> | |
1636 | ||
1637 | <varlistentry> | |
1638 | <term><varname>PreferredLifetimeSec=</varname></term> | |
1639 | <term><varname>ValidLifetimeSec=</varname></term> | |
1640 | ||
1641 | <listitem><para>Preferred and valid lifetimes for the prefix measured in | |
1642 | seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800 | |
1643 | seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults | |
1644 | to 2592000 seconds (30 days).</para></listitem> | |
1645 | </varlistentry> | |
1646 | ||
1647 | </variablelist> | |
1648 | </refsect1> | |
1649 | ||
1650 | <refsect1> | |
1651 | <title>[Bridge] Section Options</title> | |
1652 | <para>The <literal>[Bridge]</literal> section accepts the | |
1653 | following keys.</para> | |
1654 | <variablelist class='network-directives'> | |
1655 | <varlistentry> | |
1656 | <term><varname>UnicastFlood=</varname></term> | |
1657 | <listitem> | |
1658 | <para>A boolean. Controls whether the bridge should flood | |
1659 | traffic for which an FDB entry is missing and the destination | |
1660 | is unknown through this port. Defaults to unset. | |
1661 | </para> | |
1662 | </listitem> | |
1663 | </varlistentry> | |
1664 | <varlistentry> | |
1665 | <term><varname>HairPin=</varname></term> | |
1666 | <listitem> | |
1667 | <para>A boolean. Configures whether traffic may be sent back | |
1668 | out of the port on which it was received. Defaults to unset. When this | |
1669 | flag is false, and the bridge will not forward traffic back | |
1670 | out of the receiving port.</para> | |
1671 | </listitem> | |
1672 | </varlistentry> | |
1673 | <varlistentry> | |
1674 | <term><varname>UseBPDU=</varname></term> | |
1675 | <listitem> | |
1676 | <para>A boolean. Configures whether STP Bridge Protocol Data Units will be | |
1677 | processed by the bridge port. Defaults to unset.</para> | |
1678 | </listitem> | |
1679 | </varlistentry> | |
1680 | <varlistentry> | |
1681 | <term><varname>FastLeave=</varname></term> | |
1682 | <listitem> | |
1683 | <para>A boolean. This flag allows the bridge to immediately stop multicast | |
1684 | traffic on a port that receives an IGMP Leave message. It is only used with | |
1685 | IGMP snooping if enabled on the bridge. Defaults to unset.</para> | |
1686 | </listitem> | |
1687 | </varlistentry> | |
1688 | <varlistentry> | |
1689 | <term><varname>AllowPortToBeRoot=</varname></term> | |
1690 | <listitem> | |
1691 | <para>A boolean. Configures whether a given port is allowed to | |
1692 | become a root port. Only used when STP is enabled on the bridge. | |
1693 | Defaults to unset.</para> | |
1694 | </listitem> | |
1695 | </varlistentry> | |
1696 | <varlistentry> | |
1697 | <term><varname>Cost=</varname></term> | |
1698 | <listitem> | |
1699 | <para>Sets the "cost" of sending packets of this interface. | |
1700 | Each port in a bridge may have a different speed and the cost | |
1701 | is used to decide which link to use. Faster interfaces | |
1702 | should have lower costs. It is an integer value between 1 and | |
1703 | 65535.</para> | |
1704 | </listitem> | |
1705 | </varlistentry> | |
1706 | <varlistentry> | |
1707 | <term><varname>Priority=</varname></term> | |
1708 | <listitem> | |
1709 | <para>Sets the "priority" of sending packets on this interface. | |
1710 | Each port in a bridge may have a different priority which is used | |
1711 | to decide which link to use. Lower value means higher priority. | |
1712 | It is an integer value between 0 to 63. Networkd does not set any | |
1713 | default, meaning the kernel default value of 32 is used.</para> | |
1714 | </listitem> | |
1715 | </varlistentry> | |
1716 | </variablelist> | |
1717 | </refsect1> | |
1718 | <refsect1> | |
1719 | <title>[BridgeFDB] Section Options</title> | |
1720 | <para>The <literal>[BridgeFDB]</literal> section manages the | |
1721 | forwarding database table of a port and accepts the following | |
1722 | keys. Specify several <literal>[BridgeFDB]</literal> sections to | |
1723 | configure several static MAC table entries.</para> | |
1724 | ||
1725 | <variablelist class='network-directives'> | |
1726 | <varlistentry> | |
1727 | <term><varname>MACAddress=</varname></term> | |
1728 | <listitem> | |
1729 | <para>As in the <literal>[Network]</literal> section. This | |
1730 | key is mandatory.</para> | |
1731 | </listitem> | |
1732 | </varlistentry> | |
1733 | <varlistentry> | |
1734 | <term><varname>VLANId=</varname></term> | |
1735 | <listitem> | |
1736 | <para>The VLAN ID for the new static MAC table entry. If | |
1737 | omitted, no VLAN ID information is appended to the new static MAC | |
1738 | table entry.</para> | |
1739 | </listitem> | |
1740 | </varlistentry> | |
1741 | </variablelist> | |
1742 | </refsect1> | |
1743 | <refsect1> | |
1744 | <title>[BridgeVLAN] Section Options</title> | |
1745 | <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts | |
1746 | the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries. | |
1747 | The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in | |
1748 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1749 | ||
1750 | <variablelist class='network-directives'> | |
1751 | <varlistentry> | |
1752 | <term><varname>VLAN=</varname></term> | |
1753 | <listitem> | |
1754 | <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid | |
1755 | from 1 to 4094.</para> | |
1756 | </listitem> | |
1757 | </varlistentry> | |
1758 | <varlistentry> | |
1759 | <term><varname>EgressUntagged=</varname></term> | |
1760 | <listitem> | |
1761 | <para>The VLAN ID specified here will be used to untag frames on egress. Configuring | |
1762 | <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the | |
1763 | VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para> | |
1764 | </listitem> | |
1765 | </varlistentry> | |
1766 | <varlistentry> | |
1767 | <term><varname>PVID=</varname></term> | |
1768 | <listitem> | |
1769 | <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress. | |
1770 | <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of | |
1771 | <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para> | |
1772 | </listitem> | |
1773 | </varlistentry> | |
1774 | </variablelist> | |
1775 | </refsect1> | |
1776 | ||
1777 | <refsect1> | |
1778 | <title>Examples</title> | |
1779 | <example> | |
1780 | <title>Static network configuration</title> | |
1781 | ||
1782 | <programlisting># /etc/systemd/network/50-static.network | |
1783 | [Match] | |
1784 | Name=enp2s0 | |
1785 | ||
1786 | [Network] | |
1787 | Address=192.168.0.15/24 | |
1788 | Gateway=192.168.0.1</programlisting> | |
1789 | ||
1790 | <para>This brings interface <literal>enp2s0</literal> up with a static address. The | |
1791 | specified gateway will be used for a default route.</para> | |
1792 | </example> | |
1793 | ||
1794 | <example> | |
1795 | <title>DHCP on ethernet links</title> | |
1796 | ||
1797 | <programlisting># /etc/systemd/network/80-dhcp.network | |
1798 | [Match] | |
1799 | Name=en* | |
1800 | ||
1801 | [Network] | |
1802 | DHCP=yes</programlisting> | |
1803 | ||
1804 | <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with | |
1805 | <literal>en</literal> (i.e. ethernet interfaces).</para> | |
1806 | </example> | |
1807 | ||
1808 | <example> | |
1809 | <title>A bridge with two enslaved links</title> | |
1810 | ||
1811 | <programlisting># /etc/systemd/network/25-bridge-static.network | |
1812 | [Match] | |
1813 | Name=bridge0 | |
1814 | ||
1815 | [Network] | |
1816 | Address=192.168.0.15/24 | |
1817 | Gateway=192.168.0.1 | |
1818 | DNS=192.168.0.1</programlisting> | |
1819 | ||
1820 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network | |
1821 | [Match] | |
1822 | Name=enp2s0 | |
1823 | ||
1824 | [Network] | |
1825 | Bridge=bridge0</programlisting> | |
1826 | ||
1827 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network | |
1828 | [Match] | |
1829 | Name=wlp3s0 | |
1830 | ||
1831 | [Network] | |
1832 | Bridge=bridge0</programlisting> | |
1833 | ||
1834 | <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and | |
1835 | <literal>wlp3s0</literal> to it. The bridge will have the specified static address | |
1836 | and network assigned, and a default route via the specified gateway will be | |
1837 | added. The specified DNS server will be added to the global list of DNS resolvers. | |
1838 | </para> | |
1839 | </example> | |
1840 | ||
1841 | <example> | |
1842 | <title></title> | |
1843 | ||
1844 | <programlisting> | |
1845 | # /etc/systemd/network/20-bridge-slave-interface-vlan.network | |
1846 | [Match] | |
1847 | Name=enp2s0 | |
1848 | ||
1849 | [Network] | |
1850 | Bridge=bridge0 | |
1851 | ||
1852 | [BridgeVLAN] | |
1853 | VLAN=1-32 | |
1854 | PVID=42 | |
1855 | EgressUntagged=42 | |
1856 | ||
1857 | [BridgeVLAN] | |
1858 | VLAN=100-200 | |
1859 | ||
1860 | [BridgeVLAN] | |
1861 | EgressUntagged=300-400</programlisting> | |
1862 | ||
1863 | <para>This overrides the configuration specified in the previous example for the | |
1864 | interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs | |
1865 | 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be | |
1866 | untagged when they leave on this interface. Untagged packets which arrive on this | |
1867 | interface will be assigned VLAN ID 42.</para> | |
1868 | </example> | |
1869 | ||
1870 | <example> | |
1871 | <title>Various tunnels</title> | |
1872 | ||
1873 | <programlisting>/etc/systemd/network/25-tunnels.network | |
1874 | [Match] | |
1875 | Name=ens1 | |
1876 | ||
1877 | [Network] | |
1878 | Tunnel=ipip-tun | |
1879 | Tunnel=sit-tun | |
1880 | Tunnel=gre-tun | |
1881 | Tunnel=vti-tun | |
1882 | </programlisting> | |
1883 | ||
1884 | <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev | |
1885 | [NetDev] | |
1886 | Name=ipip-tun | |
1887 | Kind=ipip | |
1888 | </programlisting> | |
1889 | ||
1890 | <programlisting>/etc/systemd/network/25-tunnel-sit.netdev | |
1891 | [NetDev] | |
1892 | Name=sit-tun | |
1893 | Kind=sit | |
1894 | </programlisting> | |
1895 | ||
1896 | <programlisting>/etc/systemd/network/25-tunnel-gre.netdev | |
1897 | [NetDev] | |
1898 | Name=gre-tun | |
1899 | Kind=gre | |
1900 | </programlisting> | |
1901 | ||
1902 | <programlisting>/etc/systemd/network/25-tunnel-vti.netdev | |
1903 | [NetDev] | |
1904 | Name=vti-tun | |
1905 | Kind=vti | |
1906 | </programlisting> | |
1907 | ||
1908 | <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel, | |
1909 | a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para> | |
1910 | </example> | |
1911 | ||
1912 | <example> | |
1913 | <title>A bond device</title> | |
1914 | ||
1915 | <programlisting># /etc/systemd/network/30-bond1.network | |
1916 | [Match] | |
1917 | Name=bond1 | |
1918 | ||
1919 | [Network] | |
1920 | DHCP=ipv6 | |
1921 | </programlisting> | |
1922 | ||
1923 | <programlisting># /etc/systemd/network/30-bond1.netdev | |
1924 | [NetDev] | |
1925 | Name=bond1 | |
1926 | Kind=bond | |
1927 | </programlisting> | |
1928 | ||
1929 | <programlisting># /etc/systemd/network/30-bond1-dev1.network | |
1930 | [Match] | |
1931 | MACAddress=52:54:00:e9:64:41 | |
1932 | ||
1933 | [Network] | |
1934 | Bond=bond1 | |
1935 | </programlisting> | |
1936 | ||
1937 | <programlisting># /etc/systemd/network/30-bond1-dev2.network | |
1938 | [Match] | |
1939 | MACAddress=52:54:00:e9:64:42 | |
1940 | ||
1941 | [Network] | |
1942 | Bond=bond1 | |
1943 | </programlisting> | |
1944 | ||
1945 | <para>This will create a bond device <literal>bond1</literal> and enslave the two | |
1946 | devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP | |
1947 | will be used to acquire an address.</para> | |
1948 | </example> | |
1949 | ||
1950 | <example> | |
1951 | <title>Virtual Routing and Forwarding (VRF)</title> | |
1952 | <para>Add the <literal>bond1</literal> interface to the VRF master interface | |
1953 | <literal>vrf1</literal>. This will redirect routes generated on this interface to be | |
1954 | within the routing table defined during VRF creation. For kernels before 4.8 traffic | |
1955 | won't be redirected towards the VRFs routing table unless specific ip-rules are added. | |
1956 | </para> | |
1957 | <programlisting># /etc/systemd/network/25-vrf.network | |
1958 | [Match] | |
1959 | Name=bond1 | |
1960 | ||
1961 | [Network] | |
1962 | VRF=vrf1 | |
1963 | </programlisting> | |
1964 | </example> | |
1965 | ||
1966 | <example> | |
1967 | <title>MacVTap</title> | |
1968 | <para>This brings up a network interface <literal>macvtap-test</literal> | |
1969 | and attaches it to <literal>enp0s25</literal>.</para> | |
1970 | <programlisting># /usr/lib/systemd/network/25-macvtap.network | |
1971 | [Match] | |
1972 | Name=enp0s25 | |
1973 | ||
1974 | [Network] | |
1975 | MACVTAP=macvtap-test | |
1976 | </programlisting> | |
1977 | </example> | |
1978 | </refsect1> | |
1979 | ||
1980 | <refsect1> | |
1981 | <title>See Also</title> | |
1982 | <para> | |
1983 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
1984 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
1985 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
1986 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
1987 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
1988 | </para> | |
1989 | </refsect1> | |
1990 | ||
1991 | </refentry> |