]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.network.xml
networkd: support setting dhcp client listen port (#4631)
[thirdparty/systemd.git] / man / systemd.network.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 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
26 <refentryinfo>
27 <title>systemd.network</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Tom</firstname>
34 <surname>Gundersen</surname>
35 <email>teg@jklm.no</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.network</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.network</refname>
47 <refpurpose>Network configuration</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename><replaceable>network</replaceable>.network</filename></para>
52 </refsynopsisdiv>
53
54 <refsect1>
55 <title>Description</title>
56
57 <para>Network setup is performed by
58 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
59 </para>
60
61 <para>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>.
95 </para>
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
106 is applied, all later files are ignored, even if they match as
107 well.</para>
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>
117 <para>The hardware address of the interface (use full colon-delimited hexadecimal, e.g.,
118 01:23:45:67:89:ab).</para>
119 </listitem>
120 </varlistentry>
121 <varlistentry>
122 <term><varname>Path=</varname></term>
123 <listitem>
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>
127 </listitem>
128 </varlistentry>
129 <varlistentry>
130 <term><varname>Driver=</varname></term>
131 <listitem>
132 <para>A whitespace-separated list of shell-style globs
133 matching the driver currently bound to the device, as
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>
143 <para>A whitespace-separated list of shell-style globs
144 matching the device type, as exposed by the udev property
145 <literal>DEVTYPE</literal>.</para>
146 </listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><varname>Name=</varname></term>
150 <listitem>
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>
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>
211 <para>The hardware address to set for the device.</para>
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>
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>
222 </listitem>
223 </varlistentry>
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>
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>
254 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
255 <literal>yes</literal>, <literal>no</literal>,
256 <literal>ipv4</literal>, or <literal>ipv6</literal>.</para>
257
258 <para>Note that DHCPv6 will by default be triggered by Router
259 Advertisement, if that is enabled, regardless of this parameter.
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
263 <literal>IPv6AcceptRA=</literal>.</para>
264
265 <para>Furthermore, note that by default the domain name
266 specified through DHCP is not used for name resolution.
267 See option <option>UseDomains=</option> below.</para>
268
269 <para>See the <literal>[DHCP]</literal> section below for further configuration options for the DHCP client
270 support.</para>
271 </listitem>
272 </varlistentry>
273 <varlistentry>
274 <term><varname>DHCPServer=</varname></term>
275 <listitem>
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>
280 </listitem>
281 </varlistentry>
282 <varlistentry>
283 <term><varname>LinkLocalAddressing=</varname></term>
284 <listitem>
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>
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>
301 <term><varname>IPv6Token=</varname></term>
302 <listitem>
303 <para>An IPv6 address with the top 64 bits unset. When set, indicates the
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
306 in the case DHCP is requested by router advertisement. By default, the
307 token is autogenerated.</para>
308 </listitem>
309 </varlistentry>
310 <varlistentry>
311 <term><varname>LLMNR=</varname></term>
312 <listitem>
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>
334 </listitem>
335 </varlistentry>
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>
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>
368 <varlistentry>
369 <term><varname>LLDP=</varname></term>
370 <listitem>
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
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
377 others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
378 <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
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.
381 </para>
382 </listitem>
383 </varlistentry>
384 <varlistentry>
385 <term><varname>EmitLLDP=</varname></term>
386 <listitem>
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
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
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>
407 </listitem>
408 </varlistentry>
409 <varlistentry>
410 <term><varname>BindCarrier=</varname></term>
411 <listitem>
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.
415 </para>
416 </listitem>
417 </varlistentry>
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
425 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
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
451 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
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
462 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
463 This option may be specified more than once. This setting is read by
464 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
465 </listitem>
466 </varlistentry>
467 <varlistentry>
468 <term><varname>Domains=</varname></term>
469 <listitem>
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>
488
489 <para>This setting is read by
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>
495 </listitem>
496 </varlistentry>
497 <varlistentry>
498 <term><varname>NTP=</varname></term>
499 <listitem>
500 <para>An NTP server address. This option may be specified more than once. This setting is read by
501 <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
502 </listitem>
503 </varlistentry>
504 <varlistentry>
505 <term><varname>IPForward=</varname></term>
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
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
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>
528 </listitem>
529 </varlistentry>
530 <varlistentry>
531 <term><varname>IPMasquerade=</varname></term>
532 <listitem><para>Configures IP masquerading for the network
533 interface. If enabled, packets forwarded from the network
534 interface will be appear as coming from the local host.
535 Takes a boolean argument. Implies
536 <varname>IPForward=ipv4</varname>. Defaults to
537 <literal>no</literal>.</para></listitem>
538 </varlistentry>
539 <varlistentry>
540 <term><varname>IPv6PrivacyExtensions=</varname></term>
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
547 <literal>kernel</literal>. When true, enables the privacy
548 extensions and prefers temporary addresses over public
549 addresses. When <literal>prefer-public</literal>, enables the
550 privacy extensions, but prefers public addresses over
551 temporary addresses. When false, the privacy extensions
552 remain disabled. When <literal>kernel</literal>, the kernel's
553 default setting will be left in place. Defaults to
554 <literal>no</literal>.</para></listitem>
555 </varlistentry>
556 <varlistentry>
557 <term><varname>IPv6AcceptRA=</varname></term>
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
565 <literal>[IPv6AcceptRA]</literal> section, see below.</para>
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>
571 </listitem>
572 </varlistentry>
573 <varlistentry>
574 <term><varname>IPv6DuplicateAddressDetection=</varname></term>
575 <listitem><para>Configures the amount of IPv6 Duplicate
576 Address Detection (DAD) probes to send. Defaults to unset.
577 </para></listitem>
578 </varlistentry>
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>
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>
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>
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>
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
674 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
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>
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>
698 <varlistentry>
699 <term><varname>HomeAddress=</varname></term>
700 <listitem>
701 <para>Takes a boolean argument. Designates this address the "home address" as defined in
702 <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>.
703 Supported only on IPv6. Defaults to false.</para>
704 </listitem>
705 </varlistentry>
706 <varlistentry>
707 <term><varname>DuplicateAddressDetection=</varname></term>
708 <listitem>
709 <para>Takes a boolean argument. Do not perform Duplicate Address Detection
710 <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink> when adding this address.
711 Supported only on IPv6. Defaults to false.</para>
712 </listitem>
713 </varlistentry>
714 <varlistentry>
715 <term><varname>ManageTemporaryAddress=</varname></term>
716 <listitem>
717 <para>Takes a boolean argument. If true the kernel manage temporary addresses created
718 from this one as template on behalf of Privacy Extensions
719 <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become
720 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
721 The given address needs to have a prefix length of 64. This flag allows to use privacy
722 extensions in a manually configured network, just like if stateless auto-configuration
723 was active. Defaults to false. </para>
724 </listitem>
725 </varlistentry>
726 <varlistentry>
727 <term><varname>PrefixRoute=</varname></term>
728 <listitem>
729 <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace
730 application needs a way to suppress adding a prefix route. This is for example relevant
731 together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses,
732 but depending on on-link, no route for the prefix should be added. Defaults to false.</para>
733 </listitem>
734 </varlistentry>
735 <varlistentry>
736 <term><varname>AutoJoin=</varname></term>
737 <listitem>
738 <para>Takes a boolean argument. Joining multicast group on ethernet level via
739 <command>ip maddr</command> command would not work if we have an Ethernet switch that does
740 IGMP snooping since the switch would not replicate multicast packets on ports that did not
741 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
742 <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option
743 that enables then to do the required join. By extending ip address command with option
744 <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan
745 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
746 Defaults to <literal>no</literal>.</para>
747 </listitem>
748 </varlistentry>
749 </variablelist>
750 </refsect1>
751
752 <refsect1>
753 <title>[Route] Section Options</title>
754 <para>The <literal>[Route]</literal> section accepts the
755 following keys. Specify several <literal>[Route]</literal>
756 sections to configure several routes.</para>
757
758 <variablelist class='network-directives'>
759 <varlistentry>
760 <term><varname>Gateway=</varname></term>
761 <listitem>
762 <para>As in the <literal>[Network]</literal> section.</para>
763 </listitem>
764 </varlistentry>
765 <varlistentry>
766 <term><varname>Destination=</varname></term>
767 <listitem>
768 <para>The destination prefix of the route. Possibly
769 followed by a slash and the prefix length. If omitted, a
770 full-length host route is assumed.</para>
771 </listitem>
772 </varlistentry>
773 <varlistentry>
774 <term><varname>Source=</varname></term>
775 <listitem>
776 <para>The source prefix of the route. Possibly followed by
777 a slash and the prefix length. If omitted, a full-length
778 host route is assumed.</para>
779 </listitem>
780 </varlistentry>
781 <varlistentry>
782 <term><varname>Metric=</varname></term>
783 <listitem>
784 <para>The metric of the route (an unsigned integer).</para>
785 </listitem>
786 </varlistentry>
787 <varlistentry>
788 <term><varname>Scope=</varname></term>
789 <listitem>
790 <para>The scope of the route, which can be <literal>global</literal>,
791 <literal>link</literal> or <literal>host</literal>. Defaults to
792 <literal>global</literal>.</para>
793 </listitem>
794 </varlistentry>
795 <varlistentry>
796 <term><varname>PreferredSource=</varname></term>
797 <listitem>
798 <para>The preferred source address of the route. The address
799 must be in the format described in
800 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
801 </listitem>
802 </varlistentry>
803 <varlistentry>
804 <term><varname>Table=<replaceable>num</replaceable></varname></term>
805 <listitem>
806 <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset).
807 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
808 </para>
809 </listitem>
810 </varlistentry>
811 </variablelist>
812 </refsect1>
813
814 <refsect1>
815 <title>[DHCP] Section Options</title>
816 <para>The <literal>[DHCP]</literal> section configures the
817 DHCPv4 and DHCP6 client, if it is enabled with the
818 <varname>DHCP=</varname> setting described above:</para>
819
820 <variablelist class='network-directives'>
821 <varlistentry>
822 <term><varname>UseDNS=</varname></term>
823 <listitem>
824 <para>When true (the default), the DNS servers received
825 from the DHCP server will be used and take precedence over
826 any statically configured ones.</para>
827
828 <para>This corresponds to the <option>nameserver</option>
829 option in <citerefentry
830 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
831 </listitem>
832 </varlistentry>
833 <varlistentry>
834 <term><varname>UseNTP=</varname></term>
835 <listitem>
836 <para>When true (the default), the NTP servers received
837 from the DHCP server will be used by systemd-timesyncd
838 and take precedence over any statically configured ones.</para>
839 </listitem>
840 </varlistentry>
841 <varlistentry>
842 <term><varname>UseMTU=</varname></term>
843 <listitem>
844 <para>When true, the interface maximum transmission unit
845 from the DHCP server will be used on the current link.
846 Defaults to false.</para>
847 </listitem>
848 </varlistentry>
849 <varlistentry>
850 <term><varname>SendHostname=</varname></term>
851 <listitem>
852 <para>When true (the default), the machine's hostname will
853 be sent to the DHCP server.</para>
854 </listitem>
855 </varlistentry>
856 <varlistentry>
857 <term><varname>UseHostname=</varname></term>
858 <listitem>
859 <para>When true (the default), the hostname received from
860 the DHCP server will be set as the transient hostname of the system
861 </para>
862 </listitem>
863 </varlistentry>
864 <varlistentry>
865 <term><varname>Hostname=</varname></term>
866 <listitem>
867 <para>Use this value for the hostname which is sent to the
868 DHCP server, instead of machine's hostname.</para>
869 </listitem>
870 </varlistentry>
871 <varlistentry>
872 <term><varname>UseDomains=</varname></term>
873 <listitem>
874 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
875 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
876 the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from
877 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
878 the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to
879 false.</para>
880
881 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
882 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
883 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
884 single-label names.</para>
885
886 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
887 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
888 </listitem>
889 </varlistentry>
890 <varlistentry>
891 <term><varname>UseRoutes=</varname></term>
892 <listitem>
893 <para>When true (the default), the static routes will be
894 requested from the DHCP server and added to the routing
895 table with a metric of 1024.</para>
896 </listitem>
897 </varlistentry>
898
899 <varlistentry>
900 <term><varname>UseTimezone=</varname></term>
901
902 <listitem><para>When true, the timezone received from the
903 DHCP server will be set as timezone of the local
904 system. Defaults to <literal>no</literal>.</para></listitem>
905 </varlistentry>
906
907 <varlistentry>
908 <term><varname>CriticalConnection=</varname></term>
909 <listitem>
910 <para>When true, the connection will never be torn down
911 even if the DHCP lease expires. This is contrary to the
912 DHCP specification, but may be the best choice if, say,
913 the root filesystem relies on this connection. Defaults to
914 false.</para>
915 </listitem>
916 </varlistentry>
917
918 <varlistentry>
919 <term><varname>ClientIdentifier=</varname></term>
920 <listitem>
921 <para>The DHCPv4 client identifier to use. Either <literal>mac</literal> to use the MAC address of the link
922 or <literal>duid</literal> (the default, see below) to use an RFC4361-compliant Client ID.</para>
923 </listitem>
924 </varlistentry>
925
926 <varlistentry>
927 <term><varname>VendorClassIdentifier=</varname></term>
928 <listitem>
929 <para>The vendor class identifier used to identify vendor
930 type and configuration.</para>
931 </listitem>
932 </varlistentry>
933
934 <varlistentry>
935 <term><varname>DUIDType=</varname></term>
936 <listitem>
937 <para>Override the global <varname>DUIDType</varname> setting for this network. See
938 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
939 for a description of possible values.</para>
940 </listitem>
941 </varlistentry>
942
943 <varlistentry>
944 <term><varname>DUIDRawData=</varname></term>
945 <listitem>
946 <para>Override the global <varname>DUIDRawData</varname> setting for this network. See
947 <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
948 for a description of possible values.</para>
949 </listitem>
950 </varlistentry>
951
952 <varlistentry>
953 <term><varname>IAID=</varname></term>
954 <listitem>
955 <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para>
956 </listitem>
957 </varlistentry>
958
959 <varlistentry>
960 <term><varname>RequestBroadcast=</varname></term>
961 <listitem>
962 <para>Request the server to use broadcast messages before
963 the IP address has been configured. This is necessary for
964 devices that cannot receive RAW packets, or that cannot
965 receive packets at all before an IP address has been
966 configured. On the other hand, this must not be enabled on
967 networks where broadcasts are filtered out.</para>
968 </listitem>
969 </varlistentry>
970
971 <varlistentry>
972 <term><varname>RouteMetric=</varname></term>
973 <listitem>
974 <para>Set the routing metric for routes specified by the
975 DHCP server.</para>
976 </listitem>
977 </varlistentry>
978
979 <varlistentry>
980 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
981 <listitem>
982 <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset).
983 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
984 </para>
985 </listitem>
986 </varlistentry>
987
988 <varlistentry>
989 <term><varname>ListenPort=</varname></term>
990 <listitem>
991 <para>Allow setting custom port for the DHCP client to listen on.</para>
992 </listitem>
993 </varlistentry>
994 </variablelist>
995 </refsect1>
996
997 <refsect1>
998 <title>[IPv6AcceptRA] Section Options</title>
999 <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
1000 (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
1001 above:</para>
1002
1003 <variablelist class='network-directives'>
1004 <varlistentry>
1005 <term><varname>UseDNS=</varname></term>
1006 <listitem>
1007 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1008 precedence over any statically configured ones.</para>
1009
1010 <para>This corresponds to the <option>nameserver</option> option in <citerefentry
1011 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1012 </listitem>
1013 </varlistentry>
1014
1015 <varlistentry>
1016 <term><varname>UseDomains=</varname></term>
1017 <listitem>
1018 <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name
1019 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1020 the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name
1021 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1022 effect of the <option>Domains=</option> setting when the argument is prefixed with
1023 <literal>~</literal>. Defaults to false.</para>
1024
1025 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1026 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1027 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1028 single-label names.</para>
1029
1030 <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry
1031 project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1032 </listitem>
1033 </varlistentry>
1034
1035 <varlistentry>
1036 <term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
1037 <listitem>
1038 <para>The table identifier for the routes received in the Router Advertisement
1039 (a number between 1 and 4294967295, or 0 to unset).
1040 The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
1041 </para>
1042 </listitem>
1043 </varlistentry>
1044 </variablelist>
1045 </refsect1>
1046
1047
1048 <refsect1>
1049 <title>[DHCPServer] Section Options</title>
1050 <para>The <literal>[DHCPServer]</literal> section contains
1051 settings for the DHCP server, if enabled via the
1052 <varname>DHCPServer=</varname> option described above:</para>
1053
1054 <variablelist class='network-directives'>
1055
1056 <varlistentry>
1057 <term><varname>PoolOffset=</varname></term>
1058 <term><varname>PoolSize=</varname></term>
1059
1060 <listitem><para>Configures the pool of addresses to hand out. The pool
1061 is a contiguous sequence of IP addresses in the subnet configured for
1062 the server address, which does not include the subnet nor the broadcast
1063 address. <varname>PoolOffset=</varname> takes the offset of the pool
1064 from the start of subnet, or zero to use the default value.
1065 <varname>PoolSize=</varname> takes the number of IP addresses in the
1066 pool or zero to use the default value. By default, the pool starts at
1067 the first address after the subnet address and takes up the rest of
1068 the subnet, excluding the broadcast address. If the pool includes
1069 the server address (the default), this is reserved and not handed
1070 out to clients.</para></listitem>
1071 </varlistentry>
1072
1073 <varlistentry>
1074 <term><varname>DefaultLeaseTimeSec=</varname></term>
1075 <term><varname>MaxLeaseTimeSec=</varname></term>
1076
1077 <listitem><para>Control the default and maximum DHCP lease
1078 time to pass to clients. These settings take time values in seconds or
1079 another common time unit, depending on the suffix. The default
1080 lease time is used for clients that did not ask for a specific
1081 lease time. If a client asks for a lease time longer than the
1082 maximum lease time, it is automatically shortened to the
1083 specified time. The default lease time defaults to 1h, the
1084 maximum lease time to 12h. Shorter lease times are beneficial
1085 if the configuration data in DHCP leases changes frequently
1086 and clients shall learn the new settings with shorter
1087 latencies. Longer lease times reduce the generated DHCP
1088 network traffic.</para></listitem>
1089 </varlistentry>
1090
1091 <varlistentry>
1092 <term><varname>EmitDNS=</varname></term>
1093 <term><varname>DNS=</varname></term>
1094
1095 <listitem><para>Configures whether the DHCP leases handed out
1096 to clients shall contain DNS server information. The
1097 <varname>EmitDNS=</varname> setting takes a boolean argument
1098 and defaults to <literal>yes</literal>. The DNS servers to
1099 pass to clients may be configured with the
1100 <varname>DNS=</varname> option, which takes a list of IPv4
1101 addresses. If the <varname>EmitDNS=</varname> option is
1102 enabled but no servers configured, the servers are
1103 automatically propagated from an "uplink" interface that has
1104 appropriate servers set. The "uplink" interface is determined
1105 by the default route of the system with the highest
1106 priority. Note that this information is acquired at the time
1107 the lease is handed out, and does not take uplink interfaces
1108 into account that acquire DNS or NTP server information at a
1109 later point. DNS server propagation does not take
1110 <filename>/etc/resolv.conf</filename> into account. Also, note
1111 that the leases are not refreshed if the uplink network
1112 configuration changes. To ensure clients regularly acquire the
1113 most current uplink DNS server information, it is thus
1114 advisable to shorten the DHCP lease time via
1115 <varname>MaxLeaseTimeSec=</varname> described
1116 above.</para></listitem>
1117 </varlistentry>
1118
1119 <varlistentry>
1120 <term><varname>EmitNTP=</varname></term>
1121 <term><varname>NTP=</varname></term>
1122
1123 <listitem><para>Similar to the <varname>EmitDNS=</varname> and
1124 <varname>DNS=</varname> settings described above, these
1125 settings configure whether and what NTP server information
1126 shall be emitted as part of the DHCP lease. The same syntax,
1127 propagation semantics and defaults apply as for
1128 <varname>EmitDNS=</varname> and
1129 <varname>DNS=</varname>.</para></listitem>
1130 </varlistentry>
1131
1132 <varlistentry>
1133 <term><varname>EmitRouter=</varname></term>
1134
1135 <listitem><para>Similar to the <varname>EmitDNS=</varname>
1136 setting described above, this setting configures whether the
1137 DHCP lease should contain the router option. The same syntax,
1138 propagation semantics and defaults apply as for
1139 <varname>EmitDNS=</varname>.</para></listitem>
1140 </varlistentry>
1141
1142 <varlistentry>
1143 <term><varname>EmitTimezone=</varname></term>
1144 <term><varname>Timezone=</varname></term>
1145
1146 <listitem><para>Configures whether the DHCP leases handed out
1147 to clients shall contain timezone information. The
1148 <varname>EmitTimezone=</varname> setting takes a boolean
1149 argument and defaults to <literal>yes</literal>. The
1150 <varname>Timezone=</varname> setting takes a timezone string
1151 (such as <literal>Europe/Berlin</literal> or
1152 <literal>UTC</literal>) to pass to clients. If no explicit
1153 timezone is set, the system timezone of the local host is
1154 propagated, as determined by the
1155 <filename>/etc/localtime</filename> symlink.</para></listitem>
1156 </varlistentry>
1157
1158 </variablelist>
1159 </refsect1>
1160
1161 <refsect1>
1162 <title>[Bridge] Section Options</title>
1163 <para>The <literal>[Bridge]</literal> section accepts the
1164 following keys.</para>
1165 <variablelist class='network-directives'>
1166 <varlistentry>
1167 <term><varname>UnicastFlood=</varname></term>
1168 <listitem>
1169 <para>A boolean. Controls whether the bridge should flood
1170 traffic for which an FDB entry is missing and the destination
1171 is unknown through this port. Defaults to on.
1172 </para>
1173 </listitem>
1174 </varlistentry>
1175 <varlistentry>
1176 <term><varname>HairPin=</varname></term>
1177 <listitem>
1178 <para>A boolean. Configures whether traffic may be sent back
1179 out of the port on which it was received. By default, this
1180 flag is false, and the bridge will not forward traffic back
1181 out of the receiving port.</para>
1182 </listitem>
1183 </varlistentry>
1184 <varlistentry>
1185 <term><varname>UseBPDU=</varname></term>
1186 <listitem>
1187 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
1188 processed by the bridge port. Defaults to yes.</para>
1189 </listitem>
1190 </varlistentry>
1191 <varlistentry>
1192 <term><varname>FastLeave=</varname></term>
1193 <listitem>
1194 <para>A boolean. This flag allows the bridge to immediately stop multicast
1195 traffic on a port that receives an IGMP Leave message. It is only used with
1196 IGMP snooping if enabled on the bridge. Defaults to off.</para>
1197 </listitem>
1198 </varlistentry>
1199 <varlistentry>
1200 <term><varname>AllowPortToBeRoot=</varname></term>
1201 <listitem>
1202 <para>A boolean. Configures whether a given port is allowed to
1203 become a root port. Only used when STP is enabled on the bridge.
1204 Defaults to on.</para>
1205 </listitem>
1206 </varlistentry>
1207 <varlistentry>
1208 <term><varname>Cost=</varname></term>
1209 <listitem>
1210 <para>Sets the "cost" of sending packets of this interface.
1211 Each port in a bridge may have a different speed and the cost
1212 is used to decide which link to use. Faster interfaces
1213 should have lower costs.</para>
1214 </listitem>
1215 </varlistentry>
1216 </variablelist>
1217 </refsect1>
1218 <refsect1>
1219 <title>[BridgeFDB] Section Options</title>
1220 <para>The <literal>[BridgeFDB]</literal> section manages the
1221 forwarding database table of a port and accepts the following
1222 keys. Specify several <literal>[BridgeFDB]</literal> sections to
1223 configure several static MAC table entries.</para>
1224
1225 <variablelist class='network-directives'>
1226 <varlistentry>
1227 <term><varname>MACAddress=</varname></term>
1228 <listitem>
1229 <para>As in the <literal>[Network]</literal> section. This
1230 key is mandatory.</para>
1231 </listitem>
1232 </varlistentry>
1233 <varlistentry>
1234 <term><varname>VLANId=</varname></term>
1235 <listitem>
1236 <para>The VLAN ID for the new static MAC table entry. If
1237 omitted, no VLAN ID info is appended to the new static MAC
1238 table entry.</para>
1239 </listitem>
1240 </varlistentry>
1241 </variablelist>
1242 </refsect1>
1243 <refsect1>
1244 <title>[BridgeVLAN] Section Options</title>
1245 <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts
1246 the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries.
1247 The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in
1248 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
1249
1250 <variablelist class='network-directives'>
1251 <varlistentry>
1252 <term><varname>VLAN=</varname></term>
1253 <listitem>
1254 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1255 from 1 to 4094.</para>
1256 </listitem>
1257 </varlistentry>
1258 <varlistentry>
1259 <term><varname>EgressUntagged=</varname></term>
1260 <listitem>
1261 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1262 <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the
1263 VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para>
1264 </listitem>
1265 </varlistentry>
1266 <varlistentry>
1267 <term><varname>PVID=</varname></term>
1268 <listitem>
1269 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1270 <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of
1271 <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para>
1272 </listitem>
1273 </varlistentry>
1274 </variablelist>
1275 </refsect1>
1276
1277 <refsect1>
1278 <title>Example</title>
1279 <example>
1280 <title>/etc/systemd/network/50-static.network</title>
1281
1282 <programlisting>[Match]
1283 Name=enp2s0
1284
1285 [Network]
1286 Address=192.168.0.15/24
1287 Gateway=192.168.0.1</programlisting>
1288 </example>
1289
1290 <example>
1291 <title>/etc/systemd/network/80-dhcp.network</title>
1292
1293 <programlisting>[Match]
1294 Name=en*
1295
1296 [Network]
1297 DHCP=yes</programlisting>
1298 </example>
1299
1300 <example>
1301 <title>/etc/systemd/network/25-bridge-static.network</title>
1302
1303 <programlisting>[Match]
1304 Name=bridge0
1305
1306 [Network]
1307 Address=192.168.0.15/24
1308 Gateway=192.168.0.1
1309 DNS=192.168.0.1</programlisting>
1310 </example>
1311
1312 <example>
1313 <title>/etc/systemd/network/25-bridge-slave-interface.network</title>
1314
1315 <programlisting>[Match]
1316 Name=enp2s0
1317
1318 [Network]
1319 Bridge=bridge0</programlisting>
1320 </example>
1321 <example>
1322 <title>/etc/systemd/network/25-bridge-slave-interface-vlan.network</title>
1323
1324 <programlisting>[Match]
1325 Name=enp2s0
1326
1327 [Network]
1328 Bridge=bridge0
1329
1330 [BridgeVLAN]
1331 VLAN=1-32
1332 PVID=42
1333 EgressUntagged=42
1334
1335 [BridgeVLAN]
1336 VLAN=100-200
1337
1338 [BridgeVLAN]
1339 EgressUntagged=300-400</programlisting>
1340 </example>
1341 <example>
1342 <title>/etc/systemd/network/25-ipip.network</title>
1343
1344 <programlisting>[Match]
1345 Name=em1
1346
1347 [Network]
1348 Tunnel=ipip-tun</programlisting>
1349 </example>
1350
1351 <example>
1352 <title>/etc/systemd/network/25-sit.network</title>
1353
1354 <programlisting>[Match]
1355 Name=em1
1356
1357 [Network]
1358 Tunnel=sit-tun</programlisting>
1359 </example>
1360
1361 <example>
1362 <title>/etc/systemd/network/25-gre.network</title>
1363
1364 <programlisting>[Match]
1365 Name=em1
1366
1367 [Network]
1368 Tunnel=gre-tun</programlisting>
1369 </example>
1370
1371 <example>
1372 <title>/etc/systemd/network/25-vti.network</title>
1373
1374 <programlisting>[Match]
1375 Name=em1
1376
1377 [Network]
1378 Tunnel=vti-tun</programlisting>
1379 </example>
1380
1381 <example>
1382 <title>/etc/systemd/network/25-bond.network</title>
1383
1384 <programlisting>[Match]
1385 Name=bond1
1386
1387 [Network]
1388 DHCP=yes
1389 </programlisting>
1390 </example>
1391
1392 <example>
1393 <title>/etc/systemd/network/25-vrf.network</title>
1394 <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>
1395 <programlisting>[Match]
1396 Name=bond1
1397
1398 [Network]
1399 VRF=vrf-test
1400 </programlisting>
1401 </example>
1402
1403 </refsect1>
1404
1405 <refsect1>
1406 <title>See Also</title>
1407 <para>
1408 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1409 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1410 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1411 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1412 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1413 </para>
1414 </refsect1>
1415
1416 </refentry>