]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.network.xml
networkd: emit DNS/NTP/Timezone info via DHCP server by default
[thirdparty/systemd.git] / man / systemd.network.xml
CommitLineData
eac684ef
TG
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
eac684ef
TG
4
5<!--
6 This file is part of systemd.
7
8 Copyright 2013 Tom Gundersen
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
24<refentry id="systemd.network" conditional='ENABLE_NETWORKD'>
25
798d3a52
ZJS
26 <refentryinfo>
27 <title>systemd.network</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Tom</firstname>
34 <surname>Gundersen</surname>
35 <email>teg@jklm.no</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.network</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.network</refname>
47 <refpurpose>Network configuration</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename><replaceable>network</replaceable>.network</filename></para>
52 </refsynopsisdiv>
53
54 <refsect1>
55 <title>Description</title>
56
57 <para>Network setup is performed by
58 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
59 </para>
60
61 <para>Network files must have the extension
62 <filename>.network</filename>; other extensions are ignored.
63 Networks are applied to links whenever the links appear.</para>
64
65 <para>The <filename>.network</filename> files are read from the
66 files located in the system network directory
12b42c76 67 <filename>/usr/lib/systemd/network</filename>, the volatile
798d3a52
ZJS
68 runtime network directory
69 <filename>/run/systemd/network</filename> and the local
70 administration network directory
12b42c76 71 <filename>/etc/systemd/network</filename>. All configuration files
798d3a52
ZJS
72 are collectively sorted and processed in lexical order, regardless
73 of the directories in which they live. However, files with
74 identical filenames replace each other. Files in
75 <filename>/etc</filename> have the highest priority, files in
76 <filename>/run</filename> take precedence over files with the same
12b42c76 77 name in <filename>/usr/lib</filename>. This can be used to
798d3a52 78 override a system-supplied configuration file with a local file if
57e27ec0
ZJS
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 disable the configuration file entirely (it is "masked").</para>
798d3a52
ZJS
82 </refsect1>
83
84 <refsect1>
85 <title>[Match] Section Options</title>
86
87 <para>The network file contains a <literal>[Match]</literal>
88 section, which determines if a given network file may be applied
89 to a given device; and a <literal>[Network]</literal> section
90 specifying how the device should be configured. The first (in
91 lexical order) of the network files that matches a given device
a22e1850
LP
92 is applied, all later files are ignored, even if they match as
93 well.</para>
798d3a52
ZJS
94
95 <para>A network file is said to match a device if each of the
96 entries in the <literal>[Match]</literal> section matches, or if
97 the section is empty. The following keys are accepted:</para>
98
99 <variablelist class='network-directives'>
100 <varlistentry>
101 <term><varname>MACAddress=</varname></term>
102 <listitem>
103 <para>The hardware address.</para>
104 </listitem>
105 </varlistentry>
106 <varlistentry>
107 <term><varname>Path=</varname></term>
108 <listitem>
5256e00e
TG
109 <para>A whitespace-separated list of shell-style globs
110 matching the persistent path, as exposed by the udev
111 property <literal>ID_PATH</literal>.</para>
798d3a52
ZJS
112 </listitem>
113 </varlistentry>
114 <varlistentry>
115 <term><varname>Driver=</varname></term>
116 <listitem>
5256e00e
TG
117 <para>A whitespace-separated list of shell-style globs
118 matching the driver currently bound to the device, as
798d3a52
ZJS
119 exposed by the udev property <literal>DRIVER</literal>
120 of its parent device, or if that is not set the driver
121 as exposed by <literal>ethtool -i</literal> of the
122 device itself.</para>
123 </listitem>
124 </varlistentry>
125 <varlistentry>
126 <term><varname>Type=</varname></term>
127 <listitem>
5256e00e
TG
128 <para>A whitespace-separated list of shell-style globs
129 matching the device type, as exposed by the udev property
798d3a52
ZJS
130 <literal>DEVTYPE</literal>.</para>
131 </listitem>
132 </varlistentry>
133 <varlistentry>
134 <term><varname>Name=</varname></term>
135 <listitem>
5256e00e
TG
136 <para>A whitespace-separated list of shell-style globs
137 matching the device name, as exposed by the udev property
138 <literal>INTERFACE</literal>.</para>
798d3a52
ZJS
139 </listitem>
140 </varlistentry>
141 <varlistentry>
142 <term><varname>Host=</varname></term>
143 <listitem>
144 <para>Matches against the hostname or machine ID of the
145 host. See <literal>ConditionHost=</literal> in
146 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
147 for details.
148 </para>
149 </listitem>
150 </varlistentry>
151 <varlistentry>
152 <term><varname>Virtualization=</varname></term>
153 <listitem>
154 <para>Checks whether the system is executed in a virtualized
155 environment and optionally test whether it is a specific
156 implementation. See <literal>ConditionVirtualization=</literal> in
157 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
158 for details.
159 </para>
160 </listitem>
161 </varlistentry>
162 <varlistentry>
163 <term><varname>KernelCommandLine=</varname></term>
164 <listitem>
165 <para>Checks whether a specific kernel command line option is
166 set (or if prefixed with the exclamation mark unset). See
167 <literal>ConditionKernelCommandLine=</literal> in
168 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
169 for details.
170 </para>
171 </listitem>
172 </varlistentry>
173 <varlistentry>
174 <term><varname>Architecture=</varname></term>
175 <listitem>
176 <para>Checks whether the system is running on a specific
177 architecture. See <literal>ConditionArchitecture=</literal> in
178 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
179 for details.
180 </para>
181 </listitem>
182 </varlistentry>
183 </variablelist>
184
185 </refsect1>
186
187 <refsect1>
188 <title>[Link] Section Options</title>
189
190 <para> The <literal>[Link]</literal> section accepts the following keys:</para>
191
192 <variablelist class='network-directives'>
193 <varlistentry>
194 <term><varname>MACAddress=</varname></term>
195 <listitem>
196 <para>The hardware address.</para>
197 </listitem>
198 </varlistentry>
199 <varlistentry>
200 <term><varname>MTUBytes=</varname></term>
201 <listitem>
202 <para>The maximum transmission unit in bytes to set for the
203 device. The usual suffixes K, M, G, are supported and are
204 understood to the base of 1024.</para>
205 </listitem>
206 </varlistentry>
207 </variablelist>
208 </refsect1>
209
210 <refsect1>
211 <title>[Network] Section Options</title>
212
213 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
214
215 <variablelist class='network-directives'>
216 <varlistentry>
217 <term><varname>Description=</varname></term>
218 <listitem>
219 <para>A description of the device. This is only used for
220 presentation purposes.</para>
221 </listitem>
222 </varlistentry>
223 <varlistentry>
224 <term><varname>DHCP=</varname></term>
225 <listitem>
226 <para>Enables DHCPv4 and/or DHCPv6 support. Accepts
227 <literal>yes</literal>, <literal>no</literal>,
228 <literal>ipv4</literal>, or <literal>ipv6</literal>.</para>
e88d8021
ZJS
229
230 <para>Please note that by default the domain name
231 specified through DHCP is not used for name resolution.
232 See option <option>UseDomains=</option> below.</para>
798d3a52
ZJS
233 </listitem>
234 </varlistentry>
235 <varlistentry>
236 <term><varname>DHCPServer=</varname></term>
237 <listitem>
238 <para>A boolean. Enables a basic DHCPv4 server on the
239 device. Mostly useful for handing out leases to container
240 instances.</para>
241 </listitem>
242 </varlistentry>
243 <varlistentry>
56fd6bf7 244 <term><varname>LinkLocalAddressing=</varname></term>
798d3a52 245 <listitem>
d0d6a4cd
TG
246 <para>Enables link-local address autoconfiguration. Accepts
247 <literal>yes</literal>, <literal>no</literal>,
248 <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to
249 <literal>ipv6</literal>.</para>
798d3a52
ZJS
250 </listitem>
251 </varlistentry>
252 <varlistentry>
253 <term><varname>IPv4LLRoute=</varname></term>
254 <listitem>
255 <para>A boolean. When true, sets up the route needed for
256 non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
257 to false.
258 </para>
259 </listitem>
260 </varlistentry>
261 <varlistentry>
113bfde1
TG
262 <term><varname>IPv6Token=</varname></term>
263 <listitem>
264 <para>An IPv6 address with the top 64 bits unset. When set, indicates the
265 64 bits interface part of SLAAC IPv6 addresses for this link. By default
266 it is autogenerated.</para>
267 </listitem>
268 </varlistentry>
269 <varlistentry>
798d3a52
ZJS
270 <term><varname>LLMNR=</varname></term>
271 <listitem>
272 <para>A boolean or <literal>resolve</literal>. When true, enables
273 Link-Local Multicast Name Resolution on the link, when set to
274 <literal>resolve</literal> only resolution is enabled, but not
275 announcement. Defaults to true.</para>
276 </listitem>
277 </varlistentry>
278 <varlistentry>
279 <term><varname>LLDP=</varname></term>
280 <listitem>
281 <para>A boolean. When true, enables LLDP link receive support.
282 </para>
283 </listitem>
284 </varlistentry>
0d4ad91d
AR
285 <varlistentry>
286 <term><varname>BindCarrier=</varname></term>
287 <listitem>
288 <para>A port or a list of ports. When set, controls the
dd2b607b 289 behavior of the current interface. When all ports in the list
0d4ad91d
AR
290 are in an operational down state, the current interface is brought
291 down. When at least one port has carrier, the current interface
292 is brought up.
293 </para>
294 </listitem>
295 </varlistentry>
798d3a52
ZJS
296 <varlistentry>
297 <term><varname>Address=</varname></term>
298 <listitem>
299 <para>A static IPv4 or IPv6 address and its prefix length,
300 separated by a <literal>/</literal> character. Specify
301 this key more than once to configure several addresses.
302 The format of the address must be as described in
3ba3a79d 303 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
304 This is a short-hand for an [Address] section only
305 containing an Address key (see below). This option may be
306 specified more than once.
307 </para>
308
309 <para>If the specified address is 0.0.0.0 (for IPv4) or
310 [::] (for IPv6), a new address range of the requested size
311 is automatically allocated from a system-wide pool of
312 unused ranges. The allocated range is checked against all
313 current network interfaces and all known network
314 configuration files to avoid address range conflicts. The
315 default system-wide pool consists of 192.168.0.0/16,
316 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for
317 IPv6. This functionality is useful to manage a large
318 number of dynamically created network interfaces with the
319 same network configuration and automatic address range
320 assignment.</para>
321
322 </listitem>
323 </varlistentry>
324 <varlistentry>
325 <term><varname>Gateway=</varname></term>
326 <listitem>
327 <para>The gateway address, which must be in the format
328 described in
3ba3a79d 329 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
330 This is a short-hand for a [Route] section only containing
331 a Gateway key. This option may be specified more than
332 once.</para>
333 </listitem>
334 </varlistentry>
335 <varlistentry>
336 <term><varname>DNS=</varname></term>
337 <listitem>
338 <para>A DNS server address, which must be in the format
339 described in
3ba3a79d 340 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
341 This option may be specified more than once.</para>
342 </listitem>
343 </varlistentry>
344 <varlistentry>
345 <term><varname>Domains=</varname></term>
346 <listitem>
347 <para>The domains used for DNS resolution over this link.</para>
348 </listitem>
349 </varlistentry>
350 <varlistentry>
351 <term><varname>NTP=</varname></term>
352 <listitem>
353 <para>An NTP server address. This option may be specified more than once.</para>
354 </listitem>
355 </varlistentry>
356 <varlistentry>
357 <term><varname>IPForward=</varname></term>
358 <listitem><para>Configures IP forwarding for the network
359 interface. If enabled incoming packets on the network
360 interface will be forwarded to other interfaces according to
361 the routing table. Takes either a boolean argument, or the
362 values <literal>ipv4</literal> or <literal>ipv6</literal>,
363 which only enables IP forwarding for the specified address
2972cba1
NO
364 family, or <literal>kernel</literal>, which preserves existing sysctl settings.
365 This controls the
4046d836
LP
366 <filename>net.ipv4.conf.&lt;interface&gt;.forwarding</filename>
367 and
368 <filename>net.ipv6.conf.&lt;interface&gt;.forwarding</filename>
369 sysctl options of the network interface (see <ulink
370 url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink>
371 for details about sysctl options). Defaults to
372 <literal>no</literal>.</para>
373
2972cba1
NO
374 <para>Note: unless this option is turned on, or set to <literal>kernel</literal>,
375 no IP forwarding is done on this interface, even if this is
4046d836 376 globally turned on in the kernel, with the
e2bccc9d
DH
377 <filename>net.ipv4.ip_forward</filename>,
378 <filename>net.ipv4.conf.all.forwarding</filename>, and
379 <filename>net.ipv6.conf.all.forwarding</filename> sysctl
505c5f6d 380 options.</para>
4046d836 381 </listitem>
798d3a52
ZJS
382 </varlistentry>
383 <varlistentry>
384 <term><varname>IPMasquerade=</varname></term>
385 <listitem><para>Configures IP masquerading for the network
386 interface. If enabled packets forwarded from the network
387 interface will be appear as coming from the local host.
388 Takes a boolean argument. Implies
5c82dd13 389 <varname>IPForward=ipv4</varname>. Defaults to
4046d836 390 <literal>no</literal>.</para></listitem>
798d3a52 391 </varlistentry>
a46e37cb
SS
392 <varlistentry>
393 <term><varname>IPv6PrivacyExtensions=</varname></term>
1f0d9695
LP
394 <listitem><para>Configures use of stateless temporary
395 addresses that change over time (see <ulink
396 url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>,
397 Privacy Extensions for Stateless Address Autoconfiguration
398 in IPv6). Takes a boolean or the special values
399 <literal>prefer-public</literal> and
400 <literal>kernel</literal>. When true enables the privacy
401 extensions and prefers temporary addresses over public
402 addresses. When <literal>prefer-public</literal> enables the
403 privacy extensions, but prefers public addresses over
404 temporary addresses. When false, the privacy extensions
405 remain disabled. When <literal>kernel</literal> the kernel's
406 default setting will be left in place. Defaults to
a46e37cb
SS
407 <literal>no</literal>.</para></listitem>
408 </varlistentry>
798d3a52
ZJS
409 <varlistentry>
410 <term><varname>Bridge=</varname></term>
411 <listitem>
412 <para>The name of the bridge to add the link to.</para>
413 </listitem>
414 </varlistentry>
415 <varlistentry>
416 <term><varname>Bond=</varname></term>
417 <listitem>
418 <para>The name of the bond to add the link to.</para>
419 </listitem>
420 </varlistentry>
421 <varlistentry>
422 <term><varname>VLAN=</varname></term>
423 <listitem>
424 <para>The name of a VLAN to create on the link. This
425 option may be specified more than once.</para>
426 </listitem>
427 </varlistentry>
428 <varlistentry>
429 <term><varname>MACVLAN=</varname></term>
430 <listitem>
431 <para>The name of a MACVLAN to create on the link. This
432 option may be specified more than once.</para>
433 </listitem>
434 </varlistentry>
435 <varlistentry>
436 <term><varname>VXLAN=</varname></term>
437 <listitem>
438 <para>The name of a VXLAN to create on the link. This
439 option may be specified more than once.</para>
440 </listitem>
441 </varlistentry>
442 <varlistentry>
443 <term><varname>Tunnel=</varname></term>
444 <listitem>
445 <para>The name of a Tunnel to create on the link. This
446 option may be specified more than once.</para>
447 </listitem>
448 </varlistentry>
449 </variablelist>
450
451 </refsect1>
452
453 <refsect1>
454 <title>[Address] Section Options</title>
455
456 <para>An <literal>[Address]</literal> section accepts the
457 following keys. Specify several <literal>[Address]</literal>
458 sections to configure several addresses.</para>
459
460 <variablelist class='network-directives'>
461 <varlistentry>
462 <term><varname>Address=</varname></term>
463 <listitem>
464 <para>As in the <literal>[Network]</literal> section. This
465 key is mandatory.</para>
466 </listitem>
467 </varlistentry>
468 <varlistentry>
469 <term><varname>Peer=</varname></term>
470 <listitem>
471 <para>The peer address in a point-to-point connection.
472 Accepts the same format as the <literal>Address</literal>
473 key.</para>
474 </listitem>
475 </varlistentry>
476 <varlistentry>
477 <term><varname>Broadcast=</varname></term>
478 <listitem>
479 <para>The broadcast address, which must be in the format
480 described in
3ba3a79d 481 <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
798d3a52
ZJS
482 This key only applies to IPv4 addresses. If it is not
483 given, it is derived from the <literal>Address</literal>
484 key.</para>
485 </listitem>
486 </varlistentry>
487 <varlistentry>
488 <term><varname>Label=</varname></term>
489 <listitem>
490 <para>An address label.</para>
491 </listitem>
492 </varlistentry>
493 </variablelist>
494 </refsect1>
495
496 <refsect1>
497 <title>[Route] Section Options</title>
498 <para>The <literal>[Route]</literal> section accepts the
499 following keys. Specify several <literal>[Route]</literal>
500 sections to configure several routes.</para>
501
502 <variablelist class='network-directives'>
503 <varlistentry>
504 <term><varname>Gateway=</varname></term>
505 <listitem>
506 <para>As in the <literal>[Network]</literal> section.</para>
507 </listitem>
508 </varlistentry>
509 <varlistentry>
510 <term><varname>Destination=</varname></term>
511 <listitem>
512 <para>The destination prefix of the route. Possibly
513 followed by a slash and the prefixlength. If omitted, a
514 full-length host route is assumed.</para>
515 </listitem>
516 </varlistentry>
517 <varlistentry>
518 <term><varname>Source=</varname></term>
519 <listitem>
520 <para>The source prefix of the route. Possibly followed by
521 a slash and the prefixlength. If omitted, a full-length
522 host route is assumed.</para>
523 </listitem>
524 </varlistentry>
525 <varlistentry>
526 <term><varname>Metric=</varname></term>
527 <listitem>
528 <para>The metric of the route. An unsigned integer</para>
529 </listitem>
530 </varlistentry>
769b56a3
TG
531 <varlistentry>
532 <term><varname>Scope=</varname></term>
533 <listitem>
534 <para>The scope of the route. One of the values <literal>global</literal>,
535 <literal>link</literal> or <literal>host</literal>. Defaults to
536 <literal>global</literal>.</para>
537 </listitem>
538 </varlistentry>
798d3a52
ZJS
539 </variablelist>
540 </refsect1>
541
542 <refsect1>
543 <title>[DHCP] Section Options</title>
544 <para>The <literal>[DHCP]</literal> section accepts the following keys:</para>
545
546 <variablelist class='network-directives'>
547 <varlistentry>
548 <term><varname>UseDNS=</varname></term>
549 <listitem>
550 <para>When true (the default), the DNS servers received
551 from the DHCP server will be used and take precedence over
552 any statically configured ones.</para>
e88d8021
ZJS
553
554 <para>This corresponds to the <option>nameserver</option>
555 option in <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
798d3a52
ZJS
556 </listitem>
557 </varlistentry>
301f4073
MM
558 <varlistentry>
559 <term><varname>UseNTP=</varname></term>
560 <listitem>
561 <para>When true (the default), the NTP servers received
562 from the DHCP server will be used by systemd-timesyncd
563 and take precedence over any statically configured ones.</para>
564 </listitem>
565 </varlistentry>
798d3a52
ZJS
566 <varlistentry>
567 <term><varname>UseMTU=</varname></term>
568 <listitem>
569 <para>When true, the interface maximum transmission unit
570 from the DHCP server will be used on the current link.
571 Defaults to false.</para>
572 </listitem>
573 </varlistentry>
574 <varlistentry>
575 <term><varname>SendHostname=</varname></term>
576 <listitem>
d59be2cf
ZJS
577 <para>When true (the default), the machine's hostname will
578 be sent to the DHCP server.</para>
798d3a52
ZJS
579 </listitem>
580 </varlistentry>
581 <varlistentry>
582 <term><varname>UseHostname=</varname></term>
583 <listitem>
584 <para>When true (the default), the hostname received from
d59be2cf
ZJS
585 the DHCP server will be used as the transient hostname.
586 </para>
798d3a52
ZJS
587 </listitem>
588 </varlistentry>
1adc5d0b
SS
589 <varlistentry>
590 <term><varname>Hostname=</varname></term>
591 <listitem>
d59be2cf
ZJS
592 <para>Use this value for the hostname which is sent to the
593 DHCP server, instead of machine's hostname.</para>
1adc5d0b
SS
594 </listitem>
595 </varlistentry>
798d3a52
ZJS
596 <varlistentry>
597 <term><varname>UseDomains=</varname></term>
598 <listitem>
599 <para>When true (not the default), the domain name
600 received from the DHCP server will be used for DNS
e88d8021
ZJS
601 resolution over this link. When a name cannot be resolved
602 as specified, the domain name will be used a suffix and
603 name resolution of that will be attempted.</para>
604
605 <para>This corresponds to the <option>domain</option>
606 option in <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
607 and should not be enabled on untrusted networks.</para>
798d3a52
ZJS
608 </listitem>
609 </varlistentry>
610 <varlistentry>
611 <term><varname>UseRoutes=</varname></term>
612 <listitem>
613 <para>When true (the default), the static routes will be
614 requested from the DHCP server and added to the routing
615 table with metric of 1024.</para>
616 </listitem>
617 </varlistentry>
618 <varlistentry>
619 <term><varname>CriticalConnection=</varname></term>
620 <listitem>
621 <para>When true, the connection will never be torn down
622 even if the DHCP lease expires. This is contrary to the
623 DHCP specification, but may be the best choice if, say,
624 the root filesystem relies on this connection. Defaults to
625 false.</para>
626 </listitem>
627 </varlistentry>
3e43b2cd
JJ
628 <varlistentry>
629 <term><varname>ClientIdentifier=</varname></term>
630 <listitem>
631 <para>DHCP client identifier to use. Either <literal>mac</literal>
632 to use the MAC address of the link or <literal>duid</literal>
4a6970c5 633 (the default) to use a RFC4361-compliant Client ID.</para>
3e43b2cd
JJ
634 </listitem>
635 </varlistentry>
798d3a52
ZJS
636 <varlistentry>
637 <term><varname>VendorClassIdentifier=</varname></term>
638 <listitem>
639 <para>The vendor class identifier used to identify vendor
640 type and configuration.</para>
641 </listitem>
642 </varlistentry>
643 <varlistentry>
644 <term><varname>RequestBroadcast=</varname></term>
645 <listitem>
646 <para>Request the server to use broadcast messages before
647 the IP address has been configured. This is necessary for
648 devices that cannot receive RAW packets, or that cannot
649 receive packets at all before an IP address has been
650 configured. On the other hand, this must not be enabled on
651 networks where broadcasts are filtered out.</para>
652 </listitem>
653 </varlistentry>
654 <varlistentry>
655 <term><varname>RouteMetric=</varname></term>
656 <listitem>
657 <para>Set the routing metric for routes specified by the
658 DHCP server.</para>
659 </listitem>
660 </varlistentry>
661 </variablelist>
662
663 </refsect1>
664
665 <refsect1>
666 <title>[Bridge] Section Options</title>
667 <para>The <literal>[Bridge]</literal> section accepts the
668 following keys.</para>
669 <variablelist class='network-directives'>
165c41a9
SS
670 <varlistentry>
671 <term><varname>UnicastFlood=</varname></term>
672 <listitem>
072f9e4a
ZJS
673 <para>A boolean. Controls whether the bridge should flood
674 traffic for which an FDB entry is missing and the destination
675 is unknown through this port. Defaults to on.
47c7dfe2 676 </para>
165c41a9
SS
677 </listitem>
678 </varlistentry>
679 <varlistentry>
680 <term><varname>HairPin=</varname></term>
681 <listitem>
47c7dfe2
ZJS
682 <para>A boolean. Configures whether traffic may be sent back
683 out of the port on which it was received. By default, this
684 flag is false, and the bridge will not forward traffic back
685 out of the receiving port.</para>
165c41a9
SS
686 </listitem>
687 </varlistentry>
688 <varlistentry>
84c34096 689 <term><varname>UseBPDU=</varname></term>
165c41a9 690 <listitem>
47c7dfe2 691 <para>A boolean. Configures whether STP Bridge Protocol Data Units will be
84c34096 692 processed by the bridge port. Defaults to yes.</para>
165c41a9
SS
693 </listitem>
694 </varlistentry>
695 <varlistentry>
696 <term><varname>FastLeave=</varname></term>
697 <listitem>
47c7dfe2 698 <para>A boolean. This flag allows the bridge to immediately stop multicast
165c41a9 699 traffic on a port that receives IGMP Leave message. It is only used with
47c7dfe2 700 IGMP snooping if enabled on the bridge. Defaults to off.</para>
165c41a9
SS
701 </listitem>
702 </varlistentry>
703 <varlistentry>
23da66bb 704 <term><varname>AllowPortToBeRoot=</varname></term>
165c41a9 705 <listitem>
47c7dfe2
ZJS
706 <para>A boolean. Configures whether a given port is allowed to
707 become a root port. Only used when STP is enabled on the bridge.
23da66bb 708 Defaults to on.</para>
165c41a9
SS
709 </listitem>
710 </varlistentry>
798d3a52
ZJS
711 <varlistentry>
712 <term><varname>Cost=</varname></term>
713 <listitem>
47c7dfe2
ZJS
714 <para>Sets the "cost" of sending packets of this interface.
715 Each port in a bridge may have different speed and the cost
798d3a52 716 is used to decide which link to use. Faster interfaces
47c7dfe2 717 should have lower costs.</para>
798d3a52
ZJS
718 </listitem>
719 </varlistentry>
720 </variablelist>
721 </refsect1>
798d3a52
ZJS
722 <refsect1>
723 <title>[BridgeFDB] Section Options</title>
724 <para>The <literal>[BridgeFDB]</literal> section manages the
725 forwarding database table of a port and accepts the following
726 keys. Specify several <literal>[BridgeFDB]</literal> sections to
727 configure several static MAC table entries.</para>
728
729 <variablelist class='network-directives'>
730 <varlistentry>
731 <term><varname>MACAddress=</varname></term>
732 <listitem>
733 <para>As in the <literal>[Network]</literal> section. This
734 key is mandatory.</para>
735 </listitem>
736 </varlistentry>
737 <varlistentry>
738 <term><varname>VLANId=</varname></term>
739 <listitem>
740 <para>The VLAN Id for the new static MAC table entry. If
741 omitted, no VLAN Id info is appended to the new static MAC
742 table entry.</para>
743 </listitem>
744 </varlistentry>
745 </variablelist>
746 </refsect1>
747
748 <refsect1>
749 <title>Example</title>
750 <example>
12b42c76 751 <title>/etc/systemd/network/50-static.network</title>
798d3a52
ZJS
752
753 <programlisting>[Match]
eac684ef
TG
754Name=enp2s0
755
756[Network]
757Address=192.168.0.15/24
758Gateway=192.168.0.1</programlisting>
798d3a52 759 </example>
eac684ef 760
798d3a52 761 <example>
12b42c76 762 <title>/etc/systemd/network/80-dhcp.network</title>
eac684ef 763
798d3a52 764 <programlisting>[Match]
eac684ef
TG
765Name=en*
766
767[Network]
9c8ca3f7 768DHCP=yes</programlisting>
798d3a52 769 </example>
eac684ef 770
798d3a52 771 <example>
12b42c76 772 <title>/etc/systemd/network/bridge-static.network</title>
f47c5c47 773
798d3a52 774 <programlisting>[Match]
f47c5c47 775Name=bridge0
776
777[Network]
778Address=192.168.0.15/24
779Gateway=192.168.0.1
780DNS=192.168.0.1</programlisting>
798d3a52 781 </example>
f47c5c47 782
798d3a52 783 <example>
12b42c76 784 <title>/etc/systemd/network/bridge-slave-interface.network</title>
f47c5c47 785
798d3a52 786 <programlisting>[Match]
f47c5c47 787Name=enp2s0
788
789[Network]
790Bridge=bridge0</programlisting>
798d3a52
ZJS
791 </example>
792 <example>
12b42c76 793 <title>/etc/systemd/network/ipip.network</title>
0a8a0fad 794
798d3a52 795 <programlisting>[Match]
0a8a0fad
TG
796Name=em1
797
798[Network]
799Tunnel=ipip-tun</programlisting>
798d3a52 800 </example>
0a8a0fad 801
798d3a52 802 <example>
12b42c76 803 <title>/etc/systemd/network/sit.network</title>
0a8a0fad 804
798d3a52 805 <programlisting>[Match]
0a8a0fad
TG
806Name=em1
807
808[Network]
809Tunnel=sit-tun</programlisting>
798d3a52 810 </example>
0a8a0fad 811
798d3a52 812 <example>
12b42c76 813 <title>/etc/systemd/network/gre.network</title>
0a8a0fad 814
798d3a52 815 <programlisting>[Match]
0a8a0fad
TG
816Name=em1
817
818[Network]
819Tunnel=gre-tun</programlisting>
798d3a52 820 </example>
0a8a0fad 821
798d3a52 822 <example>
12b42c76 823 <title>/etc/systemd/network/vti.network</title>
0a8a0fad 824
798d3a52 825 <programlisting>[Match]
0a8a0fad
TG
826Name=em1
827
828[Network]
829Tunnel=vti-tun</programlisting>
798d3a52 830 </example>
d94facdc
MH
831
832 <example>
833 <title>/etc/systemd/network/bond.network</title>
834
835 <programlisting>[Match]
836Name=bond1
837
838[Network]
839DHCP=yes
840</programlisting>
841 </example>
842
798d3a52
ZJS
843 </refsect1>
844
845 <refsect1>
846 <title>See Also</title>
847 <para>
848 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
849 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
850 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
851 <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>
852 </para>
853 </refsect1>
eac684ef
TG
854
855</refentry>