]>
Commit | Line | Data |
---|---|---|
ad943783 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
eac684ef | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
eac684ef TG |
4 | |
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2013 Tom Gundersen | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | --> | |
23 | ||
24 | <refentry id="systemd.network" conditional='ENABLE_NETWORKD'> | |
25 | ||
798d3a52 ZJS |
26 | <refentryinfo> |
27 | <title>systemd.network</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Tom</firstname> | |
34 | <surname>Gundersen</surname> | |
35 | <email>teg@jklm.no</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd.network</refentrytitle> | |
42 | <manvolnum>5</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd.network</refname> | |
47 | <refpurpose>Network configuration</refpurpose> | |
48 | </refnamediv> | |
49 | ||
50 | <refsynopsisdiv> | |
51 | <para><filename><replaceable>network</replaceable>.network</filename></para> | |
52 | </refsynopsisdiv> | |
53 | ||
54 | <refsect1> | |
55 | <title>Description</title> | |
56 | ||
57 | <para>Network setup is performed by | |
58 | <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
59 | </para> | |
60 | ||
61 | <para>Network files must have the extension | |
62 | <filename>.network</filename>; other extensions are ignored. | |
63 | Networks are applied to links whenever the links appear.</para> | |
64 | ||
65 | <para>The <filename>.network</filename> files are read from the | |
66 | files located in the system network directory | |
12b42c76 | 67 | <filename>/usr/lib/systemd/network</filename>, the volatile |
798d3a52 ZJS |
68 | runtime network directory |
69 | <filename>/run/systemd/network</filename> and the local | |
70 | administration network directory | |
12b42c76 | 71 | <filename>/etc/systemd/network</filename>. All configuration files |
798d3a52 ZJS |
72 | are collectively sorted and processed in lexical order, regardless |
73 | of the directories in which they live. However, files with | |
74 | identical filenames replace each other. Files in | |
75 | <filename>/etc</filename> have the highest priority, files in | |
76 | <filename>/run</filename> take precedence over files with the same | |
12b42c76 | 77 | name in <filename>/usr/lib</filename>. This can be used to |
798d3a52 | 78 | override a system-supplied configuration file with a local file if |
57e27ec0 | 79 | needed. As a special case, an empty file (file size 0) or symlink |
b938cb90 | 80 | with the same name pointing to <filename>/dev/null</filename> |
a8eaaee7 | 81 | disables the configuration file entirely (it is "masked").</para> |
798d3a52 ZJS |
82 | </refsect1> |
83 | ||
84 | <refsect1> | |
85 | <title>[Match] Section Options</title> | |
86 | ||
87 | <para>The network file contains a <literal>[Match]</literal> | |
88 | section, which determines if a given network file may be applied | |
89 | to a given device; and a <literal>[Network]</literal> section | |
90 | specifying how the device should be configured. The first (in | |
91 | lexical order) of the network files that matches a given device | |
a22e1850 LP |
92 | is applied, all later files are ignored, even if they match as |
93 | well.</para> | |
798d3a52 ZJS |
94 | |
95 | <para>A network file is said to match a device if each of the | |
96 | entries in the <literal>[Match]</literal> section matches, or if | |
97 | the section is empty. The following keys are accepted:</para> | |
98 | ||
99 | <variablelist class='network-directives'> | |
100 | <varlistentry> | |
101 | <term><varname>MACAddress=</varname></term> | |
102 | <listitem> | |
103 | <para>The hardware address.</para> | |
104 | </listitem> | |
105 | </varlistentry> | |
106 | <varlistentry> | |
107 | <term><varname>Path=</varname></term> | |
108 | <listitem> | |
5256e00e TG |
109 | <para>A whitespace-separated list of shell-style globs |
110 | matching the persistent path, as exposed by the udev | |
111 | property <literal>ID_PATH</literal>.</para> | |
798d3a52 ZJS |
112 | </listitem> |
113 | </varlistentry> | |
114 | <varlistentry> | |
115 | <term><varname>Driver=</varname></term> | |
116 | <listitem> | |
5256e00e TG |
117 | <para>A whitespace-separated list of shell-style globs |
118 | matching the driver currently bound to the device, as | |
798d3a52 ZJS |
119 | exposed by the udev property <literal>DRIVER</literal> |
120 | of its parent device, or if that is not set the driver | |
121 | as exposed by <literal>ethtool -i</literal> of the | |
122 | device itself.</para> | |
123 | </listitem> | |
124 | </varlistentry> | |
125 | <varlistentry> | |
126 | <term><varname>Type=</varname></term> | |
127 | <listitem> | |
5256e00e TG |
128 | <para>A whitespace-separated list of shell-style globs |
129 | matching the device type, as exposed by the udev property | |
798d3a52 ZJS |
130 | <literal>DEVTYPE</literal>.</para> |
131 | </listitem> | |
132 | </varlistentry> | |
133 | <varlistentry> | |
134 | <term><varname>Name=</varname></term> | |
135 | <listitem> | |
5256e00e TG |
136 | <para>A whitespace-separated list of shell-style globs |
137 | matching the device name, as exposed by the udev property | |
138 | <literal>INTERFACE</literal>.</para> | |
798d3a52 ZJS |
139 | </listitem> |
140 | </varlistentry> | |
141 | <varlistentry> | |
142 | <term><varname>Host=</varname></term> | |
143 | <listitem> | |
144 | <para>Matches against the hostname or machine ID of the | |
145 | host. See <literal>ConditionHost=</literal> in | |
146 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
147 | for details. | |
148 | </para> | |
149 | </listitem> | |
150 | </varlistentry> | |
151 | <varlistentry> | |
152 | <term><varname>Virtualization=</varname></term> | |
153 | <listitem> | |
154 | <para>Checks whether the system is executed in a virtualized | |
155 | environment and optionally test whether it is a specific | |
156 | implementation. See <literal>ConditionVirtualization=</literal> in | |
157 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
158 | for details. | |
159 | </para> | |
160 | </listitem> | |
161 | </varlistentry> | |
162 | <varlistentry> | |
163 | <term><varname>KernelCommandLine=</varname></term> | |
164 | <listitem> | |
165 | <para>Checks whether a specific kernel command line option is | |
166 | set (or if prefixed with the exclamation mark unset). See | |
167 | <literal>ConditionKernelCommandLine=</literal> in | |
168 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
169 | for details. | |
170 | </para> | |
171 | </listitem> | |
172 | </varlistentry> | |
173 | <varlistentry> | |
174 | <term><varname>Architecture=</varname></term> | |
175 | <listitem> | |
176 | <para>Checks whether the system is running on a specific | |
177 | architecture. See <literal>ConditionArchitecture=</literal> in | |
178 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
179 | for details. | |
180 | </para> | |
181 | </listitem> | |
182 | </varlistentry> | |
183 | </variablelist> | |
184 | ||
185 | </refsect1> | |
186 | ||
187 | <refsect1> | |
188 | <title>[Link] Section Options</title> | |
189 | ||
190 | <para> The <literal>[Link]</literal> section accepts the following keys:</para> | |
191 | ||
192 | <variablelist class='network-directives'> | |
193 | <varlistentry> | |
194 | <term><varname>MACAddress=</varname></term> | |
195 | <listitem> | |
196 | <para>The hardware address.</para> | |
197 | </listitem> | |
198 | </varlistentry> | |
199 | <varlistentry> | |
200 | <term><varname>MTUBytes=</varname></term> | |
201 | <listitem> | |
202 | <para>The maximum transmission unit in bytes to set for the | |
203 | device. The usual suffixes K, M, G, are supported and are | |
204 | understood to the base of 1024.</para> | |
205 | </listitem> | |
206 | </varlistentry> | |
413708d1 VK |
207 | <varlistentry> |
208 | <term><varname>IAIDValue=</varname></term> | |
209 | <listitem> | |
210 | <para>Identity Association Identifier for the interface, a 32-bit unsigned integer.</para> | |
211 | </listitem> | |
212 | </varlistentry> | |
798d3a52 ZJS |
213 | </variablelist> |
214 | </refsect1> | |
215 | ||
216 | <refsect1> | |
217 | <title>[Network] Section Options</title> | |
218 | ||
219 | <para>The <literal>[Network]</literal> section accepts the following keys:</para> | |
220 | ||
221 | <variablelist class='network-directives'> | |
222 | <varlistentry> | |
223 | <term><varname>Description=</varname></term> | |
224 | <listitem> | |
225 | <para>A description of the device. This is only used for | |
226 | presentation purposes.</para> | |
227 | </listitem> | |
228 | </varlistentry> | |
229 | <varlistentry> | |
230 | <term><varname>DHCP=</varname></term> | |
231 | <listitem> | |
ad943783 | 232 | <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts |
798d3a52 ZJS |
233 | <literal>yes</literal>, <literal>no</literal>, |
234 | <literal>ipv4</literal>, or <literal>ipv6</literal>.</para> | |
e88d8021 | 235 | |
f5a8c43f | 236 | <para>Note that DHCPv6 will by default be triggered by Router |
7f3fdb7f | 237 | Advertisement, if that is enabled, regardless of this parameter. |
f5a8c43f TG |
238 | By enabling DHCPv6 support explicitly, the DHCPv6 client will |
239 | be started regardless of the presence of routers on the link, | |
240 | or what flags the routers pass. See | |
241 | <literal>IPv6AcceptRouterAdvertisements=</literal>.</para> | |
242 | ||
243 | <para>Furthermore, note that by default the domain name | |
e88d8021 ZJS |
244 | specified through DHCP is not used for name resolution. |
245 | See option <option>UseDomains=</option> below.</para> | |
798d3a52 ZJS |
246 | </listitem> |
247 | </varlistentry> | |
248 | <varlistentry> | |
249 | <term><varname>DHCPServer=</varname></term> | |
250 | <listitem> | |
ad943783 LP |
251 | <para>A boolean. Enables DHCPv4 server support. Defaults |
252 | to <literal>no</literal>. Further settings for the DHCP | |
253 | server may be set in the <literal>[DHCPServer]</literal> | |
254 | section described below.</para> | |
798d3a52 ZJS |
255 | </listitem> |
256 | </varlistentry> | |
257 | <varlistentry> | |
56fd6bf7 | 258 | <term><varname>LinkLocalAddressing=</varname></term> |
798d3a52 | 259 | <listitem> |
d0d6a4cd TG |
260 | <para>Enables link-local address autoconfiguration. Accepts |
261 | <literal>yes</literal>, <literal>no</literal>, | |
262 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to | |
263 | <literal>ipv6</literal>.</para> | |
798d3a52 ZJS |
264 | </listitem> |
265 | </varlistentry> | |
266 | <varlistentry> | |
267 | <term><varname>IPv4LLRoute=</varname></term> | |
268 | <listitem> | |
269 | <para>A boolean. When true, sets up the route needed for | |
270 | non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults | |
271 | to false. | |
272 | </para> | |
273 | </listitem> | |
274 | </varlistentry> | |
275 | <varlistentry> | |
113bfde1 TG |
276 | <term><varname>IPv6Token=</varname></term> |
277 | <listitem> | |
278 | <para>An IPv6 address with the top 64 bits unset. When set, indicates the | |
eb142d8e TG |
279 | 64-bit interface part of SLAAC IPv6 addresses for this link. Note that |
280 | the token is only ever used for SLAAC, and not for DHCPv6 addresses, even | |
3708bd46 | 281 | in the case DHCP is requested by router advertisement. By default, the |
eb142d8e | 282 | token is autogenerated.</para> |
113bfde1 TG |
283 | </listitem> |
284 | </varlistentry> | |
285 | <varlistentry> | |
798d3a52 ZJS |
286 | <term><varname>LLMNR=</varname></term> |
287 | <listitem> | |
aaa297d4 LP |
288 | <para>A boolean or <literal>resolve</literal>. When true, |
289 | enables <ulink | |
290 | url="https://tools.ietf.org/html/rfc4795">Link-Local | |
291 | Multicast Name Resolution</ulink> on the link. When set to | |
292 | <literal>resolve</literal>, only resolution is enabled, | |
293 | but not host registration and announcement. Defaults to | |
294 | true. This setting is read by | |
295 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
296 | </listitem> | |
297 | </varlistentry> | |
298 | <varlistentry> | |
299 | <term><varname>MulticastDNS=</varname></term> | |
300 | <listitem> | |
301 | <para>A boolean or <literal>resolve</literal>. When true, | |
302 | enables <ulink | |
303 | url="https://tools.ietf.org/html/rfc6762">Multicast | |
304 | DNS</ulink> support on the link. When set to | |
305 | <literal>resolve</literal>, only resolution is enabled, | |
306 | but not host or service registration and | |
307 | announcement. Defaults to false. This setting is read by | |
308 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
309 | </listitem> |
310 | </varlistentry> | |
ad6c0475 LP |
311 | <varlistentry> |
312 | <term><varname>DNSSEC=</varname></term> | |
313 | <listitem> | |
314 | <para>A boolean or | |
315 | <literal>allow-downgrade</literal>. When true, enables | |
316 | <ulink | |
317 | url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink> | |
318 | DNS validation support on the link. When set to | |
319 | <literal>allow-downgrade</literal>, compatibility with | |
320 | non-DNSSEC capable networks is increased, by automatically | |
321 | turning off DNSEC in this case. This option defines a | |
322 | per-interface setting for | |
323 | <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s | |
324 | global <varname>DNSSEC=</varname> option. Defaults to | |
325 | false. This setting is read by | |
326 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
327 | </listitem> | |
328 | </varlistentry> | |
8a516214 LP |
329 | <varlistentry> |
330 | <term><varname>DNSSECNegativeTrustAnchors=</varname></term> | |
331 | <listitem><para>A space-separated list of DNSSEC negative | |
332 | trust anchor domains. If specified and DNSSEC is enabled, | |
333 | look-ups done via the interface's DNS server will be subject | |
334 | to the list of negative trust anchors, and not require | |
335 | authentication for the specified domains, or anything below | |
336 | it. Use this to disable DNSSEC authentication for specific | |
337 | private domains, that cannot be proven valid using the | |
338 | Internet DNS hierarchy. Defaults to the empty list. This | |
339 | setting is read by | |
340 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
341 | </listitem> | |
342 | </varlistentry> | |
798d3a52 ZJS |
343 | <varlistentry> |
344 | <term><varname>LLDP=</varname></term> | |
345 | <listitem> | |
da6c766d LP |
346 | <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly |
347 | implemented on professional routers and bridges which announces which physical port a system is connected | |
348 | to, as well as other related data. Accepts a boolean or the special value | |
34437b4f LP |
349 | <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP |
350 | neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers | |
351 | is collected and LLDP data about other types of devices ignored (such as stations, telephones and | |
7cececb2 | 352 | others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use |
34437b4f | 353 | <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the |
da6c766d LP |
354 | collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below |
355 | for enabling LLDP packet emission from the local system. | |
798d3a52 ZJS |
356 | </para> |
357 | </listitem> | |
358 | </varlistentry> | |
da6c766d LP |
359 | <varlistentry> |
360 | <term><varname>EmitLLDP=</varname></term> | |
361 | <listitem> | |
362 | <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter and defaults to | |
363 | false. If enabled a short LLDP packet with information about the local system is sent out in regular | |
364 | intervals on the link. The LLDP packet will contain information about the local host name, the local | |
365 | machine ID (as stored in | |
366 | <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the | |
367 | local interface name, as well as the pretty hostname of the system (as set in | |
368 | <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP | |
369 | emission is only available on Ethernet links. Note that this setting passed data suitable for | |
370 | identification of host to the network and should thus not be used on untrusted networks, where such | |
371 | identification data should not be made available. Use this option to enable other systems to identify on | |
372 | which interface they are connected to this system. See <varname>LLDP=</varname> above for an option to | |
373 | enable LLDP reception.</para> | |
374 | </listitem> | |
375 | </varlistentry> | |
0d4ad91d AR |
376 | <varlistentry> |
377 | <term><varname>BindCarrier=</varname></term> | |
378 | <listitem> | |
2ae7505f TG |
379 | <para>A link name or a list of link names. When set, controls the behavior of the current |
380 | link. When all links in the list are in an operational down state, the current link is brought | |
381 | down. When at least one link has carrier, the current interface is brought up. | |
0d4ad91d AR |
382 | </para> |
383 | </listitem> | |
384 | </varlistentry> | |
798d3a52 ZJS |
385 | <varlistentry> |
386 | <term><varname>Address=</varname></term> | |
387 | <listitem> | |
388 | <para>A static IPv4 or IPv6 address and its prefix length, | |
389 | separated by a <literal>/</literal> character. Specify | |
390 | this key more than once to configure several addresses. | |
391 | The format of the address must be as described in | |
3ba3a79d | 392 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
393 | This is a short-hand for an [Address] section only |
394 | containing an Address key (see below). This option may be | |
395 | specified more than once. | |
396 | </para> | |
397 | ||
398 | <para>If the specified address is 0.0.0.0 (for IPv4) or | |
399 | [::] (for IPv6), a new address range of the requested size | |
400 | is automatically allocated from a system-wide pool of | |
401 | unused ranges. The allocated range is checked against all | |
402 | current network interfaces and all known network | |
403 | configuration files to avoid address range conflicts. The | |
404 | default system-wide pool consists of 192.168.0.0/16, | |
405 | 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for | |
406 | IPv6. This functionality is useful to manage a large | |
407 | number of dynamically created network interfaces with the | |
408 | same network configuration and automatic address range | |
409 | assignment.</para> | |
410 | ||
411 | </listitem> | |
412 | </varlistentry> | |
413 | <varlistentry> | |
414 | <term><varname>Gateway=</varname></term> | |
415 | <listitem> | |
416 | <para>The gateway address, which must be in the format | |
417 | described in | |
3ba3a79d | 418 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
419 | This is a short-hand for a [Route] section only containing |
420 | a Gateway key. This option may be specified more than | |
421 | once.</para> | |
422 | </listitem> | |
423 | </varlistentry> | |
424 | <varlistentry> | |
425 | <term><varname>DNS=</varname></term> | |
426 | <listitem> | |
427 | <para>A DNS server address, which must be in the format | |
428 | described in | |
3ba3a79d | 429 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
f41b446a | 430 | This option may be specified more than once. This setting is read by |
3df9bec5 | 431 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
432 | </listitem> |
433 | </varlistentry> | |
434 | <varlistentry> | |
435 | <term><varname>Domains=</varname></term> | |
436 | <listitem> | |
3df9bec5 LP |
437 | <para>The domains used for DNS host name resolution on this link. Takes a list of DNS domain names which |
438 | are used as search suffixes for extending single-label host names (host names containing no dots) to become | |
439 | fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface, each of | |
440 | the specified search domains are appended to it in turn, converting it into a fully qualified domain name, | |
441 | until one of them may be successfully resolved.</para> | |
442 | ||
443 | <para>The specified domains are also used for routing of DNS queries: look-ups for host names ending in the | |
444 | domains specified here are preferably routed to the DNS servers configured for this interface. If a domain | |
445 | name is prefixed with <literal>~</literal>, the domain name becomes a pure "routing" domain, is used for | |
446 | DNS query routing purposes only and is not used in the described domain search logic. By specifying a | |
07ff561c | 447 | routing domain of <literal>~.</literal> (the tilde indicating definition of a routing domain, the dot |
3df9bec5 LP |
448 | referring to the DNS root domain which is the implied suffix of all valid DNS names) it is possible to |
449 | route all DNS traffic preferably to the DNS server specified for this interface. The route domain logic is | |
450 | particularly useful on multi-homed hosts with DNS servers serving particular private DNS zones on each | |
451 | interface.</para> | |
452 | ||
453 | <para>This setting is read by | |
454 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
455 | </listitem> |
456 | </varlistentry> | |
457 | <varlistentry> | |
458 | <term><varname>NTP=</varname></term> | |
459 | <listitem> | |
f41b446a | 460 | <para>An NTP server address. This option may be specified more than once. This setting is read by |
3df9bec5 | 461 | <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
462 | </listitem> |
463 | </varlistentry> | |
464 | <varlistentry> | |
465 | <term><varname>IPForward=</varname></term> | |
765afd5c LP |
466 | <listitem><para>Configures IP packet forwarding for the |
467 | system. If enabled, incoming packets on any network | |
468 | interface will be forwarded to any other interfaces | |
469 | according to the routing table. Takes either a boolean | |
470 | argument, or the values <literal>ipv4</literal> or | |
471 | <literal>ipv6</literal>, which only enable IP packet | |
472 | forwarding for the specified address family. This controls | |
473 | the <filename>net.ipv4.ip_forward</filename> and | |
474 | <filename>net.ipv6.conf.all.forwarding</filename> sysctl | |
475 | options of the network interface (see <ulink | |
4046d836 LP |
476 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> |
477 | for details about sysctl options). Defaults to | |
478 | <literal>no</literal>.</para> | |
479 | ||
765afd5c LP |
480 | <para>Note: this setting controls a global kernel option, |
481 | and does so one way only: if a network that has this setting | |
482 | enabled is set up the global setting is turned on. However, | |
483 | it is never turned off again, even after all networks with | |
484 | this setting enabled are shut down again.</para> | |
485 | ||
486 | <para>To allow IP packet forwarding only between specific | |
487 | network interfaces use a firewall.</para> | |
4046d836 | 488 | </listitem> |
798d3a52 ZJS |
489 | </varlistentry> |
490 | <varlistentry> | |
491 | <term><varname>IPMasquerade=</varname></term> | |
492 | <listitem><para>Configures IP masquerading for the network | |
b938cb90 | 493 | interface. If enabled, packets forwarded from the network |
798d3a52 ZJS |
494 | interface will be appear as coming from the local host. |
495 | Takes a boolean argument. Implies | |
5c82dd13 | 496 | <varname>IPForward=ipv4</varname>. Defaults to |
4046d836 | 497 | <literal>no</literal>.</para></listitem> |
798d3a52 | 498 | </varlistentry> |
a46e37cb SS |
499 | <varlistentry> |
500 | <term><varname>IPv6PrivacyExtensions=</varname></term> | |
1f0d9695 LP |
501 | <listitem><para>Configures use of stateless temporary |
502 | addresses that change over time (see <ulink | |
503 | url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>, | |
504 | Privacy Extensions for Stateless Address Autoconfiguration | |
505 | in IPv6). Takes a boolean or the special values | |
506 | <literal>prefer-public</literal> and | |
b938cb90 | 507 | <literal>kernel</literal>. When true, enables the privacy |
1f0d9695 | 508 | extensions and prefers temporary addresses over public |
b938cb90 | 509 | addresses. When <literal>prefer-public</literal>, enables the |
1f0d9695 LP |
510 | privacy extensions, but prefers public addresses over |
511 | temporary addresses. When false, the privacy extensions | |
b938cb90 | 512 | remain disabled. When <literal>kernel</literal>, the kernel's |
1f0d9695 | 513 | default setting will be left in place. Defaults to |
a46e37cb SS |
514 | <literal>no</literal>.</para></listitem> |
515 | </varlistentry> | |
941d0aa8 SS |
516 | <varlistentry> |
517 | <term><varname>IPv6AcceptRouterAdvertisements=</varname></term> | |
a8eaaee7 | 518 | <listitem><para>Force the setting of the <filename>accept_ra</filename> |
ebf98081 ZJS |
519 | (router advertisements) setting for the interface. |
520 | When unset, the kernel default is used, and router | |
521 | advertisements are accepted only when local forwarding | |
522 | is disabled for that interface. | |
f5a8c43f TG |
523 | When router advertisements are accepted, they will |
524 | trigger the start of the DHCPv6 client if the relevant | |
525 | flags are passed, or if no routers are found on the link. | |
ebf98081 ZJS |
526 | Takes a boolean. If true, router advertisements are |
527 | accepted, when false, router advertisements are ignored, | |
528 | independently of the local forwarding state.</para> | |
529 | ||
530 | <para>See | |
531 | <ulink url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> | |
532 | in the kernel documentation, but note that systemd's | |
533 | setting of <constant>1</constant> corresponds to | |
534 | kernel's setting of <constant>2</constant>.</para> | |
535 | </listitem> | |
941d0aa8 | 536 | </varlistentry> |
44de7fb1 SS |
537 | <varlistentry> |
538 | <term><varname>IPv6DuplicateAddressDetection=</varname></term> | |
a8eaaee7 JE |
539 | <listitem><para>Configures the amount of IPv6 Duplicate |
540 | Address Detection (DAD) probes to send. Defaults to unset. | |
44de7fb1 SS |
541 | </para></listitem> |
542 | </varlistentry> | |
a86cba89 SS |
543 | <varlistentry> |
544 | <term><varname>IPv6HopLimit=</varname></term> | |
545 | <listitem><para>Configures IPv6 Hop Limit. For each router that | |
546 | forwards the packet, the hop limit is decremented by 1. When the | |
547 | hop limit field reaches zero, the packet is discarded. | |
548 | Defaults to unset. | |
549 | </para></listitem> | |
550 | </varlistentry> | |
798d3a52 ZJS |
551 | <varlistentry> |
552 | <term><varname>Bridge=</varname></term> | |
553 | <listitem> | |
554 | <para>The name of the bridge to add the link to.</para> | |
555 | </listitem> | |
556 | </varlistentry> | |
557 | <varlistentry> | |
558 | <term><varname>Bond=</varname></term> | |
559 | <listitem> | |
560 | <para>The name of the bond to add the link to.</para> | |
561 | </listitem> | |
562 | </varlistentry> | |
563 | <varlistentry> | |
564 | <term><varname>VLAN=</varname></term> | |
565 | <listitem> | |
566 | <para>The name of a VLAN to create on the link. This | |
567 | option may be specified more than once.</para> | |
568 | </listitem> | |
569 | </varlistentry> | |
570 | <varlistentry> | |
571 | <term><varname>MACVLAN=</varname></term> | |
572 | <listitem> | |
573 | <para>The name of a MACVLAN to create on the link. This | |
574 | option may be specified more than once.</para> | |
575 | </listitem> | |
576 | </varlistentry> | |
577 | <varlistentry> | |
578 | <term><varname>VXLAN=</varname></term> | |
579 | <listitem> | |
580 | <para>The name of a VXLAN to create on the link. This | |
581 | option may be specified more than once.</para> | |
582 | </listitem> | |
583 | </varlistentry> | |
584 | <varlistentry> | |
585 | <term><varname>Tunnel=</varname></term> | |
586 | <listitem> | |
587 | <para>The name of a Tunnel to create on the link. This | |
588 | option may be specified more than once.</para> | |
589 | </listitem> | |
590 | </varlistentry> | |
591 | </variablelist> | |
592 | ||
593 | </refsect1> | |
594 | ||
595 | <refsect1> | |
596 | <title>[Address] Section Options</title> | |
597 | ||
598 | <para>An <literal>[Address]</literal> section accepts the | |
599 | following keys. Specify several <literal>[Address]</literal> | |
600 | sections to configure several addresses.</para> | |
601 | ||
602 | <variablelist class='network-directives'> | |
603 | <varlistentry> | |
604 | <term><varname>Address=</varname></term> | |
605 | <listitem> | |
606 | <para>As in the <literal>[Network]</literal> section. This | |
607 | key is mandatory.</para> | |
608 | </listitem> | |
609 | </varlistentry> | |
610 | <varlistentry> | |
611 | <term><varname>Peer=</varname></term> | |
612 | <listitem> | |
613 | <para>The peer address in a point-to-point connection. | |
614 | Accepts the same format as the <literal>Address</literal> | |
615 | key.</para> | |
616 | </listitem> | |
617 | </varlistentry> | |
618 | <varlistentry> | |
619 | <term><varname>Broadcast=</varname></term> | |
620 | <listitem> | |
621 | <para>The broadcast address, which must be in the format | |
622 | described in | |
3ba3a79d | 623 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
624 | This key only applies to IPv4 addresses. If it is not |
625 | given, it is derived from the <literal>Address</literal> | |
626 | key.</para> | |
627 | </listitem> | |
628 | </varlistentry> | |
629 | <varlistentry> | |
630 | <term><varname>Label=</varname></term> | |
631 | <listitem> | |
632 | <para>An address label.</para> | |
633 | </listitem> | |
634 | </varlistentry> | |
635 | </variablelist> | |
636 | </refsect1> | |
637 | ||
638 | <refsect1> | |
639 | <title>[Route] Section Options</title> | |
640 | <para>The <literal>[Route]</literal> section accepts the | |
641 | following keys. Specify several <literal>[Route]</literal> | |
642 | sections to configure several routes.</para> | |
643 | ||
644 | <variablelist class='network-directives'> | |
645 | <varlistentry> | |
646 | <term><varname>Gateway=</varname></term> | |
647 | <listitem> | |
648 | <para>As in the <literal>[Network]</literal> section.</para> | |
649 | </listitem> | |
650 | </varlistentry> | |
651 | <varlistentry> | |
652 | <term><varname>Destination=</varname></term> | |
653 | <listitem> | |
654 | <para>The destination prefix of the route. Possibly | |
b938cb90 | 655 | followed by a slash and the prefix length. If omitted, a |
798d3a52 ZJS |
656 | full-length host route is assumed.</para> |
657 | </listitem> | |
658 | </varlistentry> | |
659 | <varlistentry> | |
660 | <term><varname>Source=</varname></term> | |
661 | <listitem> | |
662 | <para>The source prefix of the route. Possibly followed by | |
b938cb90 | 663 | a slash and the prefix length. If omitted, a full-length |
798d3a52 ZJS |
664 | host route is assumed.</para> |
665 | </listitem> | |
666 | </varlistentry> | |
667 | <varlistentry> | |
668 | <term><varname>Metric=</varname></term> | |
669 | <listitem> | |
b938cb90 | 670 | <para>The metric of the route (an unsigned integer).</para> |
798d3a52 ZJS |
671 | </listitem> |
672 | </varlistentry> | |
769b56a3 TG |
673 | <varlistentry> |
674 | <term><varname>Scope=</varname></term> | |
675 | <listitem> | |
a8eaaee7 | 676 | <para>The scope of the route, which can be <literal>global</literal>, |
769b56a3 TG |
677 | <literal>link</literal> or <literal>host</literal>. Defaults to |
678 | <literal>global</literal>.</para> | |
679 | </listitem> | |
0d07e595 JK |
680 | </varlistentry> |
681 | <varlistentry> | |
682 | <term><varname>PreferredSource=</varname></term> | |
683 | <listitem> | |
684 | <para>The preferred source address of the route. The address | |
685 | must be in the format described in | |
686 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> | |
687 | </listitem> | |
769b56a3 | 688 | </varlistentry> |
798d3a52 ZJS |
689 | </variablelist> |
690 | </refsect1> | |
691 | ||
692 | <refsect1> | |
693 | <title>[DHCP] Section Options</title> | |
ad943783 LP |
694 | <para>The <literal>[DHCP]</literal> section configures the |
695 | DHCPv4 and DHCP6 client, if it is enabled with the | |
696 | <varname>DHCP=</varname> setting described above:</para> | |
798d3a52 ZJS |
697 | |
698 | <variablelist class='network-directives'> | |
699 | <varlistentry> | |
700 | <term><varname>UseDNS=</varname></term> | |
701 | <listitem> | |
702 | <para>When true (the default), the DNS servers received | |
703 | from the DHCP server will be used and take precedence over | |
704 | any statically configured ones.</para> | |
e88d8021 ZJS |
705 | |
706 | <para>This corresponds to the <option>nameserver</option> | |
ad943783 LP |
707 | option in <citerefentry |
708 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
709 | </listitem> |
710 | </varlistentry> | |
301f4073 MM |
711 | <varlistentry> |
712 | <term><varname>UseNTP=</varname></term> | |
713 | <listitem> | |
714 | <para>When true (the default), the NTP servers received | |
715 | from the DHCP server will be used by systemd-timesyncd | |
716 | and take precedence over any statically configured ones.</para> | |
717 | </listitem> | |
718 | </varlistentry> | |
798d3a52 ZJS |
719 | <varlistentry> |
720 | <term><varname>UseMTU=</varname></term> | |
721 | <listitem> | |
722 | <para>When true, the interface maximum transmission unit | |
723 | from the DHCP server will be used on the current link. | |
724 | Defaults to false.</para> | |
725 | </listitem> | |
726 | </varlistentry> | |
727 | <varlistentry> | |
728 | <term><varname>SendHostname=</varname></term> | |
729 | <listitem> | |
d59be2cf ZJS |
730 | <para>When true (the default), the machine's hostname will |
731 | be sent to the DHCP server.</para> | |
798d3a52 ZJS |
732 | </listitem> |
733 | </varlistentry> | |
734 | <varlistentry> | |
735 | <term><varname>UseHostname=</varname></term> | |
736 | <listitem> | |
737 | <para>When true (the default), the hostname received from | |
ad943783 | 738 | the DHCP server will be set as the transient hostname of the system |
d59be2cf | 739 | </para> |
798d3a52 ZJS |
740 | </listitem> |
741 | </varlistentry> | |
1adc5d0b SS |
742 | <varlistentry> |
743 | <term><varname>Hostname=</varname></term> | |
744 | <listitem> | |
d59be2cf ZJS |
745 | <para>Use this value for the hostname which is sent to the |
746 | DHCP server, instead of machine's hostname.</para> | |
1adc5d0b SS |
747 | </listitem> |
748 | </varlistentry> | |
798d3a52 ZJS |
749 | <varlistentry> |
750 | <term><varname>UseDomains=</varname></term> | |
751 | <listitem> | |
07ff561c | 752 | <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name |
b2a81c0b LP |
753 | received from the DHCP server will be used as DNS search domain over this link, similar to the effect of |
754 | the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from | |
755 | the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of | |
756 | the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to | |
757 | false.</para> | |
758 | ||
759 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
760 | of all host names, in particular to single-label names. It is generally safer to use the supplied domain | |
761 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of | |
762 | single-label names.</para> | |
763 | ||
764 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
765 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
766 | </listitem> |
767 | </varlistentry> | |
768 | <varlistentry> | |
769 | <term><varname>UseRoutes=</varname></term> | |
770 | <listitem> | |
771 | <para>When true (the default), the static routes will be | |
772 | requested from the DHCP server and added to the routing | |
a8eaaee7 | 773 | table with a metric of 1024.</para> |
798d3a52 ZJS |
774 | </listitem> |
775 | </varlistentry> | |
ad943783 LP |
776 | |
777 | <varlistentry> | |
778 | <term><varname>UseTimezone=</varname></term> | |
779 | ||
780 | <listitem><para>When true, the timezone received from the | |
7f3fdb7f | 781 | DHCP server will be set as timezone of the local |
ad943783 LP |
782 | system. Defaults to <literal>no</literal>.</para></listitem> |
783 | </varlistentry> | |
784 | ||
798d3a52 ZJS |
785 | <varlistentry> |
786 | <term><varname>CriticalConnection=</varname></term> | |
787 | <listitem> | |
788 | <para>When true, the connection will never be torn down | |
789 | even if the DHCP lease expires. This is contrary to the | |
790 | DHCP specification, but may be the best choice if, say, | |
791 | the root filesystem relies on this connection. Defaults to | |
792 | false.</para> | |
793 | </listitem> | |
794 | </varlistentry> | |
3e43b2cd JJ |
795 | <varlistentry> |
796 | <term><varname>ClientIdentifier=</varname></term> | |
797 | <listitem> | |
798 | <para>DHCP client identifier to use. Either <literal>mac</literal> | |
799 | to use the MAC address of the link or <literal>duid</literal> | |
4a6970c5 | 800 | (the default) to use a RFC4361-compliant Client ID.</para> |
3e43b2cd JJ |
801 | </listitem> |
802 | </varlistentry> | |
798d3a52 ZJS |
803 | <varlistentry> |
804 | <term><varname>VendorClassIdentifier=</varname></term> | |
805 | <listitem> | |
806 | <para>The vendor class identifier used to identify vendor | |
807 | type and configuration.</para> | |
808 | </listitem> | |
809 | </varlistentry> | |
810 | <varlistentry> | |
811 | <term><varname>RequestBroadcast=</varname></term> | |
812 | <listitem> | |
813 | <para>Request the server to use broadcast messages before | |
814 | the IP address has been configured. This is necessary for | |
815 | devices that cannot receive RAW packets, or that cannot | |
816 | receive packets at all before an IP address has been | |
817 | configured. On the other hand, this must not be enabled on | |
818 | networks where broadcasts are filtered out.</para> | |
819 | </listitem> | |
820 | </varlistentry> | |
821 | <varlistentry> | |
822 | <term><varname>RouteMetric=</varname></term> | |
823 | <listitem> | |
824 | <para>Set the routing metric for routes specified by the | |
825 | DHCP server.</para> | |
826 | </listitem> | |
827 | </varlistentry> | |
ad943783 | 828 | </variablelist> |
798d3a52 ZJS |
829 | |
830 | </refsect1> | |
831 | ||
413708d1 VK |
832 | <refsect1> |
833 | <title>[DUID] Section Options</title> | |
834 | ||
835 | <para>This section configures the DHCP Unique Idendifier (DUID) value used by DHCP | |
836 | protocol. DHCPv6 client protocol sends the DHCP Unique Identifier and the interface | |
837 | Identity Association Identifier (IAID) to a DHCP server when acquiring a dynamic IPv6 | |
838 | address. DHCPv4 client protocol sends IAID and DUID to the DHCP server when acquiring | |
839 | a dynamic IPv4 address if <option>ClientIdentifier=duid</option>. IAID and DUID allows a | |
840 | DHCP server to uniquely identify the machine and the interface requesting a DHCP IP.</para> | |
841 | ||
842 | <para>The DUID value specified here overrides the DUID that systemd-networkd generates | |
843 | using the machine-id from the <filename>/etc/machine-id</filename> file, as well as the | |
844 | global DUID that may be specified in <citerefentry><refentrytitle>networkd.conf | |
845 | </refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
846 | ||
847 | <para>The configured DHCP DUID should conform to the specification in | |
848 | <ulink url="http://tools.ietf.org/html/rfc3315#section-9">RFC 3315</ulink>, | |
849 | <ulink url="http://tools.ietf.org/html/rfc6355">RFC 6355</ulink>.</para> | |
850 | ||
851 | <para>The following options are available in <literal>[DUID]</literal> section:</para> | |
852 | ||
853 | <variablelist class='network-directives'> | |
854 | ||
855 | <varlistentry> | |
856 | <term><varname>Type=</varname></term> | |
857 | <listitem><para>The type of DUID specified in this section. The following values are | |
858 | supported:</para> | |
859 | <para>raw : If <literal>Type=raw</literal>, then <literal>RawData=</literal> specifies | |
860 | the entire DUID. For e.g: <literal>RawData=00:02:00:00:ab:11:f9:2a:c2:77:29:f9:5c:00</literal> | |
861 | specifies a 14 byte long DUID-EN ("00:02"), with enterprise number 43793 ("00:00:ab:11"), | |
862 | and identifier value "f9:2a:c2:77:29:f9:5c:00".</para><para>If Type is not specified and | |
863 | RawData is specified, Type defaults to 'raw'.</para> | |
864 | <para>Type will support the following values in the future:</para> | |
865 | <para>link-layer-and-time : If <literal>Type=link-layer-and-time</literal>, then | |
866 | <literal>MACAddress=</literal> and <literal>TimeStamp=</literal> specify the hardware | |
867 | address and time-stamp for DUID-LLT.</para> | |
868 | <para>vendor : If <literal>Type=vendor</literal>, then <literal>EnterpriseNumber=</literal> | |
869 | and <literal>RawData=</literal> specify the enterprise number and identifier for DUID-EN.</para> | |
870 | <para>link-layer : If <literal>Type=link-layer</literal>, then <literal>MACAddress=</literal> | |
871 | specifies the hardware address for DUID-LL.</para> | |
872 | <para>uuid : If <literal>Type=uuid</literal>, then <literal>UUID=</literal> specifies DUID-UUID. | |
873 | </para></listitem> | |
874 | </varlistentry> | |
875 | ||
876 | <varlistentry> | |
877 | <term><varname>RawData=</varname></term> | |
878 | <listitem><para>Specifies the DUID bytes as a single newline-terminated, hexadecimal | |
879 | string, with each byte separated by a ':'.</para></listitem> | |
880 | </varlistentry> | |
881 | ||
882 | </variablelist> | |
883 | </refsect1> | |
884 | ||
885 | <refsect1> | |
886 | <para>The following options will be supported in the future: | |
887 | </para> | |
888 | <variablelist> | |
889 | <varlistentry> | |
890 | <term><varname>MACAddress=</varname></term> | |
891 | <listitem><para>Specifies the link-layer address for DUID Type <option>link-layer | |
892 | </option> or <option>link-layer-and-time</option>.</para></listitem> | |
893 | </varlistentry> | |
894 | <varlistentry> | |
895 | <term><varname>TimeStamp=</varname></term> | |
896 | <listitem><para>Specifies the DUID generation time for DUID Type <option> | |
897 | link-layer-and-time</option>.</para></listitem> | |
898 | </varlistentry> | |
899 | <varlistentry> | |
900 | <term><varname>EnterpriseNumber=</varname></term> | |
901 | <listitem><para>Specifies the enterprise number for DUID Type <option> | |
902 | vendor</option>.</para></listitem> | |
903 | </varlistentry> | |
904 | <varlistentry> | |
905 | <term><varname>UUID=</varname></term> | |
906 | <listitem><para>Specifies the UUID for DUID Type <option>uuid</option>.</para> | |
907 | </listitem> | |
908 | </varlistentry> | |
909 | </variablelist> | |
910 | </refsect1> | |
911 | ||
ad943783 LP |
912 | <refsect1> |
913 | <title>[DHCPServer] Section Options</title> | |
914 | <para>The <literal>[DHCPServer]</literal> section contains | |
915 | settings for the DHCP server, if enabled via the | |
916 | <varname>DHCPServer=</varname> option described above:</para> | |
917 | ||
918 | <variablelist class='network-directives'> | |
919 | ||
9b3a67c5 TG |
920 | <varlistentry> |
921 | <term><varname>PoolOffset=</varname></term> | |
922 | <term><varname>PoolSize=</varname></term> | |
923 | ||
924 | <listitem><para>Configures the pool of addresses to hand out. The pool | |
925 | is a contiguous sequence of IP addresses in the subnet configured for | |
926 | the server address, which does not include the subnet nor the broadcast | |
927 | address. <varname>PoolOffset=</varname> takes the offset of the pool | |
928 | from the start of subnet, or zero to use the default value. | |
929 | <varname>PoolSize=</varname> takes the number of IP addresses in the | |
b938cb90 | 930 | pool or zero to use the default value. By default, the pool starts at |
9b3a67c5 TG |
931 | the first address after the subnet address and takes up the rest of |
932 | the subnet, excluding the broadcast address. If the pool includes | |
933 | the server address (the default), this is reserved and not handed | |
934 | out to clients.</para></listitem> | |
935 | </varlistentry> | |
936 | ||
ad943783 LP |
937 | <varlistentry> |
938 | <term><varname>DefaultLeaseTimeSec=</varname></term> | |
939 | <term><varname>MaxLeaseTimeSec=</varname></term> | |
940 | ||
941 | <listitem><para>Control the default and maximum DHCP lease | |
942 | time to pass to clients. These settings take time values in seconds or | |
943 | another common time unit, depending on the suffix. The default | |
944 | lease time is used for clients that did not ask for a specific | |
945 | lease time. If a client asks for a lease time longer than the | |
b938cb90 | 946 | maximum lease time, it is automatically shortened to the |
ad943783 LP |
947 | specified time. The default lease time defaults to 1h, the |
948 | maximum lease time to 12h. Shorter lease times are beneficial | |
949 | if the configuration data in DHCP leases changes frequently | |
950 | and clients shall learn the new settings with shorter | |
951 | latencies. Longer lease times reduce the generated DHCP | |
952 | network traffic.</para></listitem> | |
953 | </varlistentry> | |
954 | ||
955 | <varlistentry> | |
956 | <term><varname>EmitDNS=</varname></term> | |
957 | <term><varname>DNS=</varname></term> | |
958 | ||
959 | <listitem><para>Configures whether the DHCP leases handed out | |
960 | to clients shall contain DNS server information. The | |
961 | <varname>EmitDNS=</varname> setting takes a boolean argument | |
962 | and defaults to <literal>yes</literal>. The DNS servers to | |
963 | pass to clients may be configured with the | |
964 | <varname>DNS=</varname> option, which takes a list of IPv4 | |
965 | addresses. If the <varname>EmitDNS=</varname> option is | |
b938cb90 | 966 | enabled but no servers configured, the servers are |
ad943783 LP |
967 | automatically propagated from an "uplink" interface that has |
968 | appropriate servers set. The "uplink" interface is determined | |
969 | by the default route of the system with the highest | |
970 | priority. Note that this information is acquired at the time | |
971 | the lease is handed out, and does not take uplink interfaces | |
972 | into account that acquire DNS or NTP server information at a | |
973 | later point. DNS server propagation does not take | |
974 | <filename>/etc/resolv.conf</filename> into account. Also, note | |
a8eaaee7 | 975 | that the leases are not refreshed if the uplink network |
ad943783 | 976 | configuration changes. To ensure clients regularly acquire the |
b938cb90 | 977 | most current uplink DNS server information, it is thus |
ad943783 LP |
978 | advisable to shorten the DHCP lease time via |
979 | <varname>MaxLeaseTimeSec=</varname> described | |
980 | above.</para></listitem> | |
981 | </varlistentry> | |
982 | ||
983 | <varlistentry> | |
984 | <term><varname>EmitNTP=</varname></term> | |
985 | <term><varname>NTP=</varname></term> | |
986 | ||
987 | <listitem><para>Similar to the <varname>EmitDNS=</varname> and | |
b938cb90 | 988 | <varname>DNS=</varname> settings described above, these |
ad943783 LP |
989 | settings configure whether and what NTP server information |
990 | shall be emitted as part of the DHCP lease. The same syntax, | |
991 | propagation semantics and defaults apply as for | |
992 | <varname>EmitDNS=</varname> and | |
993 | <varname>DNS=</varname>.</para></listitem> | |
994 | </varlistentry> | |
995 | ||
996 | <varlistentry> | |
997 | <term><varname>EmitTimezone=</varname></term> | |
998 | <term><varname>Timezone=</varname></term> | |
999 | ||
1000 | <listitem><para>Configures whether the DHCP leases handed out | |
1001 | to clients shall contain timezone information. The | |
1002 | <varname>EmitTimezone=</varname> setting takes a boolean | |
1003 | argument and defaults to <literal>yes</literal>. The | |
1004 | <varname>Timezone=</varname> setting takes a timezone string | |
1005 | (such as <literal>Europe/Berlin</literal> or | |
1006 | <literal>UTC</literal>) to pass to clients. If no explicit | |
b938cb90 | 1007 | timezone is set, the system timezone of the local host is |
ad943783 LP |
1008 | propagated, as determined by the |
1009 | <filename>/etc/localtime</filename> symlink.</para></listitem> | |
1010 | </varlistentry> | |
1011 | ||
1012 | </variablelist> | |
1013 | </refsect1> | |
1014 | ||
798d3a52 ZJS |
1015 | <refsect1> |
1016 | <title>[Bridge] Section Options</title> | |
1017 | <para>The <literal>[Bridge]</literal> section accepts the | |
1018 | following keys.</para> | |
1019 | <variablelist class='network-directives'> | |
165c41a9 SS |
1020 | <varlistentry> |
1021 | <term><varname>UnicastFlood=</varname></term> | |
1022 | <listitem> | |
072f9e4a ZJS |
1023 | <para>A boolean. Controls whether the bridge should flood |
1024 | traffic for which an FDB entry is missing and the destination | |
1025 | is unknown through this port. Defaults to on. | |
47c7dfe2 | 1026 | </para> |
165c41a9 SS |
1027 | </listitem> |
1028 | </varlistentry> | |
1029 | <varlistentry> | |
1030 | <term><varname>HairPin=</varname></term> | |
1031 | <listitem> | |
47c7dfe2 ZJS |
1032 | <para>A boolean. Configures whether traffic may be sent back |
1033 | out of the port on which it was received. By default, this | |
1034 | flag is false, and the bridge will not forward traffic back | |
1035 | out of the receiving port.</para> | |
165c41a9 SS |
1036 | </listitem> |
1037 | </varlistentry> | |
1038 | <varlistentry> | |
84c34096 | 1039 | <term><varname>UseBPDU=</varname></term> |
165c41a9 | 1040 | <listitem> |
47c7dfe2 | 1041 | <para>A boolean. Configures whether STP Bridge Protocol Data Units will be |
84c34096 | 1042 | processed by the bridge port. Defaults to yes.</para> |
165c41a9 SS |
1043 | </listitem> |
1044 | </varlistentry> | |
1045 | <varlistentry> | |
1046 | <term><varname>FastLeave=</varname></term> | |
1047 | <listitem> | |
47c7dfe2 | 1048 | <para>A boolean. This flag allows the bridge to immediately stop multicast |
a8eaaee7 | 1049 | traffic on a port that receives an IGMP Leave message. It is only used with |
47c7dfe2 | 1050 | IGMP snooping if enabled on the bridge. Defaults to off.</para> |
165c41a9 SS |
1051 | </listitem> |
1052 | </varlistentry> | |
1053 | <varlistentry> | |
23da66bb | 1054 | <term><varname>AllowPortToBeRoot=</varname></term> |
165c41a9 | 1055 | <listitem> |
47c7dfe2 ZJS |
1056 | <para>A boolean. Configures whether a given port is allowed to |
1057 | become a root port. Only used when STP is enabled on the bridge. | |
23da66bb | 1058 | Defaults to on.</para> |
165c41a9 SS |
1059 | </listitem> |
1060 | </varlistentry> | |
798d3a52 ZJS |
1061 | <varlistentry> |
1062 | <term><varname>Cost=</varname></term> | |
1063 | <listitem> | |
47c7dfe2 | 1064 | <para>Sets the "cost" of sending packets of this interface. |
a8eaaee7 | 1065 | Each port in a bridge may have a different speed and the cost |
798d3a52 | 1066 | is used to decide which link to use. Faster interfaces |
47c7dfe2 | 1067 | should have lower costs.</para> |
798d3a52 ZJS |
1068 | </listitem> |
1069 | </varlistentry> | |
1070 | </variablelist> | |
1071 | </refsect1> | |
798d3a52 ZJS |
1072 | <refsect1> |
1073 | <title>[BridgeFDB] Section Options</title> | |
1074 | <para>The <literal>[BridgeFDB]</literal> section manages the | |
1075 | forwarding database table of a port and accepts the following | |
1076 | keys. Specify several <literal>[BridgeFDB]</literal> sections to | |
1077 | configure several static MAC table entries.</para> | |
1078 | ||
1079 | <variablelist class='network-directives'> | |
1080 | <varlistentry> | |
1081 | <term><varname>MACAddress=</varname></term> | |
1082 | <listitem> | |
1083 | <para>As in the <literal>[Network]</literal> section. This | |
1084 | key is mandatory.</para> | |
1085 | </listitem> | |
1086 | </varlistentry> | |
1087 | <varlistentry> | |
1088 | <term><varname>VLANId=</varname></term> | |
1089 | <listitem> | |
a8eaaee7 JE |
1090 | <para>The VLAN ID for the new static MAC table entry. If |
1091 | omitted, no VLAN ID info is appended to the new static MAC | |
798d3a52 ZJS |
1092 | table entry.</para> |
1093 | </listitem> | |
1094 | </varlistentry> | |
1095 | </variablelist> | |
1096 | </refsect1> | |
1097 | ||
1098 | <refsect1> | |
1099 | <title>Example</title> | |
1100 | <example> | |
12b42c76 | 1101 | <title>/etc/systemd/network/50-static.network</title> |
798d3a52 ZJS |
1102 | |
1103 | <programlisting>[Match] | |
eac684ef TG |
1104 | Name=enp2s0 |
1105 | ||
1106 | [Network] | |
1107 | Address=192.168.0.15/24 | |
1108 | Gateway=192.168.0.1</programlisting> | |
798d3a52 | 1109 | </example> |
eac684ef | 1110 | |
798d3a52 | 1111 | <example> |
12b42c76 | 1112 | <title>/etc/systemd/network/80-dhcp.network</title> |
eac684ef | 1113 | |
798d3a52 | 1114 | <programlisting>[Match] |
eac684ef TG |
1115 | Name=en* |
1116 | ||
1117 | [Network] | |
9c8ca3f7 | 1118 | DHCP=yes</programlisting> |
798d3a52 | 1119 | </example> |
eac684ef | 1120 | |
798d3a52 | 1121 | <example> |
6c1695be | 1122 | <title>/etc/systemd/network/25-bridge-static.network</title> |
f47c5c47 | 1123 | |
798d3a52 | 1124 | <programlisting>[Match] |
f47c5c47 | 1125 | Name=bridge0 |
1126 | ||
1127 | [Network] | |
1128 | Address=192.168.0.15/24 | |
1129 | Gateway=192.168.0.1 | |
1130 | DNS=192.168.0.1</programlisting> | |
798d3a52 | 1131 | </example> |
f47c5c47 | 1132 | |
798d3a52 | 1133 | <example> |
6c1695be | 1134 | <title>/etc/systemd/network/25-bridge-slave-interface.network</title> |
f47c5c47 | 1135 | |
798d3a52 | 1136 | <programlisting>[Match] |
f47c5c47 | 1137 | Name=enp2s0 |
1138 | ||
1139 | [Network] | |
1140 | Bridge=bridge0</programlisting> | |
798d3a52 ZJS |
1141 | </example> |
1142 | <example> | |
6c1695be | 1143 | <title>/etc/systemd/network/25-ipip.network</title> |
0a8a0fad | 1144 | |
798d3a52 | 1145 | <programlisting>[Match] |
0a8a0fad TG |
1146 | Name=em1 |
1147 | ||
1148 | [Network] | |
1149 | Tunnel=ipip-tun</programlisting> | |
798d3a52 | 1150 | </example> |
0a8a0fad | 1151 | |
798d3a52 | 1152 | <example> |
6c1695be | 1153 | <title>/etc/systemd/network/25-sit.network</title> |
0a8a0fad | 1154 | |
798d3a52 | 1155 | <programlisting>[Match] |
0a8a0fad TG |
1156 | Name=em1 |
1157 | ||
1158 | [Network] | |
1159 | Tunnel=sit-tun</programlisting> | |
798d3a52 | 1160 | </example> |
0a8a0fad | 1161 | |
798d3a52 | 1162 | <example> |
6c1695be | 1163 | <title>/etc/systemd/network/25-gre.network</title> |
0a8a0fad | 1164 | |
798d3a52 | 1165 | <programlisting>[Match] |
0a8a0fad TG |
1166 | Name=em1 |
1167 | ||
1168 | [Network] | |
1169 | Tunnel=gre-tun</programlisting> | |
798d3a52 | 1170 | </example> |
0a8a0fad | 1171 | |
798d3a52 | 1172 | <example> |
6c1695be | 1173 | <title>/etc/systemd/network/25-vti.network</title> |
0a8a0fad | 1174 | |
798d3a52 | 1175 | <programlisting>[Match] |
0a8a0fad TG |
1176 | Name=em1 |
1177 | ||
1178 | [Network] | |
1179 | Tunnel=vti-tun</programlisting> | |
798d3a52 | 1180 | </example> |
d94facdc MH |
1181 | |
1182 | <example> | |
6c1695be | 1183 | <title>/etc/systemd/network/25-bond.network</title> |
d94facdc MH |
1184 | |
1185 | <programlisting>[Match] | |
1186 | Name=bond1 | |
1187 | ||
1188 | [Network] | |
1189 | DHCP=yes | |
1190 | </programlisting> | |
1191 | </example> | |
1192 | ||
798d3a52 ZJS |
1193 | </refsect1> |
1194 | ||
1195 | <refsect1> | |
1196 | <title>See Also</title> | |
1197 | <para> | |
1198 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
f41b446a | 1199 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
798d3a52 | 1200 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
aaa297d4 LP |
1201 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
1202 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
798d3a52 ZJS |
1203 | </para> |
1204 | </refsect1> | |
eac684ef TG |
1205 | |
1206 | </refentry> |