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