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