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