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