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