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
13 <refentry id=
"systemd.network" conditional='ENABLE_NETWORKD'
>
16 <title>systemd.network
</title>
17 <productname>systemd
</productname>
21 <contrib>Developer
</contrib>
22 <firstname>Tom
</firstname>
23 <surname>Gundersen
</surname>
24 <email>teg@jklm.no
</email>
30 <refentrytitle>systemd.network
</refentrytitle>
31 <manvolnum>5</manvolnum>
35 <refname>systemd.network
</refname>
36 <refpurpose>Network configuration
</refpurpose>
40 <para><filename><replaceable>network
</replaceable>.network
</filename></para>
44 <title>Description
</title>
46 <para>Network setup is performed by
47 <citerefentry><refentrytitle>systemd-networkd
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
50 <para>The main network file must have the extension
<filename>.network
</filename>; other
51 extensions are ignored. Networks are applied to links whenever the links appear.
</para>
53 <para>The
<filename>.network
</filename> files are read from the files located in the system
54 network directory
<filename>/usr/lib/systemd/network
</filename>, the volatile runtime network
55 directory
<filename>/run/systemd/network
</filename> and the local administration network
56 directory
<filename>/etc/systemd/network
</filename>. All configuration files are collectively
57 sorted and processed in lexical order, regardless of the directories in which they live.
58 However, files with identical filenames replace each other. Files in
<filename>/etc
</filename>
59 have the highest priority, files in
<filename>/run
</filename> take precedence over files with
60 the same name in
<filename>/usr/lib
</filename>. This can be used to override a system-supplied
61 configuration file with a local file if needed. As a special case, an empty file (file size
0)
62 or symlink with the same name pointing to
<filename>/dev/null
</filename> disables the
63 configuration file entirely (it is
"masked").
</para>
65 <para>Along with the network file
<filename>foo.network
</filename>, a
"drop-in" directory
66 <filename>foo.network.d/
</filename> may exist. All files with the suffix
67 <literal>.conf
</literal> from this directory will be parsed after the file itself is
68 parsed. This is useful to alter or add configuration settings, without having to modify the main
69 configuration file. Each drop-in file must have appropriate section headers.
</para>
71 <para>In addition to
<filename>/etc/systemd/network
</filename>, drop-in
<literal>.d
</literal>
72 directories can be placed in
<filename>/usr/lib/systemd/network
</filename> or
73 <filename>/run/systemd/network
</filename> directories. Drop-in files in
74 <filename>/etc
</filename> take precedence over those in
<filename>/run
</filename> which in turn
75 take precedence over those in
<filename>/usr/lib
</filename>. Drop-in files under any of these
76 directories take precedence over the main netdev file wherever located. (Of course, since
77 <filename>/run
</filename> is temporary and
<filename>/usr/lib
</filename> is for vendors, it is
78 unlikely drop-ins should be used in either of those places.)
</para>
80 <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
81 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
82 disabled for that interface by writing
"1" to
83 <filename>/proc/sys/net/ipv6/conf/
<replaceable>ifname
</replaceable>/disable_ipv6
</filename>.
88 <title>[Match] Section Options
</title>
90 <para>The network file contains a
<literal>[Match]
</literal>
91 section, which determines if a given network file may be applied
92 to a given device; and a
<literal>[Network]
</literal> section
93 specifying how the device should be configured. The first (in
94 lexical order) of the network files that matches a given device
95 is applied, all later files are ignored, even if they match as
98 <para>A network file is said to match a device if each of the
99 entries in the
<literal>[Match]
</literal> section matches, or if
100 the section is empty. The following keys are accepted:
</para>
102 <variablelist class='network-directives'
>
104 <term><varname>MACAddress=
</varname></term>
106 <para>The hardware address of the interface (use full colon-delimited hexadecimal, e.g.,
107 01:
23:
45:
67:
89:ab).
</para>
111 <term><varname>Path=
</varname></term>
113 <para>A whitespace-separated list of shell-style globs
114 matching the persistent path, as exposed by the udev
115 property
<literal>ID_PATH
</literal>. If the list is
116 prefixed with a
"!", the test is inverted; i.e. it is
117 true when
<literal>ID_PATH
</literal> does not match any
118 item in the list.
</para>
122 <term><varname>Driver=
</varname></term>
124 <para>A whitespace-separated list of shell-style globs
125 matching the driver currently bound to the device, as
126 exposed by the udev property
<literal>DRIVER
</literal>
127 of its parent device, or if that is not set the driver
128 as exposed by
<literal>ethtool -i
</literal> of the
129 device itself. If the list is prefixed with a
"!", the
130 test is inverted.
</para>
134 <term><varname>Type=
</varname></term>
136 <para>A whitespace-separated list of shell-style globs
137 matching the device type, as exposed by the udev property
138 <literal>DEVTYPE
</literal>. If the list is prefixed with
139 a
"!", the test is inverted.
</para>
143 <term><varname>Name=
</varname></term>
145 <para>A whitespace-separated list of shell-style globs
146 matching the device name, as exposed by the udev property
147 <literal>INTERFACE
</literal>. If the list is prefixed
148 with a
"!", the test is inverted.
</para>
152 <term><varname>Host=
</varname></term>
154 <para>Matches against the hostname or machine ID of the
155 host. See
<literal>ConditionHost=
</literal> in
156 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
162 <term><varname>Virtualization=
</varname></term>
164 <para>Checks whether the system is executed in a virtualized
165 environment and optionally test whether it is a specific
166 implementation. See
<literal>ConditionVirtualization=
</literal> in
167 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
173 <term><varname>KernelCommandLine=
</varname></term>
175 <para>Checks whether a specific kernel command line option is
176 set (or if prefixed with the exclamation mark unset). See
177 <literal>ConditionKernelCommandLine=
</literal> in
178 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
184 <term><varname>KernelVersion=
</varname></term>
186 <para>Checks whether the kernel version (as reported by
<command>uname -r
</command>) matches a certain
187 expression (or if prefixed with the exclamation mark does not match it). See
188 <literal>ConditionKernelVersion=
</literal> in
189 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
195 <term><varname>Architecture=
</varname></term>
197 <para>Checks whether the system is running on a specific
198 architecture. See
<literal>ConditionArchitecture=
</literal> in
199 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
209 <title>[Link] Section Options
</title>
211 <para> The
<literal>[Link]
</literal> section accepts the following keys:
</para>
213 <variablelist class='network-directives'
>
215 <term><varname>MACAddress=
</varname></term>
217 <para>The hardware address to set for the device.
</para>
221 <term><varname>MTUBytes=
</varname></term>
223 <para>The maximum transmission unit in bytes to set for the
224 device. The usual suffixes K, M, G, are supported and are
225 understood to the base of
1024.
</para>
226 <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen
227 below
1280 (the minimum MTU for IPv6) it will automatically be increased to this value.
</para>
231 <term><varname>ARP=
</varname></term>
233 <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol)
234 for this interface. Defaults to unset, which means that the kernel default will be used.
</para>
235 <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
236 interfaces atop a single lower-level physical interface, which will then only serve as a
237 link/
"bridge" device aggregating traffic to the same physical link and not participate in
238 the network otherwise.
</para>
242 <term><varname>Unmanaged=
</varname></term>
244 <para>A boolean. When
<literal>yes
</literal>, no attempts are
245 made to bring up or configure matching links, equivalent to
246 when there are no matching network files. Defaults to
247 <literal>no
</literal>.
</para>
248 <para>This is useful for preventing later matching network
249 files from interfering with certain interfaces that are fully
250 controlled by other applications.
</para>
254 <term><varname>RequiredForOnline=
</varname></term>
256 <para>A boolean. When
<literal>yes
</literal>, the network is deemed
257 required when determining whether the system is online when running
258 <literal>systemd-networkd-wait-online
</literal>.
259 When
<literal>no
</literal>, the network is ignored when checking for
260 online state. Defaults to
<literal>yes
</literal>.
</para>
261 <para>The network will be brought up normally in all cases, but in
262 the event that there is no address being assigned by DHCP or the
263 cable is not plugged in, the link will simply remain offline and be
264 skipped automatically by
<literal>systemd-networkd-wait-online
</literal>
265 if
<literal>RequiredForOnline=true
</literal>.
</para>
272 <title>[Network] Section Options
</title>
274 <para>The
<literal>[Network]
</literal> section accepts the following keys:
</para>
276 <variablelist class='network-directives'
>
278 <term><varname>Description=
</varname></term>
280 <para>A description of the device. This is only used for
281 presentation purposes.
</para>
285 <term><varname>DHCP=
</varname></term>
287 <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts
288 <literal>yes
</literal>,
<literal>no
</literal>,
289 <literal>ipv4
</literal>, or
<literal>ipv6
</literal>. Defaults
290 to
<literal>no
</literal>.
</para>
292 <para>Note that DHCPv6 will by default be triggered by Router
293 Advertisement, if that is enabled, regardless of this parameter.
294 By enabling DHCPv6 support explicitly, the DHCPv6 client will
295 be started regardless of the presence of routers on the link,
296 or what flags the routers pass. See
297 <literal>IPv6AcceptRA=
</literal>.
</para>
299 <para>Furthermore, note that by default the domain name
300 specified through DHCP is not used for name resolution.
301 See option
<option>UseDomains=
</option> below.
</para>
303 <para>See the
<literal>[DHCP]
</literal> section below for further configuration options for the DHCP client
308 <term><varname>DHCPServer=
</varname></term>
310 <para>A boolean. Enables DHCPv4 server support. Defaults
311 to
<literal>no
</literal>. Further settings for the DHCP
312 server may be set in the
<literal>[DHCPServer]
</literal>
313 section described below.
</para>
317 <term><varname>LinkLocalAddressing=
</varname></term>
319 <para>Enables link-local address autoconfiguration. Accepts
320 <literal>yes
</literal>,
<literal>no
</literal>,
321 <literal>ipv4
</literal>, or
<literal>ipv6
</literal>. Defaults to
322 <literal>ipv6
</literal>.
</para>
326 <term><varname>IPv4LLRoute=
</varname></term>
328 <para>A boolean. When true, sets up the route needed for
329 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
335 <term><varname>IPv6Token=
</varname></term>
337 <para>An IPv6 address with the top
64 bits unset. When set, indicates the
338 64-bit interface part of SLAAC IPv6 addresses for this link. Note that
339 the token is only ever used for SLAAC, and not for DHCPv6 addresses, even
340 in the case DHCP is requested by router advertisement. By default, the
341 token is autogenerated.
</para>
345 <term><varname>LLMNR=
</varname></term>
347 <para>A boolean or
<literal>resolve
</literal>. When true,
349 url=
"https://tools.ietf.org/html/rfc4795">Link-Local
350 Multicast Name Resolution
</ulink> on the link. When set to
351 <literal>resolve
</literal>, only resolution is enabled,
352 but not host registration and announcement. Defaults to
353 true. This setting is read by
354 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
358 <term><varname>MulticastDNS=
</varname></term>
360 <para>A boolean or
<literal>resolve
</literal>. When true,
362 url=
"https://tools.ietf.org/html/rfc6762">Multicast
363 DNS
</ulink> support on the link. When set to
364 <literal>resolve
</literal>, only resolution is enabled,
365 but not host or service registration and
366 announcement. Defaults to false. This setting is read by
367 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
371 <term><varname>DNSSEC=
</varname></term>
374 <literal>allow-downgrade
</literal>. When true, enables
376 url=
"https://tools.ietf.org/html/rfc4033">DNSSEC
</ulink>
377 DNS validation support on the link. When set to
378 <literal>allow-downgrade
</literal>, compatibility with
379 non-DNSSEC capable networks is increased, by automatically
380 turning off DNSSEC in this case. This option defines a
381 per-interface setting for
382 <citerefentry><refentrytitle>resolved.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s
383 global
<varname>DNSSEC=
</varname> option. Defaults to
384 false. This setting is read by
385 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
389 <term><varname>DNSSECNegativeTrustAnchors=
</varname></term>
390 <listitem><para>A space-separated list of DNSSEC negative
391 trust anchor domains. If specified and DNSSEC is enabled,
392 look-ups done via the interface's DNS server will be subject
393 to the list of negative trust anchors, and not require
394 authentication for the specified domains, or anything below
395 it. Use this to disable DNSSEC authentication for specific
396 private domains, that cannot be proven valid using the
397 Internet DNS hierarchy. Defaults to the empty list. This
399 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
403 <term><varname>LLDP=
</varname></term>
405 <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly
406 implemented on professional routers and bridges which announces which physical port a system is connected
407 to, as well as other related data. Accepts a boolean or the special value
408 <literal>routers-only
</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
409 neighbors maintained. If
<literal>routers-only
</literal> is set only LLDP data of various types of routers
410 is collected and LLDP data about other types of devices ignored (such as stations, telephones and
411 others). If false, LLDP reception is disabled. Defaults to
<literal>routers-only
</literal>. Use
412 <citerefentry><refentrytitle>networkctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
413 collected neighbor data. LLDP is only available on Ethernet links. See
<varname>EmitLLDP=
</varname> below
414 for enabling LLDP packet emission from the local system.
419 <term><varname>EmitLLDP=
</varname></term>
421 <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values
422 <literal>nearest-bridge
</literal>,
<literal>non-tpmr-bridge
</literal> and
423 <literal>customer-bridge
</literal>. Defaults to false, which turns off LLDP packet emission. If not false,
424 a short LLDP packet with information about the local system is sent out in regular intervals on the
425 link. The LLDP packet will contain information about the local host name, the local machine ID (as stored
426 in
<citerefentry><refentrytitle>machine-id
</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the
427 local interface name, as well as the pretty hostname of the system (as set in
428 <citerefentry><refentrytitle>machine-info
</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP
429 emission is only available on Ethernet links. Note that this setting passes data suitable for
430 identification of host to the network and should thus not be enabled on untrusted networks, where such
431 identification data should not be made available. Use this option to permit other systems to identify on
432 which interfaces they are connected to this system. The three special values control propagation of the
433 LLDP packets. The
<literal>nearest-bridge
</literal> setting permits propagation only to the nearest
434 connected bridge,
<literal>non-tpmr-bridge
</literal> permits propagation across Two-Port MAC Relays, but
435 not any other bridges, and
<literal>customer-bridge
</literal> permits propagation until a customer bridge
436 is reached. For details about these concepts, see
<ulink
437 url=
"http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE
802.1AB-
2009</ulink>. Note that
438 configuring this setting to true is equivalent to
<literal>nearest-bridge
</literal>, the recommended and
439 most restricted level of propagation. See
<varname>LLDP=
</varname> above for an option to enable LLDP
444 <term><varname>BindCarrier=
</varname></term>
446 <para>A link name or a list of link names. When set, controls the behavior of the current
447 link. When all links in the list are in an operational down state, the current link is brought
448 down. When at least one link has carrier, the current interface is brought up.
453 <term><varname>Address=
</varname></term>
455 <para>A static IPv4 or IPv6 address and its prefix length,
456 separated by a
<literal>/
</literal> character. Specify
457 this key more than once to configure several addresses.
458 The format of the address must be as described in
459 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
460 This is a short-hand for an [Address] section only
461 containing an Address key (see below). This option may be
462 specified more than once.
465 <para>If the specified address is
0.0.0.0 (for IPv4) or
466 [::] (for IPv6), a new address range of the requested size
467 is automatically allocated from a system-wide pool of
468 unused ranges. The allocated range is checked against all
469 current network interfaces and all known network
470 configuration files to avoid address range conflicts. The
471 default system-wide pool consists of
192.168.0.0/
16,
472 172.16.0.0/
12 and
10.0.0.0/
8 for IPv4, and fc00::/
7 for
473 IPv6. This functionality is useful to manage a large
474 number of dynamically created network interfaces with the
475 same network configuration and automatic address range
481 <term><varname>Gateway=
</varname></term>
483 <para>The gateway address, which must be in the format
485 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
486 This is a short-hand for a [Route] section only containing
487 a Gateway key. This option may be specified more than
492 <term><varname>DNS=
</varname></term>
494 <para>A DNS server address, which must be in the format
496 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
497 This option may be specified more than once. This setting is read by
498 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
502 <term><varname>Domains=
</varname></term>
504 <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list
505 should be a domain name, optionally prefixed with a tilde (
<literal>~
</literal>). The domains with the
506 prefix are called
"routing-only domains". The domains without the prefix are called
"search domains" and
507 are first used as search suffixes for extending single-label host names (host names containing no dots) to
508 become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface,
509 each of the specified search domains are appended to it in turn, converting it into a fully qualified
510 domain name, until one of them may be successfully resolved.
</para>
512 <para>Both
"search" and
"routing-only" domains are used for routing of DNS queries: look-ups for host names
513 ending in those domains (hence also single label names, if any
"search domains" are listed), are routed to
514 the DNS servers configured for this interface. The domain routing logic is particularly useful on
515 multi-homed hosts with DNS servers serving particular private DNS zones on each interface.
</para>
517 <para>The
"routing-only" domain
<literal>~.
</literal> (the tilde indicating definition of a routing domain,
518 the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special
519 effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed
520 to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers
521 if a link on which they are connected is available.
</para>
523 <para>This setting is read by
524 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
525 "Search domains" correspond to the
<varname>domain
</varname> and
<varname>search
</varname> entries in
526 <citerefentry project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
527 Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain
528 name servers limited to a specific link.
</para>
532 <term><varname>NTP=
</varname></term>
534 <para>An NTP server address. This option may be specified more than once. This setting is read by
535 <citerefentry><refentrytitle>systemd-timesyncd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
539 <term><varname>IPForward=
</varname></term>
540 <listitem><para>Configures IP packet forwarding for the
541 system. If enabled, incoming packets on any network
542 interface will be forwarded to any other interfaces
543 according to the routing table. Takes either a boolean
544 argument, or the values
<literal>ipv4
</literal> or
545 <literal>ipv6
</literal>, which only enable IP packet
546 forwarding for the specified address family. This controls
547 the
<filename>net.ipv4.ip_forward
</filename> and
548 <filename>net.ipv6.conf.all.forwarding
</filename> sysctl
549 options of the network interface (see
<ulink
550 url=
"https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt
</ulink>
551 for details about sysctl options). Defaults to
552 <literal>no
</literal>.
</para>
554 <para>Note: this setting controls a global kernel option,
555 and does so one way only: if a network that has this setting
556 enabled is set up the global setting is turned on. However,
557 it is never turned off again, even after all networks with
558 this setting enabled are shut down again.
</para>
560 <para>To allow IP packet forwarding only between specific
561 network interfaces use a firewall.
</para>
565 <term><varname>IPMasquerade=
</varname></term>
566 <listitem><para>Configures IP masquerading for the network
567 interface. If enabled, packets forwarded from the network
568 interface will be appear as coming from the local host.
569 Takes a boolean argument. Implies
570 <varname>IPForward=ipv4
</varname>. Defaults to
571 <literal>no
</literal>.
</para></listitem>
574 <term><varname>IPv6PrivacyExtensions=
</varname></term>
575 <listitem><para>Configures use of stateless temporary
576 addresses that change over time (see
<ulink
577 url=
"https://tools.ietf.org/html/rfc4941">RFC
4941</ulink>,
578 Privacy Extensions for Stateless Address Autoconfiguration
579 in IPv6). Takes a boolean or the special values
580 <literal>prefer-public
</literal> and
581 <literal>kernel
</literal>. When true, enables the privacy
582 extensions and prefers temporary addresses over public
583 addresses. When
<literal>prefer-public
</literal>, enables the
584 privacy extensions, but prefers public addresses over
585 temporary addresses. When false, the privacy extensions
586 remain disabled. When
<literal>kernel
</literal>, the kernel's
587 default setting will be left in place. Defaults to
588 <literal>no
</literal>.
</para></listitem>
591 <term><varname>IPv6AcceptRA=
</varname></term>
592 <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes
593 a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
594 forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
595 is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if
596 the relevant flags are set in the RA data, or if no routers are found on the link.
</para>
598 <para>Further settings for the IPv6 RA support may be configured in the
599 <literal>[IPv6AcceptRA]
</literal> section, see below.
</para>
601 <para>Also see
<ulink
602 url=
"https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt
</ulink> in the kernel
603 documentation regarding
<literal>accept_ra
</literal>, but note that systemd's setting of
604 <constant>1</constant> (i.e. true) corresponds to kernel's setting of
<constant>2</constant>.
</para>
608 <term><varname>IPv6DuplicateAddressDetection=
</varname></term>
609 <listitem><para>Configures the amount of IPv6 Duplicate
610 Address Detection (DAD) probes to send. Defaults to unset.
614 <term><varname>IPv6HopLimit=
</varname></term>
615 <listitem><para>Configures IPv6 Hop Limit. For each router that
616 forwards the packet, the hop limit is decremented by
1. When the
617 hop limit field reaches zero, the packet is discarded.
622 <term><varname>IPv4ProxyARP=
</varname></term>
623 <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host,
624 usually a router, answers ARP requests intended for another machine. By
"faking" its identity,
625 the router accepts responsibility for routing packets to the
"real" destination. (see
<ulink
626 url=
"https://tools.ietf.org/html/rfc1027">RFC
1027</ulink>.
631 <term><varname>IPv6ProxyNDP=
</varname></term>
632 <listitem><para>A boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery
633 Protocol) is a technique for IPv6 to allow routing of addresses to a different
634 destination when peers expect them to be present on a certain physical link.
635 In this case a router answers Neighbour Advertisement messages intended for
636 another machine by offering its own MAC address as destination.
637 Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour
638 Advertisement messages for addresses in the IPv6 neighbor proxy table,
639 which can also be shown by
<command>ip -
6 neighbour show proxy
</command>.
640 systemd-networkd will control the per-interface `proxy_ndp` switch for each configured
641 interface depending on this option.
646 <term><varname>IPv6ProxyNDPAddress=
</varname></term>
647 <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be
648 proxied. This option may be specified more than once. systemd-networkd will add the
649 <option>IPv6ProxyNDPAddress=
</option> entries to the kernel's IPv6 neighbor proxy table.
650 This option implies
<option>IPv6ProxyNDP=true
</option> but has no effect if
651 <option>IPv6ProxyNDP
</option> has been set to false. Defaults to unset.
655 <term><varname>IPv6PrefixDelegation=
</varname></term>
656 <listitem><para>Whether to enable or disable Router Advertisement sending on a link.
657 Allowed values are
<literal>static
</literal> which distributes prefixes as defined in
658 the
<literal>[IPv6PrefixDelegation]
</literal> and any
<literal>[IPv6Prefix]
</literal>
659 sections,
<literal>dhcpv6
</literal> which requests prefixes using a DHCPv6 client
660 configured for another link and any values configured in the
661 <literal>[IPv6PrefixDelegation]
</literal> section while ignoring all static prefix
662 configuration sections,
<literal>yes
</literal> which uses both static configuration
663 and DHCPv6, and
<literal>false
</literal> which turns off IPv6 prefix delegation
664 altogether. Defaults to
<literal>false
</literal>. See the
665 <literal>[IPv6PrefixDelegation]
</literal> and the
<literal>[IPv6Prefix]
</literal>
666 sections for more configuration options.
670 <term><varname>Bridge=
</varname></term>
672 <para>The name of the bridge to add the link to. See
673 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
678 <term><varname>Bond=
</varname></term>
680 <para>The name of the bond to add the link to. See
681 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
686 <term><varname>VRF=
</varname></term>
688 <para>The name of the VRF to add the link to. See
689 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
694 <term><varname>VLAN=
</varname></term>
696 <para>The name of a VLAN to create on the link. See
697 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
698 This option may be specified more than once.
</para>
702 <term><varname>MACVLAN=
</varname></term>
704 <para>The name of a MACVLAN to create on the link. See
705 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
706 This option may be specified more than once.
</para>
710 <term><varname>VXLAN=
</varname></term>
712 <para>The name of a VXLAN to create on the link. See
713 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
714 This option may be specified more than once.
</para>
718 <term><varname>Tunnel=
</varname></term>
720 <para>The name of a Tunnel to create on the link. See
721 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
722 This option may be specified more than once.
</para>
726 <term><varname>ActiveSlave=
</varname></term>
728 <para>A boolean. Specifies the new active slave. The
<literal>ActiveSlave=
</literal>
729 option is only valid for following modes:
730 <literal>active-backup
</literal>,
731 <literal>balance-alb
</literal> and
732 <literal>balance-tlb
</literal>. Defaults to false.
737 <term><varname>PrimarySlave=
</varname></term>
739 <para>A boolean. Specifies which slave is the primary device. The specified
740 device will always be the active slave while it is available. Only when the
741 primary is off-line will alternate devices be used. This is useful when
742 one slave is preferred over another, e.g. when one slave has higher throughput
743 than another. The
<literal>PrimarySlave=
</literal> option is only valid for
745 <literal>active-backup
</literal>,
746 <literal>balance-alb
</literal> and
747 <literal>balance-tlb
</literal>. Defaults to false.
752 <term><varname>ConfigureWithoutCarrier=
</varname></term>
754 <para>A boolean. Allows networkd to configure a specific link even if it has no carrier.
764 <title>[Address] Section Options
</title>
766 <para>An
<literal>[Address]
</literal> section accepts the
767 following keys. Specify several
<literal>[Address]
</literal>
768 sections to configure several addresses.
</para>
770 <variablelist class='network-directives'
>
772 <term><varname>Address=
</varname></term>
774 <para>As in the
<literal>[Network]
</literal> section. This
775 key is mandatory.
</para>
779 <term><varname>Peer=
</varname></term>
781 <para>The peer address in a point-to-point connection.
782 Accepts the same format as the
<literal>Address
</literal>
787 <term><varname>Broadcast=
</varname></term>
789 <para>The broadcast address, which must be in the format
791 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
792 This key only applies to IPv4 addresses. If it is not
793 given, it is derived from the
<literal>Address
</literal>
798 <term><varname>Label=
</varname></term>
800 <para>An address label.
</para>
804 <term><varname>PreferredLifetime=
</varname></term>
806 <para>Allows the default
"preferred lifetime" of the address to be overridden.
807 Only three settings are accepted:
<literal>forever
</literal> or
<literal>infinity
</literal>
808 which is the default and means that the address never expires, and
<literal>0</literal> which means
809 that the address is considered immediately
"expired" and will not be used,
810 unless explicitly requested. A setting of PreferredLifetime=
0 is useful for
811 addresses which are added to be used only by a specific application,
812 which is then configured to use them explicitly.
</para>
816 <term><varname>Scope=
</varname></term>
818 <para>The scope of the address, which can be
<literal>global
</literal>,
819 <literal>link
</literal> or
<literal>host
</literal> or an unsigned integer ranges
0 to
255.
820 Defaults to
<literal>global
</literal>.
</para>
824 <term><varname>HomeAddress=
</varname></term>
826 <para>Takes a boolean argument. Designates this address the
"home address" as defined in
827 <ulink url=
"https://tools.ietf.org/html/rfc6275">RFC
6275</ulink>.
828 Supported only on IPv6. Defaults to false.
</para>
832 <term><varname>DuplicateAddressDetection=
</varname></term>
834 <para>Takes a boolean argument. Do not perform Duplicate Address Detection
835 <ulink url=
"https://tools.ietf.org/html/rfc4862">RFC
4862</ulink> when adding this address.
836 Supported only on IPv6. Defaults to false.
</para>
840 <term><varname>ManageTemporaryAddress=
</varname></term>
842 <para>Takes a boolean argument. If true the kernel manage temporary addresses created
843 from this one as template on behalf of Privacy Extensions
844 <ulink url=
"https://tools.ietf.org/html/rfc3041">RFC
3041</ulink>. For this to become
845 active, the use_tempaddr sysctl setting has to be set to a value greater than zero.
846 The given address needs to have a prefix length of
64. This flag allows to use privacy
847 extensions in a manually configured network, just like if stateless auto-configuration
848 was active. Defaults to false.
</para>
852 <term><varname>PrefixRoute=
</varname></term>
854 <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace
855 application needs a way to suppress adding a prefix route. This is for example relevant
856 together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses,
857 but depending on on-link, no route for the prefix should be added. Defaults to false.
</para>
861 <term><varname>AutoJoin=
</varname></term>
863 <para>Takes a boolean argument. Joining multicast group on ethernet level via
864 <command>ip maddr
</command> command would not work if we have an Ethernet switch that does
865 IGMP snooping since the switch would not replicate multicast packets on ports that did not
866 have IGMP reports for the multicast addresses. Linux vxlan interfaces created via
867 <command>ip link add vxlan
</command> or networkd's netdev kind vxlan have the group option
868 that enables then to do the required join. By extending ip address command with option
869 <literal>autojoin
</literal> we can get similar functionality for openvswitch (OVS) vxlan
870 interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
871 Defaults to
<literal>no
</literal>.
</para>
878 <title>[IPv6AddressLabel] Section Options
</title>
880 <para>An
<literal>[IPv6AddressLabel]
</literal> section accepts the
881 following keys. Specify several
<literal>[IPv6AddressLabel]
</literal>
882 sections to configure several address labels. IPv6 address labels are
883 used for address selection. See
<ulink url=
"https://tools.ietf.org/html/rfc3484">RFC
3484</ulink>.
884 Precedence is managed by userspace, and only the label itself is stored in the kernel
</para>
886 <variablelist class='network-directives'
>
888 <term><varname>Label=
</varname></term>
890 <para> The label for the prefix (an unsigned integer) ranges
0 to
4294967294.
891 0xffffffff is reserved. This key is mandatory.
</para>
895 <term><varname>Prefix=
</varname></term>
897 <para>IPv6 prefix is an address with a prefix length, separated by a slash
<literal>/
</literal> character.
898 This key is mandatory.
</para>
905 <title>[RoutingPolicyRule] Section Options
</title>
907 <para>An
<literal>[RoutingPolicyRule]
</literal> section accepts the
908 following keys. Specify several
<literal>[RoutingPolicyRule]
</literal>
909 sections to configure several rules.
</para>
911 <variablelist class='network-directives'
>
913 <term><varname>TypeOfService=
</varname></term>
915 <para>Specifies the type of service to match a number between
0 to
255.
</para>
919 <term><varname>From=
</varname></term>
921 <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.
</para>
925 <term><varname>To=
</varname></term>
927 <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.
</para>
931 <term><varname>FirewallMark=
</varname></term>
933 <para>Specifies the iptables firewall mark value to match (a number between
1 and
4294967295).
</para>
937 <term><varname>Table=
</varname></term>
939 <para>Specifies the routing table identifier to lookup if the rule
940 selector matches. The table identifier for a route (a number between
1 and
4294967295).
</para>
944 <term><varname>Priority=
</varname></term>
946 <para>Specifies the priority of this rule.
<varname>Priority=
</varname> is an unsigned
947 integer. Higher number means lower priority, and rules get processed in order of increasing number.
</para>
951 <term><varname>IncomingInterface=
</varname></term>
953 <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.
</para>
957 <term><varname>OutgoingInterface=
</varname></term>
959 <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>
966 <title>[Route] Section Options
</title>
967 <para>The
<literal>[Route]
</literal> section accepts the
968 following keys. Specify several
<literal>[Route]
</literal>
969 sections to configure several routes.
</para>
971 <variablelist class='network-directives'
>
973 <term><varname>Gateway=
</varname></term>
975 <para>As in the
<literal>[Network]
</literal> section.
</para>
979 <term><varname>GatewayOnlink=
</varname></term>
981 <para>The
<literal>GatewayOnlink
</literal> option tells the kernel that it does not have
982 to check if the gateway is reachable directly by the current machine (i.e., the kernel does
983 not need to check if the gateway is attached to the local network), so that we can insert the
984 route in the kernel table without it being complained about. A boolean, defaults to
<literal>no
</literal>.
989 <term><varname>Destination=
</varname></term>
991 <para>The destination prefix of the route. Possibly
992 followed by a slash and the prefix length. If omitted, a
993 full-length host route is assumed.
</para>
997 <term><varname>Source=
</varname></term>
999 <para>The source prefix of the route. Possibly followed by
1000 a slash and the prefix length. If omitted, a full-length
1001 host route is assumed.
</para>
1005 <term><varname>Metric=
</varname></term>
1007 <para>The metric of the route (an unsigned integer).
</para>
1011 <term><varname>IPv6Preference=
</varname></term>
1013 <para>Specifies the route preference as defined in
<ulink
1014 url=
"https://tools.ietf.org/html/rfc4191">RFC4191
</ulink> for Router Discovery messages.
1015 Which can be one of
<literal>low
</literal> the route has a lowest priority,
1016 <literal>medium
</literal> the route has a default priority or
1017 <literal>high
</literal> the route has a highest priority.
</para>
1021 <term><varname>Scope=
</varname></term>
1023 <para>The scope of the route, which can be
<literal>global
</literal>,
1024 <literal>link
</literal> or
<literal>host
</literal>. Defaults to
1025 <literal>global
</literal>.
</para>
1029 <term><varname>PreferredSource=
</varname></term>
1031 <para>The preferred source address of the route. The address
1032 must be in the format described in
1033 <citerefentry project='man-pages'
><refentrytitle>inet_pton
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
1037 <term><varname>Table=
<replaceable>num
</replaceable></varname></term>
1039 <para>The table identifier for the route (a number between
1 and
4294967295, or
0 to unset).
1040 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1045 <term><varname>Protocol=
</varname></term>
1047 <para>The Protocol identifier for the route. Takes a number between
0 and
255 or the special values
1048 <literal>kernel
</literal>,
<literal>boot
</literal> and
<literal>static
</literal>. Defaults to
1049 <literal>static
</literal>.
1054 <term><varname>Type=
</varname></term>
1056 <para>The Type identifier for special route types, which can be
1057 <literal>unicast
</literal> route to a destination network address which describes the path to the destination,
1058 <literal>blackhole
</literal> packets are discarded silently,
1059 <literal>unreachable
</literal> packets are discarded and the ICMP message host unreachable is generated,
1060 <literal>prohibit
</literal> packets are discarded and the ICMP message communication administratively
1061 prohibited is generated. Defaults to
<literal>unicast
</literal>.
1066 <term><varname>InitialCongestionWindow=
</varname></term>
1068 <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP
1069 session, when a client requests a resource, the server's initial congestion window determines how many data bytes
1070 will be sent during the initial burst of data. Takes a size in bytes between
1 and
4294967295 (
2^
32 -
1). The usual
1071 suffixes K, M, G are supported and are understood to the base of
1024. Defaults to unset.
1076 <term><varname>InitialAdvertisedReceiveWindow=
</varname></term>
1078 <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initally be buffered at one time
1079 on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update
1080 from the receiving host. Takes a size in bytes between
1 and
4294967295 (
2^
32 -
1). The usual suffixes K, M, G are supported
1081 and are understood to the base of
1024. Defaults to unset.
1086 <term><varname>QuickAck=
</varname></term>
1088 <para>Takes a boolean argument. When true enables TCP quick ack mode for the route. Defaults to unset.
1097 <title>[DHCP] Section Options
</title>
1098 <para>The
<literal>[DHCP]
</literal> section configures the
1099 DHCPv4 and DHCP6 client, if it is enabled with the
1100 <varname>DHCP=
</varname> setting described above:
</para>
1102 <variablelist class='network-directives'
>
1104 <term><varname>UseDNS=
</varname></term>
1106 <para>When true (the default), the DNS servers received
1107 from the DHCP server will be used and take precedence over
1108 any statically configured ones.
</para>
1110 <para>This corresponds to the
<option>nameserver
</option>
1111 option in
<citerefentry
1112 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1116 <term><varname>UseNTP=
</varname></term>
1118 <para>When true (the default), the NTP servers received
1119 from the DHCP server will be used by systemd-timesyncd
1120 and take precedence over any statically configured ones.
</para>
1124 <term><varname>UseMTU=
</varname></term>
1126 <para>When true, the interface maximum transmission unit
1127 from the DHCP server will be used on the current link.
1128 Defaults to false.
</para>
1132 <term><varname>Anonymize=
</varname></term>
1134 <para>Takes a boolean argument. When true, the options sent to the DHCP server will
1135 follow the
<ulink url=
"https://tools.ietf.org/html/rfc7844">RFC
7844</ulink>
1136 (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
1137 Defaults to false.
</para>
1139 <para>This option should only be set to true when
1140 <varname>MACAddressPolicy=
</varname> is set to
<literal>random
</literal>
1142 project='man-pages'
><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
</para>
1144 <para>Note that this configuration will overwrite others.
1145 In concrete, the following variables will be ignored:
1146 <varname>SendHostname=
</varname>,
<varname>ClientIdentifier=
</varname>,
1147 <varname>UseRoutes=
</varname>,
<varname>SendHostname=
</varname>,
1148 <varname>UseMTU=
</varname>,
<varname>VendorClassIdentifier=
</varname>,
1149 <varname>UseTimezone=
</varname>.
</para>
1153 <term><varname>SendHostname=
</varname></term>
1155 <para>When true (the default), the machine's hostname will
1156 be sent to the DHCP server.
</para>
1160 <term><varname>UseHostname=
</varname></term>
1162 <para>When true (the default), the hostname received from
1163 the DHCP server will be set as the transient hostname of the system
1168 <term><varname>Hostname=
</varname></term>
1170 <para>Use this value for the hostname which is sent to the
1171 DHCP server, instead of machine's hostname.
</para>
1175 <term><varname>UseDomains=
</varname></term>
1177 <para>Takes a boolean argument, or the special value
<literal>route
</literal>. When true, the domain name
1178 received from the DHCP server will be used as DNS search domain over this link, similar to the effect of
1179 the
<option>Domains=
</option> setting. If set to
<literal>route
</literal>, the domain name received from
1180 the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of
1181 the
<option>Domains=
</option> setting when the argument is prefixed with
<literal>~
</literal>. Defaults to
1184 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1185 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1186 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1187 single-label names.
</para>
1189 <para>When set to true, this setting corresponds to the
<option>domain
</option> option in
<citerefentry
1190 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1194 <term><varname>UseRoutes=
</varname></term>
1196 <para>When true (the default), the static routes will be requested from the DHCP server and added to the
1197 routing table with a metric of
1024, and a scope of
"global",
"link" or
"host", depending on the route's
1198 destination and gateway. If the destination is on the local host, e.g.,
127.x.x.x, or the same as the
1199 link's own address, the scope will be set to
"host". Otherwise if the gateway is null (a direct route), a
1200 "link" scope will be used. For anything else, scope defaults to
"global".
</para>
1205 <term><varname>UseTimezone=
</varname></term>
1207 <listitem><para>When true, the timezone received from the
1208 DHCP server will be set as timezone of the local
1209 system. Defaults to
<literal>no
</literal>.
</para></listitem>
1213 <term><varname>CriticalConnection=
</varname></term>
1215 <para>When true, the connection will never be torn down
1216 even if the DHCP lease expires. This is contrary to the
1217 DHCP specification, but may be the best choice if, say,
1218 the root filesystem relies on this connection. Defaults to
1224 <term><varname>ClientIdentifier=
</varname></term>
1226 <para>The DHCPv4 client identifier to use. Takes one of
<literal>mac
</literal>,
<literal>duid
</literal> or
<literal>duid-only
</literal>.
1227 If set to
<literal>mac
</literal>, the MAC address of the link is used.
1228 If set to
<literal>duid
</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used.
1229 If set to
<literal>duid-only
</literal>, only DUID is used, this may not be RFC compliant, but some setups may require to use this.
1230 Defaults to
<literal>duid
</literal>.
</para>
1235 <term><varname>VendorClassIdentifier=
</varname></term>
1237 <para>The vendor class identifier used to identify vendor
1238 type and configuration.
</para>
1243 <term><varname>DUIDType=
</varname></term>
1245 <para>Override the global
<varname>DUIDType
</varname> setting for this network. See
1246 <citerefentry><refentrytitle>networkd.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1247 for a description of possible values.
</para>
1252 <term><varname>DUIDRawData=
</varname></term>
1254 <para>Override the global
<varname>DUIDRawData
</varname> setting for this network. See
1255 <citerefentry><refentrytitle>networkd.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1256 for a description of possible values.
</para>
1261 <term><varname>IAID=
</varname></term>
1263 <para>The DHCP Identity Association Identifier (IAID) for the interface, a
32-bit unsigned integer.
</para>
1268 <term><varname>RequestBroadcast=
</varname></term>
1270 <para>Request the server to use broadcast messages before
1271 the IP address has been configured. This is necessary for
1272 devices that cannot receive RAW packets, or that cannot
1273 receive packets at all before an IP address has been
1274 configured. On the other hand, this must not be enabled on
1275 networks where broadcasts are filtered out.
</para>
1280 <term><varname>RouteMetric=
</varname></term>
1282 <para>Set the routing metric for routes specified by the
1288 <term><varname>RouteTable=
<replaceable>num
</replaceable></varname></term>
1290 <para>The table identifier for DHCP routes (a number between
1 and
4294967295, or
0 to unset).
1291 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1293 <para>When used in combination with
<varname>VRF=
</varname> the
1294 VRF's routing table is used unless this parameter is specified.
1300 <term><varname>ListenPort=
</varname></term>
1302 <para>Allow setting custom port for the DHCP client to listen on.
</para>
1307 <term><varname>RapidCommit=
</varname></term>
1309 <para>A boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through
1310 a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both
1311 the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default
1312 four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides
1313 faster client configuration and is beneficial in environments in which networks are under a heavy load.
1314 See
<ulink url=
"https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC
3315</ulink> for details.
1315 Defaults to true.
</para>
1323 <title>[IPv6AcceptRA] Section Options
</title>
1324 <para>The
<literal>[IPv6AcceptRA]
</literal> section configures the IPv6 Router Advertisement
1325 (RA) client, if it is enabled with the
<varname>IPv6AcceptRA=
</varname> setting described
1328 <variablelist class='network-directives'
>
1330 <term><varname>UseDNS=
</varname></term>
1332 <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
1333 precedence over any statically configured ones.
</para>
1335 <para>This corresponds to the
<option>nameserver
</option> option in
<citerefentry
1336 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1341 <term><varname>UseDomains=
</varname></term>
1343 <para>Takes a boolean argument, or the special value
<literal>route
</literal>. When true, the domain name
1344 received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to
1345 the effect of the
<option>Domains=
</option> setting. If set to
<literal>route
</literal>, the domain name
1346 received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the
1347 effect of the
<option>Domains=
</option> setting when the argument is prefixed with
1348 <literal>~
</literal>. Defaults to false.
</para>
1350 <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution
1351 of all host names, in particular of single-label names. It is generally safer to use the supplied domain
1352 only as routing domain, rather than as search domain, in order to not have it affect local resolution of
1353 single-label names.
</para>
1355 <para>When set to true, this setting corresponds to the
<option>domain
</option> option in
<citerefentry
1356 project='man-pages'
><refentrytitle>resolv.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1361 <term><varname>RouteTable=
<replaceable>num
</replaceable></varname></term>
1363 <para>The table identifier for the routes received in the Router Advertisement
1364 (a number between
1 and
4294967295, or
0 to unset).
1365 The table can be retrieved using
<command>ip route show table
<replaceable>num
</replaceable></command>.
1373 <title>[DHCPServer] Section Options
</title>
1374 <para>The
<literal>[DHCPServer]
</literal> section contains
1375 settings for the DHCP server, if enabled via the
1376 <varname>DHCPServer=
</varname> option described above:
</para>
1378 <variablelist class='network-directives'
>
1381 <term><varname>PoolOffset=
</varname></term>
1382 <term><varname>PoolSize=
</varname></term>
1384 <listitem><para>Configures the pool of addresses to hand out. The pool
1385 is a contiguous sequence of IP addresses in the subnet configured for
1386 the server address, which does not include the subnet nor the broadcast
1387 address.
<varname>PoolOffset=
</varname> takes the offset of the pool
1388 from the start of subnet, or zero to use the default value.
1389 <varname>PoolSize=
</varname> takes the number of IP addresses in the
1390 pool or zero to use the default value. By default, the pool starts at
1391 the first address after the subnet address and takes up the rest of
1392 the subnet, excluding the broadcast address. If the pool includes
1393 the server address (the default), this is reserved and not handed
1394 out to clients.
</para></listitem>
1398 <term><varname>DefaultLeaseTimeSec=
</varname></term>
1399 <term><varname>MaxLeaseTimeSec=
</varname></term>
1401 <listitem><para>Control the default and maximum DHCP lease
1402 time to pass to clients. These settings take time values in seconds or
1403 another common time unit, depending on the suffix. The default
1404 lease time is used for clients that did not ask for a specific
1405 lease time. If a client asks for a lease time longer than the
1406 maximum lease time, it is automatically shortened to the
1407 specified time. The default lease time defaults to
1h, the
1408 maximum lease time to
12h. Shorter lease times are beneficial
1409 if the configuration data in DHCP leases changes frequently
1410 and clients shall learn the new settings with shorter
1411 latencies. Longer lease times reduce the generated DHCP
1412 network traffic.
</para></listitem>
1416 <term><varname>EmitDNS=
</varname></term>
1417 <term><varname>DNS=
</varname></term>
1419 <listitem><para>Configures whether the DHCP leases handed out
1420 to clients shall contain DNS server information. The
1421 <varname>EmitDNS=
</varname> setting takes a boolean argument
1422 and defaults to
<literal>yes
</literal>. The DNS servers to
1423 pass to clients may be configured with the
1424 <varname>DNS=
</varname> option, which takes a list of IPv4
1425 addresses. If the
<varname>EmitDNS=
</varname> option is
1426 enabled but no servers configured, the servers are
1427 automatically propagated from an
"uplink" interface that has
1428 appropriate servers set. The
"uplink" interface is determined
1429 by the default route of the system with the highest
1430 priority. Note that this information is acquired at the time
1431 the lease is handed out, and does not take uplink interfaces
1432 into account that acquire DNS or NTP server information at a
1433 later point. DNS server propagation does not take
1434 <filename>/etc/resolv.conf
</filename> into account. Also, note
1435 that the leases are not refreshed if the uplink network
1436 configuration changes. To ensure clients regularly acquire the
1437 most current uplink DNS server information, it is thus
1438 advisable to shorten the DHCP lease time via
1439 <varname>MaxLeaseTimeSec=
</varname> described
1440 above.
</para></listitem>
1444 <term><varname>EmitNTP=
</varname></term>
1445 <term><varname>NTP=
</varname></term>
1447 <listitem><para>Similar to the
<varname>EmitDNS=
</varname> and
1448 <varname>DNS=
</varname> settings described above, these
1449 settings configure whether and what NTP server information
1450 shall be emitted as part of the DHCP lease. The same syntax,
1451 propagation semantics and defaults apply as for
1452 <varname>EmitDNS=
</varname> and
1453 <varname>DNS=
</varname>.
</para></listitem>
1457 <term><varname>EmitRouter=
</varname></term>
1459 <listitem><para>Similar to the
<varname>EmitDNS=
</varname>
1460 setting described above, this setting configures whether the
1461 DHCP lease should contain the router option. The same syntax,
1462 propagation semantics and defaults apply as for
1463 <varname>EmitDNS=
</varname>.
</para></listitem>
1467 <term><varname>EmitTimezone=
</varname></term>
1468 <term><varname>Timezone=
</varname></term>
1470 <listitem><para>Configures whether the DHCP leases handed out
1471 to clients shall contain timezone information. The
1472 <varname>EmitTimezone=
</varname> setting takes a boolean
1473 argument and defaults to
<literal>yes
</literal>. The
1474 <varname>Timezone=
</varname> setting takes a timezone string
1475 (such as
<literal>Europe/Berlin
</literal> or
1476 <literal>UTC
</literal>) to pass to clients. If no explicit
1477 timezone is set, the system timezone of the local host is
1478 propagated, as determined by the
1479 <filename>/etc/localtime
</filename> symlink.
</para></listitem>
1486 <title>[IPv6PrefixDelegation] Section Options
</title>
1487 <para>The
<literal>[IPv6PrefixDelegation]
</literal> section contains
1488 settings for sending IPv6 Router Advertisements and whether to act as
1489 a router, if enabled via the
<varname>IPv6PrefixDelegation=
</varname>
1490 option described above. IPv6 network prefixes are defined with one or
1491 more
<literal>[IPv6Prefix]
</literal> sections.
</para>
1493 <variablelist class='network-directives'
>
1496 <term><varname>Managed=
</varname></term>
1497 <term><varname>OtherInformation=
</varname></term>
1499 <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6
1500 addresses on the network link when
<varname>Managed=
</varname> boolean
1501 is set to
<literal>true
</literal> or if only additional network
1502 information can be obtained via DHCPv6 for the network link when
1503 <varname>OtherInformation=
</varname> boolean is set to
1504 <literal>true
</literal>. Both settings default to
1505 <literal>false
</literal>, which means that a DHCPv6 server is not being
1506 used.
</para></listitem>
1510 <term><varname>RouterLifetimeSec=
</varname></term>
1512 <listitem><para>Configures the IPv6 router lifetime in seconds. If set,
1513 this host also announces itself in Router Advertisements as an IPv6
1514 router for the network link. Defaults to unset, which means the host is
1515 not acting as a router.
</para>
1520 <term><varname>RouterPreference=
</varname></term>
1522 <listitem><para>Configures IPv6 router preference if
1523 <varname>RouterLifetimeSec=
</varname> is non-zero. Valid values are
1524 <literal>high
</literal>,
<literal>medium
</literal> and
1525 <literal>low
</literal>, with
<literal>normal
</literal> and
1526 <literal>default
</literal> added as synonyms for
1527 <literal>medium
</literal> just to make configuration easier. See
1528 <ulink url=
"https://tools.ietf.org/html/rfc4191">RFC
4191</ulink>
1529 for details. Defaults to
<literal>medium
</literal>.
</para></listitem>
1533 <term><varname>EmitDNS=
</varname></term>
1534 <term><varname>DNS=
</varname></term>
1536 <listitem><para><varname>DNS=
</varname> specifies a list of recursive
1537 DNS server IPv6 addresses that distributed via Router Advertisement
1538 messages when
<varname>EmitDNS=
</varname> is true. If
<varname>DNS=
1539 </varname> is empty, DNS servers are read from the
1540 <literal>[Network]
</literal> section. If the
1541 <literal>[Network]
</literal> section does not contain any DNS servers
1542 either, DNS servers from the uplink with the highest priority default
1543 route are used. When
<varname>EmitDNS=
</varname> is false, no DNS server
1544 information is sent in Router Advertisement messages.
1545 <varname>EmitDNS=
</varname> defaults to true.
1550 <term><varname>EmitDomains=
</varname></term>
1551 <term><varname>Domains=
</varname></term>
1553 <listitem><para>A list of DNS search domains distributed via Router
1554 Advertisement messages when
<varname>EmitDomains=
</varname> is true. If
1555 <varname>Domains=
</varname> is empty, DNS search domains are read from the
1556 <literal>[Network]
</literal> section. If the
<literal>[Network]
</literal>
1557 section does not contain any DNS search domains either, DNS search
1558 domains from the uplink with the highest priority default route are
1559 used. When
<varname>EmitDomains=
</varname> is false, no DNS search domain
1560 information is sent in Router Advertisement messages.
1561 <varname>EmitDomains=
</varname> defaults to true.
1566 <term><varname>DNSLifetimeSec=
</varname></term>
1568 <listitem><para>Lifetime in seconds for the DNS server addresses listed
1569 in
<varname>DNS=
</varname> and search domains listed in
1570 <varname>Domains=
</varname>.
</para></listitem>
1577 <title>[IPv6Prefix] Section Options
</title>
1578 <para>One or more
<literal>[IPv6Prefix]
</literal> sections contain the IPv6
1579 prefixes that are announced via Router Advertisements. See
1580 <ulink url=
"https://tools.ietf.org/html/rfc4861">RFC
4861</ulink>
1581 for further details.
</para>
1583 <variablelist class='network-directives'
>
1586 <term><varname>AddressAutoconfiguration=
</varname></term>
1587 <term><varname>OnLink=
</varname></term>
1589 <listitem><para>Boolean values to specify whether IPv6 addresses can be
1590 autoconfigured with this prefix and whether the prefix can be used for
1591 onlink determination. Both settings default to
<literal>true
</literal>
1592 in order to ease configuration.
1597 <term><varname>Prefix=
</varname></term>
1599 <listitem><para>The IPv6 prefix that is to be distributed to hosts.
1600 Similarly to configuring static IPv6 addresses, the setting is
1601 configured as an IPv6 prefix and its prefix length, separated by a
1602 <literal>/
</literal> character. Use multiple
1603 <literal>[IPv6Prefix]
</literal> sections to configure multiple IPv6
1604 prefixes since prefix lifetimes, address autoconfiguration and onlink
1605 status may differ from one prefix to another.
</para></listitem>
1609 <term><varname>PreferredLifetimeSec=
</varname></term>
1610 <term><varname>ValidLifetimeSec=
</varname></term>
1612 <listitem><para>Preferred and valid lifetimes for the prefix measured in
1613 seconds.
<varname>PreferredLifetimeSec=
</varname> defaults to
604800
1614 seconds (one week) and
<varname>ValidLifetimeSec=
</varname> defaults
1615 to
2592000 seconds (
30 days).
</para></listitem>
1622 <title>[Bridge] Section Options
</title>
1623 <para>The
<literal>[Bridge]
</literal> section accepts the
1624 following keys.
</para>
1625 <variablelist class='network-directives'
>
1627 <term><varname>UnicastFlood=
</varname></term>
1629 <para>A boolean. Controls whether the bridge should flood
1630 traffic for which an FDB entry is missing and the destination
1631 is unknown through this port. Defaults to on.
1636 <term><varname>HairPin=
</varname></term>
1638 <para>A boolean. Configures whether traffic may be sent back
1639 out of the port on which it was received. By default, this
1640 flag is false, and the bridge will not forward traffic back
1641 out of the receiving port.
</para>
1645 <term><varname>UseBPDU=
</varname></term>
1647 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
1648 processed by the bridge port. Defaults to yes.
</para>
1652 <term><varname>FastLeave=
</varname></term>
1654 <para>A boolean. This flag allows the bridge to immediately stop multicast
1655 traffic on a port that receives an IGMP Leave message. It is only used with
1656 IGMP snooping if enabled on the bridge. Defaults to off.
</para>
1660 <term><varname>AllowPortToBeRoot=
</varname></term>
1662 <para>A boolean. Configures whether a given port is allowed to
1663 become a root port. Only used when STP is enabled on the bridge.
1664 Defaults to on.
</para>
1668 <term><varname>Cost=
</varname></term>
1670 <para>Sets the
"cost" of sending packets of this interface.
1671 Each port in a bridge may have a different speed and the cost
1672 is used to decide which link to use. Faster interfaces
1673 should have lower costs. It is an integer value between
1 and
1678 <term><varname>Priority=
</varname></term>
1680 <para>Sets the
"priority" of sending packets on this interface.
1681 Each port in a bridge may have a different priority which is used
1682 to decide which link to use. Lower value means higher priority.
1683 It is an integer value between
0 to
63. Networkd does not set any
1684 default, meaning the kernel default value of
32 is used.
</para>
1690 <title>[BridgeFDB] Section Options
</title>
1691 <para>The
<literal>[BridgeFDB]
</literal> section manages the
1692 forwarding database table of a port and accepts the following
1693 keys. Specify several
<literal>[BridgeFDB]
</literal> sections to
1694 configure several static MAC table entries.
</para>
1696 <variablelist class='network-directives'
>
1698 <term><varname>MACAddress=
</varname></term>
1700 <para>As in the
<literal>[Network]
</literal> section. This
1701 key is mandatory.
</para>
1705 <term><varname>VLANId=
</varname></term>
1707 <para>The VLAN ID for the new static MAC table entry. If
1708 omitted, no VLAN ID information is appended to the new static MAC
1715 <title>[BridgeVLAN] Section Options
</title>
1716 <para>The
<literal>[BridgeVLAN]
</literal> section manages the VLAN ID configuration of a bridge port and accepts
1717 the following keys. Specify several
<literal>[BridgeVLAN]
</literal> sections to configure several VLAN entries.
1718 The
<varname>VLANFiltering=
</varname> option has to be enabled, see
<literal>[Bridge]
</literal> section in
1719 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
1721 <variablelist class='network-directives'
>
1723 <term><varname>VLAN=
</varname></term>
1725 <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid
1726 from
1 to
4094.
</para>
1730 <term><varname>EgressUntagged=
</varname></term>
1732 <para>The VLAN ID specified here will be used to untag frames on egress. Configuring
1733 <varname>EgressUntagged=
</varname> implicates the use of
<varname>VLAN=
</varname> above and will enable the
1734 VLAN ID for ingress as well. This can be either a single ID or a range M-N.
</para>
1738 <term><varname>PVID=
</varname></term>
1740 <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress.
1741 <varname>PVID=
</varname> can be used only once. Configuring
<varname>PVID=
</varname> implicates the use of
1742 <varname>VLAN=
</varname> above and will enable the VLAN ID for ingress as well.
</para>
1749 <title>Examples
</title>
1751 <title>Static network configuration
</title>
1753 <programlisting># /etc/systemd/network/
50-static.network
1758 Address=
192.168.0.15/
24
1759 Gateway=
192.168.0.1</programlisting>
1761 <para>This brings interface
<literal>enp2s0
</literal> up with a static address. The
1762 specified gateway will be used for a default route.
</para>
1766 <title>DHCP on ethernet links
</title>
1768 <programlisting># /etc/systemd/network/
80-dhcp.network
1773 DHCP=yes
</programlisting>
1775 <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with
1776 <literal>en
</literal> (i.e. ethernet interfaces).
</para>
1780 <title>A bridge with two enslaved links
</title>
1782 <programlisting># /etc/systemd/network/
25-bridge-static.network
1787 Address=
192.168.0.15/
24
1789 DNS=
192.168.0.1</programlisting>
1791 <programlisting># /etc/systemd/network/
25-bridge-slave-interface-
1.network
1796 Bridge=bridge0
</programlisting>
1798 <programlisting># /etc/systemd/network/
25-bridge-slave-interface-
2.network
1803 Bridge=bridge0
</programlisting>
1805 <para>This creates a bridge and attaches devices
<literal>enp2s0
</literal> and
1806 <literal>wlp3s0
</literal> to it. The bridge will have the specified static address
1807 and network assigned, and a default route via the specified gateway will be
1808 added. The specified DNS server will be added to the global list of DNS resolvers.
1816 # /etc/systemd/network/
20-bridge-slave-interface-vlan.network
1832 EgressUntagged=
300-
400</programlisting>
1834 <para>This overrides the configuration specified in the previous example for the
1835 interface
<literal>enp2s0
</literal>, and enables VLAN on that bridge port. VLAN IDs
1836 1-
32,
42,
100-
400 will be allowed. Packets tagged with VLAN IDs
42,
300-
400 will be
1837 untagged when they leave on this interface. Untagged packets which arrive on this
1838 interface will be assigned VLAN ID
42.
</para>
1842 <title>Various tunnels
</title>
1844 <programlisting>/etc/systemd/network/
25-tunnels.network
1855 <programlisting>/etc/systemd/network/
25-tunnel-ipip.netdev
1861 <programlisting>/etc/systemd/network/
25-tunnel-sit.netdev
1867 <programlisting>/etc/systemd/network/
25-tunnel-gre.netdev
1873 <programlisting>/etc/systemd/network/
25-tunnel-vti.netdev
1879 <para>This will bring interface
<literal>ens1
</literal> up and create an IPIP tunnel,
1880 a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.
</para>
1884 <title>A bond device
</title>
1886 <programlisting># /etc/systemd/network/
30-bond1.network
1894 <programlisting># /etc/systemd/network/
30-bond1.netdev
1900 <programlisting># /etc/systemd/network/
30-bond1-dev1.network
1902 MACAddress=
52:
54:
00:e9:
64:
41
1908 <programlisting># /etc/systemd/network/
30-bond1-dev2.network
1910 MACAddress=
52:
54:
00:e9:
64:
42
1916 <para>This will create a bond device
<literal>bond1
</literal> and enslave the two
1917 devices with MAC addresses
52:
54:
00:e9:
64:
41 and
52:
54:
00:e9:
64:
42 to it. IPv6 DHCP
1918 will be used to acquire an address.
</para>
1922 <title>Virtual Routing and Forwarding (VRF)
</title>
1923 <para>Add the
<literal>bond1
</literal> interface to the VRF master interface
1924 <literal>vrf1
</literal>. This will redirect routes generated on this interface to be
1925 within the routing table defined during VRF creation. For kernels before
4.8 traffic
1926 won't be redirected towards the VRFs routing table unless specific ip-rules are added.
1928 <programlisting># /etc/systemd/network/
25-vrf.network
1938 <title>MacVTap
</title>
1939 <para>This brings up a network interface
<literal>macvtap-test
</literal>
1940 and attaches it to
<literal>enp0s25
</literal>.
</para>
1941 <programlisting># /usr/lib/systemd/network/
25-macvtap.network
1946 MACVTAP=macvtap-test
1952 <title>See Also
</title>
1954 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1955 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1956 <citerefentry><refentrytitle>systemd.link
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1957 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1958 <citerefentry><refentrytitle>systemd-resolved.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>