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">
6 SPDX-License-Identifier: LGPL-2.1+
8 This file is part of systemd.
10 Copyright 2013 Tom Gundersen
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 <refentry id=
"systemd.network" conditional='ENABLE_NETWORKD'
>
29 <title>systemd.network
</title>
30 <productname>systemd
</productname>
34 <contrib>Developer
</contrib>
35 <firstname>Tom
</firstname>
36 <surname>Gundersen
</surname>
37 <email>teg@jklm.no
</email>
43 <refentrytitle>systemd.network
</refentrytitle>
44 <manvolnum>5</manvolnum>
48 <refname>systemd.network
</refname>
49 <refpurpose>Network configuration
</refpurpose>
53 <para><filename><replaceable>network
</replaceable>.network
</filename></para>
57 <title>Description
</title>
59 <para>Network setup is performed by
60 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
63 <para>The main network file must have the extension
<filename>.network
</filename>; other
64 extensions are ignored. Networks are applied to links whenever the links appear.
</para>
66 <para>The
<filename>.network
</filename> files are read from the files located in the system
67 network directory
<filename>/usr/lib/systemd/network
</filename>, the volatile runtime network
68 directory
<filename>/run/systemd/network
</filename> and the local administration network
69 directory
<filename>/etc/systemd/network
</filename>. All configuration files are collectively
70 sorted and processed in lexical order, regardless of the directories in which they live.
71 However, files with identical filenames replace each other. Files in
<filename>/etc
</filename>
72 have the highest priority, files in
<filename>/run
</filename> take precedence over files with
73 the same name in
<filename>/usr/lib
</filename>. This can be used to override a system-supplied
74 configuration file with a local file if needed. As a special case, an empty file (file size
0)
75 or symlink with the same name pointing to
<filename>/dev/null
</filename> disables the
76 configuration file entirely (it is
"masked").
</para>
78 <para>Along with the network file
<filename>foo.network
</filename>, a
"drop-in" directory
79 <filename>foo.network.d/
</filename> may exist. All files with the suffix
80 <literal>.conf
</literal> from this directory will be parsed after the file itself is
81 parsed. This is useful to alter or add configuration settings, without having to modify the main
82 configuration file. Each drop-in file must have appropriate section headers.
</para>
84 <para>In addition to
<filename>/etc/systemd/network
</filename>, drop-in
<literal>.d
</literal>
85 directories can be placed in
<filename>/usr/lib/systemd/network
</filename> or
86 <filename>/run/systemd/network
</filename> directories. Drop-in files in
87 <filename>/etc
</filename> take precedence over those in
<filename>/run
</filename> which in turn
88 take precedence over those in
<filename>/usr/lib
</filename>. Drop-in files under any of these
89 directories take precedence over the main netdev file wherever located. (Of course, since
90 <filename>/run
</filename> is temporary and
<filename>/usr/lib
</filename> is for vendors, it is
91 unlikely drop-ins should be used in either of those places.)
</para>
93 <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
94 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
95 disabled for that interface by writing
"1" to
96 <filename>/proc/sys/net/ipv6/conf/
<replaceable>ifname
</replaceable>/disable_ipv6
</filename>.
101 <title>[Match] Section Options
</title>
103 <para>The network file contains a
<literal>[Match]
</literal>
104 section, which determines if a given network file may be applied
105 to a given device; and a
<literal>[Network]
</literal> section
106 specifying how the device should be configured. The first (in
107 lexical order) of the network files that matches a given device
108 is applied, all later files are ignored, even if they match as
111 <para>A network file is said to match a device if each of the
112 entries in the
<literal>[Match]
</literal> section matches, or if
113 the section is empty. The following keys are accepted:
</para>
115 <variablelist class='network-directives'
>
117 <term><varname>MACAddress=
</varname></term>
119 <para>The hardware address of the interface (use full colon-delimited hexadecimal, e.g.,
120 01:
23:
45:
67:
89:ab).
</para>
124 <term><varname>Path=
</varname></term>
126 <para>A whitespace-separated list of shell-style globs
127 matching the persistent path, as exposed by the udev
128 property
<literal>ID_PATH
</literal>. If the list is
129 prefixed with a
"!", the test is inverted; i.e. it is
130 true when
<literal>ID_PATH
</literal> does not match any
131 item in the list.
</para>
135 <term><varname>Driver=
</varname></term>
137 <para>A whitespace-separated list of shell-style globs
138 matching the driver currently bound to the device, as
139 exposed by the udev property
<literal>DRIVER
</literal>
140 of its parent device, or if that is not set the driver
141 as exposed by
<literal>ethtool -i
</literal> of the
142 device itself. If the list is prefixed with a
"!", the
143 test is inverted.
</para>
147 <term><varname>Type=
</varname></term>
149 <para>A whitespace-separated list of shell-style globs
150 matching the device type, as exposed by the udev property
151 <literal>DEVTYPE
</literal>. If the list is prefixed with
152 a
"!", the test is inverted.
</para>
156 <term><varname>Name=
</varname></term>
158 <para>A whitespace-separated list of shell-style globs
159 matching the device name, as exposed by the udev property
160 <literal>INTERFACE
</literal>. If the list is prefixed
161 with a
"!", the test is inverted.
</para>
165 <term><varname>Host=
</varname></term>
167 <para>Matches against the hostname or machine ID of the
168 host. See
<literal>ConditionHost=
</literal> in
169 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
175 <term><varname>Virtualization=
</varname></term>
177 <para>Checks whether the system is executed in a virtualized
178 environment and optionally test whether it is a specific
179 implementation. See
<literal>ConditionVirtualization=
</literal> in
180 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
186 <term><varname>KernelCommandLine=
</varname></term>
188 <para>Checks whether a specific kernel command line option is
189 set (or if prefixed with the exclamation mark unset). See
190 <literal>ConditionKernelCommandLine=
</literal> in
191 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
197 <term><varname>Architecture=
</varname></term>
199 <para>Checks whether the system is running on a specific
200 architecture. See
<literal>ConditionArchitecture=
</literal> in
201 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
211 <title>[Link] Section Options
</title>
213 <para> The
<literal>[Link]
</literal> section accepts the following keys:
</para>
215 <variablelist class='network-directives'
>
217 <term><varname>MACAddress=
</varname></term>
219 <para>The hardware address to set for the device.
</para>
223 <term><varname>MTUBytes=
</varname></term>
225 <para>The maximum transmission unit in bytes to set for the
226 device. The usual suffixes K, M, G, are supported and are
227 understood to the base of
1024.
</para>
228 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
229 below
1280 (the minimum MTU for IPv6) it will automatically be increased to this value.
</para>
233 <term><varname>ARP=
</varname></term>
235 <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol)
236 for this interface. Defaults to unset, which means that the kernel default will be used.
</para>
237 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
238 interfaces atop a single lower-level physical interface, which will then only serve as a
239 link/
"bridge" device aggregating traffic to the same physical link and not participate in
240 the network otherwise.
</para>
244 <term><varname>Unmanaged=
</varname></term>
246 <para>A boolean. When
<literal>yes
</literal>, no attempts are
247 made to bring up or configure matching links, equivalent to
248 when there are no matching network files. Defaults to
249 <literal>no
</literal>.
</para>
250 <para>This is useful for preventing later matching network
251 files from interfering with certain interfaces that are fully
252 controlled by other applications.
</para>
256 <term><varname>RequiredForOnline=
</varname></term>
258 <para>A boolean. When
<literal>yes
</literal>, the network is deemed
259 required when determining whether the system is online when running
260 <literal>systemd-networkd-wait-online
</literal>.
261 When
<literal>no
</literal>, the network is ignored when checking for
262 online state. Defaults to
<literal>yes
</literal>.
</para>
263 <para>The network will be brought up normally in all cases, but in
264 the event that there is no address being assigned by DHCP or the
265 cable is not plugged in, the link will simply remain offline and be
266 skipped automatically by
<literal>systemd-networkd-wait-online
</literal>
267 if
<literal>RequiredForOnline=true
</literal>.
</para>
274 <title>[Network] Section Options
</title>
276 <para>The
<literal>[Network]
</literal> section accepts the following keys:
</para>
278 <variablelist class='network-directives'
>
280 <term><varname>Description=
</varname></term>
282 <para>A description of the device. This is only used for
283 presentation purposes.
</para>
287 <term><varname>DHCP=
</varname></term>
289 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
290 <literal>yes
</literal>,
<literal>no
</literal>,
291 <literal>ipv4
</literal>, or
<literal>ipv6
</literal>. Defaults
292 to
<literal>no
</literal>.
</para>
294 <para>Note that DHCPv6 will by default be triggered by Router
295 Advertisement, if that is enabled, regardless of this parameter.
296 By enabling DHCPv6 support explicitly, the DHCPv6 client will
297 be started regardless of the presence of routers on the link,
298 or what flags the routers pass. See
299 <literal>IPv6AcceptRA=
</literal>.
</para>
301 <para>Furthermore, note that by default the domain name
302 specified through DHCP is not used for name resolution.
303 See option
<option>UseDomains=
</option> below.
</para>
305 <para>See the
<literal>[DHCP]
</literal> section below for further configuration options for the DHCP client
310 <term><varname>DHCPServer=
</varname></term>
312 <para>A boolean. Enables DHCPv4 server support. Defaults
313 to
<literal>no
</literal>. Further settings for the DHCP
314 server may be set in the
<literal>[DHCPServer]
</literal>
315 section described below.
</para>
319 <term><varname>LinkLocalAddressing=
</varname></term>
321 <para>Enables link-local address autoconfiguration. Accepts
322 <literal>yes
</literal>,
<literal>no
</literal>,
323 <literal>ipv4
</literal>, or
<literal>ipv6
</literal>. Defaults to
324 <literal>ipv6
</literal>.
</para>
328 <term><varname>IPv4LLRoute=
</varname></term>
330 <para>A boolean. When true, sets up the route needed for
331 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
337 <term><varname>IPv6Token=
</varname></term>
339 <para>An IPv6 address with the top
64 bits unset. When set, indicates the
340 64-bit interface part of SLAAC IPv6 addresses for this link. Note that
341 the token is only ever used for SLAAC, and not for DHCPv6 addresses, even
342 in the case DHCP is requested by router advertisement. By default, the
343 token is autogenerated.
</para>
347 <term><varname>LLMNR=
</varname></term>
349 <para>A boolean or
<literal>resolve
</literal>. When true,
351 url=
"https://tools.ietf.org/html/rfc4795">Link-Local
352 Multicast Name Resolution
</ulink> on the link. When set to
353 <literal>resolve
</literal>, only resolution is enabled,
354 but not host registration and announcement. Defaults to
355 true. This setting is read by
356 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
360 <term><varname>MulticastDNS=
</varname></term>
362 <para>A boolean or
<literal>resolve
</literal>. When true,
364 url=
"https://tools.ietf.org/html/rfc6762">Multicast
365 DNS
</ulink> support on the link. When set to
366 <literal>resolve
</literal>, only resolution is enabled,
367 but not host or service registration and
368 announcement. Defaults to false. This setting is read by
369 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
373 <term><varname>DNSSEC=
</varname></term>
376 <literal>allow-downgrade
</literal>. When true, enables
378 url=
"https://tools.ietf.org/html/rfc4033">DNSSEC
</ulink>
379 DNS validation support on the link. When set to
380 <literal>allow-downgrade
</literal>, compatibility with
381 non-DNSSEC capable networks is increased, by automatically
382 turning off DNSSEC in this case. This option defines a
383 per-interface setting for
384 <citerefentry><refentrytitle>resolved.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
385 global
<varname>DNSSEC=
</varname> option. Defaults to
386 false. This setting is read by
387 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
391 <term><varname>DNSSECNegativeTrustAnchors=
</varname></term>
392 <listitem><para>A space-separated list of DNSSEC negative
393 trust anchor domains. If specified and DNSSEC is enabled,
394 look-ups done via the interface's DNS server will be subject
395 to the list of negative trust anchors, and not require
396 authentication for the specified domains, or anything below
397 it. Use this to disable DNSSEC authentication for specific
398 private domains, that cannot be proven valid using the
399 Internet DNS hierarchy. Defaults to the empty list. This
401 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
405 <term><varname>LLDP=
</varname></term>
407 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
408 implemented on professional routers and bridges which announces which physical port a system is connected
409 to, as well as other related data. Accepts a boolean or the special value
410 <literal>routers-only
</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
411 neighbors maintained. If
<literal>routers-only
</literal> is set only LLDP data of various types of routers
412 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
413 others). If false, LLDP reception is disabled. Defaults to
<literal>routers-only
</literal>. Use
414 <citerefentry><refentrytitle>networkctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
415 collected neighbor data. LLDP is only available on Ethernet links. See
<varname>EmitLLDP=
</varname> below
416 for enabling LLDP packet emission from the local system.
421 <term><varname>EmitLLDP=
</varname></term>
423 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
424 <literal>nearest-bridge
</literal>,
<literal>non-tpmr-bridge
</literal> and
425 <literal>customer-bridge
</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
426 a short LLDP packet with information about the local system is sent out in regular intervals on the
427 link. The LLDP packet will contain information about the local host name, the local machine ID (as stored
428 in
<citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
429 local interface name, as well as the pretty hostname of the system (as set in
430 <citerefentry><refentrytitle>machine-info
</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
431 emission is only available on Ethernet links. Note that this setting passes data suitable for
432 identification of host to the network and should thus not be enabled on untrusted networks, where such
433 identification data should not be made available. Use this option to permit other systems to identify on
434 which interfaces they are connected to this system. The three special values control propagation of the
435 LLDP packets. The
<literal>nearest-bridge
</literal> setting permits propagation only to the nearest
436 connected bridge,
<literal>non-tpmr-bridge
</literal> permits propagation across Two-Port MAC Relays, but
437 not any other bridges, and
<literal>customer-bridge
</literal> permits propagation until a customer bridge
438 is reached. For details about these concepts, see
<ulink
439 url=
"http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE
802.1AB-
2009</ulink>. Note that
440 configuring this setting to true is equivalent to
<literal>nearest-bridge
</literal>, the recommended and
441 most restricted level of propagation. See
<varname>LLDP=
</varname> above for an option to enable LLDP
446 <term><varname>BindCarrier=
</varname></term>
448 <para>A link name or a list of link names. When set, controls the behavior of the current
449 link. When all links in the list are in an operational down state, the current link is brought
450 down. When at least one link has carrier, the current interface is brought up.
455 <term><varname>Address=
</varname></term>
457 <para>A static IPv4 or IPv6 address and its prefix length,
458 separated by a
<literal>/
</literal> character. Specify
459 this key more than once to configure several addresses.
460 The format of the address must be as described in
461 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
462 This is a short-hand for an [Address] section only
463 containing an Address key (see below). This option may be
464 specified more than once.
467 <para>If the specified address is
0.0.0.0 (for IPv4) or
468 [::] (for IPv6), a new address range of the requested size
469 is automatically allocated from a system-wide pool of
470 unused ranges. The allocated range is checked against all
471 current network interfaces and all known network
472 configuration files to avoid address range conflicts. The
473 default system-wide pool consists of
192.168.0.0/
16,
474 172.16.0.0/
12 and
10.0.0.0/
8 for IPv4, and fc00::/
7 for
475 IPv6. This functionality is useful to manage a large
476 number of dynamically created network interfaces with the
477 same network configuration and automatic address range
483 <term><varname>Gateway=
</varname></term>
485 <para>The gateway address, which must be in the format
487 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
488 This is a short-hand for a [Route] section only containing
489 a Gateway key. This option may be specified more than
494 <term><varname>DNS=
</varname></term>
496 <para>A DNS server address, which must be in the format
498 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
499 This option may be specified more than once. This setting is read by
500 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
504 <term><varname>Domains=
</varname></term>
506 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
507 should be a domain name, optionally prefixed with a tilde (
<literal>~
</literal>). The domains with the
508 prefix are called
"routing-only domains". The domains without the prefix are called
"search domains" and
509 are first used as search suffixes for extending single-label host names (host names containing no dots) to
510 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
511 each of the specified search domains are appended to it in turn, converting it into a fully qualified
512 domain name, until one of them may be successfully resolved.
</para>
514 <para>Both
"search" and
"routing-only" domains are used for routing of DNS queries: look-ups for host names
515 ending in those domains (hence also single label names, if any
"search domains" are listed), are routed to
516 the DNS servers configured for this interface. The domain routing logic is particularly useful on
517 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.
</para>
519 <para>The
"routing-only" domain
<literal>~.
</literal> (the tilde indicating definition of a routing domain,
520 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
521 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
522 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
523 if a link on which they are connected is available.
</para>
525 <para>This setting is read by
526 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
527 "Search domains" correspond to the
<varname>domain
</varname> and
<varname>search
</varname> entries in
528 <citerefentry project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
529 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
530 name servers limited to a specific link.
</para>
534 <term><varname>NTP=
</varname></term>
536 <para>An NTP server address. This option may be specified more than once. This setting is read by
537 <citerefentry><refentrytitle>systemd-timesyncd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
541 <term><varname>IPForward=
</varname></term>
542 <listitem><para>Configures IP packet forwarding for the
543 system. If enabled, incoming packets on any network
544 interface will be forwarded to any other interfaces
545 according to the routing table. Takes either a boolean
546 argument, or the values
<literal>ipv4
</literal> or
547 <literal>ipv6
</literal>, which only enable IP packet
548 forwarding for the specified address family. This controls
549 the
<filename>net.ipv4.ip_forward
</filename> and
550 <filename>net.ipv6.conf.all.forwarding
</filename> sysctl
551 options of the network interface (see
<ulink
552 url=
"https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt
</ulink>
553 for details about sysctl options). Defaults to
554 <literal>no
</literal>.
</para>
556 <para>Note: this setting controls a global kernel option,
557 and does so one way only: if a network that has this setting
558 enabled is set up the global setting is turned on. However,
559 it is never turned off again, even after all networks with
560 this setting enabled are shut down again.
</para>
562 <para>To allow IP packet forwarding only between specific
563 network interfaces use a firewall.
</para>
567 <term><varname>IPMasquerade=
</varname></term>
568 <listitem><para>Configures IP masquerading for the network
569 interface. If enabled, packets forwarded from the network
570 interface will be appear as coming from the local host.
571 Takes a boolean argument. Implies
572 <varname>IPForward=ipv4
</varname>. Defaults to
573 <literal>no
</literal>.
</para></listitem>
576 <term><varname>IPv6PrivacyExtensions=
</varname></term>
577 <listitem><para>Configures use of stateless temporary
578 addresses that change over time (see
<ulink
579 url=
"https://tools.ietf.org/html/rfc4941">RFC
4941</ulink>,
580 Privacy Extensions for Stateless Address Autoconfiguration
581 in IPv6). Takes a boolean or the special values
582 <literal>prefer-public
</literal> and
583 <literal>kernel
</literal>. When true, enables the privacy
584 extensions and prefers temporary addresses over public
585 addresses. When
<literal>prefer-public
</literal>, enables the
586 privacy extensions, but prefers public addresses over
587 temporary addresses. When false, the privacy extensions
588 remain disabled. When
<literal>kernel
</literal>, the kernel's
589 default setting will be left in place. Defaults to
590 <literal>no
</literal>.
</para></listitem>
593 <term><varname>IPv6AcceptRA=
</varname></term>
594 <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes
595 a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
596 forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
597 is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if
598 the relevant flags are set in the RA data, or if no routers are found on the link.
</para>
600 <para>Further settings for the IPv6 RA support may be configured in the
601 <literal>[IPv6AcceptRA]
</literal> section, see below.
</para>
603 <para>Also see
<ulink
604 url=
"https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt
</ulink> in the kernel
605 documentation regarding
<literal>accept_ra
</literal>, but note that systemd's setting of
606 <constant>1</constant> (i.e. true) corresponds to kernel's setting of
<constant>2</constant>.
</para>
610 <term><varname>IPv6DuplicateAddressDetection=
</varname></term>
611 <listitem><para>Configures the amount of IPv6 Duplicate
612 Address Detection (DAD) probes to send. Defaults to unset.
616 <term><varname>IPv6HopLimit=
</varname></term>
617 <listitem><para>Configures IPv6 Hop Limit. For each router that
618 forwards the packet, the hop limit is decremented by
1. When the
619 hop limit field reaches zero, the packet is discarded.
624 <term><varname>IPv4ProxyARP=
</varname></term>
625 <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
626 usually a router, answers ARP requests intended for another machine. By
"faking" its identity,
627 the router accepts responsibility for routing packets to the
"real" destination. (see
<ulink
628 url=
"https://tools.ietf.org/html/rfc1027">RFC
1027</ulink>.
633 <term><varname>IPv6ProxyNDP=
</varname></term>
634 <listitem><para>A boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery
635 Protocol) is a technique for IPv6 to allow routing of addresses to a different
636 destination when peers expect them to be present on a certain physical link.
637 In this case a router answers Neighbour Advertisement messages intended for
638 another machine by offering its own MAC address as destination.
639 Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour
640 Advertisement messages for addresses in the IPv6 neighbor proxy table,
641 which can also be shown by
<command>ip -
6 neighbour show proxy
</command>.
642 systemd-networkd will control the per-interface `proxy_ndp` switch for each configured
643 interface depending on this option.
648 <term><varname>IPv6ProxyNDPAddress=
</varname></term>
649 <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be
650 proxied. This option may be specified more than once. systemd-networkd will add the
651 <option>IPv6ProxyNDPAddress=
</option> entries to the kernel's IPv6 neighbor proxy table.
652 This option implies
<option>IPv6ProxyNDP=true
</option> but has no effect if
653 <option>IPv6ProxyNDP
</option> has been set to false. Defaults to unset.
657 <term><varname>IPv6PrefixDelegation=
</varname></term>
658 <listitem><para>Whether to enable or disable Router Advertisement sending on a link.
659 Defaults to
<literal>false
</literal>. See the
<literal>[IPv6PrefixDelegation]
</literal>
660 and the
<literal>[IPv6Prefix]
</literal> sections for configuration options.
664 <term><varname>Bridge=
</varname></term>
666 <para>The name of the bridge to add the link to. See
667 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
672 <term><varname>Bond=
</varname></term>
674 <para>The name of the bond to add the link to. See
675 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
680 <term><varname>VRF=
</varname></term>
682 <para>The name of the VRF to add the link to. See
683 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
688 <term><varname>VLAN=
</varname></term>
690 <para>The name of a VLAN to create on the link. See
691 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
692 This option may be specified more than once.
</para>
696 <term><varname>MACVLAN=
</varname></term>
698 <para>The name of a MACVLAN to create on the link. See
699 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
700 This option may be specified more than once.
</para>
704 <term><varname>VXLAN=
</varname></term>
706 <para>The name of a VXLAN to create on the link. See
707 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
708 This option may be specified more than once.
</para>
712 <term><varname>Tunnel=
</varname></term>
714 <para>The name of a Tunnel to create on the link. See
715 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
716 This option may be specified more than once.
</para>
720 <term><varname>ActiveSlave=
</varname></term>
722 <para>A boolean. Specifies the new active slave. The
<literal>ActiveSlave=
</literal>
723 option is only valid for following modes:
724 <literal>active-backup
</literal>,
725 <literal>balance-alb
</literal> and
726 <literal>balance-tlb
</literal>. Defaults to false.
731 <term><varname>PrimarySlave=
</varname></term>
733 <para>A boolean. Specifies which slave is the primary device. The specified
734 device will always be the active slave while it is available. Only when the
735 primary is off-line will alternate devices be used. This is useful when
736 one slave is preferred over another, e.g. when one slave has higher throughput
737 than another. The
<literal>PrimarySlave=
</literal> option is only valid for
739 <literal>active-backup
</literal>,
740 <literal>balance-alb
</literal> and
741 <literal>balance-tlb
</literal>. Defaults to false.
746 <term><varname>ConfigureWithoutCarrier=
</varname></term>
748 <para>A boolean. Allows networkd to configure a specific link even if it has no carrier.
758 <title>[Address] Section Options
</title>
760 <para>An
<literal>[Address]
</literal> section accepts the
761 following keys. Specify several
<literal>[Address]
</literal>
762 sections to configure several addresses.
</para>
764 <variablelist class='network-directives'
>
766 <term><varname>Address=
</varname></term>
768 <para>As in the
<literal>[Network]
</literal> section. This
769 key is mandatory.
</para>
773 <term><varname>Peer=
</varname></term>
775 <para>The peer address in a point-to-point connection.
776 Accepts the same format as the
<literal>Address
</literal>
781 <term><varname>Broadcast=
</varname></term>
783 <para>The broadcast address, which must be in the format
785 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
786 This key only applies to IPv4 addresses. If it is not
787 given, it is derived from the
<literal>Address
</literal>
792 <term><varname>Label=
</varname></term>
794 <para>An address label.
</para>
798 <term><varname>PreferredLifetime=
</varname></term>
800 <para>Allows the default
"preferred lifetime" of the address to be overridden.
801 Only three settings are accepted:
<literal>forever
</literal> or
<literal>infinity
</literal>
802 which is the default and means that the address never expires, and
<literal>0</literal> which means
803 that the address is considered immediately
"expired" and will not be used,
804 unless explicitly requested. A setting of PreferredLifetime=
0 is useful for
805 addresses which are added to be used only by a specific application,
806 which is then configured to use them explicitly.
</para>
810 <term><varname>Scope=
</varname></term>
812 <para>The scope of the address, which can be
<literal>global
</literal>,
813 <literal>link
</literal> or
<literal>host
</literal> or an unsigned integer ranges
0 to
255.
814 Defaults to
<literal>global
</literal>.
</para>
818 <term><varname>HomeAddress=
</varname></term>
820 <para>Takes a boolean argument. Designates this address the
"home address" as defined in
821 <ulink url=
"https://tools.ietf.org/html/rfc6275">RFC
6275</ulink>.
822 Supported only on IPv6. Defaults to false.
</para>
826 <term><varname>DuplicateAddressDetection=
</varname></term>
828 <para>Takes a boolean argument. Do not perform Duplicate Address Detection
829 <ulink url=
"https://tools.ietf.org/html/rfc4862">RFC
4862</ulink> when adding this address.
830 Supported only on IPv6. Defaults to false.
</para>
834 <term><varname>ManageTemporaryAddress=
</varname></term>
836 <para>Takes a boolean argument. If true the kernel manage temporary addresses created
837 from this one as template on behalf of Privacy Extensions
838 <ulink url=
"https://tools.ietf.org/html/rfc3041">RFC
3041</ulink>. For this to become
839 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
840 The given address needs to have a prefix length of
64. This flag allows to use privacy
841 extensions in a manually configured network, just like if stateless auto-configuration
842 was active. Defaults to false.
</para>
846 <term><varname>PrefixRoute=
</varname></term>
848 <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace
849 application needs a way to suppress adding a prefix route. This is for example relevant
850 together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses,
851 but depending on on-link, no route for the prefix should be added. Defaults to false.
</para>
855 <term><varname>AutoJoin=
</varname></term>
857 <para>Takes a boolean argument. Joining multicast group on ethernet level via
858 <command>ip maddr
</command> command would not work if we have an Ethernet switch that does
859 IGMP snooping since the switch would not replicate multicast packets on ports that did not
860 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
861 <command>ip link add vxlan
</command> or networkd's netdev kind vxlan have the group option
862 that enables then to do the required join. By extending ip address command with option
863 <literal>autojoin
</literal> we can get similar functionality for openvswitch (OVS) vxlan
864 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
865 Defaults to
<literal>no
</literal>.
</para>
872 <title>[IPv6AddressLabel] Section Options
</title>
874 <para>An
<literal>[IPv6AddressLabel]
</literal> section accepts the
875 following keys. Specify several
<literal>[IPv6AddressLabel]
</literal>
876 sections to configure several address labels. IPv6 address labels are
877 used for address selection. See
<ulink url=
"https://tools.ietf.org/html/rfc3484">RFC
3484</ulink>.
878 Precedence is managed by userspace, and only the label itself is stored in the kernel
</para>
880 <variablelist class='network-directives'
>
882 <term><varname>Label=
</varname></term>
884 <para> The label for the prefix (an unsigned integer) ranges
0 to
4294967294.
885 0xffffffff is reserved. This key is mandatory.
</para>
889 <term><varname>Prefix=
</varname></term>
891 <para>IPv6 prefix is an address with a prefix length, separated by a slash
<literal>/
</literal> character.
892 This key is mandatory.
</para>
899 <title>[RoutingPolicyRule] Section Options
</title>
901 <para>An
<literal>[RoutingPolicyRule]
</literal> section accepts the
902 following keys. Specify several
<literal>[RoutingPolicyRule]
</literal>
903 sections to configure several rules.
</para>
905 <variablelist class='network-directives'
>
907 <term><varname>TypeOfService=
</varname></term>
909 <para>Specifies the type of service to match a number between
0 to
255.
</para>
913 <term><varname>From=
</varname></term>
915 <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.
</para>
919 <term><varname>To=
</varname></term>
921 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.
</para>
925 <term><varname>FirewallMark=
</varname></term>
927 <para>Specifies the iptables firewall mark value to match (a number between
1 and
4294967295).
</para>
931 <term><varname>Table=
</varname></term>
933 <para>Specifies the routing table identifier to lookup if the rule
934 selector matches. The table identifier for a route (a number between
1 and
4294967295).
</para>
938 <term><varname>Priority=
</varname></term>
940 <para>Specifies the priority of this rule.
<varname>Priority=
</varname> is an unsigned
941 integer. Higher number means lower priority, and rules get processed in order of increasing number.
</para>
945 <term><varname>IncomingInterface=
</varname></term>
947 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.
</para>
951 <term><varname>OutgoingInterface=
</varname></term>
953 <para>Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device.
</para>
960 <title>[Route] Section Options
</title>
961 <para>The
<literal>[Route]
</literal> section accepts the
962 following keys. Specify several
<literal>[Route]
</literal>
963 sections to configure several routes.
</para>
965 <variablelist class='network-directives'
>
967 <term><varname>Gateway=
</varname></term>
969 <para>As in the
<literal>[Network]
</literal> section.
</para>
973 <term><varname>GatewayOnlink=
</varname></term>
975 <para>The
<literal>GatewayOnlink
</literal> option tells the kernel that it does not have
976 to check if the gateway is reachable directly by the current machine (i.e., the kernel does
977 not need to check if the gateway is attached to the local network), so that we can insert the
978 route in the kernel table without it being complained about. A boolean, defaults to
<literal>no
</literal>.
983 <term><varname>Destination=
</varname></term>
985 <para>The destination prefix of the route. Possibly
986 followed by a slash and the prefix length. If omitted, a
987 full-length host route is assumed.
</para>
991 <term><varname>Source=
</varname></term>
993 <para>The source prefix of the route. Possibly followed by
994 a slash and the prefix length. If omitted, a full-length
995 host route is assumed.
</para>
999 <term><varname>Metric=
</varname></term>
1001 <para>The metric of the route (an unsigned integer).
</para>
1005 <term><varname>IPv6Preference=
</varname></term>
1007 <para>Specifies the route preference as defined in
<ulink
1008 url=
"https://tools.ietf.org/html/rfc4191">RFC4191
</ulink> for Router Discovery messages.
1009 Which can be one of
<literal>low
</literal> the route has a lowest priority,
1010 <literal>medium
</literal> the route has a default priority or
1011 <literal>high
</literal> the route has a highest priority.
</para>
1015 <term><varname>Scope=
</varname></term>
1017 <para>The scope of the route, which can be
<literal>global
</literal>,
1018 <literal>link
</literal> or
<literal>host
</literal>. Defaults to
1019 <literal>global
</literal>.
</para>
1023 <term><varname>PreferredSource=
</varname></term>
1025 <para>The preferred source address of the route. The address
1026 must be in the format described in
1027 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
1031 <term><varname>Table=
<replaceable>num
</replaceable></varname></term>
1033 <para>The table identifier for the route (a number between
1 and
4294967295, or
0 to unset).
1034 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1039 <term><varname>Protocol=
</varname></term>
1041 <para>The Protocol identifier for the route. Takes a number between
0 and
255 or the special values
1042 <literal>kernel
</literal>,
<literal>boot
</literal> and
<literal>static
</literal>. Defaults to
1043 <literal>static
</literal>.
1048 <term><varname>Type=
</varname></term>
1050 <para>The Type identifier for special route types, which can be
1051 <literal>unicast
</literal> route to a destination network address which describes the path to the destination,
1052 <literal>blackhole
</literal> packets are discarded silently,
1053 <literal>unreachable
</literal> packets are discarded and the ICMP message host unreachable is generated,
1054 <literal>prohibit
</literal> packets are discarded and the ICMP message communication administratively
1055 prohibited is generated. Defaults to
<literal>unicast
</literal>.
1064 <title>[DHCP] Section Options
</title>
1065 <para>The
<literal>[DHCP]
</literal> section configures the
1066 DHCPv4 and DHCP6 client, if it is enabled with the
1067 <varname>DHCP=
</varname> setting described above:
</para>
1069 <variablelist class='network-directives'
>
1071 <term><varname>UseDNS=
</varname></term>
1073 <para>When true (the default), the DNS servers received
1074 from the DHCP server will be used and take precedence over
1075 any statically configured ones.
</para>
1077 <para>This corresponds to the
<option>nameserver
</option>
1078 option in
<citerefentry
1079 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1083 <term><varname>UseNTP=
</varname></term>
1085 <para>When true (the default), the NTP servers received
1086 from the DHCP server will be used by systemd-timesyncd
1087 and take precedence over any statically configured ones.
</para>
1091 <term><varname>UseMTU=
</varname></term>
1093 <para>When true, the interface maximum transmission unit
1094 from the DHCP server will be used on the current link.
1095 Defaults to false.
</para>
1099 <term><varname>Anonymize=
</varname></term>
1101 <para>Takes a boolean argument. When true, the options sent to the DHCP server will
1102 follow the
<ulink url=
"https://tools.ietf.org/html/rfc7844">RFC
7844</ulink>
1103 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1104 Defaults to false.
</para>
1106 <para>This option should only be set to true when
1107 <varname>MACAddressPolicy=
</varname> is set to
<literal>random
</literal>
1109 project='man-pages'
><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
</para>
1111 <para>Note that this configuration will overwrite others.
1112 In concrete, the following variables will be ignored:
1113 <varname>SendHostname=
</varname>,
<varname>ClientIdentifier=
</varname>,
1114 <varname>UseRoutes=
</varname>,
<varname>SendHostname=
</varname>,
1115 <varname>UseMTU=
</varname>,
<varname>VendorClassIdentifier=
</varname>,
1116 <varname>UseTimezone=
</varname>.
</para>
1120 <term><varname>SendHostname=
</varname></term>
1122 <para>When true (the default), the machine's hostname will
1123 be sent to the DHCP server.
</para>
1127 <term><varname>UseHostname=
</varname></term>
1129 <para>When true (the default), the hostname received from
1130 the DHCP server will be set as the transient hostname of the system
1135 <term><varname>Hostname=
</varname></term>
1137 <para>Use this value for the hostname which is sent to the
1138 DHCP server, instead of machine's hostname.
</para>
1142 <term><varname>UseDomains=
</varname></term>
1144 <para>Takes a boolean argument, or the special value
<literal>route
</literal>. When true, the domain name
1145 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1146 the
<option>Domains=
</option> setting. If set to
<literal>route
</literal>, the domain name received from
1147 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1148 the
<option>Domains=
</option> setting when the argument is prefixed with
<literal>~
</literal>. Defaults to
1151 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1152 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1153 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1154 single-label names.
</para>
1156 <para>When set to true, this setting corresponds to the
<option>domain
</option> option in
<citerefentry
1157 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1161 <term><varname>UseRoutes=
</varname></term>
1163 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1164 routing table with a metric of
1024, and a scope of
"global",
"link" or
"host", depending on the route's
1165 destination and gateway. If the destination is on the local host, e.g.,
127.x.x.x, or the same as the
1166 link's own address, the scope will be set to
"host". Otherwise if the gateway is null (a direct route), a
1167 "link" scope will be used. For anything else, scope defaults to
"global".
</para>
1172 <term><varname>UseTimezone=
</varname></term>
1174 <listitem><para>When true, the timezone received from the
1175 DHCP server will be set as timezone of the local
1176 system. Defaults to
<literal>no
</literal>.
</para></listitem>
1180 <term><varname>CriticalConnection=
</varname></term>
1182 <para>When true, the connection will never be torn down
1183 even if the DHCP lease expires. This is contrary to the
1184 DHCP specification, but may be the best choice if, say,
1185 the root filesystem relies on this connection. Defaults to
1191 <term><varname>ClientIdentifier=
</varname></term>
1193 <para>The DHCPv4 client identifier to use. Either
<literal>mac
</literal> to use the MAC address of the link
1194 or
<literal>duid
</literal> (the default, see below) to use an RFC4361-compliant Client ID.
</para>
1199 <term><varname>VendorClassIdentifier=
</varname></term>
1201 <para>The vendor class identifier used to identify vendor
1202 type and configuration.
</para>
1207 <term><varname>DUIDType=
</varname></term>
1209 <para>Override the global
<varname>DUIDType
</varname> setting for this network. See
1210 <citerefentry><refentrytitle>networkd.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1211 for a description of possible values.
</para>
1216 <term><varname>DUIDRawData=
</varname></term>
1218 <para>Override the global
<varname>DUIDRawData
</varname> setting for this network. See
1219 <citerefentry><refentrytitle>networkd.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1220 for a description of possible values.
</para>
1225 <term><varname>IAID=
</varname></term>
1227 <para>The DHCP Identity Association Identifier (IAID) for the interface, a
32-bit unsigned integer.
</para>
1232 <term><varname>RequestBroadcast=
</varname></term>
1234 <para>Request the server to use broadcast messages before
1235 the IP address has been configured. This is necessary for
1236 devices that cannot receive RAW packets, or that cannot
1237 receive packets at all before an IP address has been
1238 configured. On the other hand, this must not be enabled on
1239 networks where broadcasts are filtered out.
</para>
1244 <term><varname>RouteMetric=
</varname></term>
1246 <para>Set the routing metric for routes specified by the
1252 <term><varname>RouteTable=
<replaceable>num
</replaceable></varname></term>
1254 <para>The table identifier for DHCP routes (a number between
1 and
4294967295, or
0 to unset).
1255 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1257 <para>When used in combination with
<varname>VRF=
</varname> the
1258 VRF's routing table is used unless this parameter is specified.
1264 <term><varname>ListenPort=
</varname></term>
1266 <para>Allow setting custom port for the DHCP client to listen on.
</para>
1273 <title>[IPv6AcceptRA] Section Options
</title>
1274 <para>The
<literal>[IPv6AcceptRA]
</literal> section configures the IPv6 Router Advertisement
1275 (RA) client, if it is enabled with the
<varname>IPv6AcceptRA=
</varname> setting described
1278 <variablelist class='network-directives'
>
1280 <term><varname>UseDNS=
</varname></term>
1282 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1283 precedence over any statically configured ones.
</para>
1285 <para>This corresponds to the
<option>nameserver
</option> option in
<citerefentry
1286 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1291 <term><varname>UseDomains=
</varname></term>
1293 <para>Takes a boolean argument, or the special value
<literal>route
</literal>. When true, the domain name
1294 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1295 the effect of the
<option>Domains=
</option> setting. If set to
<literal>route
</literal>, the domain name
1296 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1297 effect of the
<option>Domains=
</option> setting when the argument is prefixed with
1298 <literal>~
</literal>. Defaults to false.
</para>
1300 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1301 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1302 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1303 single-label names.
</para>
1305 <para>When set to true, this setting corresponds to the
<option>domain
</option> option in
<citerefentry
1306 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1311 <term><varname>RouteTable=
<replaceable>num
</replaceable></varname></term>
1313 <para>The table identifier for the routes received in the Router Advertisement
1314 (a number between
1 and
4294967295, or
0 to unset).
1315 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1324 <title>[DHCPServer] Section Options
</title>
1325 <para>The
<literal>[DHCPServer]
</literal> section contains
1326 settings for the DHCP server, if enabled via the
1327 <varname>DHCPServer=
</varname> option described above:
</para>
1329 <variablelist class='network-directives'
>
1332 <term><varname>PoolOffset=
</varname></term>
1333 <term><varname>PoolSize=
</varname></term>
1335 <listitem><para>Configures the pool of addresses to hand out. The pool
1336 is a contiguous sequence of IP addresses in the subnet configured for
1337 the server address, which does not include the subnet nor the broadcast
1338 address.
<varname>PoolOffset=
</varname> takes the offset of the pool
1339 from the start of subnet, or zero to use the default value.
1340 <varname>PoolSize=
</varname> takes the number of IP addresses in the
1341 pool or zero to use the default value. By default, the pool starts at
1342 the first address after the subnet address and takes up the rest of
1343 the subnet, excluding the broadcast address. If the pool includes
1344 the server address (the default), this is reserved and not handed
1345 out to clients.
</para></listitem>
1349 <term><varname>DefaultLeaseTimeSec=
</varname></term>
1350 <term><varname>MaxLeaseTimeSec=
</varname></term>
1352 <listitem><para>Control the default and maximum DHCP lease
1353 time to pass to clients. These settings take time values in seconds or
1354 another common time unit, depending on the suffix. The default
1355 lease time is used for clients that did not ask for a specific
1356 lease time. If a client asks for a lease time longer than the
1357 maximum lease time, it is automatically shortened to the
1358 specified time. The default lease time defaults to
1h, the
1359 maximum lease time to
12h. Shorter lease times are beneficial
1360 if the configuration data in DHCP leases changes frequently
1361 and clients shall learn the new settings with shorter
1362 latencies. Longer lease times reduce the generated DHCP
1363 network traffic.
</para></listitem>
1367 <term><varname>EmitDNS=
</varname></term>
1368 <term><varname>DNS=
</varname></term>
1370 <listitem><para>Configures whether the DHCP leases handed out
1371 to clients shall contain DNS server information. The
1372 <varname>EmitDNS=
</varname> setting takes a boolean argument
1373 and defaults to
<literal>yes
</literal>. The DNS servers to
1374 pass to clients may be configured with the
1375 <varname>DNS=
</varname> option, which takes a list of IPv4
1376 addresses. If the
<varname>EmitDNS=
</varname> option is
1377 enabled but no servers configured, the servers are
1378 automatically propagated from an
"uplink" interface that has
1379 appropriate servers set. The
"uplink" interface is determined
1380 by the default route of the system with the highest
1381 priority. Note that this information is acquired at the time
1382 the lease is handed out, and does not take uplink interfaces
1383 into account that acquire DNS or NTP server information at a
1384 later point. DNS server propagation does not take
1385 <filename>/etc/resolv.conf
</filename> into account. Also, note
1386 that the leases are not refreshed if the uplink network
1387 configuration changes. To ensure clients regularly acquire the
1388 most current uplink DNS server information, it is thus
1389 advisable to shorten the DHCP lease time via
1390 <varname>MaxLeaseTimeSec=
</varname> described
1391 above.
</para></listitem>
1395 <term><varname>EmitNTP=
</varname></term>
1396 <term><varname>NTP=
</varname></term>
1398 <listitem><para>Similar to the
<varname>EmitDNS=
</varname> and
1399 <varname>DNS=
</varname> settings described above, these
1400 settings configure whether and what NTP server information
1401 shall be emitted as part of the DHCP lease. The same syntax,
1402 propagation semantics and defaults apply as for
1403 <varname>EmitDNS=
</varname> and
1404 <varname>DNS=
</varname>.
</para></listitem>
1408 <term><varname>EmitRouter=
</varname></term>
1410 <listitem><para>Similar to the
<varname>EmitDNS=
</varname>
1411 setting described above, this setting configures whether the
1412 DHCP lease should contain the router option. The same syntax,
1413 propagation semantics and defaults apply as for
1414 <varname>EmitDNS=
</varname>.
</para></listitem>
1418 <term><varname>EmitTimezone=
</varname></term>
1419 <term><varname>Timezone=
</varname></term>
1421 <listitem><para>Configures whether the DHCP leases handed out
1422 to clients shall contain timezone information. The
1423 <varname>EmitTimezone=
</varname> setting takes a boolean
1424 argument and defaults to
<literal>yes
</literal>. The
1425 <varname>Timezone=
</varname> setting takes a timezone string
1426 (such as
<literal>Europe/Berlin
</literal> or
1427 <literal>UTC
</literal>) to pass to clients. If no explicit
1428 timezone is set, the system timezone of the local host is
1429 propagated, as determined by the
1430 <filename>/etc/localtime
</filename> symlink.
</para></listitem>
1437 <title>[IPv6PrefixDelegation] Section Options
</title>
1438 <para>The
<literal>[IPv6PrefixDelegation]
</literal> section contains
1439 settings for sending IPv6 Router Advertisements and whether to act as
1440 a router, if enabled via the
<varname>IPv6PrefixDelegation=
</varname>
1441 option described above. IPv6 network prefixes are defined with one or
1442 more
<literal>[IPv6Prefix]
</literal> sections.
</para>
1444 <variablelist class='network-directives'
>
1447 <term><varname>Managed=
</varname></term>
1448 <term><varname>OtherInformation=
</varname></term>
1450 <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6
1451 addresses on the network link when
<varname>Managed=
</varname> boolean
1452 is set to
<literal>true
</literal> or if only additional network
1453 information can be obtained via DHCPv6 for the network link when
1454 <varname>OtherInformation=
</varname> boolean is set to
1455 <literal>true
</literal>. Both settings default to
1456 <literal>false
</literal>, which means that a DHCPv6 server is not being
1457 used.
</para></listitem>
1461 <term><varname>RouterLifetimeSec=
</varname></term>
1463 <listitem><para>Configures the IPv6 router lifetime in seconds. If set,
1464 this host also announces itself in Router Advertisements as an IPv6
1465 router for the network link. Defaults to unset, which means the host is
1466 not acting as a router.
</para>
1471 <term><varname>RouterPreference=
</varname></term>
1473 <listitem><para>Configures IPv6 router preference if
1474 <varname>RouterLifetimeSec=
</varname> is non-zero. Valid values are
1475 <literal>high
</literal>,
<literal>medium
</literal> and
1476 <literal>low
</literal>, with
<literal>normal
</literal> and
1477 <literal>default
</literal> added as synonyms for
1478 <literal>medium
</literal> just to make configuration easier. See
1479 <ulink url=
"https://tools.ietf.org/html/rfc4191">RFC
4191</ulink>
1480 for details. Defaults to
<literal>medium
</literal>.
</para></listitem>
1484 <term><varname>EmitDNS=
</varname></term>
1485 <term><varname>DNS=
</varname></term>
1487 <listitem><para><varname>DNS=
</varname> specifies a list of recursive
1488 DNS server IPv6 addresses that distributed via Router Advertisement
1489 messages when
<varname>EmitDNS=
</varname> is true. If
<varname>DNS=
1490 </varname> is empty, DNS servers are read from the
1491 <literal>[Network]
</literal> section. If the
1492 <literal>[Network]
</literal> section does not contain any DNS servers
1493 either, DNS servers from the uplink with the highest priority default
1494 route are used. When
<varname>EmitDNS=
</varname> is false, no DNS server
1495 information is sent in Router Advertisement messages.
1496 <varname>EmitDNS=
</varname> defaults to true.
1501 <term><varname>EmitDomains=
</varname></term>
1502 <term><varname>Domains=
</varname></term>
1504 <listitem><para>A list of DNS search domains distributed via Router
1505 Advertisement messages when
<varname>EmitDomains=
</varname> is true. If
1506 <varname>Domains=
</varname> is empty, DNS search domains are read from the
1507 <literal>[Network]
</literal> section. If the
<literal>[Network]
</literal>
1508 section does not contain any DNS search domains either, DNS search
1509 domains from the uplink with the highest priority default route are
1510 used. When
<varname>EmitDomains=
</varname> is false, no DNS search domain
1511 information is sent in Router Advertisement messages.
1512 <varname>EmitDomains=
</varname> defaults to true.
1517 <term><varname>DNSLifetimeSec=
</varname></term>
1519 <listitem><para>Lifetime in seconds for the DNS server addresses listed
1520 in
<varname>DNS=
</varname> and search domains listed in
1521 <varname>Domains=
</varname>.
</para></listitem>
1528 <title>[IPv6Prefix] Section Options
</title>
1529 <para>One or more
<literal>[IPv6Prefix]
</literal> sections contain the IPv6
1530 prefixes that are announced via Router Advertisements. See
1531 <ulink url=
"https://tools.ietf.org/html/rfc4861">RFC
4861</ulink>
1532 for further details.
</para>
1534 <variablelist class='network-directives'
>
1537 <term><varname>AddressAutoconfiguration=
</varname></term>
1538 <term><varname>OnLink=
</varname></term>
1540 <listitem><para>Boolean values to specify whether IPv6 addresses can be
1541 autoconfigured with this prefix and whether the prefix can be used for
1542 onlink determination. Both settings default to
<literal>true
</literal>
1543 in order to ease configuration.
1548 <term><varname>Prefix=
</varname></term>
1550 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
1551 Similarly to configuring static IPv6 addresses, the setting is
1552 configured as an IPv6 prefix and its prefix length, separated by a
1553 <literal>/
</literal> character. Use multiple
1554 <literal>[IPv6Prefix]
</literal> sections to configure multiple IPv6
1555 prefixes since prefix lifetimes, address autoconfiguration and onlink
1556 status may differ from one prefix to another.
</para></listitem>
1560 <term><varname>PreferredLifetimeSec=
</varname></term>
1561 <term><varname>ValidLifetimeSec=
</varname></term>
1563 <listitem><para>Preferred and valid lifetimes for the prefix measured in
1564 seconds.
<varname>PreferredLifetimeSec=
</varname> defaults to
604800
1565 seconds (one week) and
<varname>ValidLifetimeSec=
</varname> defaults
1566 to
2592000 seconds (
30 days).
</para></listitem>
1573 <title>[Bridge] Section Options
</title>
1574 <para>The
<literal>[Bridge]
</literal> section accepts the
1575 following keys.
</para>
1576 <variablelist class='network-directives'
>
1578 <term><varname>UnicastFlood=
</varname></term>
1580 <para>A boolean. Controls whether the bridge should flood
1581 traffic for which an FDB entry is missing and the destination
1582 is unknown through this port. Defaults to on.
1587 <term><varname>HairPin=
</varname></term>
1589 <para>A boolean. Configures whether traffic may be sent back
1590 out of the port on which it was received. By default, this
1591 flag is false, and the bridge will not forward traffic back
1592 out of the receiving port.
</para>
1596 <term><varname>UseBPDU=
</varname></term>
1598 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
1599 processed by the bridge port. Defaults to yes.
</para>
1603 <term><varname>FastLeave=
</varname></term>
1605 <para>A boolean. This flag allows the bridge to immediately stop multicast
1606 traffic on a port that receives an IGMP Leave message. It is only used with
1607 IGMP snooping if enabled on the bridge. Defaults to off.
</para>
1611 <term><varname>AllowPortToBeRoot=
</varname></term>
1613 <para>A boolean. Configures whether a given port is allowed to
1614 become a root port. Only used when STP is enabled on the bridge.
1615 Defaults to on.
</para>
1619 <term><varname>Cost=
</varname></term>
1621 <para>Sets the
"cost" of sending packets of this interface.
1622 Each port in a bridge may have a different speed and the cost
1623 is used to decide which link to use. Faster interfaces
1624 should have lower costs. It is an integer value between
1 and
1629 <term><varname>Priority=
</varname></term>
1631 <para>Sets the
"priority" of sending packets on this interface.
1632 Each port in a bridge may have a different priority which is used
1633 to decide which link to use. Lower value means higher priority.
1634 It is an integer value between
0 to
63. Networkd does not set any
1635 default, meaning the kernel default value of
32 is used.
</para>
1641 <title>[BridgeFDB] Section Options
</title>
1642 <para>The
<literal>[BridgeFDB]
</literal> section manages the
1643 forwarding database table of a port and accepts the following
1644 keys. Specify several
<literal>[BridgeFDB]
</literal> sections to
1645 configure several static MAC table entries.
</para>
1647 <variablelist class='network-directives'
>
1649 <term><varname>MACAddress=
</varname></term>
1651 <para>As in the
<literal>[Network]
</literal> section. This
1652 key is mandatory.
</para>
1656 <term><varname>VLANId=
</varname></term>
1658 <para>The VLAN ID for the new static MAC table entry. If
1659 omitted, no VLAN ID information is appended to the new static MAC
1666 <title>[BridgeVLAN] Section Options
</title>
1667 <para>The
<literal>[BridgeVLAN]
</literal> section manages the VLAN ID configuration of a bridge port and accepts
1668 the following keys. Specify several
<literal>[BridgeVLAN]
</literal> sections to configure several VLAN entries.
1669 The
<varname>VLANFiltering=
</varname> option has to be enabled, see
<literal>[Bridge]
</literal> section in
1670 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1672 <variablelist class='network-directives'
>
1674 <term><varname>VLAN=
</varname></term>
1676 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1677 from
1 to
4094.
</para>
1681 <term><varname>EgressUntagged=
</varname></term>
1683 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1684 <varname>EgressUntagged=
</varname> implicates the use of
<varname>VLAN=
</varname> above and will enable the
1685 VLAN ID for ingress as well. This can be either a single ID or a range M-N.
</para>
1689 <term><varname>PVID=
</varname></term>
1691 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1692 <varname>PVID=
</varname> can be used only once. Configuring
<varname>PVID=
</varname> implicates the use of
1693 <varname>VLAN=
</varname> above and will enable the VLAN ID for ingress as well.
</para>
1700 <title>Examples
</title>
1702 <title>Static network configuration
</title>
1704 <programlisting># /etc/systemd/network/
50-static.network
1709 Address=
192.168.0.15/
24
1710 Gateway=
192.168.0.1</programlisting>
1712 <para>This brings interface
<literal>enp2s0
</literal> up with a static address. The
1713 specified gateway will be used for a default route.
</para>
1717 <title>DHCP on ethernet links
</title>
1719 <programlisting># /etc/systemd/network/
80-dhcp.network
1724 DHCP=yes
</programlisting>
1726 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
1727 <literal>en
</literal> (i.e. ethernet interfaces).
</para>
1731 <title>A bridge with two enslaved links
</title>
1733 <programlisting># /etc/systemd/network/
25-bridge-static.network
1738 Address=
192.168.0.15/
24
1740 DNS=
192.168.0.1</programlisting>
1742 <programlisting># /etc/systemd/network/
25-bridge-slave-interface-
1.network
1747 Bridge=bridge0
</programlisting>
1749 <programlisting># /etc/systemd/network/
25-bridge-slave-interface-
2.network
1754 Bridge=bridge0
</programlisting>
1756 <para>This creates a bridge and attaches devices
<literal>enp2s0
</literal> and
1757 <literal>wlp3s0
</literal> to it. The bridge will have the specified static address
1758 and network assigned, and a default route via the specified gateway will be
1759 added. The specified DNS server will be added to the global list of DNS resolvers.
1767 # /etc/systemd/network/
20-bridge-slave-interface-vlan.network
1783 EgressUntagged=
300-
400</programlisting>
1785 <para>This overrides the configuration specified in the previous example for the
1786 interface
<literal>enp2s0
</literal>, and enables VLAN on that bridge port. VLAN IDs
1787 1-
32,
42,
100-
400 will be allowed. Packets tagged with VLAN IDs
42,
300-
400 will be
1788 untagged when they leave on this interface. Untagged packets which arrive on this
1789 interface will be assigned VLAN ID
42.
</para>
1793 <title>Various tunnels
</title>
1795 <programlisting>/etc/systemd/network/
25-tunnels.network
1806 <programlisting>/etc/systemd/network/
25-tunnel-ipip.netdev
1812 <programlisting>/etc/systemd/network/
25-tunnel-sit.netdev
1818 <programlisting>/etc/systemd/network/
25-tunnel-gre.netdev
1824 <programlisting>/etc/systemd/network/
25-tunnel-vti.netdev
1830 <para>This will bring interface
<literal>ens1
</literal> up and create an IPIP tunnel,
1831 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.
</para>
1835 <title>A bond device
</title>
1837 <programlisting># /etc/systemd/network/
30-bond1.network
1845 <programlisting># /etc/systemd/network/
30-bond1.netdev
1851 <programlisting># /etc/systemd/network/
30-bond1-dev1.network
1853 MACAddress=
52:
54:
00:e9:
64:
41
1859 <programlisting># /etc/systemd/network/
30-bond1-dev2.network
1861 MACAddress=
52:
54:
00:e9:
64:
42
1867 <para>This will create a bond device
<literal>bond1
</literal> and enslave the two
1868 devices with MAC addresses
52:
54:
00:e9:
64:
41 and
52:
54:
00:e9:
64:
42 to it. IPv6 DHCP
1869 will be used to acquire an address.
</para>
1873 <title>Virtual Routing and Forwarding (VRF)
</title>
1874 <para>Add the
<literal>bond1
</literal> interface to the VRF master interface
1875 <literal>vrf1
</literal>. This will redirect routes generated on this interface to be
1876 within the routing table defined during VRF creation. For kernels before
4.8 traffic
1877 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
1879 <programlisting># /etc/systemd/network/
25-vrf.network
1889 <title>MacVTap
</title>
1890 <para>This brings up a network interface
<literal>macvtap-test
</literal>
1891 and attaches it to
<literal>enp0s25
</literal>.
</para>
1892 <programlisting># /usr/lib/systemd/network/
25-macvtap.network
1897 MACVTAP=macvtap-test
1903 <title>See Also
</title>
1905 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1906 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1907 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1908 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1909 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>