]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.network.xml
Merge pull request #4061 from dm0-/coreos-1545
[thirdparty/systemd.git] / man / systemd.network.xml
CommitLineData
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>
2df22529
ZJS
470 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
471 should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the
472 prefix are called "routing-only domains". The domains without the prefix are called "search domains" and
473 are first used as search suffixes for extending single-label host names (host names containing no dots) to
474 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
475 each of the specified search domains are appended to it in turn, converting it into a fully qualified
476 domain name, until one of them may be successfully resolved.</para>
477
478 <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names
479 ending in those domains (hence also single label names, if any "search domains" are listed), are routed to
480 the DNS servers configured for this interface. The domain routing logic is particularly useful on
481 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para>
482
483 <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain,
484 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
485 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
486 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
487 if a link on which they are connected is available.</para>
3df9bec5
LP
488
489 <para>This setting is read by
2df22529
ZJS
490 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
491 "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in
492 <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
493 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
494 name servers limited to a specific link.</para>
798d3a52
ZJS
495 </listitem>
496 </varlistentry>
497 <varlistentry>
498 <term><varname>NTP=</varname></term>
499 <listitem>
f41b446a 500 <para>An NTP server address. This option may be specified more than once. This setting is read by
3df9bec5 501 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
798d3a52
ZJS
502 </listitem>
503 </varlistentry>
504 <varlistentry>
505 <term><varname>IPForward=</varname></term>
765afd5c
LP
506 <listitem><para>Configures IP packet forwarding for the
507 system. If enabled, incoming packets on any network
508 interface will be forwarded to any other interfaces
509 according to the routing table. Takes either a boolean
510 argument, or the values <literal>ipv4</literal> or
511 <literal>ipv6</literal>, which only enable IP packet
512 forwarding for the specified address family. This controls
513 the <filename>net.ipv4.ip_forward</filename> and
514 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
515 options of the network interface (see <ulink
4046d836
LP
516 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
517 for details about sysctl options). Defaults to
518 <literal>no</literal>.</para>
519
765afd5c
LP
520 <para>Note: this setting controls a global kernel option,
521 and does so one way only: if a network that has this setting
522 enabled is set up the global setting is turned on. However,
523 it is never turned off again, even after all networks with
524 this setting enabled are shut down again.</para>
525
526 <para>To allow IP packet forwarding only between specific
527 network interfaces use a firewall.</para>
4046d836 528 </listitem>
798d3a52
ZJS
529 </varlistentry>
530 <varlistentry>
531 <term><varname>IPMasquerade=</varname></term>
532 <listitem><para>Configures IP masquerading for the network
b938cb90 533 interface. If enabled, packets forwarded from the network
798d3a52
ZJS
534 interface will be appear as coming from the local host.
535 Takes a boolean argument. Implies
5c82dd13 536 <varname>IPForward=ipv4</varname>. Defaults to
4046d836 537 <literal>no</literal>.</para></listitem>
798d3a52 538 </varlistentry>
a46e37cb
SS
539 <varlistentry>
540 <term><varname>IPv6PrivacyExtensions=</varname></term>
1f0d9695
LP
541 <listitem><para>Configures use of stateless temporary
542 addresses that change over time (see <ulink
543 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
544 Privacy Extensions for Stateless Address Autoconfiguration
545 in IPv6). Takes a boolean or the special values
546 <literal>prefer-public</literal> and
b938cb90 547 <literal>kernel</literal>. When true, enables the privacy
1f0d9695 548 extensions and prefers temporary addresses over public
b938cb90 549 addresses. When <literal>prefer-public</literal>, enables the
1f0d9695
LP
550 privacy extensions, but prefers public addresses over
551 temporary addresses. When false, the privacy extensions
b938cb90 552 remain disabled. When <literal>kernel</literal>, the kernel's
1f0d9695 553 default setting will be left in place. Defaults to
a46e37cb
SS
554 <literal>no</literal>.</para></listitem>
555 </varlistentry>
941d0aa8 556 <varlistentry>
f921f573 557 <term><varname>IPv6AcceptRA=</varname></term>
1e7a0e21
LP
558 <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes
559 a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
560 forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
561 is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if
562 the relevant flags are set in the RA data, or if no routers are found on the link.</para>
563
564 <para>Further settings for the IPv6 RA support may be configured in the
f921f573 565 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
1e7a0e21
LP
566
567 <para>Also see <ulink
568 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
569 documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of
570 <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para>
ebf98081 571 </listitem>
941d0aa8 572 </varlistentry>
44de7fb1
SS
573 <varlistentry>
574 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
a8eaaee7
JE
575 <listitem><para>Configures the amount of IPv6 Duplicate
576 Address Detection (DAD) probes to send. Defaults to unset.
44de7fb1
SS
577 </para></listitem>
578 </varlistentry>
a86cba89
SS
579 <varlistentry>
580 <term><varname>IPv6HopLimit=</varname></term>
581 <listitem><para>Configures IPv6 Hop Limit. For each router that
582 forwards the packet, the hop limit is decremented by 1. When the
583 hop limit field reaches zero, the packet is discarded.
584 Defaults to unset.
585 </para></listitem>
586 </varlistentry>
23d8b221
SS
587 <varlistentry>
588 <term><varname>ProxyARP=</varname></term>
589 <listitem><para>A boolean. Configures proxy ARP. Proxy ARP is the technique in which one host,
590 usually a router, answers ARP requests intended for another machine. By "faking" its identity,
591 the router accepts responsibility for routing packets to the "real" destination. (see <ulink
592 url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>.
593 Defaults to unset.
594 </para></listitem>
595 </varlistentry>
798d3a52
ZJS
596 <varlistentry>
597 <term><varname>Bridge=</varname></term>
598 <listitem>
599 <para>The name of the bridge to add the link to.</para>
600 </listitem>
601 </varlistentry>
602 <varlistentry>
603 <term><varname>Bond=</varname></term>
604 <listitem>
605 <para>The name of the bond to add the link to.</para>
606 </listitem>
607 </varlistentry>
6cb955c6
AR
608 <varlistentry>
609 <term><varname>VRF=</varname></term>
610 <listitem>
611 <para>The name of the VRF to add the link to.</para>
612 </listitem>
613 </varlistentry>
798d3a52
ZJS
614 <varlistentry>
615 <term><varname>VLAN=</varname></term>
616 <listitem>
617 <para>The name of a VLAN to create on the link. This
618 option may be specified more than once.</para>
619 </listitem>
620 </varlistentry>
621 <varlistentry>
622 <term><varname>MACVLAN=</varname></term>
623 <listitem>
624 <para>The name of a MACVLAN to create on the link. This
625 option may be specified more than once.</para>
626 </listitem>
627 </varlistentry>
628 <varlistentry>
629 <term><varname>VXLAN=</varname></term>
630 <listitem>
631 <para>The name of a VXLAN to create on the link. This
632 option may be specified more than once.</para>
633 </listitem>
634 </varlistentry>
635 <varlistentry>
636 <term><varname>Tunnel=</varname></term>
637 <listitem>
638 <para>The name of a Tunnel to create on the link. This
639 option may be specified more than once.</para>
640 </listitem>
641 </varlistentry>
642 </variablelist>
643
644 </refsect1>
645
646 <refsect1>
647 <title>[Address] Section Options</title>
648
649 <para>An <literal>[Address]</literal> section accepts the
650 following keys. Specify several <literal>[Address]</literal>
651 sections to configure several addresses.</para>
652
653 <variablelist class='network-directives'>
654 <varlistentry>
655 <term><varname>Address=</varname></term>
656 <listitem>
657 <para>As in the <literal>[Network]</literal> section. This
658 key is mandatory.</para>
659 </listitem>
660 </varlistentry>
661 <varlistentry>
662 <term><varname>Peer=</varname></term>
663 <listitem>
664 <para>The peer address in a point-to-point connection.
665 Accepts the same format as the <literal>Address</literal>
666 key.</para>
667 </listitem>
668 </varlistentry>
669 <varlistentry>
670 <term><varname>Broadcast=</varname></term>
671 <listitem>
672 <para>The broadcast address, which must be in the format
673 described in
3ba3a79d 674 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
675 This key only applies to IPv4 addresses. If it is not
676 given, it is derived from the <literal>Address</literal>
677 key.</para>
678 </listitem>
679 </varlistentry>
680 <varlistentry>
681 <term><varname>Label=</varname></term>
682 <listitem>
683 <para>An address label.</para>
684 </listitem>
685 </varlistentry>
b5834a0b
SS
686 <varlistentry>
687 <term><varname>PreferredLifetime=</varname></term>
688 <listitem>
689 <para>Allows the default "preferred lifetime" of the address to be overridden.
690 Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal>
691 which is the default and means that the address never expires, and <literal>0</literal> which means
692 that the address is considered immediately "expired" and will not be used,
693 unless explicitly requested. A setting of PreferredLifetime=0 is useful for
694 addresses which are added to be used only by a specific application,
695 which is then configured to use them explicitly.</para>
696 </listitem>
697 </varlistentry>
798d3a52
ZJS
698 </variablelist>
699 </refsect1>
700
701 <refsect1>
702 <title>[Route] Section Options</title>
703 <para>The <literal>[Route]</literal> section accepts the
704 following keys. Specify several <literal>[Route]</literal>
705 sections to configure several routes.</para>
706
707 <variablelist class='network-directives'>
708 <varlistentry>
709 <term><varname>Gateway=</varname></term>
710 <listitem>
711 <para>As in the <literal>[Network]</literal> section.</para>
712 </listitem>
713 </varlistentry>
714 <varlistentry>
715 <term><varname>Destination=</varname></term>
716 <listitem>
717 <para>The destination prefix of the route. Possibly
b938cb90 718 followed by a slash and the prefix length. If omitted, a
798d3a52
ZJS
719 full-length host route is assumed.</para>
720 </listitem>
721 </varlistentry>
722 <varlistentry>
723 <term><varname>Source=</varname></term>
724 <listitem>
725 <para>The source prefix of the route. Possibly followed by
b938cb90 726 a slash and the prefix length. If omitted, a full-length
798d3a52
ZJS
727 host route is assumed.</para>
728 </listitem>
729 </varlistentry>
730 <varlistentry>
731 <term><varname>Metric=</varname></term>
732 <listitem>
b938cb90 733 <para>The metric of the route (an unsigned integer).</para>
798d3a52
ZJS
734 </listitem>
735 </varlistentry>
769b56a3
TG
736 <varlistentry>
737 <term><varname>Scope=</varname></term>
738 <listitem>
a8eaaee7 739 <para>The scope of the route, which can be <literal>global</literal>,
769b56a3
TG
740 <literal>link</literal> or <literal>host</literal>. Defaults to
741 <literal>global</literal>.</para>
742 </listitem>
0d07e595
JK
743 </varlistentry>
744 <varlistentry>
745 <term><varname>PreferredSource=</varname></term>
746 <listitem>
747 <para>The preferred source address of the route. The address
748 must be in the format described in
749 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
750 </listitem>
769b56a3 751 </varlistentry>
c953b24c
SS
752 <varlistentry>
753 <term><varname>Table=<replaceable>num</replaceable></varname></term>
754 <listitem>
755 <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset).
756 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
757 </para>
758 </listitem>
759 </varlistentry>
798d3a52
ZJS
760 </variablelist>
761 </refsect1>
762
763 <refsect1>
764 <title>[DHCP] Section Options</title>
ad943783
LP
765 <para>The <literal>[DHCP]</literal> section configures the
766 DHCPv4 and DHCP6 client, if it is enabled with the
767 <varname>DHCP=</varname> setting described above:</para>
798d3a52
ZJS
768
769 <variablelist class='network-directives'>
770 <varlistentry>
771 <term><varname>UseDNS=</varname></term>
772 <listitem>
773 <para>When true (the default), the DNS servers received
774 from the DHCP server will be used and take precedence over
775 any statically configured ones.</para>
e88d8021
ZJS
776
777 <para>This corresponds to the <option>nameserver</option>
ad943783
LP
778 option in <citerefentry
779 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
780 </listitem>
781 </varlistentry>
301f4073
MM
782 <varlistentry>
783 <term><varname>UseNTP=</varname></term>
784 <listitem>
785 <para>When true (the default), the NTP servers received
786 from the DHCP server will be used by systemd-timesyncd
787 and take precedence over any statically configured ones.</para>
788 </listitem>
789 </varlistentry>
798d3a52
ZJS
790 <varlistentry>
791 <term><varname>UseMTU=</varname></term>
792 <listitem>
793 <para>When true, the interface maximum transmission unit
794 from the DHCP server will be used on the current link.
795 Defaults to false.</para>
796 </listitem>
797 </varlistentry>
798 <varlistentry>
799 <term><varname>SendHostname=</varname></term>
800 <listitem>
d59be2cf
ZJS
801 <para>When true (the default), the machine's hostname will
802 be sent to the DHCP server.</para>
798d3a52
ZJS
803 </listitem>
804 </varlistentry>
805 <varlistentry>
806 <term><varname>UseHostname=</varname></term>
807 <listitem>
808 <para>When true (the default), the hostname received from
ad943783 809 the DHCP server will be set as the transient hostname of the system
d59be2cf 810 </para>
798d3a52
ZJS
811 </listitem>
812 </varlistentry>
1adc5d0b
SS
813 <varlistentry>
814 <term><varname>Hostname=</varname></term>
815 <listitem>
d59be2cf
ZJS
816 <para>Use this value for the hostname which is sent to the
817 DHCP server, instead of machine's hostname.</para>
1adc5d0b
SS
818 </listitem>
819 </varlistentry>
798d3a52
ZJS
820 <varlistentry>
821 <term><varname>UseDomains=</varname></term>
822 <listitem>
07ff561c 823 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
b2a81c0b
LP
824 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
825 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
826 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
827 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
828 false.</para>
829
830 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1e7a0e21 831 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
b2a81c0b
LP
832 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
833 single-label names.</para>
834
835 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
836 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
837 </listitem>
838 </varlistentry>
839 <varlistentry>
840 <term><varname>UseRoutes=</varname></term>
841 <listitem>
842 <para>When true (the default), the static routes will be
843 requested from the DHCP server and added to the routing
a8eaaee7 844 table with a metric of 1024.</para>
798d3a52
ZJS
845 </listitem>
846 </varlistentry>
ad943783
LP
847
848 <varlistentry>
849 <term><varname>UseTimezone=</varname></term>
850
851 <listitem><para>When true, the timezone received from the
7f3fdb7f 852 DHCP server will be set as timezone of the local
ad943783
LP
853 system. Defaults to <literal>no</literal>.</para></listitem>
854 </varlistentry>
855
798d3a52
ZJS
856 <varlistentry>
857 <term><varname>CriticalConnection=</varname></term>
858 <listitem>
859 <para>When true, the connection will never be torn down
860 even if the DHCP lease expires. This is contrary to the
861 DHCP specification, but may be the best choice if, say,
862 the root filesystem relies on this connection. Defaults to
863 false.</para>
864 </listitem>
865 </varlistentry>
e2e08e77 866
3e43b2cd
JJ
867 <varlistentry>
868 <term><varname>ClientIdentifier=</varname></term>
869 <listitem>
076ea6f6 870 <para>The DHCPv4 client identifier to use. Either <literal>mac</literal> to use the MAC address of the link
037a3ded 871 or <literal>duid</literal> (the default, see below) to use an RFC4361-compliant Client ID.</para>
3e43b2cd
JJ
872 </listitem>
873 </varlistentry>
e2e08e77 874
798d3a52
ZJS
875 <varlistentry>
876 <term><varname>VendorClassIdentifier=</varname></term>
877 <listitem>
878 <para>The vendor class identifier used to identify vendor
879 type and configuration.</para>
880 </listitem>
881 </varlistentry>
076ea6f6 882
e2e08e77
ZJS
883 <varlistentry>
884 <term><varname>DUIDType=</varname></term>
885 <listitem>
886 <para>Override the global <varname>DUIDType</varname> setting for this network. See
887 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
888 for a description of possible values.</para>
889 </listitem>
890 </varlistentry>
076ea6f6 891
e2e08e77
ZJS
892 <varlistentry>
893 <term><varname>DUIDRawData=</varname></term>
894 <listitem>
895 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
896 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
897 for a description of possible values.</para>
076ea6f6
LP
898 </listitem>
899 </varlistentry>
e2e08e77 900
d05def16
LP
901 <varlistentry>
902 <term><varname>IAID=</varname></term>
903 <listitem>
904 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
905 </listitem>
906 </varlistentry>
907
798d3a52
ZJS
908 <varlistentry>
909 <term><varname>RequestBroadcast=</varname></term>
910 <listitem>
911 <para>Request the server to use broadcast messages before
912 the IP address has been configured. This is necessary for
913 devices that cannot receive RAW packets, or that cannot
914 receive packets at all before an IP address has been
915 configured. On the other hand, this must not be enabled on
916 networks where broadcasts are filtered out.</para>
917 </listitem>
918 </varlistentry>
e2e08e77 919
798d3a52
ZJS
920 <varlistentry>
921 <term><varname>RouteMetric=</varname></term>
922 <listitem>
923 <para>Set the routing metric for routes specified by the
924 DHCP server.</para>
925 </listitem>
926 </varlistentry>
f594276b
JK
927
928 <varlistentry>
929 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
930 <listitem>
d11e656a 931 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
f594276b
JK
932 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
933 </para>
934 </listitem>
935 </varlistentry>
ad943783 936 </variablelist>
076ea6f6 937 </refsect1>
413708d1 938
1e7a0e21 939 <refsect1>
f921f573
LP
940 <title>[IPv6AcceptRA] Section Options</title>
941 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
942 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1e7a0e21
LP
943 above:</para>
944
945 <variablelist class='network-directives'>
946 <varlistentry>
947 <term><varname>UseDNS=</varname></term>
948 <listitem>
949 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
950 precedence over any statically configured ones.</para>
951
952 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
953 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
954 </listitem>
955 </varlistentry>
956
957 <varlistentry>
958 <term><varname>UseDomains=</varname></term>
959 <listitem>
960 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
961 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
962 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
963 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
964 effect of the <option>Domains=</option> setting when the argument is prefixed with
965 <literal>~</literal>. Defaults to false.</para>
966
967 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
968 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
969 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
970 single-label names.</para>
971
972 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
973 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
974 </listitem>
975 </varlistentry>
2ba31d29
JK
976
977 <varlistentry>
978 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
979 <listitem>
d11e656a
ZJS
980 <para>The table identifier for the routes received in the Router Advertisement
981 (a number between 1 and 4294967295, or 0 to unset).
2ba31d29
JK
982 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
983 </para>
984 </listitem>
985 </varlistentry>
1e7a0e21
LP
986 </variablelist>
987 </refsect1>
988
989
ad943783
LP
990 <refsect1>
991 <title>[DHCPServer] Section Options</title>
992 <para>The <literal>[DHCPServer]</literal> section contains
993 settings for the DHCP server, if enabled via the
994 <varname>DHCPServer=</varname> option described above:</para>
995
996 <variablelist class='network-directives'>
997
9b3a67c5
TG
998 <varlistentry>
999 <term><varname>PoolOffset=</varname></term>
1000 <term><varname>PoolSize=</varname></term>
1001
1002 <listitem><para>Configures the pool of addresses to hand out. The pool
1003 is a contiguous sequence of IP addresses in the subnet configured for
1004 the server address, which does not include the subnet nor the broadcast
1005 address. <varname>PoolOffset=</varname> takes the offset of the pool
1006 from the start of subnet, or zero to use the default value.
1007 <varname>PoolSize=</varname> takes the number of IP addresses in the
b938cb90 1008 pool or zero to use the default value. By default, the pool starts at
9b3a67c5
TG
1009 the first address after the subnet address and takes up the rest of
1010 the subnet, excluding the broadcast address. If the pool includes
1011 the server address (the default), this is reserved and not handed
1012 out to clients.</para></listitem>
1013 </varlistentry>
1014
ad943783
LP
1015 <varlistentry>
1016 <term><varname>DefaultLeaseTimeSec=</varname></term>
1017 <term><varname>MaxLeaseTimeSec=</varname></term>
1018
1019 <listitem><para>Control the default and maximum DHCP lease
1020 time to pass to clients. These settings take time values in seconds or
1021 another common time unit, depending on the suffix. The default
1022 lease time is used for clients that did not ask for a specific
1023 lease time. If a client asks for a lease time longer than the
b938cb90 1024 maximum lease time, it is automatically shortened to the
ad943783
LP
1025 specified time. The default lease time defaults to 1h, the
1026 maximum lease time to 12h. Shorter lease times are beneficial
1027 if the configuration data in DHCP leases changes frequently
1028 and clients shall learn the new settings with shorter
1029 latencies. Longer lease times reduce the generated DHCP
1030 network traffic.</para></listitem>
1031 </varlistentry>
1032
1033 <varlistentry>
1034 <term><varname>EmitDNS=</varname></term>
1035 <term><varname>DNS=</varname></term>
1036
1037 <listitem><para>Configures whether the DHCP leases handed out
1038 to clients shall contain DNS server information. The
1039 <varname>EmitDNS=</varname> setting takes a boolean argument
1040 and defaults to <literal>yes</literal>. The DNS servers to
1041 pass to clients may be configured with the
1042 <varname>DNS=</varname> option, which takes a list of IPv4
1043 addresses. If the <varname>EmitDNS=</varname> option is
b938cb90 1044 enabled but no servers configured, the servers are
ad943783
LP
1045 automatically propagated from an "uplink" interface that has
1046 appropriate servers set. The "uplink" interface is determined
1047 by the default route of the system with the highest
1048 priority. Note that this information is acquired at the time
1049 the lease is handed out, and does not take uplink interfaces
1050 into account that acquire DNS or NTP server information at a
1051 later point. DNS server propagation does not take
1052 <filename>/etc/resolv.conf</filename> into account. Also, note
a8eaaee7 1053 that the leases are not refreshed if the uplink network
ad943783 1054 configuration changes. To ensure clients regularly acquire the
b938cb90 1055 most current uplink DNS server information, it is thus
ad943783
LP
1056 advisable to shorten the DHCP lease time via
1057 <varname>MaxLeaseTimeSec=</varname> described
1058 above.</para></listitem>
1059 </varlistentry>
1060
1061 <varlistentry>
1062 <term><varname>EmitNTP=</varname></term>
1063 <term><varname>NTP=</varname></term>
1064
1065 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
b938cb90 1066 <varname>DNS=</varname> settings described above, these
ad943783
LP
1067 settings configure whether and what NTP server information
1068 shall be emitted as part of the DHCP lease. The same syntax,
1069 propagation semantics and defaults apply as for
1070 <varname>EmitDNS=</varname> and
1071 <varname>DNS=</varname>.</para></listitem>
1072 </varlistentry>
1073
77ff6022
CG
1074 <varlistentry>
1075 <term><varname>EmitRouter=</varname></term>
1076
1077 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1078 setting described above, this setting configures whether the
1079 DHCP lease should contain the router option. The same syntax,
1080 propagation semantics and defaults apply as for
1081 <varname>EmitDNS=</varname>.</para></listitem>
1082 </varlistentry>
1083
ad943783
LP
1084 <varlistentry>
1085 <term><varname>EmitTimezone=</varname></term>
1086 <term><varname>Timezone=</varname></term>
1087
1088 <listitem><para>Configures whether the DHCP leases handed out
1089 to clients shall contain timezone information. The
1090 <varname>EmitTimezone=</varname> setting takes a boolean
1091 argument and defaults to <literal>yes</literal>. The
1092 <varname>Timezone=</varname> setting takes a timezone string
1093 (such as <literal>Europe/Berlin</literal> or
1094 <literal>UTC</literal>) to pass to clients. If no explicit
b938cb90 1095 timezone is set, the system timezone of the local host is
ad943783
LP
1096 propagated, as determined by the
1097 <filename>/etc/localtime</filename> symlink.</para></listitem>
1098 </varlistentry>
1099
1100 </variablelist>
1101 </refsect1>
1102
798d3a52
ZJS
1103 <refsect1>
1104 <title>[Bridge] Section Options</title>
1105 <para>The <literal>[Bridge]</literal> section accepts the
1106 following keys.</para>
1107 <variablelist class='network-directives'>
165c41a9
SS
1108 <varlistentry>
1109 <term><varname>UnicastFlood=</varname></term>
1110 <listitem>
072f9e4a
ZJS
1111 <para>A boolean. Controls whether the bridge should flood
1112 traffic for which an FDB entry is missing and the destination
1113 is unknown through this port. Defaults to on.
47c7dfe2 1114 </para>
165c41a9
SS
1115 </listitem>
1116 </varlistentry>
1117 <varlistentry>
1118 <term><varname>HairPin=</varname></term>
1119 <listitem>
47c7dfe2
ZJS
1120 <para>A boolean. Configures whether traffic may be sent back
1121 out of the port on which it was received. By default, this
1122 flag is false, and the bridge will not forward traffic back
1123 out of the receiving port.</para>
165c41a9
SS
1124 </listitem>
1125 </varlistentry>
1126 <varlistentry>
84c34096 1127 <term><varname>UseBPDU=</varname></term>
165c41a9 1128 <listitem>
47c7dfe2 1129 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
84c34096 1130 processed by the bridge port. Defaults to yes.</para>
165c41a9
SS
1131 </listitem>
1132 </varlistentry>
1133 <varlistentry>
1134 <term><varname>FastLeave=</varname></term>
1135 <listitem>
47c7dfe2 1136 <para>A boolean. This flag allows the bridge to immediately stop multicast
a8eaaee7 1137 traffic on a port that receives an IGMP Leave message. It is only used with
47c7dfe2 1138 IGMP snooping if enabled on the bridge. Defaults to off.</para>
165c41a9
SS
1139 </listitem>
1140 </varlistentry>
1141 <varlistentry>
23da66bb 1142 <term><varname>AllowPortToBeRoot=</varname></term>
165c41a9 1143 <listitem>
47c7dfe2
ZJS
1144 <para>A boolean. Configures whether a given port is allowed to
1145 become a root port. Only used when STP is enabled on the bridge.
23da66bb 1146 Defaults to on.</para>
165c41a9
SS
1147 </listitem>
1148 </varlistentry>
798d3a52
ZJS
1149 <varlistentry>
1150 <term><varname>Cost=</varname></term>
1151 <listitem>
47c7dfe2 1152 <para>Sets the "cost" of sending packets of this interface.
a8eaaee7 1153 Each port in a bridge may have a different speed and the cost
798d3a52 1154 is used to decide which link to use. Faster interfaces
47c7dfe2 1155 should have lower costs.</para>
798d3a52
ZJS
1156 </listitem>
1157 </varlistentry>
1158 </variablelist>
1159 </refsect1>
798d3a52
ZJS
1160 <refsect1>
1161 <title>[BridgeFDB] Section Options</title>
1162 <para>The <literal>[BridgeFDB]</literal> section manages the
1163 forwarding database table of a port and accepts the following
1164 keys. Specify several <literal>[BridgeFDB]</literal> sections to
1165 configure several static MAC table entries.</para>
1166
1167 <variablelist class='network-directives'>
1168 <varlistentry>
1169 <term><varname>MACAddress=</varname></term>
1170 <listitem>
1171 <para>As in the <literal>[Network]</literal> section. This
1172 key is mandatory.</para>
1173 </listitem>
1174 </varlistentry>
1175 <varlistentry>
1176 <term><varname>VLANId=</varname></term>
1177 <listitem>
a8eaaee7
JE
1178 <para>The VLAN ID for the new static MAC table entry. If
1179 omitted, no VLAN ID info is appended to the new static MAC
798d3a52
ZJS
1180 table entry.</para>
1181 </listitem>
1182 </varlistentry>
1183 </variablelist>
1184 </refsect1>
13b498f9
TJ
1185 <refsect1>
1186 <title>[BridgeVLAN] Section Options</title>
1187 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
1188 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
1189 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
1190 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1191
1192 <variablelist class='network-directives'>
1193 <varlistentry>
1194 <term><varname>VLAN=</varname></term>
1195 <listitem>
1196 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1197 from 1 to 4094.</para>
1198 </listitem>
1199 </varlistentry>
1200 <varlistentry>
1201 <term><varname>EgressUntagged=</varname></term>
1202 <listitem>
1203 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1204 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
1205 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
1206 </listitem>
1207 </varlistentry>
1208 <varlistentry>
1209 <term><varname>PVID=</varname></term>
1210 <listitem>
1211 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1212 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
1213 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
1214 </listitem>
1215 </varlistentry>
1216 </variablelist>
1217 </refsect1>
798d3a52
ZJS
1218
1219 <refsect1>
1220 <title>Example</title>
1221 <example>
12b42c76 1222 <title>/etc/systemd/network/50-static.network</title>
798d3a52
ZJS
1223
1224 <programlisting>[Match]
eac684ef
TG
1225Name=enp2s0
1226
1227[Network]
1228Address=192.168.0.15/24
1229Gateway=192.168.0.1</programlisting>
798d3a52 1230 </example>
eac684ef 1231
798d3a52 1232 <example>
12b42c76 1233 <title>/etc/systemd/network/80-dhcp.network</title>
eac684ef 1234
798d3a52 1235 <programlisting>[Match]
eac684ef
TG
1236Name=en*
1237
1238[Network]
9c8ca3f7 1239DHCP=yes</programlisting>
798d3a52 1240 </example>
eac684ef 1241
798d3a52 1242 <example>
6c1695be 1243 <title>/etc/systemd/network/25-bridge-static.network</title>
f47c5c47 1244
798d3a52 1245 <programlisting>[Match]
f47c5c47 1246Name=bridge0
1247
1248[Network]
1249Address=192.168.0.15/24
1250Gateway=192.168.0.1
1251DNS=192.168.0.1</programlisting>
798d3a52 1252 </example>
f47c5c47 1253
798d3a52 1254 <example>
6c1695be 1255 <title>/etc/systemd/network/25-bridge-slave-interface.network</title>
f47c5c47 1256
798d3a52 1257 <programlisting>[Match]
f47c5c47 1258Name=enp2s0
1259
1260[Network]
1261Bridge=bridge0</programlisting>
13b498f9
TJ
1262 </example>
1263 <example>
1264 <title>/etc/systemd/network/25-bridge-slave-interface-vlan.network</title>
1265
1266 <programlisting>[Match]
1267Name=enp2s0
1268
1269[Network]
1270Bridge=bridge0
1271
1272[BridgeVLAN]
1273VLAN=1-32
1274PVID=42
1275EgressUntagged=42
1276
1277[BridgeVLAN]
1278VLAN=100-200
1279
1280[BridgeVLAN]
1281EgressUntagged=300-400</programlisting>
798d3a52
ZJS
1282 </example>
1283 <example>
6c1695be 1284 <title>/etc/systemd/network/25-ipip.network</title>
0a8a0fad 1285
798d3a52 1286 <programlisting>[Match]
0a8a0fad
TG
1287Name=em1
1288
1289[Network]
1290Tunnel=ipip-tun</programlisting>
798d3a52 1291 </example>
0a8a0fad 1292
798d3a52 1293 <example>
6c1695be 1294 <title>/etc/systemd/network/25-sit.network</title>
0a8a0fad 1295
798d3a52 1296 <programlisting>[Match]
0a8a0fad
TG
1297Name=em1
1298
1299[Network]
1300Tunnel=sit-tun</programlisting>
798d3a52 1301 </example>
0a8a0fad 1302
798d3a52 1303 <example>
6c1695be 1304 <title>/etc/systemd/network/25-gre.network</title>
0a8a0fad 1305
798d3a52 1306 <programlisting>[Match]
0a8a0fad
TG
1307Name=em1
1308
1309[Network]
1310Tunnel=gre-tun</programlisting>
798d3a52 1311 </example>
0a8a0fad 1312
798d3a52 1313 <example>
6c1695be 1314 <title>/etc/systemd/network/25-vti.network</title>
0a8a0fad 1315
798d3a52 1316 <programlisting>[Match]
0a8a0fad
TG
1317Name=em1
1318
1319[Network]
1320Tunnel=vti-tun</programlisting>
798d3a52 1321 </example>
d94facdc
MH
1322
1323 <example>
6c1695be 1324 <title>/etc/systemd/network/25-bond.network</title>
d94facdc
MH
1325
1326 <programlisting>[Match]
1327Name=bond1
1328
1329[Network]
1330DHCP=yes
6cb955c6
AR
1331</programlisting>
1332 </example>
1333
1334 <example>
1335 <title>/etc/systemd/network/25-vrf.network</title>
1336 <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>
1337 <programlisting>[Match]
1338Name=bond1
1339
1340[Network]
1341VRF=vrf-test
d94facdc
MH
1342</programlisting>
1343 </example>
1344
798d3a52
ZJS
1345 </refsect1>
1346
1347 <refsect1>
1348 <title>See Also</title>
1349 <para>
1350 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
f41b446a 1351 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 1352 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
aaa297d4
LP
1353 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1354 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
1355 </para>
1356 </refsect1>
eac684ef
TG
1357
1358</refentry>