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