]>
Commit | Line | Data |
---|---|---|
ad943783 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
eac684ef | 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 | <!-- | |
572eb058 ZJS |
6 | SPDX-License-Identifier: LGPL-2.1+ |
7 | ||
eac684ef TG |
8 | This file is part of systemd. |
9 | ||
10 | Copyright 2013 Tom Gundersen | |
11 | ||
12 | systemd is free software; you can redistribute it and/or modify it | |
13 | under the terms of the GNU Lesser General Public License as published by | |
14 | the Free Software Foundation; either version 2.1 of the License, or | |
15 | (at your option) any later version. | |
16 | ||
17 | systemd is distributed in the hope that it will be useful, but | |
18 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 | Lesser General Public License for more details. | |
21 | ||
22 | You should have received a copy of the GNU Lesser General Public License | |
23 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
24 | --> | |
25 | ||
26 | <refentry id="systemd.network" conditional='ENABLE_NETWORKD'> | |
27 | ||
798d3a52 ZJS |
28 | <refentryinfo> |
29 | <title>systemd.network</title> | |
30 | <productname>systemd</productname> | |
31 | ||
32 | <authorgroup> | |
33 | <author> | |
34 | <contrib>Developer</contrib> | |
35 | <firstname>Tom</firstname> | |
36 | <surname>Gundersen</surname> | |
37 | <email>teg@jklm.no</email> | |
38 | </author> | |
39 | </authorgroup> | |
40 | </refentryinfo> | |
41 | ||
42 | <refmeta> | |
43 | <refentrytitle>systemd.network</refentrytitle> | |
44 | <manvolnum>5</manvolnum> | |
45 | </refmeta> | |
46 | ||
47 | <refnamediv> | |
48 | <refname>systemd.network</refname> | |
49 | <refpurpose>Network configuration</refpurpose> | |
50 | </refnamediv> | |
51 | ||
52 | <refsynopsisdiv> | |
53 | <para><filename><replaceable>network</replaceable>.network</filename></para> | |
54 | </refsynopsisdiv> | |
55 | ||
56 | <refsect1> | |
57 | <title>Description</title> | |
58 | ||
59 | <para>Network setup is performed by | |
60 | <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
61 | </para> | |
62 | ||
bac150e9 ZJS |
63 | <para>The main network file must have the extension <filename>.network</filename>; other |
64 | extensions are ignored. Networks are applied to links whenever the links appear.</para> | |
65 | ||
66 | <para>The <filename>.network</filename> files are read from the files located in the system | |
67 | network directory <filename>/usr/lib/systemd/network</filename>, the volatile runtime network | |
68 | directory <filename>/run/systemd/network</filename> and the local administration network | |
69 | directory <filename>/etc/systemd/network</filename>. All configuration files are collectively | |
70 | sorted and processed in lexical order, regardless of the directories in which they live. | |
71 | However, files with identical filenames replace each other. Files in <filename>/etc</filename> | |
72 | have the highest priority, files in <filename>/run</filename> take precedence over files with | |
73 | the same name in <filename>/usr/lib</filename>. This can be used to override a system-supplied | |
74 | configuration file with a local file if needed. As a special case, an empty file (file size 0) | |
75 | or symlink with the same name pointing to <filename>/dev/null</filename> disables the | |
76 | configuration file entirely (it is "masked").</para> | |
77 | ||
78 | <para>Along with the network file <filename>foo.network</filename>, a "drop-in" directory | |
79 | <filename>foo.network.d/</filename> may exist. All files with the suffix | |
80 | <literal>.conf</literal> from this directory will be parsed after the file itself is | |
81 | parsed. This is useful to alter or add configuration settings, without having to modify the main | |
82 | configuration file. Each drop-in file must have appropriate section headers.</para> | |
83 | ||
84 | <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal> | |
85 | directories can be placed in <filename>/usr/lib/systemd/network</filename> or | |
86 | <filename>/run/systemd/network</filename> directories. Drop-in files in | |
87 | <filename>/etc</filename> take precedence over those in <filename>/run</filename> which in turn | |
88 | take precedence over those in <filename>/usr/lib</filename>. Drop-in files under any of these | |
89 | directories take precedence over the main netdev file wherever located. (Of course, since | |
90 | <filename>/run</filename> is temporary and <filename>/usr/lib</filename> is for vendors, it is | |
91 | unlikely drop-ins should be used in either of those places.)</para> | |
92 | ||
93 | <para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6 | |
94 | nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically | |
95 | disabled for that interface by writing "1" to | |
96 | <filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>. | |
82ecb4c3 | 97 | </para> |
798d3a52 ZJS |
98 | </refsect1> |
99 | ||
100 | <refsect1> | |
101 | <title>[Match] Section Options</title> | |
102 | ||
103 | <para>The network file contains a <literal>[Match]</literal> | |
104 | section, which determines if a given network file may be applied | |
105 | to a given device; and a <literal>[Network]</literal> section | |
106 | specifying how the device should be configured. The first (in | |
107 | lexical order) of the network files that matches a given device | |
a22e1850 LP |
108 | is applied, all later files are ignored, even if they match as |
109 | well.</para> | |
798d3a52 ZJS |
110 | |
111 | <para>A network file is said to match a device if each of the | |
112 | entries in the <literal>[Match]</literal> section matches, or if | |
113 | the section is empty. The following keys are accepted:</para> | |
114 | ||
115 | <variablelist class='network-directives'> | |
116 | <varlistentry> | |
117 | <term><varname>MACAddress=</varname></term> | |
118 | <listitem> | |
de25aae1 DKG |
119 | <para>The hardware address of the interface (use full colon-delimited hexadecimal, e.g., |
120 | 01:23:45:67:89:ab).</para> | |
798d3a52 ZJS |
121 | </listitem> |
122 | </varlistentry> | |
123 | <varlistentry> | |
124 | <term><varname>Path=</varname></term> | |
125 | <listitem> | |
5256e00e TG |
126 | <para>A whitespace-separated list of shell-style globs |
127 | matching the persistent path, as exposed by the udev | |
618b196e DM |
128 | property <literal>ID_PATH</literal>. If the list is |
129 | prefixed with a "!", the test is inverted; i.e. it is | |
130 | true when <literal>ID_PATH</literal> does not match any | |
131 | item in the list.</para> | |
798d3a52 ZJS |
132 | </listitem> |
133 | </varlistentry> | |
134 | <varlistentry> | |
135 | <term><varname>Driver=</varname></term> | |
136 | <listitem> | |
5256e00e TG |
137 | <para>A whitespace-separated list of shell-style globs |
138 | matching the driver currently bound to the device, as | |
798d3a52 ZJS |
139 | exposed by the udev property <literal>DRIVER</literal> |
140 | of its parent device, or if that is not set the driver | |
141 | as exposed by <literal>ethtool -i</literal> of the | |
618b196e DM |
142 | device itself. If the list is prefixed with a "!", the |
143 | test is inverted.</para> | |
798d3a52 ZJS |
144 | </listitem> |
145 | </varlistentry> | |
146 | <varlistentry> | |
147 | <term><varname>Type=</varname></term> | |
148 | <listitem> | |
5256e00e TG |
149 | <para>A whitespace-separated list of shell-style globs |
150 | matching the device type, as exposed by the udev property | |
618b196e DM |
151 | <literal>DEVTYPE</literal>. If the list is prefixed with |
152 | a "!", the test is inverted.</para> | |
798d3a52 ZJS |
153 | </listitem> |
154 | </varlistentry> | |
155 | <varlistentry> | |
156 | <term><varname>Name=</varname></term> | |
157 | <listitem> | |
5256e00e TG |
158 | <para>A whitespace-separated list of shell-style globs |
159 | matching the device name, as exposed by the udev property | |
618b196e DM |
160 | <literal>INTERFACE</literal>. If the list is prefixed |
161 | with a "!", the test is inverted.</para> | |
798d3a52 ZJS |
162 | </listitem> |
163 | </varlistentry> | |
164 | <varlistentry> | |
165 | <term><varname>Host=</varname></term> | |
166 | <listitem> | |
167 | <para>Matches against the hostname or machine ID of the | |
168 | host. See <literal>ConditionHost=</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>Virtualization=</varname></term> | |
176 | <listitem> | |
177 | <para>Checks whether the system is executed in a virtualized | |
178 | environment and optionally test whether it is a specific | |
179 | implementation. See <literal>ConditionVirtualization=</literal> in | |
180 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
181 | for details. | |
182 | </para> | |
183 | </listitem> | |
184 | </varlistentry> | |
185 | <varlistentry> | |
186 | <term><varname>KernelCommandLine=</varname></term> | |
187 | <listitem> | |
188 | <para>Checks whether a specific kernel command line option is | |
189 | set (or if prefixed with the exclamation mark unset). See | |
190 | <literal>ConditionKernelCommandLine=</literal> in | |
191 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
192 | for details. | |
193 | </para> | |
194 | </listitem> | |
195 | </varlistentry> | |
5022f08a LP |
196 | <varlistentry> |
197 | <term><varname>KernelVersion=</varname></term> | |
198 | <listitem> | |
199 | <para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain | |
200 | expression (or if prefixed with the exclamation mark does not match it). See | |
201 | <literal>ConditionKernelVersion=</literal> in | |
202 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for | |
203 | details. | |
204 | </para> | |
205 | </listitem> | |
206 | </varlistentry> | |
798d3a52 ZJS |
207 | <varlistentry> |
208 | <term><varname>Architecture=</varname></term> | |
209 | <listitem> | |
210 | <para>Checks whether the system is running on a specific | |
211 | architecture. See <literal>ConditionArchitecture=</literal> in | |
212 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
213 | for details. | |
214 | </para> | |
215 | </listitem> | |
216 | </varlistentry> | |
217 | </variablelist> | |
218 | ||
219 | </refsect1> | |
220 | ||
221 | <refsect1> | |
222 | <title>[Link] Section Options</title> | |
223 | ||
224 | <para> The <literal>[Link]</literal> section accepts the following keys:</para> | |
225 | ||
226 | <variablelist class='network-directives'> | |
227 | <varlistentry> | |
228 | <term><varname>MACAddress=</varname></term> | |
229 | <listitem> | |
de25aae1 | 230 | <para>The hardware address to set for the device.</para> |
798d3a52 ZJS |
231 | </listitem> |
232 | </varlistentry> | |
233 | <varlistentry> | |
234 | <term><varname>MTUBytes=</varname></term> | |
235 | <listitem> | |
236 | <para>The maximum transmission unit in bytes to set for the | |
237 | device. The usual suffixes K, M, G, are supported and are | |
238 | understood to the base of 1024.</para> | |
439689c6 SS |
239 | <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen |
240 | below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para> | |
798d3a52 ZJS |
241 | </listitem> |
242 | </varlistentry> | |
99d2baa2 SS |
243 | <varlistentry> |
244 | <term><varname>ARP=</varname></term> | |
245 | <listitem> | |
246 | <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol) | |
247 | for this interface. Defaults to unset, which means that the kernel default will be used.</para> | |
248 | <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual | |
249 | interfaces atop a single lower-level physical interface, which will then only serve as a | |
250 | link/"bridge" device aggregating traffic to the same physical link and not participate in | |
251 | the network otherwise.</para> | |
252 | </listitem> | |
253 | </varlistentry> | |
a09dc546 DM |
254 | <varlistentry> |
255 | <term><varname>Unmanaged=</varname></term> | |
256 | <listitem> | |
257 | <para>A boolean. When <literal>yes</literal>, no attempts are | |
258 | made to bring up or configure matching links, equivalent to | |
259 | when there are no matching network files. Defaults to | |
260 | <literal>no</literal>.</para> | |
261 | <para>This is useful for preventing later matching network | |
262 | files from interfering with certain interfaces that are fully | |
263 | controlled by other applications.</para> | |
264 | </listitem> | |
265 | </varlistentry> | |
c1a38904 MTL |
266 | <varlistentry> |
267 | <term><varname>RequiredForOnline=</varname></term> | |
268 | <listitem> | |
269 | <para>A boolean. When <literal>yes</literal>, the network is deemed | |
270 | required when determining whether the system is online when running | |
271 | <literal>systemd-networkd-wait-online</literal>. | |
272 | When <literal>no</literal>, the network is ignored when checking for | |
273 | online state. Defaults to <literal>yes</literal>.</para> | |
274 | <para>The network will be brought up normally in all cases, but in | |
275 | the event that there is no address being assigned by DHCP or the | |
276 | cable is not plugged in, the link will simply remain offline and be | |
277 | skipped automatically by <literal>systemd-networkd-wait-online</literal> | |
278 | if <literal>RequiredForOnline=true</literal>.</para> | |
279 | </listitem> | |
280 | </varlistentry> | |
798d3a52 ZJS |
281 | </variablelist> |
282 | </refsect1> | |
283 | ||
284 | <refsect1> | |
285 | <title>[Network] Section Options</title> | |
286 | ||
287 | <para>The <literal>[Network]</literal> section accepts the following keys:</para> | |
288 | ||
289 | <variablelist class='network-directives'> | |
290 | <varlistentry> | |
291 | <term><varname>Description=</varname></term> | |
292 | <listitem> | |
293 | <para>A description of the device. This is only used for | |
294 | presentation purposes.</para> | |
295 | </listitem> | |
296 | </varlistentry> | |
297 | <varlistentry> | |
298 | <term><varname>DHCP=</varname></term> | |
299 | <listitem> | |
ad943783 | 300 | <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts |
798d3a52 | 301 | <literal>yes</literal>, <literal>no</literal>, |
c702bd3b LY |
302 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults |
303 | to <literal>no</literal>.</para> | |
e88d8021 | 304 | |
f5a8c43f | 305 | <para>Note that DHCPv6 will by default be triggered by Router |
7f3fdb7f | 306 | Advertisement, if that is enabled, regardless of this parameter. |
f5a8c43f TG |
307 | By enabling DHCPv6 support explicitly, the DHCPv6 client will |
308 | be started regardless of the presence of routers on the link, | |
309 | or what flags the routers pass. See | |
f921f573 | 310 | <literal>IPv6AcceptRA=</literal>.</para> |
f5a8c43f TG |
311 | |
312 | <para>Furthermore, note that by default the domain name | |
e88d8021 ZJS |
313 | specified through DHCP is not used for name resolution. |
314 | See option <option>UseDomains=</option> below.</para> | |
2ef322fc LP |
315 | |
316 | <para>See the <literal>[DHCP]</literal> section below for further configuration options for the DHCP client | |
317 | support.</para> | |
798d3a52 ZJS |
318 | </listitem> |
319 | </varlistentry> | |
320 | <varlistentry> | |
321 | <term><varname>DHCPServer=</varname></term> | |
322 | <listitem> | |
ad943783 LP |
323 | <para>A boolean. Enables DHCPv4 server support. Defaults |
324 | to <literal>no</literal>. Further settings for the DHCP | |
325 | server may be set in the <literal>[DHCPServer]</literal> | |
326 | section described below.</para> | |
798d3a52 ZJS |
327 | </listitem> |
328 | </varlistentry> | |
329 | <varlistentry> | |
56fd6bf7 | 330 | <term><varname>LinkLocalAddressing=</varname></term> |
798d3a52 | 331 | <listitem> |
d0d6a4cd TG |
332 | <para>Enables link-local address autoconfiguration. Accepts |
333 | <literal>yes</literal>, <literal>no</literal>, | |
334 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to | |
335 | <literal>ipv6</literal>.</para> | |
798d3a52 ZJS |
336 | </listitem> |
337 | </varlistentry> | |
338 | <varlistentry> | |
339 | <term><varname>IPv4LLRoute=</varname></term> | |
340 | <listitem> | |
341 | <para>A boolean. When true, sets up the route needed for | |
342 | non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults | |
343 | to false. | |
344 | </para> | |
345 | </listitem> | |
346 | </varlistentry> | |
347 | <varlistentry> | |
113bfde1 TG |
348 | <term><varname>IPv6Token=</varname></term> |
349 | <listitem> | |
350 | <para>An IPv6 address with the top 64 bits unset. When set, indicates the | |
eb142d8e TG |
351 | 64-bit interface part of SLAAC IPv6 addresses for this link. Note that |
352 | the token is only ever used for SLAAC, and not for DHCPv6 addresses, even | |
3708bd46 | 353 | in the case DHCP is requested by router advertisement. By default, the |
eb142d8e | 354 | token is autogenerated.</para> |
113bfde1 TG |
355 | </listitem> |
356 | </varlistentry> | |
357 | <varlistentry> | |
798d3a52 ZJS |
358 | <term><varname>LLMNR=</varname></term> |
359 | <listitem> | |
aaa297d4 LP |
360 | <para>A boolean or <literal>resolve</literal>. When true, |
361 | enables <ulink | |
362 | url="https://tools.ietf.org/html/rfc4795">Link-Local | |
363 | Multicast Name Resolution</ulink> on the link. When set to | |
364 | <literal>resolve</literal>, only resolution is enabled, | |
365 | but not host registration and announcement. Defaults to | |
366 | true. This setting is read by | |
367 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
368 | </listitem> | |
369 | </varlistentry> | |
370 | <varlistentry> | |
371 | <term><varname>MulticastDNS=</varname></term> | |
372 | <listitem> | |
373 | <para>A boolean or <literal>resolve</literal>. When true, | |
374 | enables <ulink | |
375 | url="https://tools.ietf.org/html/rfc6762">Multicast | |
376 | DNS</ulink> support on the link. When set to | |
377 | <literal>resolve</literal>, only resolution is enabled, | |
378 | but not host or service registration and | |
379 | announcement. Defaults to false. This setting is read by | |
380 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
381 | </listitem> |
382 | </varlistentry> | |
ad6c0475 LP |
383 | <varlistentry> |
384 | <term><varname>DNSSEC=</varname></term> | |
385 | <listitem> | |
386 | <para>A boolean or | |
387 | <literal>allow-downgrade</literal>. When true, enables | |
388 | <ulink | |
389 | url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink> | |
390 | DNS validation support on the link. When set to | |
391 | <literal>allow-downgrade</literal>, compatibility with | |
392 | non-DNSSEC capable networks is increased, by automatically | |
785889e5 | 393 | turning off DNSSEC in this case. This option defines a |
ad6c0475 LP |
394 | per-interface setting for |
395 | <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s | |
396 | global <varname>DNSSEC=</varname> option. Defaults to | |
397 | false. This setting is read by | |
398 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
399 | </listitem> | |
400 | </varlistentry> | |
8a516214 LP |
401 | <varlistentry> |
402 | <term><varname>DNSSECNegativeTrustAnchors=</varname></term> | |
403 | <listitem><para>A space-separated list of DNSSEC negative | |
404 | trust anchor domains. If specified and DNSSEC is enabled, | |
405 | look-ups done via the interface's DNS server will be subject | |
406 | to the list of negative trust anchors, and not require | |
407 | authentication for the specified domains, or anything below | |
408 | it. Use this to disable DNSSEC authentication for specific | |
409 | private domains, that cannot be proven valid using the | |
410 | Internet DNS hierarchy. Defaults to the empty list. This | |
411 | setting is read by | |
412 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
413 | </listitem> | |
414 | </varlistentry> | |
798d3a52 ZJS |
415 | <varlistentry> |
416 | <term><varname>LLDP=</varname></term> | |
417 | <listitem> | |
da6c766d LP |
418 | <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly |
419 | implemented on professional routers and bridges which announces which physical port a system is connected | |
420 | to, as well as other related data. Accepts a boolean or the special value | |
34437b4f LP |
421 | <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP |
422 | neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers | |
423 | is collected and LLDP data about other types of devices ignored (such as stations, telephones and | |
7cececb2 | 424 | others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use |
34437b4f | 425 | <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the |
da6c766d LP |
426 | collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below |
427 | for enabling LLDP packet emission from the local system. | |
798d3a52 ZJS |
428 | </para> |
429 | </listitem> | |
430 | </varlistentry> | |
da6c766d LP |
431 | <varlistentry> |
432 | <term><varname>EmitLLDP=</varname></term> | |
433 | <listitem> | |
7272b25e LP |
434 | <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values |
435 | <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and | |
436 | <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false, | |
437 | a short LLDP packet with information about the local system is sent out in regular intervals on the | |
438 | link. The LLDP packet will contain information about the local host name, the local machine ID (as stored | |
439 | in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the | |
da6c766d LP |
440 | local interface name, as well as the pretty hostname of the system (as set in |
441 | <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP | |
7272b25e LP |
442 | emission is only available on Ethernet links. Note that this setting passes data suitable for |
443 | identification of host to the network and should thus not be enabled on untrusted networks, where such | |
444 | identification data should not be made available. Use this option to permit other systems to identify on | |
445 | which interfaces they are connected to this system. The three special values control propagation of the | |
446 | LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest | |
447 | connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but | |
448 | not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge | |
449 | is reached. For details about these concepts, see <ulink | |
450 | url="http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf">IEEE 802.1AB-2009</ulink>. Note that | |
451 | configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and | |
452 | most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP | |
453 | reception.</para> | |
da6c766d LP |
454 | </listitem> |
455 | </varlistentry> | |
0d4ad91d AR |
456 | <varlistentry> |
457 | <term><varname>BindCarrier=</varname></term> | |
458 | <listitem> | |
2ae7505f TG |
459 | <para>A link name or a list of link names. When set, controls the behavior of the current |
460 | link. When all links in the list are in an operational down state, the current link is brought | |
461 | down. When at least one link has carrier, the current interface is brought up. | |
0d4ad91d AR |
462 | </para> |
463 | </listitem> | |
464 | </varlistentry> | |
798d3a52 ZJS |
465 | <varlistentry> |
466 | <term><varname>Address=</varname></term> | |
467 | <listitem> | |
468 | <para>A static IPv4 or IPv6 address and its prefix length, | |
469 | separated by a <literal>/</literal> character. Specify | |
470 | this key more than once to configure several addresses. | |
471 | The format of the address must be as described in | |
3ba3a79d | 472 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
473 | This is a short-hand for an [Address] section only |
474 | containing an Address key (see below). This option may be | |
475 | specified more than once. | |
476 | </para> | |
477 | ||
478 | <para>If the specified address is 0.0.0.0 (for IPv4) or | |
479 | [::] (for IPv6), a new address range of the requested size | |
480 | is automatically allocated from a system-wide pool of | |
481 | unused ranges. The allocated range is checked against all | |
482 | current network interfaces and all known network | |
483 | configuration files to avoid address range conflicts. The | |
484 | default system-wide pool consists of 192.168.0.0/16, | |
485 | 172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for | |
486 | IPv6. This functionality is useful to manage a large | |
487 | number of dynamically created network interfaces with the | |
488 | same network configuration and automatic address range | |
489 | assignment.</para> | |
490 | ||
491 | </listitem> | |
492 | </varlistentry> | |
493 | <varlistentry> | |
494 | <term><varname>Gateway=</varname></term> | |
495 | <listitem> | |
496 | <para>The gateway address, which must be in the format | |
497 | described in | |
3ba3a79d | 498 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
499 | This is a short-hand for a [Route] section only containing |
500 | a Gateway key. This option may be specified more than | |
501 | once.</para> | |
502 | </listitem> | |
503 | </varlistentry> | |
504 | <varlistentry> | |
505 | <term><varname>DNS=</varname></term> | |
506 | <listitem> | |
507 | <para>A DNS server address, which must be in the format | |
508 | described in | |
3ba3a79d | 509 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
f41b446a | 510 | This option may be specified more than once. This setting is read by |
3df9bec5 | 511 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
512 | </listitem> |
513 | </varlistentry> | |
514 | <varlistentry> | |
515 | <term><varname>Domains=</varname></term> | |
516 | <listitem> | |
2df22529 ZJS |
517 | <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list |
518 | should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the | |
519 | prefix are called "routing-only domains". The domains without the prefix are called "search domains" and | |
520 | are first used as search suffixes for extending single-label host names (host names containing no dots) to | |
521 | become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface, | |
522 | each of the specified search domains are appended to it in turn, converting it into a fully qualified | |
523 | domain name, until one of them may be successfully resolved.</para> | |
524 | ||
525 | <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names | |
526 | ending in those domains (hence also single label names, if any "search domains" are listed), are routed to | |
527 | the DNS servers configured for this interface. The domain routing logic is particularly useful on | |
528 | multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para> | |
529 | ||
530 | <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain, | |
531 | the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special | |
532 | effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed | |
533 | to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers | |
534 | if a link on which they are connected is available.</para> | |
3df9bec5 LP |
535 | |
536 | <para>This setting is read by | |
2df22529 ZJS |
537 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
538 | "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in | |
98e9d710 | 539 | <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
2df22529 ZJS |
540 | Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain |
541 | name servers limited to a specific link.</para> | |
798d3a52 ZJS |
542 | </listitem> |
543 | </varlistentry> | |
544 | <varlistentry> | |
545 | <term><varname>NTP=</varname></term> | |
546 | <listitem> | |
f41b446a | 547 | <para>An NTP server address. This option may be specified more than once. This setting is read by |
3df9bec5 | 548 | <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
549 | </listitem> |
550 | </varlistentry> | |
551 | <varlistentry> | |
552 | <term><varname>IPForward=</varname></term> | |
765afd5c LP |
553 | <listitem><para>Configures IP packet forwarding for the |
554 | system. If enabled, incoming packets on any network | |
555 | interface will be forwarded to any other interfaces | |
556 | according to the routing table. Takes either a boolean | |
557 | argument, or the values <literal>ipv4</literal> or | |
558 | <literal>ipv6</literal>, which only enable IP packet | |
559 | forwarding for the specified address family. This controls | |
560 | the <filename>net.ipv4.ip_forward</filename> and | |
561 | <filename>net.ipv6.conf.all.forwarding</filename> sysctl | |
562 | options of the network interface (see <ulink | |
4046d836 LP |
563 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> |
564 | for details about sysctl options). Defaults to | |
565 | <literal>no</literal>.</para> | |
566 | ||
765afd5c LP |
567 | <para>Note: this setting controls a global kernel option, |
568 | and does so one way only: if a network that has this setting | |
569 | enabled is set up the global setting is turned on. However, | |
570 | it is never turned off again, even after all networks with | |
571 | this setting enabled are shut down again.</para> | |
572 | ||
573 | <para>To allow IP packet forwarding only between specific | |
574 | network interfaces use a firewall.</para> | |
4046d836 | 575 | </listitem> |
798d3a52 ZJS |
576 | </varlistentry> |
577 | <varlistentry> | |
578 | <term><varname>IPMasquerade=</varname></term> | |
579 | <listitem><para>Configures IP masquerading for the network | |
b938cb90 | 580 | interface. If enabled, packets forwarded from the network |
798d3a52 ZJS |
581 | interface will be appear as coming from the local host. |
582 | Takes a boolean argument. Implies | |
5c82dd13 | 583 | <varname>IPForward=ipv4</varname>. Defaults to |
4046d836 | 584 | <literal>no</literal>.</para></listitem> |
798d3a52 | 585 | </varlistentry> |
a46e37cb SS |
586 | <varlistentry> |
587 | <term><varname>IPv6PrivacyExtensions=</varname></term> | |
1f0d9695 LP |
588 | <listitem><para>Configures use of stateless temporary |
589 | addresses that change over time (see <ulink | |
590 | url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>, | |
591 | Privacy Extensions for Stateless Address Autoconfiguration | |
592 | in IPv6). Takes a boolean or the special values | |
593 | <literal>prefer-public</literal> and | |
b938cb90 | 594 | <literal>kernel</literal>. When true, enables the privacy |
1f0d9695 | 595 | extensions and prefers temporary addresses over public |
b938cb90 | 596 | addresses. When <literal>prefer-public</literal>, enables the |
1f0d9695 LP |
597 | privacy extensions, but prefers public addresses over |
598 | temporary addresses. When false, the privacy extensions | |
b938cb90 | 599 | remain disabled. When <literal>kernel</literal>, the kernel's |
1f0d9695 | 600 | default setting will be left in place. Defaults to |
a46e37cb SS |
601 | <literal>no</literal>.</para></listitem> |
602 | </varlistentry> | |
941d0aa8 | 603 | <varlistentry> |
f921f573 | 604 | <term><varname>IPv6AcceptRA=</varname></term> |
1e7a0e21 LP |
605 | <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface. Takes |
606 | a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local | |
607 | forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding | |
608 | is disabled for that interface. When RAs are accepted, they may trigger the start of the DHCPv6 client if | |
609 | the relevant flags are set in the RA data, or if no routers are found on the link.</para> | |
610 | ||
611 | <para>Further settings for the IPv6 RA support may be configured in the | |
f921f573 | 612 | <literal>[IPv6AcceptRA]</literal> section, see below.</para> |
1e7a0e21 LP |
613 | |
614 | <para>Also see <ulink | |
615 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel | |
616 | documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of | |
617 | <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para> | |
ebf98081 | 618 | </listitem> |
941d0aa8 | 619 | </varlistentry> |
44de7fb1 SS |
620 | <varlistentry> |
621 | <term><varname>IPv6DuplicateAddressDetection=</varname></term> | |
a8eaaee7 JE |
622 | <listitem><para>Configures the amount of IPv6 Duplicate |
623 | Address Detection (DAD) probes to send. Defaults to unset. | |
44de7fb1 SS |
624 | </para></listitem> |
625 | </varlistentry> | |
a86cba89 SS |
626 | <varlistentry> |
627 | <term><varname>IPv6HopLimit=</varname></term> | |
628 | <listitem><para>Configures IPv6 Hop Limit. For each router that | |
629 | forwards the packet, the hop limit is decremented by 1. When the | |
630 | hop limit field reaches zero, the packet is discarded. | |
631 | Defaults to unset. | |
632 | </para></listitem> | |
633 | </varlistentry> | |
23d8b221 | 634 | <varlistentry> |
8f9a206b SS |
635 | <term><varname>IPv4ProxyARP=</varname></term> |
636 | <listitem><para>A boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host, | |
23d8b221 SS |
637 | usually a router, answers ARP requests intended for another machine. By "faking" its identity, |
638 | the router accepts responsibility for routing packets to the "real" destination. (see <ulink | |
639 | url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>. | |
640 | Defaults to unset. | |
641 | </para></listitem> | |
642 | </varlistentry> | |
a0e5c15d | 643 | <varlistentry> |
465dfe59 HV |
644 | <term><varname>IPv6ProxyNDP=</varname></term> |
645 | <listitem><para>A boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery | |
646 | Protocol) is a technique for IPv6 to allow routing of addresses to a different | |
647 | destination when peers expect them to be present on a certain physical link. | |
a0e5c15d FK |
648 | In this case a router answers Neighbour Advertisement messages intended for |
649 | another machine by offering its own MAC address as destination. | |
465dfe59 | 650 | Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour |
a0e5c15d | 651 | Advertisement messages for addresses in the IPv6 neighbor proxy table, |
465dfe59 HV |
652 | which can also be shown by <command>ip -6 neighbour show proxy</command>. |
653 | systemd-networkd will control the per-interface `proxy_ndp` switch for each configured | |
654 | interface depending on this option. | |
655 | Defautls to unset. | |
656 | </para></listitem> | |
657 | </varlistentry> | |
658 | <varlistentry> | |
659 | <term><varname>IPv6ProxyNDPAddress=</varname></term> | |
660 | <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be | |
661 | proxied. This option may be specified more than once. systemd-networkd will add the | |
662 | <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table. | |
663 | This option implies <option>IPv6ProxyNDP=true</option> but has no effect if | |
664 | <option>IPv6ProxyNDP</option> has been set to false. Defaults to unset. | |
a0e5c15d FK |
665 | </para></listitem> |
666 | </varlistentry> | |
3f9e0236 PF |
667 | <varlistentry> |
668 | <term><varname>IPv6PrefixDelegation=</varname></term> | |
669 | <listitem><para>Whether to enable or disable Router Advertisement sending on a link. | |
982be97c PF |
670 | Allowed values are <literal>static</literal> which distributes prefixes as defined in |
671 | the <literal>[IPv6PrefixDelegation]</literal> and any <literal>[IPv6Prefix]</literal> | |
672 | sections, <literal>dhcpv6</literal> which requests prefixes using a DHCPv6 client | |
673 | configured for another link and any values configured in the | |
674 | <literal>[IPv6PrefixDelegation]</literal> section while ignoring all static prefix | |
675 | configuration sections, <literal>yes</literal> which uses both static configuration | |
676 | and DHCPv6, and <literal>false</literal> which turns off IPv6 prefix delegation | |
677 | altogether. Defaults to <literal>false</literal>. See the | |
678 | <literal>[IPv6PrefixDelegation]</literal> and the <literal>[IPv6Prefix]</literal> | |
679 | sections for more configuration options. | |
3f9e0236 PF |
680 | </para></listitem> |
681 | </varlistentry> | |
798d3a52 ZJS |
682 | <varlistentry> |
683 | <term><varname>Bridge=</varname></term> | |
684 | <listitem> | |
9e35b3de ZJS |
685 | <para>The name of the bridge to add the link to. See |
686 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
687 | </para> | |
798d3a52 ZJS |
688 | </listitem> |
689 | </varlistentry> | |
690 | <varlistentry> | |
691 | <term><varname>Bond=</varname></term> | |
692 | <listitem> | |
9e35b3de ZJS |
693 | <para>The name of the bond to add the link to. See |
694 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
695 | </para> | |
798d3a52 ZJS |
696 | </listitem> |
697 | </varlistentry> | |
6cb955c6 AR |
698 | <varlistentry> |
699 | <term><varname>VRF=</varname></term> | |
700 | <listitem> | |
9e35b3de ZJS |
701 | <para>The name of the VRF to add the link to. See |
702 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
703 | </para> | |
6cb955c6 AR |
704 | </listitem> |
705 | </varlistentry> | |
798d3a52 ZJS |
706 | <varlistentry> |
707 | <term><varname>VLAN=</varname></term> | |
708 | <listitem> | |
9e35b3de ZJS |
709 | <para>The name of a VLAN to create on the link. See |
710 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
711 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
712 | </listitem> |
713 | </varlistentry> | |
714 | <varlistentry> | |
715 | <term><varname>MACVLAN=</varname></term> | |
716 | <listitem> | |
9e35b3de ZJS |
717 | <para>The name of a MACVLAN to create on the link. See |
718 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
719 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
720 | </listitem> |
721 | </varlistentry> | |
722 | <varlistentry> | |
723 | <term><varname>VXLAN=</varname></term> | |
724 | <listitem> | |
9e35b3de ZJS |
725 | <para>The name of a VXLAN to create on the link. See |
726 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
727 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
728 | </listitem> |
729 | </varlistentry> | |
730 | <varlistentry> | |
731 | <term><varname>Tunnel=</varname></term> | |
732 | <listitem> | |
9e35b3de ZJS |
733 | <para>The name of a Tunnel to create on the link. See |
734 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
735 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
736 | </listitem> |
737 | </varlistentry> | |
dd5f3175 SS |
738 | <varlistentry> |
739 | <term><varname>ActiveSlave=</varname></term> | |
740 | <listitem> | |
741 | <para>A boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal> | |
742 | option is only valid for following modes: | |
743 | <literal>active-backup</literal>, | |
744 | <literal>balance-alb</literal> and | |
745 | <literal>balance-tlb</literal>. Defaults to false. | |
746 | </para> | |
747 | </listitem> | |
748 | </varlistentry> | |
749 | <varlistentry> | |
750 | <term><varname>PrimarySlave=</varname></term> | |
751 | <listitem> | |
752 | <para>A boolean. Specifies which slave is the primary device. The specified | |
753 | device will always be the active slave while it is available. Only when the | |
754 | primary is off-line will alternate devices be used. This is useful when | |
755 | one slave is preferred over another, e.g. when one slave has higher throughput | |
756 | than another. The <literal>PrimarySlave=</literal> option is only valid for | |
757 | following modes: | |
758 | <literal>active-backup</literal>, | |
759 | <literal>balance-alb</literal> and | |
760 | <literal>balance-tlb</literal>. Defaults to false. | |
761 | </para> | |
762 | </listitem> | |
763 | </varlistentry> | |
dad2d78e SS |
764 | <varlistentry> |
765 | <term><varname>ConfigureWithoutCarrier=</varname></term> | |
766 | <listitem> | |
767 | <para>A boolean. Allows networkd to configure a specific link even if it has no carrier. | |
768 | Defaults to false. | |
769 | </para> | |
770 | </listitem> | |
771 | </varlistentry> | |
798d3a52 ZJS |
772 | </variablelist> |
773 | ||
774 | </refsect1> | |
775 | ||
776 | <refsect1> | |
777 | <title>[Address] Section Options</title> | |
778 | ||
779 | <para>An <literal>[Address]</literal> section accepts the | |
780 | following keys. Specify several <literal>[Address]</literal> | |
781 | sections to configure several addresses.</para> | |
782 | ||
783 | <variablelist class='network-directives'> | |
784 | <varlistentry> | |
785 | <term><varname>Address=</varname></term> | |
786 | <listitem> | |
787 | <para>As in the <literal>[Network]</literal> section. This | |
788 | key is mandatory.</para> | |
789 | </listitem> | |
790 | </varlistentry> | |
791 | <varlistentry> | |
792 | <term><varname>Peer=</varname></term> | |
793 | <listitem> | |
794 | <para>The peer address in a point-to-point connection. | |
795 | Accepts the same format as the <literal>Address</literal> | |
796 | key.</para> | |
797 | </listitem> | |
798 | </varlistentry> | |
799 | <varlistentry> | |
800 | <term><varname>Broadcast=</varname></term> | |
801 | <listitem> | |
802 | <para>The broadcast address, which must be in the format | |
803 | described in | |
3ba3a79d | 804 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
805 | This key only applies to IPv4 addresses. If it is not |
806 | given, it is derived from the <literal>Address</literal> | |
807 | key.</para> | |
808 | </listitem> | |
809 | </varlistentry> | |
810 | <varlistentry> | |
811 | <term><varname>Label=</varname></term> | |
812 | <listitem> | |
813 | <para>An address label.</para> | |
814 | </listitem> | |
815 | </varlistentry> | |
b5834a0b SS |
816 | <varlistentry> |
817 | <term><varname>PreferredLifetime=</varname></term> | |
818 | <listitem> | |
819 | <para>Allows the default "preferred lifetime" of the address to be overridden. | |
820 | Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal> | |
821 | which is the default and means that the address never expires, and <literal>0</literal> which means | |
822 | that the address is considered immediately "expired" and will not be used, | |
823 | unless explicitly requested. A setting of PreferredLifetime=0 is useful for | |
824 | addresses which are added to be used only by a specific application, | |
825 | which is then configured to use them explicitly.</para> | |
826 | </listitem> | |
827 | </varlistentry> | |
2959fb07 SS |
828 | <varlistentry> |
829 | <term><varname>Scope=</varname></term> | |
830 | <listitem> | |
831 | <para>The scope of the address, which can be <literal>global</literal>, | |
832 | <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255. | |
833 | Defaults to <literal>global</literal>.</para> | |
834 | </listitem> | |
835 | </varlistentry> | |
e63be084 SS |
836 | <varlistentry> |
837 | <term><varname>HomeAddress=</varname></term> | |
838 | <listitem> | |
839 | <para>Takes a boolean argument. Designates this address the "home address" as defined in | |
840 | <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>. | |
841 | Supported only on IPv6. Defaults to false.</para> | |
842 | </listitem> | |
843 | </varlistentry> | |
844 | <varlistentry> | |
845 | <term><varname>DuplicateAddressDetection=</varname></term> | |
846 | <listitem> | |
847 | <para>Takes a boolean argument. Do not perform Duplicate Address Detection | |
848 | <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink> when adding this address. | |
849 | Supported only on IPv6. Defaults to false.</para> | |
850 | </listitem> | |
851 | </varlistentry> | |
852 | <varlistentry> | |
853 | <term><varname>ManageTemporaryAddress=</varname></term> | |
854 | <listitem> | |
855 | <para>Takes a boolean argument. If true the kernel manage temporary addresses created | |
856 | from this one as template on behalf of Privacy Extensions | |
857 | <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become | |
858 | active, the use_tempaddr sysctl setting has to be set to a value greater than zero. | |
859 | The given address needs to have a prefix length of 64. This flag allows to use privacy | |
860 | extensions in a manually configured network, just like if stateless auto-configuration | |
861 | was active. Defaults to false. </para> | |
862 | </listitem> | |
863 | </varlistentry> | |
864 | <varlistentry> | |
865 | <term><varname>PrefixRoute=</varname></term> | |
866 | <listitem> | |
867 | <para>Takes a boolean argument. When adding or modifying an IPv6 address, the userspace | |
868 | application needs a way to suppress adding a prefix route. This is for example relevant | |
869 | together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses, | |
870 | but depending on on-link, no route for the prefix should be added. Defaults to false.</para> | |
871 | </listitem> | |
872 | </varlistentry> | |
873 | <varlistentry> | |
874 | <term><varname>AutoJoin=</varname></term> | |
875 | <listitem> | |
876 | <para>Takes a boolean argument. Joining multicast group on ethernet level via | |
877 | <command>ip maddr</command> command would not work if we have an Ethernet switch that does | |
878 | IGMP snooping since the switch would not replicate multicast packets on ports that did not | |
879 | have IGMP reports for the multicast addresses. Linux vxlan interfaces created via | |
880 | <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option | |
881 | that enables then to do the required join. By extending ip address command with option | |
882 | <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan | |
883 | interfaces as well as other tunneling mechanisms that need to receive multicast traffic. | |
884 | Defaults to <literal>no</literal>.</para> | |
885 | </listitem> | |
886 | </varlistentry> | |
798d3a52 ZJS |
887 | </variablelist> |
888 | </refsect1> | |
889 | ||
95b74ef6 SS |
890 | <refsect1> |
891 | <title>[IPv6AddressLabel] Section Options</title> | |
892 | ||
893 | <para>An <literal>[IPv6AddressLabel]</literal> section accepts the | |
894 | following keys. Specify several <literal>[IPv6AddressLabel]</literal> | |
785889e5 | 895 | sections to configure several address labels. IPv6 address labels are |
95b74ef6 SS |
896 | used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. |
897 | Precedence is managed by userspace, and only the label itself is stored in the kernel</para> | |
898 | ||
899 | <variablelist class='network-directives'> | |
900 | <varlistentry> | |
901 | <term><varname>Label=</varname></term> | |
902 | <listitem> | |
903 | <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294. | |
904 | 0xffffffff is reserved. This key is mandatory.</para> | |
905 | </listitem> | |
906 | </varlistentry> | |
907 | <varlistentry> | |
908 | <term><varname>Prefix=</varname></term> | |
909 | <listitem> | |
910 | <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character. | |
911 | This key is mandatory. </para> | |
912 | </listitem> | |
913 | </varlistentry> | |
914 | </variablelist> | |
915 | </refsect1> | |
916 | ||
bce67bbe SS |
917 | <refsect1> |
918 | <title>[RoutingPolicyRule] Section Options</title> | |
919 | ||
920 | <para>An <literal>[RoutingPolicyRule]</literal> section accepts the | |
921 | following keys. Specify several <literal>[RoutingPolicyRule]</literal> | |
922 | sections to configure several rules.</para> | |
923 | ||
924 | <variablelist class='network-directives'> | |
925 | <varlistentry> | |
926 | <term><varname>TypeOfService=</varname></term> | |
927 | <listitem> | |
928 | <para>Specifies the type of service to match a number between 0 to 255.</para> | |
929 | </listitem> | |
930 | </varlistentry> | |
931 | <varlistentry> | |
932 | <term><varname>From=</varname></term> | |
933 | <listitem> | |
934 | <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
935 | </listitem> | |
936 | </varlistentry> | |
937 | <varlistentry> | |
938 | <term><varname>To=</varname></term> | |
939 | <listitem> | |
940 | <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
941 | </listitem> | |
942 | </varlistentry> | |
943 | <varlistentry> | |
944 | <term><varname>FirewallMark=</varname></term> | |
945 | <listitem> | |
946 | <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para> | |
947 | </listitem> | |
948 | </varlistentry> | |
949 | <varlistentry> | |
950 | <term><varname>Table=</varname></term> | |
951 | <listitem> | |
952 | <para>Specifies the routing table identifier to lookup if the rule | |
953 | selector matches. The table identifier for a route (a number between 1 and 4294967295).</para> | |
954 | </listitem> | |
955 | </varlistentry> | |
956 | <varlistentry> | |
957 | <term><varname>Priority=</varname></term> | |
958 | <listitem> | |
959 | <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned | |
960 | integer. Higher number means lower priority, and rules get processed in order of increasing number.</para> | |
961 | </listitem> | |
962 | </varlistentry> | |
762e2659 SS |
963 | <varlistentry> |
964 | <term><varname>IncomingInterface=</varname></term> | |
965 | <listitem> | |
966 | <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para> | |
967 | </listitem> | |
968 | </varlistentry> | |
969 | <varlistentry> | |
970 | <term><varname>OutgoingInterface=</varname></term> | |
971 | <listitem> | |
972 | <para>Specifies the outgoing device to match. The outgoing interface is only available for packets originating from local sockets that are bound to a device.</para> | |
973 | </listitem> | |
974 | </varlistentry> | |
bce67bbe SS |
975 | </variablelist> |
976 | </refsect1> | |
977 | ||
798d3a52 ZJS |
978 | <refsect1> |
979 | <title>[Route] Section Options</title> | |
980 | <para>The <literal>[Route]</literal> section accepts the | |
981 | following keys. Specify several <literal>[Route]</literal> | |
982 | sections to configure several routes.</para> | |
983 | ||
984 | <variablelist class='network-directives'> | |
985 | <varlistentry> | |
986 | <term><varname>Gateway=</varname></term> | |
987 | <listitem> | |
988 | <para>As in the <literal>[Network]</literal> section.</para> | |
989 | </listitem> | |
990 | </varlistentry> | |
28959f7d SS |
991 | <varlistentry> |
992 | <term><varname>GatewayOnlink=</varname></term> | |
993 | <listitem> | |
320ac7a6 | 994 | <para>The <literal>GatewayOnlink</literal> option tells the kernel that it does not have |
28959f7d SS |
995 | to check if the gateway is reachable directly by the current machine (i.e., the kernel does |
996 | not need to check if the gateway is attached to the local network), so that we can insert the | |
997 | route in the kernel table without it being complained about. A boolean, defaults to <literal>no</literal>. | |
998 | </para> | |
999 | </listitem> | |
1000 | </varlistentry> | |
798d3a52 ZJS |
1001 | <varlistentry> |
1002 | <term><varname>Destination=</varname></term> | |
1003 | <listitem> | |
1004 | <para>The destination prefix of the route. Possibly | |
b938cb90 | 1005 | followed by a slash and the prefix length. If omitted, a |
798d3a52 ZJS |
1006 | full-length host route is assumed.</para> |
1007 | </listitem> | |
1008 | </varlistentry> | |
1009 | <varlistentry> | |
1010 | <term><varname>Source=</varname></term> | |
1011 | <listitem> | |
1012 | <para>The source prefix of the route. Possibly followed by | |
b938cb90 | 1013 | a slash and the prefix length. If omitted, a full-length |
798d3a52 ZJS |
1014 | host route is assumed.</para> |
1015 | </listitem> | |
1016 | </varlistentry> | |
1017 | <varlistentry> | |
1018 | <term><varname>Metric=</varname></term> | |
1019 | <listitem> | |
b938cb90 | 1020 | <para>The metric of the route (an unsigned integer).</para> |
798d3a52 ZJS |
1021 | </listitem> |
1022 | </varlistentry> | |
b5bf6f64 SS |
1023 | <varlistentry> |
1024 | <term><varname>IPv6Preference=</varname></term> | |
1025 | <listitem> | |
1026 | <para>Specifies the route preference as defined in <ulink | |
1027 | url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages. | |
1028 | Which can be one of <literal>low</literal> the route has a lowest priority, | |
1029 | <literal>medium</literal> the route has a default priority or | |
1030 | <literal>high</literal> the route has a highest priority.</para> | |
1031 | </listitem> | |
1032 | </varlistentry> | |
769b56a3 TG |
1033 | <varlistentry> |
1034 | <term><varname>Scope=</varname></term> | |
1035 | <listitem> | |
a8eaaee7 | 1036 | <para>The scope of the route, which can be <literal>global</literal>, |
769b56a3 TG |
1037 | <literal>link</literal> or <literal>host</literal>. Defaults to |
1038 | <literal>global</literal>.</para> | |
1039 | </listitem> | |
0d07e595 JK |
1040 | </varlistentry> |
1041 | <varlistentry> | |
1042 | <term><varname>PreferredSource=</varname></term> | |
1043 | <listitem> | |
1044 | <para>The preferred source address of the route. The address | |
1045 | must be in the format described in | |
1046 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> | |
1047 | </listitem> | |
769b56a3 | 1048 | </varlistentry> |
c953b24c SS |
1049 | <varlistentry> |
1050 | <term><varname>Table=<replaceable>num</replaceable></varname></term> | |
1051 | <listitem> | |
1052 | <para>The table identifier for the route (a number between 1 and 4294967295, or 0 to unset). | |
1053 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. | |
1054 | </para> | |
1055 | </listitem> | |
1056 | </varlistentry> | |
c83ecc04 SS |
1057 | <varlistentry> |
1058 | <term><varname>Protocol=</varname></term> | |
1059 | <listitem> | |
1060 | <para>The Protocol identifier for the route. Takes a number between 0 and 255 or the special values | |
1061 | <literal>kernel</literal>, <literal>boot</literal> and <literal>static</literal>. Defaults to | |
1062 | <literal>static</literal>. | |
1063 | </para> | |
1064 | </listitem> | |
1065 | </varlistentry> | |
983226f3 SS |
1066 | <varlistentry> |
1067 | <term><varname>Type=</varname></term> | |
1068 | <listitem> | |
1069 | <para>The Type identifier for special route types, which can be | |
1070 | <literal>unicast</literal> route to a destination network address which describes the path to the destination, | |
1071 | <literal>blackhole</literal> packets are discarded silently, | |
1072 | <literal>unreachable</literal> packets are discarded and the ICMP message host unreachable is generated, | |
1073 | <literal>prohibit</literal> packets are discarded and the ICMP message communication administratively | |
1074 | prohibited is generated. Defaults to <literal>unicast</literal>. | |
1075 | </para> | |
1076 | </listitem> | |
1077 | </varlistentry> | |
323d9329 SS |
1078 | <varlistentry> |
1079 | <term><varname>InitialCongestionWindow=</varname></term> | |
1080 | <listitem> | |
6b21ad33 SS |
1081 | <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP |
1082 | session, when a client requests a resource, the server's initial congestion window determines how many data bytes | |
1083 | will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual | |
1084 | suffixes K, M, G are supported and are understood to the base of 1024. Defaults to unset. | |
323d9329 SS |
1085 | </para> |
1086 | </listitem> | |
1087 | </varlistentry> | |
1088 | <varlistentry> | |
1089 | <term><varname>InitialAdvertisedReceiveWindow=</varname></term> | |
1090 | <listitem> | |
6b21ad33 SS |
1091 | <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initally be buffered at one time |
1092 | on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update | |
1093 | from the receiving host. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual suffixes K, M, G are supported | |
1094 | and are understood to the base of 1024. Defaults to unset. | |
323d9329 SS |
1095 | </para> |
1096 | </listitem> | |
1097 | </varlistentry> | |
09f5dfad SS |
1098 | <varlistentry> |
1099 | <term><varname>QuickAck=</varname></term> | |
1100 | <listitem> | |
1101 | <para>Takes a boolean argument. When true enables TCP quick ack mode for the route. Defaults to unset. | |
1102 | </para> | |
1103 | </listitem> | |
1104 | </varlistentry> | |
983226f3 | 1105 | |
798d3a52 ZJS |
1106 | </variablelist> |
1107 | </refsect1> | |
1108 | ||
1109 | <refsect1> | |
1110 | <title>[DHCP] Section Options</title> | |
ad943783 LP |
1111 | <para>The <literal>[DHCP]</literal> section configures the |
1112 | DHCPv4 and DHCP6 client, if it is enabled with the | |
1113 | <varname>DHCP=</varname> setting described above:</para> | |
798d3a52 ZJS |
1114 | |
1115 | <variablelist class='network-directives'> | |
1116 | <varlistentry> | |
1117 | <term><varname>UseDNS=</varname></term> | |
1118 | <listitem> | |
1119 | <para>When true (the default), the DNS servers received | |
1120 | from the DHCP server will be used and take precedence over | |
1121 | any statically configured ones.</para> | |
e88d8021 ZJS |
1122 | |
1123 | <para>This corresponds to the <option>nameserver</option> | |
ad943783 LP |
1124 | option in <citerefentry |
1125 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
1126 | </listitem> |
1127 | </varlistentry> | |
301f4073 MM |
1128 | <varlistentry> |
1129 | <term><varname>UseNTP=</varname></term> | |
1130 | <listitem> | |
1131 | <para>When true (the default), the NTP servers received | |
1132 | from the DHCP server will be used by systemd-timesyncd | |
1133 | and take precedence over any statically configured ones.</para> | |
1134 | </listitem> | |
1135 | </varlistentry> | |
798d3a52 ZJS |
1136 | <varlistentry> |
1137 | <term><varname>UseMTU=</varname></term> | |
1138 | <listitem> | |
1139 | <para>When true, the interface maximum transmission unit | |
1140 | from the DHCP server will be used on the current link. | |
95ab9eff | 1141 | Defaults to false.</para> |
798d3a52 ZJS |
1142 | </listitem> |
1143 | </varlistentry> | |
7585baa0 | 1144 | <varlistentry> |
1145 | <term><varname>Anonymize=</varname></term> | |
1146 | <listitem> | |
1147 | <para>Takes a boolean argument. When true, the options sent to the DHCP server will | |
1148 | follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink> | |
1149 | (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information. | |
1150 | Defaults to false.</para> | |
1151 | ||
1152 | <para>This option should only be set to true when | |
1153 | <varname>MACAddressPolicy=</varname> is set to <literal>random</literal> | |
1154 | (see <citerefentry | |
1155 | project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para> | |
1156 | ||
1157 | <para>Note that this configuration will overwrite others. | |
1158 | In concrete, the following variables will be ignored: | |
1159 | <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>, | |
1160 | <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>, | |
1161 | <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>, | |
1162 | <varname>UseTimezone=</varname>.</para> | |
1163 | </listitem> | |
1164 | </varlistentry> | |
798d3a52 ZJS |
1165 | <varlistentry> |
1166 | <term><varname>SendHostname=</varname></term> | |
1167 | <listitem> | |
d59be2cf ZJS |
1168 | <para>When true (the default), the machine's hostname will |
1169 | be sent to the DHCP server.</para> | |
798d3a52 ZJS |
1170 | </listitem> |
1171 | </varlistentry> | |
1172 | <varlistentry> | |
1173 | <term><varname>UseHostname=</varname></term> | |
1174 | <listitem> | |
1175 | <para>When true (the default), the hostname received from | |
ad943783 | 1176 | the DHCP server will be set as the transient hostname of the system |
d59be2cf | 1177 | </para> |
798d3a52 ZJS |
1178 | </listitem> |
1179 | </varlistentry> | |
1adc5d0b SS |
1180 | <varlistentry> |
1181 | <term><varname>Hostname=</varname></term> | |
1182 | <listitem> | |
d59be2cf ZJS |
1183 | <para>Use this value for the hostname which is sent to the |
1184 | DHCP server, instead of machine's hostname.</para> | |
1adc5d0b SS |
1185 | </listitem> |
1186 | </varlistentry> | |
798d3a52 ZJS |
1187 | <varlistentry> |
1188 | <term><varname>UseDomains=</varname></term> | |
1189 | <listitem> | |
07ff561c | 1190 | <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name |
b2a81c0b LP |
1191 | received from the DHCP server will be used as DNS search domain over this link, similar to the effect of |
1192 | the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from | |
1193 | the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of | |
1194 | the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to | |
1195 | false.</para> | |
1196 | ||
1197 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1e7a0e21 | 1198 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain |
b2a81c0b LP |
1199 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of |
1200 | single-label names.</para> | |
1201 | ||
1202 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1203 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
1204 | </listitem> |
1205 | </varlistentry> | |
1206 | <varlistentry> | |
1207 | <term><varname>UseRoutes=</varname></term> | |
1208 | <listitem> | |
d6eac9bd DW |
1209 | <para>When true (the default), the static routes will be requested from the DHCP server and added to the |
1210 | routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's | |
1211 | destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the | |
1212 | link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a | |
1213 | "link" scope will be used. For anything else, scope defaults to "global".</para> | |
798d3a52 ZJS |
1214 | </listitem> |
1215 | </varlistentry> | |
ad943783 LP |
1216 | |
1217 | <varlistentry> | |
1218 | <term><varname>UseTimezone=</varname></term> | |
1219 | ||
1220 | <listitem><para>When true, the timezone received from the | |
7f3fdb7f | 1221 | DHCP server will be set as timezone of the local |
ad943783 LP |
1222 | system. Defaults to <literal>no</literal>.</para></listitem> |
1223 | </varlistentry> | |
1224 | ||
798d3a52 ZJS |
1225 | <varlistentry> |
1226 | <term><varname>CriticalConnection=</varname></term> | |
1227 | <listitem> | |
1228 | <para>When true, the connection will never be torn down | |
1229 | even if the DHCP lease expires. This is contrary to the | |
1230 | DHCP specification, but may be the best choice if, say, | |
1231 | the root filesystem relies on this connection. Defaults to | |
1232 | false.</para> | |
1233 | </listitem> | |
1234 | </varlistentry> | |
e2e08e77 | 1235 | |
3e43b2cd JJ |
1236 | <varlistentry> |
1237 | <term><varname>ClientIdentifier=</varname></term> | |
1238 | <listitem> | |
dace710c YW |
1239 | <para>The DHCPv4 client identifier to use. Takes one of <literal>mac</literal>, <literal>duid</literal> or <literal>duid-only</literal>. |
1240 | If set to <literal>mac</literal>, the MAC address of the link is used. | |
1241 | If set to <literal>duid</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used. | |
1242 | If set to <literal>duid-only</literal>, only DUID is used, this may not be RFC compliant, but some setups may require to use this. | |
1243 | Defaults to <literal>duid</literal>.</para> | |
3e43b2cd JJ |
1244 | </listitem> |
1245 | </varlistentry> | |
e2e08e77 | 1246 | |
798d3a52 ZJS |
1247 | <varlistentry> |
1248 | <term><varname>VendorClassIdentifier=</varname></term> | |
1249 | <listitem> | |
1250 | <para>The vendor class identifier used to identify vendor | |
1251 | type and configuration.</para> | |
1252 | </listitem> | |
1253 | </varlistentry> | |
076ea6f6 | 1254 | |
e2e08e77 ZJS |
1255 | <varlistentry> |
1256 | <term><varname>DUIDType=</varname></term> | |
1257 | <listitem> | |
1258 | <para>Override the global <varname>DUIDType</varname> setting for this network. See | |
1259 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1260 | for a description of possible values.</para> | |
1261 | </listitem> | |
1262 | </varlistentry> | |
076ea6f6 | 1263 | |
e2e08e77 ZJS |
1264 | <varlistentry> |
1265 | <term><varname>DUIDRawData=</varname></term> | |
1266 | <listitem> | |
1267 | <para>Override the global <varname>DUIDRawData</varname> setting for this network. See | |
1268 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1269 | for a description of possible values.</para> | |
076ea6f6 LP |
1270 | </listitem> |
1271 | </varlistentry> | |
e2e08e77 | 1272 | |
d05def16 LP |
1273 | <varlistentry> |
1274 | <term><varname>IAID=</varname></term> | |
1275 | <listitem> | |
1276 | <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para> | |
1277 | </listitem> | |
1278 | </varlistentry> | |
1279 | ||
798d3a52 ZJS |
1280 | <varlistentry> |
1281 | <term><varname>RequestBroadcast=</varname></term> | |
1282 | <listitem> | |
1283 | <para>Request the server to use broadcast messages before | |
1284 | the IP address has been configured. This is necessary for | |
1285 | devices that cannot receive RAW packets, or that cannot | |
1286 | receive packets at all before an IP address has been | |
1287 | configured. On the other hand, this must not be enabled on | |
1288 | networks where broadcasts are filtered out.</para> | |
1289 | </listitem> | |
1290 | </varlistentry> | |
e2e08e77 | 1291 | |
798d3a52 ZJS |
1292 | <varlistentry> |
1293 | <term><varname>RouteMetric=</varname></term> | |
1294 | <listitem> | |
1295 | <para>Set the routing metric for routes specified by the | |
1296 | DHCP server.</para> | |
1297 | </listitem> | |
1298 | </varlistentry> | |
f594276b JK |
1299 | |
1300 | <varlistentry> | |
1301 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1302 | <listitem> | |
d11e656a | 1303 | <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset). |
f594276b JK |
1304 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. |
1305 | </para> | |
917b2260 AR |
1306 | <para>When used in combination with <varname>VRF=</varname> the |
1307 | VRF's routing table is used unless this parameter is specified. | |
1308 | </para> | |
f594276b JK |
1309 | </listitem> |
1310 | </varlistentry> | |
9faed222 SS |
1311 | |
1312 | <varlistentry> | |
1313 | <term><varname>ListenPort=</varname></term> | |
1314 | <listitem> | |
1315 | <para>Allow setting custom port for the DHCP client to listen on.</para> | |
1316 | </listitem> | |
1317 | </varlistentry> | |
fb5c8216 SS |
1318 | |
1319 | <varlistentry> | |
1320 | <term><varname>RapidCommit=</varname></term> | |
1321 | <listitem> | |
1322 | <para>A boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through | |
1323 | a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both | |
1324 | the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default | |
1325 | four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides | |
1326 | faster client configuration and is beneficial in environments in which networks are under a heavy load. | |
1327 | See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details. | |
1328 | Defaults to true.</para> | |
1329 | </listitem> | |
1330 | </varlistentry> | |
1331 | ||
ad943783 | 1332 | </variablelist> |
076ea6f6 | 1333 | </refsect1> |
413708d1 | 1334 | |
1e7a0e21 | 1335 | <refsect1> |
f921f573 LP |
1336 | <title>[IPv6AcceptRA] Section Options</title> |
1337 | <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement | |
1338 | (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described | |
1e7a0e21 LP |
1339 | above:</para> |
1340 | ||
1341 | <variablelist class='network-directives'> | |
1342 | <varlistentry> | |
1343 | <term><varname>UseDNS=</varname></term> | |
1344 | <listitem> | |
1345 | <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take | |
1346 | precedence over any statically configured ones.</para> | |
1347 | ||
1348 | <para>This corresponds to the <option>nameserver</option> option in <citerefentry | |
1349 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1350 | </listitem> | |
1351 | </varlistentry> | |
1352 | ||
1353 | <varlistentry> | |
1354 | <term><varname>UseDomains=</varname></term> | |
1355 | <listitem> | |
1356 | <para>Takes a boolean argument, or the special value <literal>route</literal>. When true, the domain name | |
1357 | received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to | |
1358 | the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name | |
1359 | received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the | |
1360 | effect of the <option>Domains=</option> setting when the argument is prefixed with | |
1361 | <literal>~</literal>. Defaults to false.</para> | |
1362 | ||
1363 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1364 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain | |
1365 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of | |
1366 | single-label names.</para> | |
1367 | ||
1368 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1369 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1370 | </listitem> | |
1371 | </varlistentry> | |
2ba31d29 JK |
1372 | |
1373 | <varlistentry> | |
1374 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1375 | <listitem> | |
d11e656a ZJS |
1376 | <para>The table identifier for the routes received in the Router Advertisement |
1377 | (a number between 1 and 4294967295, or 0 to unset). | |
2ba31d29 JK |
1378 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. |
1379 | </para> | |
1380 | </listitem> | |
1381 | </varlistentry> | |
1e7a0e21 LP |
1382 | </variablelist> |
1383 | </refsect1> | |
1384 | ||
1385 | ||
ad943783 LP |
1386 | <refsect1> |
1387 | <title>[DHCPServer] Section Options</title> | |
1388 | <para>The <literal>[DHCPServer]</literal> section contains | |
1389 | settings for the DHCP server, if enabled via the | |
1390 | <varname>DHCPServer=</varname> option described above:</para> | |
1391 | ||
1392 | <variablelist class='network-directives'> | |
1393 | ||
9b3a67c5 TG |
1394 | <varlistentry> |
1395 | <term><varname>PoolOffset=</varname></term> | |
1396 | <term><varname>PoolSize=</varname></term> | |
1397 | ||
1398 | <listitem><para>Configures the pool of addresses to hand out. The pool | |
1399 | is a contiguous sequence of IP addresses in the subnet configured for | |
1400 | the server address, which does not include the subnet nor the broadcast | |
1401 | address. <varname>PoolOffset=</varname> takes the offset of the pool | |
1402 | from the start of subnet, or zero to use the default value. | |
1403 | <varname>PoolSize=</varname> takes the number of IP addresses in the | |
b938cb90 | 1404 | pool or zero to use the default value. By default, the pool starts at |
9b3a67c5 TG |
1405 | the first address after the subnet address and takes up the rest of |
1406 | the subnet, excluding the broadcast address. If the pool includes | |
1407 | the server address (the default), this is reserved and not handed | |
1408 | out to clients.</para></listitem> | |
1409 | </varlistentry> | |
1410 | ||
ad943783 LP |
1411 | <varlistentry> |
1412 | <term><varname>DefaultLeaseTimeSec=</varname></term> | |
1413 | <term><varname>MaxLeaseTimeSec=</varname></term> | |
1414 | ||
1415 | <listitem><para>Control the default and maximum DHCP lease | |
1416 | time to pass to clients. These settings take time values in seconds or | |
1417 | another common time unit, depending on the suffix. The default | |
1418 | lease time is used for clients that did not ask for a specific | |
1419 | lease time. If a client asks for a lease time longer than the | |
b938cb90 | 1420 | maximum lease time, it is automatically shortened to the |
ad943783 LP |
1421 | specified time. The default lease time defaults to 1h, the |
1422 | maximum lease time to 12h. Shorter lease times are beneficial | |
1423 | if the configuration data in DHCP leases changes frequently | |
1424 | and clients shall learn the new settings with shorter | |
1425 | latencies. Longer lease times reduce the generated DHCP | |
1426 | network traffic.</para></listitem> | |
1427 | </varlistentry> | |
1428 | ||
1429 | <varlistentry> | |
1430 | <term><varname>EmitDNS=</varname></term> | |
1431 | <term><varname>DNS=</varname></term> | |
1432 | ||
1433 | <listitem><para>Configures whether the DHCP leases handed out | |
1434 | to clients shall contain DNS server information. The | |
1435 | <varname>EmitDNS=</varname> setting takes a boolean argument | |
1436 | and defaults to <literal>yes</literal>. The DNS servers to | |
1437 | pass to clients may be configured with the | |
1438 | <varname>DNS=</varname> option, which takes a list of IPv4 | |
1439 | addresses. If the <varname>EmitDNS=</varname> option is | |
b938cb90 | 1440 | enabled but no servers configured, the servers are |
ad943783 LP |
1441 | automatically propagated from an "uplink" interface that has |
1442 | appropriate servers set. The "uplink" interface is determined | |
1443 | by the default route of the system with the highest | |
1444 | priority. Note that this information is acquired at the time | |
1445 | the lease is handed out, and does not take uplink interfaces | |
1446 | into account that acquire DNS or NTP server information at a | |
1447 | later point. DNS server propagation does not take | |
1448 | <filename>/etc/resolv.conf</filename> into account. Also, note | |
a8eaaee7 | 1449 | that the leases are not refreshed if the uplink network |
ad943783 | 1450 | configuration changes. To ensure clients regularly acquire the |
b938cb90 | 1451 | most current uplink DNS server information, it is thus |
ad943783 LP |
1452 | advisable to shorten the DHCP lease time via |
1453 | <varname>MaxLeaseTimeSec=</varname> described | |
1454 | above.</para></listitem> | |
1455 | </varlistentry> | |
1456 | ||
1457 | <varlistentry> | |
1458 | <term><varname>EmitNTP=</varname></term> | |
1459 | <term><varname>NTP=</varname></term> | |
1460 | ||
1461 | <listitem><para>Similar to the <varname>EmitDNS=</varname> and | |
b938cb90 | 1462 | <varname>DNS=</varname> settings described above, these |
ad943783 LP |
1463 | settings configure whether and what NTP server information |
1464 | shall be emitted as part of the DHCP lease. The same syntax, | |
1465 | propagation semantics and defaults apply as for | |
1466 | <varname>EmitDNS=</varname> and | |
1467 | <varname>DNS=</varname>.</para></listitem> | |
1468 | </varlistentry> | |
1469 | ||
77ff6022 CG |
1470 | <varlistentry> |
1471 | <term><varname>EmitRouter=</varname></term> | |
1472 | ||
1473 | <listitem><para>Similar to the <varname>EmitDNS=</varname> | |
1474 | setting described above, this setting configures whether the | |
1475 | DHCP lease should contain the router option. The same syntax, | |
1476 | propagation semantics and defaults apply as for | |
1477 | <varname>EmitDNS=</varname>.</para></listitem> | |
1478 | </varlistentry> | |
1479 | ||
ad943783 LP |
1480 | <varlistentry> |
1481 | <term><varname>EmitTimezone=</varname></term> | |
1482 | <term><varname>Timezone=</varname></term> | |
1483 | ||
1484 | <listitem><para>Configures whether the DHCP leases handed out | |
1485 | to clients shall contain timezone information. The | |
1486 | <varname>EmitTimezone=</varname> setting takes a boolean | |
1487 | argument and defaults to <literal>yes</literal>. The | |
1488 | <varname>Timezone=</varname> setting takes a timezone string | |
1489 | (such as <literal>Europe/Berlin</literal> or | |
1490 | <literal>UTC</literal>) to pass to clients. If no explicit | |
b938cb90 | 1491 | timezone is set, the system timezone of the local host is |
ad943783 LP |
1492 | propagated, as determined by the |
1493 | <filename>/etc/localtime</filename> symlink.</para></listitem> | |
1494 | </varlistentry> | |
1495 | ||
1496 | </variablelist> | |
1497 | </refsect1> | |
1498 | ||
798d3a52 | 1499 | <refsect1> |
3f9e0236 PF |
1500 | <title>[IPv6PrefixDelegation] Section Options</title> |
1501 | <para>The <literal>[IPv6PrefixDelegation]</literal> section contains | |
1502 | settings for sending IPv6 Router Advertisements and whether to act as | |
1503 | a router, if enabled via the <varname>IPv6PrefixDelegation=</varname> | |
1504 | option described above. IPv6 network prefixes are defined with one or | |
1505 | more <literal>[IPv6Prefix]</literal> sections.</para> | |
1506 | ||
1507 | <variablelist class='network-directives'> | |
1508 | ||
1509 | <varlistentry> | |
1510 | <term><varname>Managed=</varname></term> | |
1511 | <term><varname>OtherInformation=</varname></term> | |
1512 | ||
1513 | <listitem><para>Controls whether a DHCPv6 server is used to acquire IPv6 | |
1514 | addresses on the network link when <varname>Managed=</varname> boolean | |
1515 | is set to <literal>true</literal> or if only additional network | |
1516 | information can be obtained via DHCPv6 for the network link when | |
1517 | <varname>OtherInformation=</varname> boolean is set to | |
1518 | <literal>true</literal>. Both settings default to | |
1519 | <literal>false</literal>, which means that a DHCPv6 server is not being | |
1520 | used.</para></listitem> | |
1521 | </varlistentry> | |
1522 | ||
1523 | <varlistentry> | |
1524 | <term><varname>RouterLifetimeSec=</varname></term> | |
1525 | ||
1526 | <listitem><para>Configures the IPv6 router lifetime in seconds. If set, | |
1527 | this host also announces itself in Router Advertisements as an IPv6 | |
1528 | router for the network link. Defaults to unset, which means the host is | |
1529 | not acting as a router.</para> | |
1530 | </listitem> | |
1531 | </varlistentry> | |
1532 | ||
1533 | <varlistentry> | |
1534 | <term><varname>RouterPreference=</varname></term> | |
1535 | ||
1536 | <listitem><para>Configures IPv6 router preference if | |
1537 | <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are | |
1538 | <literal>high</literal>, <literal>medium</literal> and | |
1539 | <literal>low</literal>, with <literal>normal</literal> and | |
1540 | <literal>default</literal> added as synonyms for | |
1541 | <literal>medium</literal> just to make configuration easier. See | |
1542 | <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink> | |
1543 | for details. Defaults to <literal>medium</literal>.</para></listitem> | |
1544 | </varlistentry> | |
1545 | ||
1546 | <varlistentry> | |
4cb8478c | 1547 | <term><varname>EmitDNS=</varname></term> |
3f9e0236 PF |
1548 | <term><varname>DNS=</varname></term> |
1549 | ||
4cb8478c PF |
1550 | <listitem><para><varname>DNS=</varname> specifies a list of recursive |
1551 | DNS server IPv6 addresses that distributed via Router Advertisement | |
1552 | messages when <varname>EmitDNS=</varname> is true. If <varname>DNS= | |
1553 | </varname> is empty, DNS servers are read from the | |
1554 | <literal>[Network]</literal> section. If the | |
1555 | <literal>[Network]</literal> section does not contain any DNS servers | |
1556 | either, DNS servers from the uplink with the highest priority default | |
1557 | route are used. When <varname>EmitDNS=</varname> is false, no DNS server | |
1558 | information is sent in Router Advertisement messages. | |
1559 | <varname>EmitDNS=</varname> defaults to true. | |
3f9e0236 PF |
1560 | </para></listitem> |
1561 | </varlistentry> | |
1562 | ||
760021c0 | 1563 | <varlistentry> |
4cb8478c | 1564 | <term><varname>EmitDomains=</varname></term> |
760021c0 PF |
1565 | <term><varname>Domains=</varname></term> |
1566 | ||
4cb8478c PF |
1567 | <listitem><para>A list of DNS search domains distributed via Router |
1568 | Advertisement messages when <varname>EmitDomains=</varname> is true. If | |
1569 | <varname>Domains=</varname> is empty, DNS search domains are read from the | |
1570 | <literal>[Network]</literal> section. If the <literal>[Network]</literal> | |
1571 | section does not contain any DNS search domains either, DNS search | |
1572 | domains from the uplink with the highest priority default route are | |
1573 | used. When <varname>EmitDomains=</varname> is false, no DNS search domain | |
1574 | information is sent in Router Advertisement messages. | |
1575 | <varname>EmitDomains=</varname> defaults to true. | |
1576 | </para></listitem> | |
760021c0 PF |
1577 | </varlistentry> |
1578 | ||
3f9e0236 PF |
1579 | <varlistentry> |
1580 | <term><varname>DNSLifetimeSec=</varname></term> | |
1581 | ||
1582 | <listitem><para>Lifetime in seconds for the DNS server addresses listed | |
760021c0 PF |
1583 | in <varname>DNS=</varname> and search domains listed in |
1584 | <varname>Domains=</varname>.</para></listitem> | |
3f9e0236 PF |
1585 | </varlistentry> |
1586 | ||
1587 | </variablelist> | |
1588 | </refsect1> | |
1589 | ||
1590 | <refsect1> | |
1591 | <title>[IPv6Prefix] Section Options</title> | |
1592 | <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6 | |
1593 | prefixes that are announced via Router Advertisements. See | |
1594 | <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink> | |
1595 | for further details.</para> | |
1596 | ||
1597 | <variablelist class='network-directives'> | |
1598 | ||
1599 | <varlistentry> | |
1600 | <term><varname>AddressAutoconfiguration=</varname></term> | |
1601 | <term><varname>OnLink=</varname></term> | |
1602 | ||
1603 | <listitem><para>Boolean values to specify whether IPv6 addresses can be | |
1604 | autoconfigured with this prefix and whether the prefix can be used for | |
1605 | onlink determination. Both settings default to <literal>true</literal> | |
1606 | in order to ease configuration. | |
1607 | </para></listitem> | |
1608 | </varlistentry> | |
1609 | ||
1610 | <varlistentry> | |
1611 | <term><varname>Prefix=</varname></term> | |
1612 | ||
1613 | <listitem><para>The IPv6 prefix that is to be distributed to hosts. | |
1614 | Similarly to configuring static IPv6 addresses, the setting is | |
1615 | configured as an IPv6 prefix and its prefix length, separated by a | |
1616 | <literal>/</literal> character. Use multiple | |
1617 | <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6 | |
1618 | prefixes since prefix lifetimes, address autoconfiguration and onlink | |
1619 | status may differ from one prefix to another.</para></listitem> | |
1620 | </varlistentry> | |
1621 | ||
1622 | <varlistentry> | |
1623 | <term><varname>PreferredLifetimeSec=</varname></term> | |
1624 | <term><varname>ValidLifetimeSec=</varname></term> | |
1625 | ||
1626 | <listitem><para>Preferred and valid lifetimes for the prefix measured in | |
1627 | seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800 | |
1628 | seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults | |
1629 | to 2592000 seconds (30 days).</para></listitem> | |
1630 | </varlistentry> | |
1631 | ||
1632 | </variablelist> | |
1633 | </refsect1> | |
1634 | ||
1635 | <refsect1> | |
798d3a52 ZJS |
1636 | <title>[Bridge] Section Options</title> |
1637 | <para>The <literal>[Bridge]</literal> section accepts the | |
1638 | following keys.</para> | |
1639 | <variablelist class='network-directives'> | |
165c41a9 SS |
1640 | <varlistentry> |
1641 | <term><varname>UnicastFlood=</varname></term> | |
1642 | <listitem> | |
072f9e4a ZJS |
1643 | <para>A boolean. Controls whether the bridge should flood |
1644 | traffic for which an FDB entry is missing and the destination | |
1645 | is unknown through this port. Defaults to on. | |
47c7dfe2 | 1646 | </para> |
165c41a9 SS |
1647 | </listitem> |
1648 | </varlistentry> | |
1649 | <varlistentry> | |
1650 | <term><varname>HairPin=</varname></term> | |
1651 | <listitem> | |
47c7dfe2 ZJS |
1652 | <para>A boolean. Configures whether traffic may be sent back |
1653 | out of the port on which it was received. By default, this | |
1654 | flag is false, and the bridge will not forward traffic back | |
1655 | out of the receiving port.</para> | |
165c41a9 SS |
1656 | </listitem> |
1657 | </varlistentry> | |
1658 | <varlistentry> | |
84c34096 | 1659 | <term><varname>UseBPDU=</varname></term> |
165c41a9 | 1660 | <listitem> |
47c7dfe2 | 1661 | <para>A boolean. Configures whether STP Bridge Protocol Data Units will be |
84c34096 | 1662 | processed by the bridge port. Defaults to yes.</para> |
165c41a9 SS |
1663 | </listitem> |
1664 | </varlistentry> | |
1665 | <varlistentry> | |
1666 | <term><varname>FastLeave=</varname></term> | |
1667 | <listitem> | |
47c7dfe2 | 1668 | <para>A boolean. This flag allows the bridge to immediately stop multicast |
a8eaaee7 | 1669 | traffic on a port that receives an IGMP Leave message. It is only used with |
47c7dfe2 | 1670 | IGMP snooping if enabled on the bridge. Defaults to off.</para> |
165c41a9 SS |
1671 | </listitem> |
1672 | </varlistentry> | |
1673 | <varlistentry> | |
23da66bb | 1674 | <term><varname>AllowPortToBeRoot=</varname></term> |
165c41a9 | 1675 | <listitem> |
47c7dfe2 ZJS |
1676 | <para>A boolean. Configures whether a given port is allowed to |
1677 | become a root port. Only used when STP is enabled on the bridge. | |
23da66bb | 1678 | Defaults to on.</para> |
165c41a9 SS |
1679 | </listitem> |
1680 | </varlistentry> | |
798d3a52 ZJS |
1681 | <varlistentry> |
1682 | <term><varname>Cost=</varname></term> | |
1683 | <listitem> | |
47c7dfe2 | 1684 | <para>Sets the "cost" of sending packets of this interface. |
a8eaaee7 | 1685 | Each port in a bridge may have a different speed and the cost |
798d3a52 | 1686 | is used to decide which link to use. Faster interfaces |
785889e5 | 1687 | should have lower costs. It is an integer value between 1 and |
b56be296 DJL |
1688 | 65535.</para> |
1689 | </listitem> | |
1690 | </varlistentry> | |
1691 | <varlistentry> | |
1692 | <term><varname>Priority=</varname></term> | |
1693 | <listitem> | |
1694 | <para>Sets the "priority" of sending packets on this interface. | |
1695 | Each port in a bridge may have a different priority which is used | |
1696 | to decide which link to use. Lower value means higher priority. | |
785889e5 | 1697 | It is an integer value between 0 to 63. Networkd does not set any |
b56be296 | 1698 | default, meaning the kernel default value of 32 is used.</para> |
798d3a52 ZJS |
1699 | </listitem> |
1700 | </varlistentry> | |
1701 | </variablelist> | |
1702 | </refsect1> | |
798d3a52 ZJS |
1703 | <refsect1> |
1704 | <title>[BridgeFDB] Section Options</title> | |
1705 | <para>The <literal>[BridgeFDB]</literal> section manages the | |
1706 | forwarding database table of a port and accepts the following | |
1707 | keys. Specify several <literal>[BridgeFDB]</literal> sections to | |
1708 | configure several static MAC table entries.</para> | |
1709 | ||
1710 | <variablelist class='network-directives'> | |
1711 | <varlistentry> | |
1712 | <term><varname>MACAddress=</varname></term> | |
1713 | <listitem> | |
1714 | <para>As in the <literal>[Network]</literal> section. This | |
1715 | key is mandatory.</para> | |
1716 | </listitem> | |
1717 | </varlistentry> | |
1718 | <varlistentry> | |
1719 | <term><varname>VLANId=</varname></term> | |
1720 | <listitem> | |
a8eaaee7 | 1721 | <para>The VLAN ID for the new static MAC table entry. If |
db9b9fb9 | 1722 | omitted, no VLAN ID information is appended to the new static MAC |
798d3a52 ZJS |
1723 | table entry.</para> |
1724 | </listitem> | |
1725 | </varlistentry> | |
1726 | </variablelist> | |
1727 | </refsect1> | |
13b498f9 TJ |
1728 | <refsect1> |
1729 | <title>[BridgeVLAN] Section Options</title> | |
1730 | <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts | |
1731 | the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries. | |
1732 | The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in | |
1733 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1734 | ||
1735 | <variablelist class='network-directives'> | |
1736 | <varlistentry> | |
1737 | <term><varname>VLAN=</varname></term> | |
1738 | <listitem> | |
1739 | <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid | |
1740 | from 1 to 4094.</para> | |
1741 | </listitem> | |
1742 | </varlistentry> | |
1743 | <varlistentry> | |
1744 | <term><varname>EgressUntagged=</varname></term> | |
1745 | <listitem> | |
1746 | <para>The VLAN ID specified here will be used to untag frames on egress. Configuring | |
1747 | <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the | |
1748 | VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para> | |
1749 | </listitem> | |
1750 | </varlistentry> | |
1751 | <varlistentry> | |
1752 | <term><varname>PVID=</varname></term> | |
1753 | <listitem> | |
1754 | <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress. | |
1755 | <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of | |
1756 | <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para> | |
1757 | </listitem> | |
1758 | </varlistentry> | |
1759 | </variablelist> | |
1760 | </refsect1> | |
798d3a52 ZJS |
1761 | |
1762 | <refsect1> | |
9e35b3de | 1763 | <title>Examples</title> |
798d3a52 | 1764 | <example> |
9e35b3de | 1765 | <title>Static network configuration</title> |
798d3a52 | 1766 | |
9e35b3de ZJS |
1767 | <programlisting># /etc/systemd/network/50-static.network |
1768 | [Match] | |
eac684ef TG |
1769 | Name=enp2s0 |
1770 | ||
1771 | [Network] | |
1772 | Address=192.168.0.15/24 | |
1773 | Gateway=192.168.0.1</programlisting> | |
9e35b3de ZJS |
1774 | |
1775 | <para>This brings interface <literal>enp2s0</literal> up with a static address. The | |
1776 | specified gateway will be used for a default route.</para> | |
798d3a52 | 1777 | </example> |
eac684ef | 1778 | |
798d3a52 | 1779 | <example> |
9e35b3de | 1780 | <title>DHCP on ethernet links</title> |
eac684ef | 1781 | |
9e35b3de ZJS |
1782 | <programlisting># /etc/systemd/network/80-dhcp.network |
1783 | [Match] | |
eac684ef TG |
1784 | Name=en* |
1785 | ||
1786 | [Network] | |
9c8ca3f7 | 1787 | DHCP=yes</programlisting> |
9e35b3de ZJS |
1788 | |
1789 | <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with | |
1790 | <literal>en</literal> (i.e. ethernet interfaces).</para> | |
798d3a52 | 1791 | </example> |
eac684ef | 1792 | |
798d3a52 | 1793 | <example> |
9e35b3de | 1794 | <title>A bridge with two enslaved links</title> |
f47c5c47 | 1795 | |
9e35b3de ZJS |
1796 | <programlisting># /etc/systemd/network/25-bridge-static.network |
1797 | [Match] | |
f47c5c47 | 1798 | Name=bridge0 |
1799 | ||
1800 | [Network] | |
1801 | Address=192.168.0.15/24 | |
1802 | Gateway=192.168.0.1 | |
1803 | DNS=192.168.0.1</programlisting> | |
f47c5c47 | 1804 | |
9e35b3de ZJS |
1805 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network |
1806 | [Match] | |
f47c5c47 | 1807 | Name=enp2s0 |
1808 | ||
1809 | [Network] | |
1810 | Bridge=bridge0</programlisting> | |
9e35b3de ZJS |
1811 | |
1812 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network | |
1813 | [Match] | |
1814 | Name=wlp3s0 | |
1815 | ||
1816 | [Network] | |
1817 | Bridge=bridge0</programlisting> | |
1818 | ||
1819 | <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and | |
1820 | <literal>wlp3s0</literal> to it. The bridge will have the specified static address | |
1821 | and network assigned, and a default route via the specified gateway will be | |
1822 | added. The specified DNS server will be added to the global list of DNS resolvers. | |
1823 | </para> | |
13b498f9 | 1824 | </example> |
9e35b3de | 1825 | |
13b498f9 | 1826 | <example> |
9e35b3de | 1827 | <title></title> |
13b498f9 | 1828 | |
9e35b3de ZJS |
1829 | <programlisting> |
1830 | # /etc/systemd/network/20-bridge-slave-interface-vlan.network | |
1831 | [Match] | |
13b498f9 TJ |
1832 | Name=enp2s0 |
1833 | ||
1834 | [Network] | |
1835 | Bridge=bridge0 | |
1836 | ||
1837 | [BridgeVLAN] | |
1838 | VLAN=1-32 | |
1839 | PVID=42 | |
1840 | EgressUntagged=42 | |
1841 | ||
1842 | [BridgeVLAN] | |
1843 | VLAN=100-200 | |
1844 | ||
1845 | [BridgeVLAN] | |
1846 | EgressUntagged=300-400</programlisting> | |
0a8a0fad | 1847 | |
9e35b3de ZJS |
1848 | <para>This overrides the configuration specified in the previous example for the |
1849 | interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs | |
1850 | 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be | |
1851 | untagged when they leave on this interface. Untagged packets which arrive on this | |
1852 | interface will be assigned VLAN ID 42.</para> | |
798d3a52 | 1853 | </example> |
0a8a0fad | 1854 | |
798d3a52 | 1855 | <example> |
9e35b3de | 1856 | <title>Various tunnels</title> |
0a8a0fad | 1857 | |
9e35b3de ZJS |
1858 | <programlisting>/etc/systemd/network/25-tunnels.network |
1859 | [Match] | |
1860 | Name=ens1 | |
0a8a0fad TG |
1861 | |
1862 | [Network] | |
9e35b3de ZJS |
1863 | Tunnel=ipip-tun |
1864 | Tunnel=sit-tun | |
1865 | Tunnel=gre-tun | |
1866 | Tunnel=vti-tun | |
1867 | </programlisting> | |
1868 | ||
1869 | <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev | |
1870 | [NetDev] | |
1871 | Name=ipip-tun | |
1872 | Kind=ipip | |
1873 | </programlisting> | |
1874 | ||
1875 | <programlisting>/etc/systemd/network/25-tunnel-sit.netdev | |
1876 | [NetDev] | |
1877 | Name=sit-tun | |
1878 | Kind=sit | |
1879 | </programlisting> | |
1880 | ||
1881 | <programlisting>/etc/systemd/network/25-tunnel-gre.netdev | |
1882 | [NetDev] | |
1883 | Name=gre-tun | |
1884 | Kind=gre | |
1885 | </programlisting> | |
1886 | ||
1887 | <programlisting>/etc/systemd/network/25-tunnel-vti.netdev | |
1888 | [NetDev] | |
1889 | Name=vti-tun | |
1890 | Kind=vti | |
1891 | </programlisting> | |
1892 | ||
1893 | <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel, | |
1894 | a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para> | |
798d3a52 | 1895 | </example> |
0a8a0fad | 1896 | |
798d3a52 | 1897 | <example> |
9e35b3de | 1898 | <title>A bond device</title> |
0a8a0fad | 1899 | |
9e35b3de ZJS |
1900 | <programlisting># /etc/systemd/network/30-bond1.network |
1901 | [Match] | |
1902 | Name=bond1 | |
0a8a0fad TG |
1903 | |
1904 | [Network] | |
9e35b3de ZJS |
1905 | DHCP=ipv6 |
1906 | </programlisting> | |
0a8a0fad | 1907 | |
9e35b3de ZJS |
1908 | <programlisting># /etc/systemd/network/30-bond1.netdev |
1909 | [NetDev] | |
1910 | Name=bond1 | |
1911 | Kind=bond | |
1912 | </programlisting> | |
0a8a0fad | 1913 | |
301a21a8 | 1914 | <programlisting># /etc/systemd/network/30-bond1-dev1.network |
9e35b3de ZJS |
1915 | [Match] |
1916 | MACAddress=52:54:00:e9:64:41 | |
0a8a0fad TG |
1917 | |
1918 | [Network] | |
9e35b3de ZJS |
1919 | Bond=bond1 |
1920 | </programlisting> | |
d94facdc | 1921 | |
301a21a8 | 1922 | <programlisting># /etc/systemd/network/30-bond1-dev2.network |
9e35b3de ZJS |
1923 | [Match] |
1924 | MACAddress=52:54:00:e9:64:42 | |
d94facdc MH |
1925 | |
1926 | [Network] | |
9e35b3de | 1927 | Bond=bond1 |
6cb955c6 | 1928 | </programlisting> |
9e35b3de ZJS |
1929 | |
1930 | <para>This will create a bond device <literal>bond1</literal> and enslave the two | |
1931 | devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP | |
1932 | will be used to acquire an address.</para> | |
6cb955c6 AR |
1933 | </example> |
1934 | ||
1935 | <example> | |
9e35b3de ZJS |
1936 | <title>Virtual Routing and Forwarding (VRF)</title> |
1937 | <para>Add the <literal>bond1</literal> interface to the VRF master interface | |
1938 | <literal>vrf1</literal>. This will redirect routes generated on this interface to be | |
11d38b90 AR |
1939 | within the routing table defined during VRF creation. For kernels before 4.8 traffic |
1940 | won't be redirected towards the VRFs routing table unless specific ip-rules are added. | |
1941 | </para> | |
9e35b3de ZJS |
1942 | <programlisting># /etc/systemd/network/25-vrf.network |
1943 | [Match] | |
6cb955c6 AR |
1944 | Name=bond1 |
1945 | ||
1946 | [Network] | |
9e35b3de | 1947 | VRF=vrf1 |
d94facdc MH |
1948 | </programlisting> |
1949 | </example> | |
1950 | ||
42125eda SS |
1951 | <example> |
1952 | <title>MacVTap</title> | |
1953 | <para>This brings up a network interface <literal>macvtap-test</literal> | |
1954 | and attaches it to <literal>enp0s25</literal>.</para> | |
83ddf5d3 | 1955 | <programlisting># /usr/lib/systemd/network/25-macvtap.network |
42125eda SS |
1956 | [Match] |
1957 | Name=enp0s25 | |
1958 | ||
1959 | [Network] | |
1960 | MACVTAP=macvtap-test | |
1961 | </programlisting> | |
1962 | </example> | |
798d3a52 ZJS |
1963 | </refsect1> |
1964 | ||
1965 | <refsect1> | |
1966 | <title>See Also</title> | |
1967 | <para> | |
1968 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
f41b446a | 1969 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
798d3a52 | 1970 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
aaa297d4 LP |
1971 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
1972 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
798d3a52 ZJS |
1973 | </para> |
1974 | </refsect1> | |
eac684ef TG |
1975 | |
1976 | </refentry> |