]>
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 | |
b1e91af8 | 60 | directories take precedence over the main network 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 | 92 | <para>A whitespace-separated list of hardware addresses. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example below. |
b1e91af8 | 93 | This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list |
9310bf4b YW |
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 | |
c382025a | 116 | exposed by the udev property <literal>ID_NET_DRIVER</literal> |
798d3a52 ZJS |
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> | |
44005bfb YW |
141 | <varlistentry> |
142 | <term><varname>Property=</varname></term> | |
143 | <listitem> | |
144 | <para>A whitespace-separated list of udev property name with its value after a equal | |
145 | (<literal>=</literal>). If multiple properties are specified, the test results are ANDed. | |
146 | If the list is prefixed with a "!", the test is inverted. If a value contains white | |
147 | spaces, then please quote whole key and value pair. If a value contains quotation, then | |
148 | please escape the quotation with <literal>\</literal>.</para> | |
149 | ||
150 | <para>Example: if a .network file has the following: | |
151 | <programlisting>Property=ID_MODEL_ID=9999 "ID_VENDOR_FROM_DATABASE=vendor name" "KEY=with \"quotation\""</programlisting> | |
152 | then, the .network file matches only when an interface has all the above three properties. | |
153 | </para> | |
154 | </listitem> | |
155 | </varlistentry> | |
78404d22 | 156 | <varlistentry> |
1bcefad9 | 157 | <term><varname>WLANInterfaceType=</varname></term> |
78404d22 YW |
158 | <listitem> |
159 | <para>A whitespace-separated list of wireless network type. Supported values are | |
160 | <literal>ad-hoc</literal>, <literal>station</literal>, <literal>ap</literal>, | |
161 | <literal>ap-vlan</literal>, <literal>wds</literal>, <literal>monitor</literal>, | |
162 | <literal>mesh-point</literal>, <literal>p2p-client</literal>, <literal>p2p-go</literal>, | |
163 | <literal>p2p-device</literal>, <literal>ocb</literal>, and <literal>nan</literal>. If the | |
164 | list is prefixed with a "!", the test is inverted. | |
165 | </para> | |
166 | </listitem> | |
167 | </varlistentry> | |
8d968fdd YW |
168 | <varlistentry> |
169 | <term><varname>SSID=</varname></term> | |
170 | <listitem> | |
171 | <para>A whitespace-separated list of shell-style globs matching the SSID of the currently | |
172 | connected wireless LAN. If the list is prefixed with a "!", the test is inverted. | |
173 | </para> | |
174 | </listitem> | |
175 | </varlistentry> | |
277ba8d1 YW |
176 | <varlistentry> |
177 | <term><varname>BSSID=</varname></term> | |
178 | <listitem> | |
179 | <para>A whitespace-separated list of hardware address of the currently connected wireless | |
180 | LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example in | |
181 | <varname>MACAddress=</varname>. This option may appear more than one, in which case the | |
182 | lists are merged. If the empty string is assigned to this option, the list of BSSID defined | |
183 | prior to this is reset.</para> | |
184 | </listitem> | |
185 | </varlistentry> | |
798d3a52 ZJS |
186 | <varlistentry> |
187 | <term><varname>Host=</varname></term> | |
188 | <listitem> | |
d689bbca YW |
189 | <para>Matches against the hostname or machine ID of the host. See |
190 | <literal>ConditionHost=</literal> in | |
798d3a52 | 191 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
d689bbca YW |
192 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. |
193 | If an empty string is assigned, then previously assigned value is cleared. | |
798d3a52 ZJS |
194 | </para> |
195 | </listitem> | |
196 | </varlistentry> | |
197 | <varlistentry> | |
198 | <term><varname>Virtualization=</varname></term> | |
199 | <listitem> | |
d689bbca YW |
200 | <para>Checks whether the system is executed in a virtualized environment and optionally test |
201 | whether it is a specific implementation. See <literal>ConditionVirtualization=</literal> in | |
798d3a52 | 202 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
d689bbca YW |
203 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. |
204 | If an empty string is assigned, then previously assigned value is cleared. | |
798d3a52 ZJS |
205 | </para> |
206 | </listitem> | |
207 | </varlistentry> | |
208 | <varlistentry> | |
209 | <term><varname>KernelCommandLine=</varname></term> | |
210 | <listitem> | |
d689bbca | 211 | <para>Checks whether a specific kernel command line option is set. See |
798d3a52 ZJS |
212 | <literal>ConditionKernelCommandLine=</literal> in |
213 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
d689bbca YW |
214 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. |
215 | If an empty string is assigned, then previously assigned value is cleared. | |
798d3a52 ZJS |
216 | </para> |
217 | </listitem> | |
218 | </varlistentry> | |
5022f08a LP |
219 | <varlistentry> |
220 | <term><varname>KernelVersion=</varname></term> | |
221 | <listitem> | |
d689bbca YW |
222 | <para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a |
223 | certain expression. See <literal>ConditionKernelVersion=</literal> in | |
224 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
225 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. | |
226 | If an empty string is assigned, then previously assigned value is cleared. | |
5022f08a LP |
227 | </para> |
228 | </listitem> | |
229 | </varlistentry> | |
798d3a52 ZJS |
230 | <varlistentry> |
231 | <term><varname>Architecture=</varname></term> | |
232 | <listitem> | |
d689bbca YW |
233 | <para>Checks whether the system is running on a specific architecture. See |
234 | <literal>ConditionArchitecture=</literal> in | |
798d3a52 | 235 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
d689bbca YW |
236 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. |
237 | If an empty string is assigned, then previously assigned value is cleared. | |
798d3a52 ZJS |
238 | </para> |
239 | </listitem> | |
240 | </varlistentry> | |
241 | </variablelist> | |
242 | ||
243 | </refsect1> | |
244 | ||
245 | <refsect1> | |
246 | <title>[Link] Section Options</title> | |
247 | ||
248 | <para> The <literal>[Link]</literal> section accepts the following keys:</para> | |
249 | ||
250 | <variablelist class='network-directives'> | |
251 | <varlistentry> | |
252 | <term><varname>MACAddress=</varname></term> | |
253 | <listitem> | |
de25aae1 | 254 | <para>The hardware address to set for the device.</para> |
798d3a52 ZJS |
255 | </listitem> |
256 | </varlistentry> | |
257 | <varlistentry> | |
258 | <term><varname>MTUBytes=</varname></term> | |
259 | <listitem> | |
260 | <para>The maximum transmission unit in bytes to set for the | |
261 | device. The usual suffixes K, M, G, are supported and are | |
262 | understood to the base of 1024.</para> | |
439689c6 SS |
263 | <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen |
264 | below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para> | |
798d3a52 ZJS |
265 | </listitem> |
266 | </varlistentry> | |
99d2baa2 SS |
267 | <varlistentry> |
268 | <term><varname>ARP=</varname></term> | |
269 | <listitem> | |
9b6ffef3 YW |
270 | <para>Takes a boolean. If set to true, the ARP (low-level Address Resolution Protocol) |
271 | for this interface is enabled. When unset, the kernel's default will be used.</para> | |
99d2baa2 SS |
272 | <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual |
273 | interfaces atop a single lower-level physical interface, which will then only serve as a | |
274 | link/"bridge" device aggregating traffic to the same physical link and not participate in | |
275 | the network otherwise.</para> | |
276 | </listitem> | |
277 | </varlistentry> | |
e6ebebbe SS |
278 | <varlistentry> |
279 | <term><varname>Multicast=</varname></term> | |
280 | <listitem> | |
9b6ffef3 | 281 | <para>Takes a boolean. If set to true, the multicast flag on the device is enabled.</para> |
866e6b7a SS |
282 | </listitem> |
283 | </varlistentry> | |
284 | <varlistentry> | |
285 | <term><varname>AllMulticast=</varname></term> | |
286 | <listitem> | |
9b6ffef3 | 287 | <para>Takes a boolean. If set to true, the driver retrieves all multicast packets from the network. |
866e6b7a | 288 | This happens when multicast routing is enabled.</para> |
e6ebebbe SS |
289 | </listitem> |
290 | </varlistentry> | |
a09dc546 DM |
291 | <varlistentry> |
292 | <term><varname>Unmanaged=</varname></term> | |
293 | <listitem> | |
9b6ffef3 | 294 | <para>Takes a boolean. When <literal>yes</literal>, no attempts are |
a09dc546 DM |
295 | made to bring up or configure matching links, equivalent to |
296 | when there are no matching network files. Defaults to | |
297 | <literal>no</literal>.</para> | |
298 | <para>This is useful for preventing later matching network | |
299 | files from interfering with certain interfaces that are fully | |
300 | controlled by other applications.</para> | |
301 | </listitem> | |
302 | </varlistentry> | |
c1a38904 MTL |
303 | <varlistentry> |
304 | <term><varname>RequiredForOnline=</varname></term> | |
305 | <listitem> | |
8d6082e4 YW |
306 | <para>Takes a boolean or operational state. Please see |
307 | <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
308 | for possible operational states. When <literal>yes</literal>, the network is deemed required when | |
309 | determining whether the system is online when running | |
310 | <command>systemd-networkd-wait-online</command>. When <literal>no</literal>, the network is ignored | |
311 | when checking for online state. When an operational state is set, <literal>yes</literal> is implied, | |
312 | and this controls the operational state required for the network interface to be considered online. | |
313 | Defaults to <literal>yes</literal>.</para> | |
314 | ||
c1a38904 MTL |
315 | <para>The network will be brought up normally in all cases, but in |
316 | the event that there is no address being assigned by DHCP or the | |
317 | cable is not plugged in, the link will simply remain offline and be | |
8d6082e4 | 318 | skipped automatically by <command>systemd-networkd-wait-online</command> |
ca92fe36 | 319 | if <literal>RequiredForOnline=no</literal>.</para> |
c1a38904 MTL |
320 | </listitem> |
321 | </varlistentry> | |
798d3a52 ZJS |
322 | </variablelist> |
323 | </refsect1> | |
324 | ||
325 | <refsect1> | |
326 | <title>[Network] Section Options</title> | |
327 | ||
328 | <para>The <literal>[Network]</literal> section accepts the following keys:</para> | |
329 | ||
330 | <variablelist class='network-directives'> | |
331 | <varlistentry> | |
332 | <term><varname>Description=</varname></term> | |
333 | <listitem> | |
334 | <para>A description of the device. This is only used for | |
335 | presentation purposes.</para> | |
336 | </listitem> | |
337 | </varlistentry> | |
338 | <varlistentry> | |
339 | <term><varname>DHCP=</varname></term> | |
340 | <listitem> | |
ad943783 | 341 | <para>Enables DHCPv4 and/or DHCPv6 client support. Accepts |
798d3a52 | 342 | <literal>yes</literal>, <literal>no</literal>, |
c702bd3b LY |
343 | <literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults |
344 | to <literal>no</literal>.</para> | |
e88d8021 | 345 | |
f5a8c43f | 346 | <para>Note that DHCPv6 will by default be triggered by Router |
7f3fdb7f | 347 | Advertisement, if that is enabled, regardless of this parameter. |
f5a8c43f TG |
348 | By enabling DHCPv6 support explicitly, the DHCPv6 client will |
349 | be started regardless of the presence of routers on the link, | |
350 | or what flags the routers pass. See | |
f921f573 | 351 | <literal>IPv6AcceptRA=</literal>.</para> |
f5a8c43f TG |
352 | |
353 | <para>Furthermore, note that by default the domain name | |
e88d8021 ZJS |
354 | specified through DHCP is not used for name resolution. |
355 | See option <option>UseDomains=</option> below.</para> | |
2ef322fc | 356 | |
4f7331a8 YW |
357 | <para>See the <literal>[DHCPv4]</literal> or <literal>[DHCPv6]</literal> section below for |
358 | further configuration options for the DHCP client support.</para> | |
798d3a52 ZJS |
359 | </listitem> |
360 | </varlistentry> | |
361 | <varlistentry> | |
362 | <term><varname>DHCPServer=</varname></term> | |
363 | <listitem> | |
68b7f7ac | 364 | <para>Takes a boolean. If set to <literal>yes</literal>, DHCPv4 server will be started. Defaults |
ad943783 LP |
365 | to <literal>no</literal>. Further settings for the DHCP |
366 | server may be set in the <literal>[DHCPServer]</literal> | |
367 | section described below.</para> | |
798d3a52 ZJS |
368 | </listitem> |
369 | </varlistentry> | |
370 | <varlistentry> | |
56fd6bf7 | 371 | <term><varname>LinkLocalAddressing=</varname></term> |
798d3a52 | 372 | <listitem> |
85fc09c9 | 373 | <para>Enables link-local address autoconfiguration. Accepts <literal>yes</literal>, |
8bc17bb3 SS |
374 | <literal>no</literal>, <literal>ipv4</literal>, <literal>ipv6</literal>, |
375 | <literal>fallback</literal>, or <literal>ipv4-fallback</literal>. If | |
376 | <literal>fallback</literal> or <literal>ipv4-fallback</literal> is specified, then an IPv4 | |
377 | link-local address is configured only when DHCPv4 fails. If <literal>fallback</literal>, | |
378 | an IPv6 link-local address is always configured, and if <literal>ipv4-fallback</literal>, | |
379 | the address is not configured. Note that, the fallback mechanism works only when DHCPv4 | |
380 | client is enabled, that is, it requires <literal>DHCP=yes</literal> or | |
381 | <literal>DHCP=ipv4</literal>. If <varname>Bridge=</varname> is set, defaults to | |
382 | <literal>no</literal>, and if not, defaults to <literal>ipv6</literal>. | |
383 | </para> | |
798d3a52 ZJS |
384 | </listitem> |
385 | </varlistentry> | |
386 | <varlistentry> | |
387 | <term><varname>IPv4LLRoute=</varname></term> | |
388 | <listitem> | |
9b6ffef3 | 389 | <para>Takes a boolean. If set to true, sets up the route needed for |
798d3a52 ZJS |
390 | non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults |
391 | to false. | |
392 | </para> | |
393 | </listitem> | |
394 | </varlistentry> | |
5d5003ab YW |
395 | <varlistentry> |
396 | <term><varname>DefaultRouteOnDevice=</varname></term> | |
397 | <listitem> | |
398 | <para>Takes a boolean. If set to true, sets up the default route bound to the interface. | |
399 | Defaults to false. This is useful when creating routes on point-to-point interfaces. | |
400 | This is equivalent to e.g. the following. | |
401 | <programlisting>ip route add default dev veth99</programlisting></para> | |
402 | </listitem> | |
403 | </varlistentry> | |
798d3a52 | 404 | <varlistentry> |
113bfde1 TG |
405 | <term><varname>IPv6Token=</varname></term> |
406 | <listitem> | |
407 | <para>An IPv6 address with the top 64 bits unset. When set, indicates the | |
eb142d8e TG |
408 | 64-bit interface part of SLAAC IPv6 addresses for this link. Note that |
409 | the token is only ever used for SLAAC, and not for DHCPv6 addresses, even | |
3708bd46 | 410 | in the case DHCP is requested by router advertisement. By default, the |
eb142d8e | 411 | token is autogenerated.</para> |
113bfde1 TG |
412 | </listitem> |
413 | </varlistentry> | |
414 | <varlistentry> | |
798d3a52 ZJS |
415 | <term><varname>LLMNR=</varname></term> |
416 | <listitem> | |
9b6ffef3 | 417 | <para>Takes a boolean or <literal>resolve</literal>. When true, |
aaa297d4 LP |
418 | enables <ulink |
419 | url="https://tools.ietf.org/html/rfc4795">Link-Local | |
420 | Multicast Name Resolution</ulink> on the link. When set to | |
421 | <literal>resolve</literal>, only resolution is enabled, | |
422 | but not host registration and announcement. Defaults to | |
423 | true. This setting is read by | |
424 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
425 | </listitem> | |
426 | </varlistentry> | |
427 | <varlistentry> | |
428 | <term><varname>MulticastDNS=</varname></term> | |
429 | <listitem> | |
9b6ffef3 | 430 | <para>Takes a boolean or <literal>resolve</literal>. When true, |
aaa297d4 LP |
431 | enables <ulink |
432 | url="https://tools.ietf.org/html/rfc6762">Multicast | |
433 | DNS</ulink> support on the link. When set to | |
434 | <literal>resolve</literal>, only resolution is enabled, | |
435 | but not host or service registration and | |
436 | announcement. Defaults to false. This setting is read by | |
437 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
438 | </listitem> |
439 | </varlistentry> | |
30e59c84 | 440 | <varlistentry> |
c9299be2 | 441 | <term><varname>DNSOverTLS=</varname></term> |
30e59c84 | 442 | <listitem> |
4310bfc2 IT |
443 | <para>Takes a boolean or <literal>opportunistic</literal>. |
444 | When true, enables | |
30e59c84 IT |
445 | <ulink |
446 | url="https://tools.ietf.org/html/rfc7858">DNS-over-TLS</ulink> | |
4310bfc2 IT |
447 | support on the link. |
448 | When set to <literal>opportunistic</literal>, compatibility with | |
449 | non-DNS-over-TLS servers is increased, by automatically | |
450 | turning off DNS-over-TLS servers in this case. | |
451 | This option defines a per-interface setting for | |
30e59c84 | 452 | <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s |
c9299be2 | 453 | global <varname>DNSOverTLS=</varname> option. Defaults to |
30e59c84 IT |
454 | false. This setting is read by |
455 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
456 | </listitem> | |
457 | </varlistentry> | |
ad6c0475 LP |
458 | <varlistentry> |
459 | <term><varname>DNSSEC=</varname></term> | |
460 | <listitem> | |
9b6ffef3 | 461 | <para>Takes a boolean. or |
ad6c0475 LP |
462 | <literal>allow-downgrade</literal>. When true, enables |
463 | <ulink | |
464 | url="https://tools.ietf.org/html/rfc4033">DNSSEC</ulink> | |
465 | DNS validation support on the link. When set to | |
466 | <literal>allow-downgrade</literal>, compatibility with | |
467 | non-DNSSEC capable networks is increased, by automatically | |
785889e5 | 468 | turning off DNSSEC in this case. This option defines a |
ad6c0475 LP |
469 | per-interface setting for |
470 | <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>'s | |
471 | global <varname>DNSSEC=</varname> option. Defaults to | |
472 | false. This setting is read by | |
473 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
474 | </listitem> | |
475 | </varlistentry> | |
8a516214 LP |
476 | <varlistentry> |
477 | <term><varname>DNSSECNegativeTrustAnchors=</varname></term> | |
478 | <listitem><para>A space-separated list of DNSSEC negative | |
479 | trust anchor domains. If specified and DNSSEC is enabled, | |
480 | look-ups done via the interface's DNS server will be subject | |
481 | to the list of negative trust anchors, and not require | |
482 | authentication for the specified domains, or anything below | |
483 | it. Use this to disable DNSSEC authentication for specific | |
484 | private domains, that cannot be proven valid using the | |
485 | Internet DNS hierarchy. Defaults to the empty list. This | |
486 | setting is read by | |
487 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
488 | </listitem> | |
489 | </varlistentry> | |
798d3a52 ZJS |
490 | <varlistentry> |
491 | <term><varname>LLDP=</varname></term> | |
492 | <listitem> | |
da6c766d LP |
493 | <para>Controls support for Ethernet LLDP packet reception. LLDP is a link-layer protocol commonly |
494 | implemented on professional routers and bridges which announces which physical port a system is connected | |
495 | to, as well as other related data. Accepts a boolean or the special value | |
34437b4f LP |
496 | <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP |
497 | neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers | |
498 | is collected and LLDP data about other types of devices ignored (such as stations, telephones and | |
7cececb2 | 499 | others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use |
34437b4f | 500 | <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the |
da6c766d LP |
501 | collected neighbor data. LLDP is only available on Ethernet links. See <varname>EmitLLDP=</varname> below |
502 | for enabling LLDP packet emission from the local system. | |
798d3a52 ZJS |
503 | </para> |
504 | </listitem> | |
505 | </varlistentry> | |
da6c766d LP |
506 | <varlistentry> |
507 | <term><varname>EmitLLDP=</varname></term> | |
508 | <listitem> | |
7272b25e LP |
509 | <para>Controls support for Ethernet LLDP packet emission. Accepts a boolean parameter or the special values |
510 | <literal>nearest-bridge</literal>, <literal>non-tpmr-bridge</literal> and | |
511 | <literal>customer-bridge</literal>. Defaults to false, which turns off LLDP packet emission. If not false, | |
512 | a short LLDP packet with information about the local system is sent out in regular intervals on the | |
513 | link. The LLDP packet will contain information about the local host name, the local machine ID (as stored | |
514 | in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>) and the | |
da6c766d LP |
515 | local interface name, as well as the pretty hostname of the system (as set in |
516 | <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>). LLDP | |
7272b25e LP |
517 | emission is only available on Ethernet links. Note that this setting passes data suitable for |
518 | identification of host to the network and should thus not be enabled on untrusted networks, where such | |
519 | identification data should not be made available. Use this option to permit other systems to identify on | |
520 | which interfaces they are connected to this system. The three special values control propagation of the | |
521 | LLDP packets. The <literal>nearest-bridge</literal> setting permits propagation only to the nearest | |
522 | connected bridge, <literal>non-tpmr-bridge</literal> permits propagation across Two-Port MAC Relays, but | |
523 | not any other bridges, and <literal>customer-bridge</literal> permits propagation until a customer bridge | |
524 | is reached. For details about these concepts, see <ulink | |
6a1bae83 | 525 | url="https://standards.ieee.org/findstds/standard/802.1AB-2016.html">IEEE 802.1AB-2016</ulink>. Note that |
7272b25e LP |
526 | configuring this setting to true is equivalent to <literal>nearest-bridge</literal>, the recommended and |
527 | most restricted level of propagation. See <varname>LLDP=</varname> above for an option to enable LLDP | |
528 | reception.</para> | |
da6c766d LP |
529 | </listitem> |
530 | </varlistentry> | |
0d4ad91d AR |
531 | <varlistentry> |
532 | <term><varname>BindCarrier=</varname></term> | |
533 | <listitem> | |
2ae7505f TG |
534 | <para>A link name or a list of link names. When set, controls the behavior of the current |
535 | link. When all links in the list are in an operational down state, the current link is brought | |
536 | down. When at least one link has carrier, the current interface is brought up. | |
0d4ad91d AR |
537 | </para> |
538 | </listitem> | |
539 | </varlistentry> | |
798d3a52 ZJS |
540 | <varlistentry> |
541 | <term><varname>Address=</varname></term> | |
542 | <listitem> | |
543 | <para>A static IPv4 or IPv6 address and its prefix length, | |
544 | separated by a <literal>/</literal> character. Specify | |
545 | this key more than once to configure several addresses. | |
546 | The format of the address must be as described in | |
3ba3a79d | 547 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
548 | This is a short-hand for an [Address] section only |
549 | containing an Address key (see below). This option may be | |
550 | specified more than once. | |
551 | </para> | |
552 | ||
e6ef3a13 YW |
553 | <para>If the specified address is <literal>0.0.0.0</literal> (for IPv4) or <literal>::</literal> |
554 | (for IPv6), a new address range of the requested size is automatically allocated from a | |
555 | system-wide pool of unused ranges. Note that the prefix length must be equal or larger than 8 for | |
556 | IPv4, and 64 for IPv6. The allocated range is checked against all current network interfaces and | |
557 | all known network configuration files to avoid address range conflicts. The default system-wide | |
558 | 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. | |
559 | This functionality is useful to manage a large number of dynamically created network interfaces | |
560 | with the same network configuration and automatic address range assignment.</para> | |
798d3a52 ZJS |
561 | |
562 | </listitem> | |
563 | </varlistentry> | |
564 | <varlistentry> | |
565 | <term><varname>Gateway=</varname></term> | |
566 | <listitem> | |
567 | <para>The gateway address, which must be in the format | |
568 | described in | |
3ba3a79d | 569 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 ZJS |
570 | This is a short-hand for a [Route] section only containing |
571 | a Gateway key. This option may be specified more than | |
572 | once.</para> | |
573 | </listitem> | |
574 | </varlistentry> | |
575 | <varlistentry> | |
576 | <term><varname>DNS=</varname></term> | |
577 | <listitem> | |
578 | <para>A DNS server address, which must be in the format | |
579 | described in | |
3ba3a79d | 580 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
f41b446a | 581 | This option may be specified more than once. This setting is read by |
3df9bec5 | 582 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
583 | </listitem> |
584 | </varlistentry> | |
585 | <varlistentry> | |
586 | <term><varname>Domains=</varname></term> | |
587 | <listitem> | |
2df22529 ZJS |
588 | <para>A list of domains which should be resolved using the DNS servers on this link. Each item in the list |
589 | should be a domain name, optionally prefixed with a tilde (<literal>~</literal>). The domains with the | |
590 | prefix are called "routing-only domains". The domains without the prefix are called "search domains" and | |
591 | are first used as search suffixes for extending single-label host names (host names containing no dots) to | |
592 | become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface, | |
593 | each of the specified search domains are appended to it in turn, converting it into a fully qualified | |
594 | domain name, until one of them may be successfully resolved.</para> | |
595 | ||
596 | <para>Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names | |
597 | ending in those domains (hence also single label names, if any "search domains" are listed), are routed to | |
598 | the DNS servers configured for this interface. The domain routing logic is particularly useful on | |
599 | multi-homed hosts with DNS servers serving particular private DNS zones on each interface.</para> | |
600 | ||
601 | <para>The "routing-only" domain <literal>~.</literal> (the tilde indicating definition of a routing domain, | |
602 | the dot referring to the DNS root domain which is the implied suffix of all valid DNS names) has special | |
603 | effect. It causes all DNS traffic which does not match another configured domain routing entry to be routed | |
604 | to DNS servers specified for this interface. This setting is useful to prefer a certain set of DNS servers | |
605 | if a link on which they are connected is available.</para> | |
3df9bec5 LP |
606 | |
607 | <para>This setting is read by | |
2df22529 ZJS |
608 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
609 | "Search domains" correspond to the <varname>domain</varname> and <varname>search</varname> entries in | |
98e9d710 | 610 | <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
2df22529 ZJS |
611 | Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain |
612 | name servers limited to a specific link.</para> | |
798d3a52 ZJS |
613 | </listitem> |
614 | </varlistentry> | |
7ece6f58 LP |
615 | <varlistentry> |
616 | <term><varname>DNSDefaultRoute=</varname></term> | |
617 | <listitem> | |
618 | <para>Takes a boolean argument. If true, this link's configured DNS servers are used for resolving domain | |
619 | names that do not match any link's configured <varname>Domains=</varname> setting. If false, this link's | |
620 | configured DNS servers are never used for such domains, and are exclusively used for resolving names that | |
621 | match at least one of the domains configured on this link. If not specified defaults to an automatic mode: | |
622 | queries not matching any link's configured domains will be routed to this link if it has no routing-only | |
623 | domains configured.</para> | |
624 | </listitem> | |
625 | </varlistentry> | |
798d3a52 ZJS |
626 | <varlistentry> |
627 | <term><varname>NTP=</varname></term> | |
628 | <listitem> | |
f41b446a | 629 | <para>An NTP server address. This option may be specified more than once. This setting is read by |
3df9bec5 | 630 | <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> |
798d3a52 ZJS |
631 | </listitem> |
632 | </varlistentry> | |
633 | <varlistentry> | |
634 | <term><varname>IPForward=</varname></term> | |
765afd5c LP |
635 | <listitem><para>Configures IP packet forwarding for the |
636 | system. If enabled, incoming packets on any network | |
637 | interface will be forwarded to any other interfaces | |
9b6ffef3 YW |
638 | according to the routing table. Takes a boolean, |
639 | or the values <literal>ipv4</literal> or | |
765afd5c LP |
640 | <literal>ipv6</literal>, which only enable IP packet |
641 | forwarding for the specified address family. This controls | |
642 | the <filename>net.ipv4.ip_forward</filename> and | |
643 | <filename>net.ipv6.conf.all.forwarding</filename> sysctl | |
644 | options of the network interface (see <ulink | |
4046d836 LP |
645 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> |
646 | for details about sysctl options). Defaults to | |
647 | <literal>no</literal>.</para> | |
648 | ||
765afd5c LP |
649 | <para>Note: this setting controls a global kernel option, |
650 | and does so one way only: if a network that has this setting | |
651 | enabled is set up the global setting is turned on. However, | |
652 | it is never turned off again, even after all networks with | |
653 | this setting enabled are shut down again.</para> | |
654 | ||
655 | <para>To allow IP packet forwarding only between specific | |
656 | network interfaces use a firewall.</para> | |
4046d836 | 657 | </listitem> |
798d3a52 ZJS |
658 | </varlistentry> |
659 | <varlistentry> | |
660 | <term><varname>IPMasquerade=</varname></term> | |
661 | <listitem><para>Configures IP masquerading for the network | |
b938cb90 | 662 | interface. If enabled, packets forwarded from the network |
798d3a52 ZJS |
663 | interface will be appear as coming from the local host. |
664 | Takes a boolean argument. Implies | |
5c82dd13 | 665 | <varname>IPForward=ipv4</varname>. Defaults to |
4046d836 | 666 | <literal>no</literal>.</para></listitem> |
798d3a52 | 667 | </varlistentry> |
a46e37cb SS |
668 | <varlistentry> |
669 | <term><varname>IPv6PrivacyExtensions=</varname></term> | |
1f0d9695 LP |
670 | <listitem><para>Configures use of stateless temporary |
671 | addresses that change over time (see <ulink | |
672 | url="https://tools.ietf.org/html/rfc4941">RFC 4941</ulink>, | |
673 | Privacy Extensions for Stateless Address Autoconfiguration | |
674 | in IPv6). Takes a boolean or the special values | |
675 | <literal>prefer-public</literal> and | |
b938cb90 | 676 | <literal>kernel</literal>. When true, enables the privacy |
1f0d9695 | 677 | extensions and prefers temporary addresses over public |
b938cb90 | 678 | addresses. When <literal>prefer-public</literal>, enables the |
1f0d9695 LP |
679 | privacy extensions, but prefers public addresses over |
680 | temporary addresses. When false, the privacy extensions | |
b938cb90 | 681 | remain disabled. When <literal>kernel</literal>, the kernel's |
1f0d9695 | 682 | default setting will be left in place. Defaults to |
a46e37cb SS |
683 | <literal>no</literal>.</para></listitem> |
684 | </varlistentry> | |
941d0aa8 | 685 | <varlistentry> |
f921f573 | 686 | <term><varname>IPv6AcceptRA=</varname></term> |
b3454e1e YW |
687 | <listitem><para>Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support |
688 | for the interface. If true, RAs are accepted; if false, RAs are ignored, independently of the | |
689 | local forwarding state. When RAs are accepted, they may trigger the start of the DHCPv6 | |
690 | client if the relevant flags are set in the RA data, or if no routers are found on the link.</para> | |
1e7a0e21 LP |
691 | |
692 | <para>Further settings for the IPv6 RA support may be configured in the | |
f921f573 | 693 | <literal>[IPv6AcceptRA]</literal> section, see below.</para> |
1e7a0e21 LP |
694 | |
695 | <para>Also see <ulink | |
696 | url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel | |
697 | documentation regarding <literal>accept_ra</literal>, but note that systemd's setting of | |
698 | <constant>1</constant> (i.e. true) corresponds to kernel's setting of <constant>2</constant>.</para> | |
c4a05aa1 | 699 | |
b3454e1e YW |
700 | <para>Note that kernel's implementation of the IPv6 RA protocol is always disabled, |
701 | regardless of this setting. If this option is enabled, a userspace implementation of the IPv6 | |
702 | RA protocol is used, and the kernel's own implementation remains disabled, since | |
703 | <command>systemd-networkd</command> needs to know all details supplied in the advertisements, | |
704 | and these are not available from the kernel if the kernel's own implementation is used.</para> | |
ebf98081 | 705 | </listitem> |
941d0aa8 | 706 | </varlistentry> |
44de7fb1 SS |
707 | <varlistentry> |
708 | <term><varname>IPv6DuplicateAddressDetection=</varname></term> | |
a8eaaee7 | 709 | <listitem><para>Configures the amount of IPv6 Duplicate |
025314d9 | 710 | Address Detection (DAD) probes to send. When unset, the kernel's default will be used. |
44de7fb1 SS |
711 | </para></listitem> |
712 | </varlistentry> | |
a86cba89 SS |
713 | <varlistentry> |
714 | <term><varname>IPv6HopLimit=</varname></term> | |
715 | <listitem><para>Configures IPv6 Hop Limit. For each router that | |
716 | forwards the packet, the hop limit is decremented by 1. When the | |
717 | hop limit field reaches zero, the packet is discarded. | |
025314d9 | 718 | When unset, the kernel's default will be used. |
a86cba89 SS |
719 | </para></listitem> |
720 | </varlistentry> | |
23d8b221 | 721 | <varlistentry> |
8f9a206b | 722 | <term><varname>IPv4ProxyARP=</varname></term> |
9b6ffef3 | 723 | <listitem><para>Takes a boolean. Configures proxy ARP for IPv4. Proxy ARP is the technique in which one host, |
23d8b221 SS |
724 | usually a router, answers ARP requests intended for another machine. By "faking" its identity, |
725 | the router accepts responsibility for routing packets to the "real" destination. (see <ulink | |
726 | url="https://tools.ietf.org/html/rfc1027">RFC 1027</ulink>. | |
025314d9 | 727 | When unset, the kernel's default will be used. |
23d8b221 SS |
728 | </para></listitem> |
729 | </varlistentry> | |
a0e5c15d | 730 | <varlistentry> |
465dfe59 | 731 | <term><varname>IPv6ProxyNDP=</varname></term> |
9b6ffef3 | 732 | <listitem><para>Takes a boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery |
465dfe59 HV |
733 | Protocol) is a technique for IPv6 to allow routing of addresses to a different |
734 | destination when peers expect them to be present on a certain physical link. | |
a0e5c15d FK |
735 | In this case a router answers Neighbour Advertisement messages intended for |
736 | another machine by offering its own MAC address as destination. | |
465dfe59 | 737 | Unlike proxy ARP for IPv4, it is not enabled globally, but will only send Neighbour |
a0e5c15d | 738 | Advertisement messages for addresses in the IPv6 neighbor proxy table, |
465dfe59 HV |
739 | which can also be shown by <command>ip -6 neighbour show proxy</command>. |
740 | systemd-networkd will control the per-interface `proxy_ndp` switch for each configured | |
741 | interface depending on this option. | |
025314d9 | 742 | When unset, the kernel's default will be used. |
465dfe59 HV |
743 | </para></listitem> |
744 | </varlistentry> | |
745 | <varlistentry> | |
746 | <term><varname>IPv6ProxyNDPAddress=</varname></term> | |
747 | <listitem><para>An IPv6 address, for which Neighbour Advertisement messages will be | |
748 | proxied. This option may be specified more than once. systemd-networkd will add the | |
749 | <option>IPv6ProxyNDPAddress=</option> entries to the kernel's IPv6 neighbor proxy table. | |
964c4eda | 750 | This option implies <option>IPv6ProxyNDP=yes</option> but has no effect if |
025314d9 | 751 | <option>IPv6ProxyNDP</option> has been set to false. When unset, the kernel's default will be used. |
a0e5c15d FK |
752 | </para></listitem> |
753 | </varlistentry> | |
3f9e0236 PF |
754 | <varlistentry> |
755 | <term><varname>IPv6PrefixDelegation=</varname></term> | |
756 | <listitem><para>Whether to enable or disable Router Advertisement sending on a link. | |
982be97c PF |
757 | Allowed values are <literal>static</literal> which distributes prefixes as defined in |
758 | the <literal>[IPv6PrefixDelegation]</literal> and any <literal>[IPv6Prefix]</literal> | |
759 | sections, <literal>dhcpv6</literal> which requests prefixes using a DHCPv6 client | |
760 | configured for another link and any values configured in the | |
761 | <literal>[IPv6PrefixDelegation]</literal> section while ignoring all static prefix | |
762 | configuration sections, <literal>yes</literal> which uses both static configuration | |
763 | and DHCPv6, and <literal>false</literal> which turns off IPv6 prefix delegation | |
764 | altogether. Defaults to <literal>false</literal>. See the | |
765 | <literal>[IPv6PrefixDelegation]</literal> and the <literal>[IPv6Prefix]</literal> | |
766 | sections for more configuration options. | |
3f9e0236 PF |
767 | </para></listitem> |
768 | </varlistentry> | |
11102cba SS |
769 | <varlistentry> |
770 | <term><varname>IPv6MTUBytes=</varname></term> | |
771 | <listitem><para>Configures IPv6 maximum transmission unit (MTU). | |
025314d9 | 772 | An integer greater than or equal to 1280 bytes. When unset, the kernel's default will be used. |
11102cba SS |
773 | </para></listitem> |
774 | </varlistentry> | |
798d3a52 ZJS |
775 | <varlistentry> |
776 | <term><varname>Bridge=</varname></term> | |
777 | <listitem> | |
9e35b3de ZJS |
778 | <para>The name of the bridge to add the link to. See |
779 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
780 | </para> | |
798d3a52 ZJS |
781 | </listitem> |
782 | </varlistentry> | |
783 | <varlistentry> | |
784 | <term><varname>Bond=</varname></term> | |
785 | <listitem> | |
9e35b3de ZJS |
786 | <para>The name of the bond to add the link to. See |
787 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
788 | </para> | |
798d3a52 ZJS |
789 | </listitem> |
790 | </varlistentry> | |
6cb955c6 AR |
791 | <varlistentry> |
792 | <term><varname>VRF=</varname></term> | |
793 | <listitem> | |
9e35b3de ZJS |
794 | <para>The name of the VRF to add the link to. See |
795 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
796 | </para> | |
6cb955c6 AR |
797 | </listitem> |
798 | </varlistentry> | |
798d3a52 ZJS |
799 | <varlistentry> |
800 | <term><varname>VLAN=</varname></term> | |
801 | <listitem> | |
9e35b3de ZJS |
802 | <para>The name of a VLAN to create on the link. See |
803 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
804 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
805 | </listitem> |
806 | </varlistentry> | |
2479c4fe | 807 | <varlistentry> |
808 | <term><varname>IPVLAN=</varname></term> | |
809 | <listitem> | |
810 | <para>The name of a IPVLAN to create on the link. See | |
811 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
812 | This option may be specified more than once.</para> | |
813 | </listitem> | |
814 | </varlistentry> | |
798d3a52 ZJS |
815 | <varlistentry> |
816 | <term><varname>MACVLAN=</varname></term> | |
817 | <listitem> | |
9e35b3de ZJS |
818 | <para>The name of a MACVLAN to create on the link. See |
819 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
820 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
821 | </listitem> |
822 | </varlistentry> | |
823 | <varlistentry> | |
824 | <term><varname>VXLAN=</varname></term> | |
825 | <listitem> | |
9e35b3de ZJS |
826 | <para>The name of a VXLAN to create on the link. See |
827 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
828 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
829 | </listitem> |
830 | </varlistentry> | |
831 | <varlistentry> | |
832 | <term><varname>Tunnel=</varname></term> | |
833 | <listitem> | |
9e35b3de ZJS |
834 | <para>The name of a Tunnel to create on the link. See |
835 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
836 | This option may be specified more than once.</para> | |
798d3a52 ZJS |
837 | </listitem> |
838 | </varlistentry> | |
81962db7 SS |
839 | <varlistentry> |
840 | <term><varname>MACsec=</varname></term> | |
841 | <listitem> | |
842 | <para>The name of a MACsec device to create on the link. See | |
843 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
844 | This option may be specified more than once.</para> | |
845 | </listitem> | |
846 | </varlistentry> | |
dd5f3175 SS |
847 | <varlistentry> |
848 | <term><varname>ActiveSlave=</varname></term> | |
849 | <listitem> | |
9b6ffef3 | 850 | <para>Takes a boolean. Specifies the new active slave. The <literal>ActiveSlave=</literal> |
dd5f3175 SS |
851 | option is only valid for following modes: |
852 | <literal>active-backup</literal>, | |
853 | <literal>balance-alb</literal> and | |
854 | <literal>balance-tlb</literal>. Defaults to false. | |
855 | </para> | |
856 | </listitem> | |
857 | </varlistentry> | |
858 | <varlistentry> | |
859 | <term><varname>PrimarySlave=</varname></term> | |
860 | <listitem> | |
9b6ffef3 | 861 | <para>Takes a boolean. Specifies which slave is the primary device. The specified |
dd5f3175 SS |
862 | device will always be the active slave while it is available. Only when the |
863 | primary is off-line will alternate devices be used. This is useful when | |
864 | one slave is preferred over another, e.g. when one slave has higher throughput | |
865 | than another. The <literal>PrimarySlave=</literal> option is only valid for | |
866 | following modes: | |
867 | <literal>active-backup</literal>, | |
868 | <literal>balance-alb</literal> and | |
869 | <literal>balance-tlb</literal>. Defaults to false. | |
870 | </para> | |
871 | </listitem> | |
872 | </varlistentry> | |
dad2d78e SS |
873 | <varlistentry> |
874 | <term><varname>ConfigureWithoutCarrier=</varname></term> | |
875 | <listitem> | |
9b6ffef3 | 876 | <para>Takes a boolean. Allows networkd to configure a specific link even if it has no carrier. |
dad2d78e SS |
877 | Defaults to false. |
878 | </para> | |
879 | </listitem> | |
880 | </varlistentry> | |
93b4dab5 SS |
881 | <varlistentry> |
882 | <term><varname>IgnoreCarrierLoss=</varname></term> | |
883 | <listitem> | |
884 | <para>A boolean. Allows networkd to retain both the static and dynamic configuration of the | |
885 | interface even if its carrier is lost. Defaults to false. | |
886 | </para> | |
887 | </listitem> | |
888 | </varlistentry> | |
98d20a17 | 889 | <varlistentry> |
890 | <term><varname>Xfrm=</varname></term> | |
891 | <listitem> | |
892 | <para>The name of the xfrm to create on the link. See | |
893 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
894 | This option may be specified more than once.</para> | |
895 | </listitem> | |
896 | </varlistentry> | |
c98d78d3 YW |
897 | <varlistentry> |
898 | <term><varname>KeepConfiguration=</varname></term> | |
899 | <listitem> | |
900 | <para>Takes a boolean or one of <literal>static</literal>, <literal>dhcp-on-stop</literal>, | |
901 | <literal>dhcp</literal>. When <literal>static</literal>, <command>systemd-networkd</command> | |
902 | will not drop static addresses and routes on starting up process. When set to | |
903 | <literal>dhcp-on-stop</literal>, <command>systemd-networkd</command> will not drop addresses | |
904 | and routes on stopping the daemon. When <literal>dhcp</literal>, | |
905 | the addresses and routes provided by a DHCP server will never be dropped even if the DHCP | |
906 | lease expires. This is contrary to the DHCP specification, but may be the best choice if, | |
907 | e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal> | |
908 | implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies | |
80060352 ZJS |
909 | <literal>dhcp</literal> and <literal>static</literal>. Defaults to <literal>no</literal>. |
910 | </para> | |
c98d78d3 YW |
911 | </listitem> |
912 | </varlistentry> | |
93b4dab5 | 913 | |
798d3a52 ZJS |
914 | </variablelist> |
915 | ||
916 | </refsect1> | |
917 | ||
918 | <refsect1> | |
919 | <title>[Address] Section Options</title> | |
920 | ||
921 | <para>An <literal>[Address]</literal> section accepts the | |
922 | following keys. Specify several <literal>[Address]</literal> | |
923 | sections to configure several addresses.</para> | |
924 | ||
925 | <variablelist class='network-directives'> | |
926 | <varlistentry> | |
927 | <term><varname>Address=</varname></term> | |
928 | <listitem> | |
4e68898e YW |
929 | <para>As in the <literal>[Network]</literal> section. This key is mandatory. Each |
930 | <literal>[Address]</literal> section can contain one <varname>Address=</varname> setting.</para> | |
798d3a52 ZJS |
931 | </listitem> |
932 | </varlistentry> | |
933 | <varlistentry> | |
934 | <term><varname>Peer=</varname></term> | |
935 | <listitem> | |
936 | <para>The peer address in a point-to-point connection. | |
4e68898e | 937 | Accepts the same format as the <varname>Address=</varname> |
798d3a52 ZJS |
938 | key.</para> |
939 | </listitem> | |
940 | </varlistentry> | |
941 | <varlistentry> | |
942 | <term><varname>Broadcast=</varname></term> | |
943 | <listitem> | |
944 | <para>The broadcast address, which must be in the format | |
945 | described in | |
3ba3a79d | 946 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
798d3a52 | 947 | This key only applies to IPv4 addresses. If it is not |
4e68898e | 948 | given, it is derived from the <varname>Address=</varname> |
798d3a52 ZJS |
949 | key.</para> |
950 | </listitem> | |
951 | </varlistentry> | |
952 | <varlistentry> | |
953 | <term><varname>Label=</varname></term> | |
954 | <listitem> | |
955 | <para>An address label.</para> | |
956 | </listitem> | |
957 | </varlistentry> | |
b5834a0b SS |
958 | <varlistentry> |
959 | <term><varname>PreferredLifetime=</varname></term> | |
960 | <listitem> | |
961 | <para>Allows the default "preferred lifetime" of the address to be overridden. | |
962 | Only three settings are accepted: <literal>forever</literal> or <literal>infinity</literal> | |
963 | which is the default and means that the address never expires, and <literal>0</literal> which means | |
964 | that the address is considered immediately "expired" and will not be used, | |
965 | unless explicitly requested. A setting of PreferredLifetime=0 is useful for | |
966 | addresses which are added to be used only by a specific application, | |
967 | which is then configured to use them explicitly.</para> | |
968 | </listitem> | |
969 | </varlistentry> | |
2959fb07 SS |
970 | <varlistentry> |
971 | <term><varname>Scope=</varname></term> | |
972 | <listitem> | |
973 | <para>The scope of the address, which can be <literal>global</literal>, | |
974 | <literal>link</literal> or <literal>host</literal> or an unsigned integer ranges 0 to 255. | |
975 | Defaults to <literal>global</literal>.</para> | |
976 | </listitem> | |
977 | </varlistentry> | |
e63be084 SS |
978 | <varlistentry> |
979 | <term><varname>HomeAddress=</varname></term> | |
980 | <listitem> | |
9b6ffef3 | 981 | <para>Takes a boolean. Designates this address the "home address" as defined in |
e63be084 SS |
982 | <ulink url="https://tools.ietf.org/html/rfc6275">RFC 6275</ulink>. |
983 | Supported only on IPv6. Defaults to false.</para> | |
984 | </listitem> | |
985 | </varlistentry> | |
986 | <varlistentry> | |
987 | <term><varname>DuplicateAddressDetection=</varname></term> | |
988 | <listitem> | |
051e77ca SS |
989 | <para>Takes one of <literal>ipv4</literal>, <literal>ipv6</literal>, |
990 | <literal>both</literal>, <literal>none</literal>. When <literal>ipv4</literal>, | |
991 | performs IPv4 Duplicate Address Detection. See | |
992 | <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5224</ulink>. | |
993 | When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See | |
994 | <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>. | |
995 | Defaults to <literal>ipv6</literal>.</para> | |
e63be084 SS |
996 | </listitem> |
997 | </varlistentry> | |
998 | <varlistentry> | |
999 | <term><varname>ManageTemporaryAddress=</varname></term> | |
1000 | <listitem> | |
9b6ffef3 | 1001 | <para>Takes a boolean. If true the kernel manage temporary addresses created |
e63be084 SS |
1002 | from this one as template on behalf of Privacy Extensions |
1003 | <ulink url="https://tools.ietf.org/html/rfc3041">RFC 3041</ulink>. For this to become | |
1004 | active, the use_tempaddr sysctl setting has to be set to a value greater than zero. | |
1005 | The given address needs to have a prefix length of 64. This flag allows to use privacy | |
1006 | extensions in a manually configured network, just like if stateless auto-configuration | |
1007 | was active. Defaults to false. </para> | |
1008 | </listitem> | |
1009 | </varlistentry> | |
1010 | <varlistentry> | |
1011 | <term><varname>PrefixRoute=</varname></term> | |
1012 | <listitem> | |
9b6ffef3 | 1013 | <para>Takes a boolean. When adding or modifying an IPv6 address, the userspace |
e63be084 SS |
1014 | application needs a way to suppress adding a prefix route. This is for example relevant |
1015 | together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf generated addresses, | |
1016 | but depending on on-link, no route for the prefix should be added. Defaults to false.</para> | |
1017 | </listitem> | |
1018 | </varlistentry> | |
1019 | <varlistentry> | |
1020 | <term><varname>AutoJoin=</varname></term> | |
1021 | <listitem> | |
9b6ffef3 | 1022 | <para>Takes a boolean. Joining multicast group on ethernet level via |
e63be084 SS |
1023 | <command>ip maddr</command> command would not work if we have an Ethernet switch that does |
1024 | IGMP snooping since the switch would not replicate multicast packets on ports that did not | |
1025 | have IGMP reports for the multicast addresses. Linux vxlan interfaces created via | |
1026 | <command>ip link add vxlan</command> or networkd's netdev kind vxlan have the group option | |
1027 | that enables then to do the required join. By extending ip address command with option | |
1028 | <literal>autojoin</literal> we can get similar functionality for openvswitch (OVS) vxlan | |
1029 | interfaces as well as other tunneling mechanisms that need to receive multicast traffic. | |
1030 | Defaults to <literal>no</literal>.</para> | |
1031 | </listitem> | |
1032 | </varlistentry> | |
798d3a52 ZJS |
1033 | </variablelist> |
1034 | </refsect1> | |
1035 | ||
e4a71bf3 WKI |
1036 | <refsect1> |
1037 | <title>[Neighbor] Section Options</title> | |
1038 | <para>A <literal>[Neighbor]</literal> section accepts the | |
1039 | following keys. The neighbor section adds a permanent, static | |
1040 | entry to the neighbor table (IPv6) or ARP table (IPv4) for | |
1041 | the given hardware address on the links matched for the network. | |
1042 | Specify several <literal>[Neighbor]</literal> sections to configure | |
1043 | several static neighbors.</para> | |
1044 | ||
1045 | <variablelist class='network-directives'> | |
1046 | <varlistentry> | |
1047 | <term><varname>Address=</varname></term> | |
1048 | <listitem> | |
1049 | <para>The IP address of the neighbor.</para> | |
1050 | </listitem> | |
1051 | </varlistentry> | |
1052 | <varlistentry> | |
b956364d | 1053 | <term><varname>LinkLayerAddress=</varname></term> |
e4a71bf3 | 1054 | <listitem> |
b956364d | 1055 | <para>The link layer address (MAC address or IP address) of the neighbor.</para> |
e4a71bf3 WKI |
1056 | </listitem> |
1057 | </varlistentry> | |
1058 | </variablelist> | |
1059 | </refsect1> | |
1060 | ||
95b74ef6 SS |
1061 | <refsect1> |
1062 | <title>[IPv6AddressLabel] Section Options</title> | |
1063 | ||
1064 | <para>An <literal>[IPv6AddressLabel]</literal> section accepts the | |
1065 | following keys. Specify several <literal>[IPv6AddressLabel]</literal> | |
785889e5 | 1066 | sections to configure several address labels. IPv6 address labels are |
95b74ef6 SS |
1067 | used for address selection. See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. |
1068 | Precedence is managed by userspace, and only the label itself is stored in the kernel</para> | |
1069 | ||
1070 | <variablelist class='network-directives'> | |
1071 | <varlistentry> | |
1072 | <term><varname>Label=</varname></term> | |
1073 | <listitem> | |
1074 | <para> The label for the prefix (an unsigned integer) ranges 0 to 4294967294. | |
1075 | 0xffffffff is reserved. This key is mandatory.</para> | |
1076 | </listitem> | |
1077 | </varlistentry> | |
1078 | <varlistentry> | |
1079 | <term><varname>Prefix=</varname></term> | |
1080 | <listitem> | |
1081 | <para>IPv6 prefix is an address with a prefix length, separated by a slash <literal>/</literal> character. | |
1082 | This key is mandatory. </para> | |
1083 | </listitem> | |
1084 | </varlistentry> | |
1085 | </variablelist> | |
1086 | </refsect1> | |
1087 | ||
bce67bbe SS |
1088 | <refsect1> |
1089 | <title>[RoutingPolicyRule] Section Options</title> | |
1090 | ||
1091 | <para>An <literal>[RoutingPolicyRule]</literal> section accepts the | |
1092 | following keys. Specify several <literal>[RoutingPolicyRule]</literal> | |
1093 | sections to configure several rules.</para> | |
1094 | ||
1095 | <variablelist class='network-directives'> | |
1096 | <varlistentry> | |
1097 | <term><varname>TypeOfService=</varname></term> | |
1098 | <listitem> | |
1099 | <para>Specifies the type of service to match a number between 0 to 255.</para> | |
1100 | </listitem> | |
1101 | </varlistentry> | |
1102 | <varlistentry> | |
1103 | <term><varname>From=</varname></term> | |
1104 | <listitem> | |
1105 | <para>Specifies the source address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
1106 | </listitem> | |
1107 | </varlistentry> | |
1108 | <varlistentry> | |
1109 | <term><varname>To=</varname></term> | |
1110 | <listitem> | |
1111 | <para>Specifies the destination address prefix to match. Possibly followed by a slash and the prefix length.</para> | |
1112 | </listitem> | |
1113 | </varlistentry> | |
1114 | <varlistentry> | |
1115 | <term><varname>FirewallMark=</varname></term> | |
1116 | <listitem> | |
1117 | <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para> | |
1118 | </listitem> | |
1119 | </varlistentry> | |
1120 | <varlistentry> | |
1121 | <term><varname>Table=</varname></term> | |
1122 | <listitem> | |
41b90a1e YW |
1123 | <para>Specifies the routing table identifier to lookup if the rule selector matches. Takes |
1124 | one of <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, | |
1125 | or a number between 1 and 4294967295. Defaults to <literal>main</literal>.</para> | |
bce67bbe SS |
1126 | </listitem> |
1127 | </varlistentry> | |
1128 | <varlistentry> | |
1129 | <term><varname>Priority=</varname></term> | |
1130 | <listitem> | |
1131 | <para>Specifies the priority of this rule. <varname>Priority=</varname> is an unsigned | |
1132 | integer. Higher number means lower priority, and rules get processed in order of increasing number.</para> | |
1133 | </listitem> | |
1134 | </varlistentry> | |
762e2659 SS |
1135 | <varlistentry> |
1136 | <term><varname>IncomingInterface=</varname></term> | |
1137 | <listitem> | |
1138 | <para>Specifies incoming device to match. If the interface is loopback, the rule only matches packets originating from this host.</para> | |
1139 | </listitem> | |
1140 | </varlistentry> | |
1141 | <varlistentry> | |
1142 | <term><varname>OutgoingInterface=</varname></term> | |
1143 | <listitem> | |
1144 | <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> | |
1145 | </listitem> | |
1146 | </varlistentry> | |
926062f0 SS |
1147 | <varlistentry> |
1148 | <term><varname>SourcePort=</varname></term> | |
1149 | <listitem> | |
1150 | <para>Specifies the source IP port or IP port range match in forwarding information base (FIB) rules. | |
1151 | A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para> | |
1152 | </listitem> | |
1153 | </varlistentry> | |
1154 | <varlistentry> | |
1155 | <term><varname>DestinationPort=</varname></term> | |
1156 | <listitem> | |
1157 | <para>Specifies the destination IP port or IP port range match in forwarding information base (FIB) rules. | |
1158 | A port range is specified by the lower and upper port separated by a dash. Defaults to unset.</para> | |
1159 | </listitem> | |
1160 | </varlistentry> | |
1161 | <varlistentry> | |
97f9df9e | 1162 | <term><varname>IPProtocol=</varname></term> |
926062f0 | 1163 | <listitem> |
3a269dcf YW |
1164 | <para>Specifies the IP protocol to match in forwarding information base (FIB) rules. Takes IP protocol name such as <literal>tcp</literal>, |
1165 | <literal>udp</literal> or <literal>sctp</literal>, or IP protocol number such as <literal>6</literal> for <literal>tcp</literal> or | |
1166 | <literal>17</literal> for <literal>udp</literal>. | |
926062f0 SS |
1167 | Defaults to unset.</para> |
1168 | </listitem> | |
1169 | </varlistentry> | |
8b220643 SS |
1170 | <varlistentry> |
1171 | <term><varname>InvertRule=</varname></term> | |
1172 | <listitem> | |
5238e957 | 1173 | <para>A boolean. Specifies whether the rule to be inverted. Defaults to false.</para> |
8b220643 SS |
1174 | </listitem> |
1175 | </varlistentry> | |
f6c6ff97 YW |
1176 | <varlistentry> |
1177 | <term><varname>Family=</varname></term> | |
1178 | <listitem> | |
1179 | <para>Takes a special value <literal>ipv4</literal>, <literal>ipv6</literal>, or | |
1180 | <literal>both</literal>. By default, the address family is determined by the address | |
1181 | specified in <varname>To=</varname> or <varname>From=</varname>. If neither | |
1182 | <varname>To=</varname> nor <varname>From=</varname> are specified, then defaults to | |
1183 | <literal>ipv4</literal>.</para> | |
1184 | </listitem> | |
1185 | </varlistentry> | |
bce67bbe | 1186 | </variablelist> |
c16c7808 SS |
1187 | </refsect1> |
1188 | ||
1189 | <refsect1> | |
1190 | <title>[NextHop] Section Options</title> | |
1191 | <para>The <literal>[NextHop]</literal> section accepts the | |
1192 | following keys. Specify several <literal>[NextHop]</literal> | |
1193 | sections to configure several nexthop. Nexthop is used to manipulate entries in the kernel's nexthop | |
1194 | tables.</para> | |
1195 | ||
1196 | <variablelist class='network-directives'> | |
1197 | <varlistentry> | |
1198 | <term><varname>Gateway=</varname></term> | |
1199 | <listitem> | |
1200 | <para>As in the <literal>[Network]</literal> section. This is mandatory.</para> | |
1201 | </listitem> | |
1202 | </varlistentry> | |
1203 | <varlistentry> | |
1204 | <term><varname>Id=</varname></term> | |
1205 | <listitem> | |
1206 | <para>The id of the nexthop (an unsigned integer). If unspecified or '0' then automatically chosen by kernel.</para> | |
1207 | </listitem> | |
1208 | </varlistentry> | |
1209 | </variablelist> | |
bce67bbe SS |
1210 | </refsect1> |
1211 | ||
798d3a52 ZJS |
1212 | <refsect1> |
1213 | <title>[Route] Section Options</title> | |
1214 | <para>The <literal>[Route]</literal> section accepts the | |
1215 | following keys. Specify several <literal>[Route]</literal> | |
1216 | sections to configure several routes.</para> | |
1217 | ||
1218 | <variablelist class='network-directives'> | |
1219 | <varlistentry> | |
1220 | <term><varname>Gateway=</varname></term> | |
1221 | <listitem> | |
1222 | <para>As in the <literal>[Network]</literal> section.</para> | |
1223 | </listitem> | |
1224 | </varlistentry> | |
28959f7d | 1225 | <varlistentry> |
9cb8c559 | 1226 | <term><varname>GatewayOnLink=</varname></term> |
28959f7d | 1227 | <listitem> |
9b6ffef3 | 1228 | <para>Takes a boolean. If set to true, the kernel does not have |
28959f7d SS |
1229 | to check if the gateway is reachable directly by the current machine (i.e., the kernel does |
1230 | not need to check if the gateway is attached to the local network), so that we can insert the | |
9b6ffef3 | 1231 | route in the kernel table without it being complained about. Defaults to <literal>no</literal>. |
28959f7d SS |
1232 | </para> |
1233 | </listitem> | |
1234 | </varlistentry> | |
798d3a52 ZJS |
1235 | <varlistentry> |
1236 | <term><varname>Destination=</varname></term> | |
1237 | <listitem> | |
1238 | <para>The destination prefix of the route. Possibly | |
b938cb90 | 1239 | followed by a slash and the prefix length. If omitted, a |
798d3a52 ZJS |
1240 | full-length host route is assumed.</para> |
1241 | </listitem> | |
1242 | </varlistentry> | |
1243 | <varlistentry> | |
1244 | <term><varname>Source=</varname></term> | |
1245 | <listitem> | |
1246 | <para>The source prefix of the route. Possibly followed by | |
b938cb90 | 1247 | a slash and the prefix length. If omitted, a full-length |
798d3a52 ZJS |
1248 | host route is assumed.</para> |
1249 | </listitem> | |
1250 | </varlistentry> | |
1251 | <varlistentry> | |
1252 | <term><varname>Metric=</varname></term> | |
1253 | <listitem> | |
b938cb90 | 1254 | <para>The metric of the route (an unsigned integer).</para> |
798d3a52 ZJS |
1255 | </listitem> |
1256 | </varlistentry> | |
b5bf6f64 SS |
1257 | <varlistentry> |
1258 | <term><varname>IPv6Preference=</varname></term> | |
1259 | <listitem> | |
1260 | <para>Specifies the route preference as defined in <ulink | |
1261 | url="https://tools.ietf.org/html/rfc4191">RFC4191</ulink> for Router Discovery messages. | |
1262 | Which can be one of <literal>low</literal> the route has a lowest priority, | |
1263 | <literal>medium</literal> the route has a default priority or | |
1264 | <literal>high</literal> the route has a highest priority.</para> | |
1265 | </listitem> | |
1266 | </varlistentry> | |
769b56a3 TG |
1267 | <varlistentry> |
1268 | <term><varname>Scope=</varname></term> | |
1269 | <listitem> | |
f5c38922 YW |
1270 | <para>The scope of the route, which can be <literal>global</literal>, <literal>site</literal>, |
1271 | <literal>link</literal>, <literal>host</literal>, or <literal>nowhere</literal>. For IPv4 route, | |
1272 | defaults to <literal>host</literal> if <varname>Type=</varname> is <literal>local</literal> | |
1273 | or <literal>nat</literal>, and <literal>link</literal> if <varname>Type=</varname> is | |
1274 | <literal>broadcast</literal>, <literal>multicast</literal>, or <literal>anycast</literal>. | |
1275 | In other cases, defaults to <literal>global</literal>.</para> | |
769b56a3 | 1276 | </listitem> |
0d07e595 JK |
1277 | </varlistentry> |
1278 | <varlistentry> | |
1279 | <term><varname>PreferredSource=</varname></term> | |
1280 | <listitem> | |
1281 | <para>The preferred source address of the route. The address | |
1282 | must be in the format described in | |
1283 | <citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> | |
1284 | </listitem> | |
769b56a3 | 1285 | </varlistentry> |
c953b24c | 1286 | <varlistentry> |
f5c38922 | 1287 | <term><varname>Table=</varname></term> |
c953b24c | 1288 | <listitem> |
f5c38922 YW |
1289 | <para>The table identifier for the route. Takes <literal>default</literal>, |
1290 | <literal>main</literal>, <literal>local</literal> or a number between 1 and 4294967295. | |
1291 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. | |
1292 | If unset and <varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>, | |
1293 | <literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used. | |
1294 | In other cases, defaults to <literal>main</literal>. | |
c953b24c SS |
1295 | </para> |
1296 | </listitem> | |
1297 | </varlistentry> | |
c83ecc04 SS |
1298 | <varlistentry> |
1299 | <term><varname>Protocol=</varname></term> | |
1300 | <listitem> | |
88925d2f | 1301 | <para>The protocol identifier for the route. Takes a number between 0 and 255 or the special values |
ca420b62 YW |
1302 | <literal>kernel</literal>, <literal>boot</literal>, <literal>static</literal>, |
1303 | <literal>ra</literal> and <literal>dhcp</literal>. Defaults to <literal>static</literal>. | |
c83ecc04 SS |
1304 | </para> |
1305 | </listitem> | |
1306 | </varlistentry> | |
983226f3 SS |
1307 | <varlistentry> |
1308 | <term><varname>Type=</varname></term> | |
1309 | <listitem> | |
94d6e299 YW |
1310 | <para>Specifies the type for the route. Takes one of <literal>unicast</literal>, |
1311 | <literal>local</literal>, <literal>broadcast</literal>, <literal>anycast</literal>, | |
1312 | <literal>multicast</literal>, <literal>blackhole</literal>, <literal>unreachable</literal>, | |
1313 | <literal>prohibit</literal>, <literal>throw</literal>, <literal>nat</literal>, and | |
1314 | <literal>xresolve</literal>. If <literal>unicast</literal>, a regular route is defined, i.e. a | |
66d7235e LP |
1315 | route indicating the path to take to a destination network address. If <literal>blackhole</literal>, packets |
1316 | to the defined route are discarded silently. If <literal>unreachable</literal>, packets to the defined route | |
1317 | are discarded and the ICMP message "Host Unreachable" is generated. If <literal>prohibit</literal>, packets | |
1318 | to the defined route are discarded and the ICMP message "Communication Administratively Prohibited" is | |
1319 | generated. If <literal>throw</literal>, route lookup in the current routing table will fail and the route | |
1320 | selection process will return to Routing Policy Database (RPDB). Defaults to <literal>unicast</literal>. | |
983226f3 SS |
1321 | </para> |
1322 | </listitem> | |
1323 | </varlistentry> | |
323d9329 SS |
1324 | <varlistentry> |
1325 | <term><varname>InitialCongestionWindow=</varname></term> | |
1326 | <listitem> | |
6b21ad33 SS |
1327 | <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP |
1328 | session, when a client requests a resource, the server's initial congestion window determines how many data bytes | |
1329 | will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual | |
025314d9 | 1330 | 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 |
1331 | </para> |
1332 | </listitem> | |
1333 | </varlistentry> | |
1334 | <varlistentry> | |
1335 | <term><varname>InitialAdvertisedReceiveWindow=</varname></term> | |
1336 | <listitem> | |
5238e957 | 1337 | <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 |
1338 | on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update |
1339 | 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 | 1340 | and are understood to the base of 1024. When unset, the kernel's default will be used. |
323d9329 SS |
1341 | </para> |
1342 | </listitem> | |
1343 | </varlistentry> | |
09f5dfad SS |
1344 | <varlistentry> |
1345 | <term><varname>QuickAck=</varname></term> | |
1346 | <listitem> | |
9b6ffef3 | 1347 | <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 |
1348 | </para> |
1349 | </listitem> | |
1350 | </varlistentry> | |
633c7258 SS |
1351 | <varlistentry> |
1352 | <term><varname>FastOpenNoCookie=</varname></term> | |
1353 | <listitem> | |
1354 | <para>Takes a boolean. When true enables TCP fastopen without a cookie on a per-route basis. | |
1355 | When unset, the kernel's default will be used. | |
1356 | </para> | |
1357 | </listitem> | |
09f5dfad | 1358 | </varlistentry> |
9b88f20a SS |
1359 | <varlistentry> |
1360 | <term><varname>TTLPropagate=</varname></term> | |
1361 | <listitem> | |
1362 | <para>Takes a boolean. When true enables TTL propagation at Label Switched Path (LSP) egress. | |
1363 | When unset, the kernel's default will be used. | |
1364 | </para> | |
1365 | </listitem> | |
1366 | </varlistentry> | |
cea79e66 SS |
1367 | <varlistentry> |
1368 | <term><varname>MTUBytes=</varname></term> | |
1369 | <listitem> | |
1370 | <para>The maximum transmission unit in bytes to set for the | |
1371 | route. The usual suffixes K, M, G, are supported and are | |
1372 | understood to the base of 1024.</para> | |
1373 | <para>Note that if IPv6 is enabled on the interface, and the MTU is chosen | |
1374 | below 1280 (the minimum MTU for IPv6) it will automatically be increased to this value.</para> | |
1375 | </listitem> | |
afe42aef SC |
1376 | </varlistentry> |
1377 | <varlistentry> | |
1378 | <term><varname>IPServiceType=</varname></term> | |
1379 | <listitem> | |
e681a2ee YW |
1380 | <para>Takes string; <literal>CS6</literal> or <literal>CS4</literal>. Used to set IP |
1381 | service type to CS6 (network control) or CS4 (Realtime). Defaults to CS6.</para> | |
afe42aef SC |
1382 | </listitem> |
1383 | </varlistentry> | |
798d3a52 ZJS |
1384 | </variablelist> |
1385 | </refsect1> | |
1386 | ||
1387 | <refsect1> | |
4f7331a8 YW |
1388 | <title>[DHCPv4] Section Options</title> |
1389 | <para>The <literal>[DHCPv4]</literal> section configures the | |
caa8ca42 | 1390 | DHCPv4 client, if it is enabled with the |
ad943783 | 1391 | <varname>DHCP=</varname> setting described above:</para> |
798d3a52 ZJS |
1392 | |
1393 | <variablelist class='network-directives'> | |
1394 | <varlistentry> | |
1395 | <term><varname>UseDNS=</varname></term> | |
1396 | <listitem> | |
1397 | <para>When true (the default), the DNS servers received | |
1398 | from the DHCP server will be used and take precedence over | |
1399 | any statically configured ones.</para> | |
e88d8021 ZJS |
1400 | |
1401 | <para>This corresponds to the <option>nameserver</option> | |
ad943783 LP |
1402 | option in <citerefentry |
1403 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
1404 | </listitem> |
1405 | </varlistentry> | |
a24e12f0 YW |
1406 | <varlistentry> |
1407 | <term><varname>RoutesToDNS=</varname></term> | |
1408 | <listitem> | |
1409 | <para>When true, the routes to the DNS servers received from the DHCP server will be | |
1410 | configured. When <varname>UseDNS=</varname> is disabled, this setting is ignored. | |
f7e7bb65 | 1411 | Defaults to false.</para> |
a24e12f0 YW |
1412 | </listitem> |
1413 | </varlistentry> | |
301f4073 MM |
1414 | <varlistentry> |
1415 | <term><varname>UseNTP=</varname></term> | |
1416 | <listitem> | |
1417 | <para>When true (the default), the NTP servers received | |
1418 | from the DHCP server will be used by systemd-timesyncd | |
1419 | and take precedence over any statically configured ones.</para> | |
1420 | </listitem> | |
1421 | </varlistentry> | |
299d578f SS |
1422 | <varlistentry> |
1423 | <term><varname>UseSIP=</varname></term> | |
1424 | <listitem> | |
1425 | <para>When true (the default), the SIP servers received | |
1426 | from the DHCP server will be saved at the state files and can be | |
1427 | read via <function>sd_network_link_get_sip_servers()</function> function.</para> | |
1428 | </listitem> | |
1429 | </varlistentry> | |
798d3a52 ZJS |
1430 | <varlistentry> |
1431 | <term><varname>UseMTU=</varname></term> | |
1432 | <listitem> | |
1433 | <para>When true, the interface maximum transmission unit | |
1434 | from the DHCP server will be used on the current link. | |
7169cdc8 | 1435 | If <varname>MTUBytes=</varname> is set, then this setting is ignored. |
95ab9eff | 1436 | Defaults to false.</para> |
798d3a52 ZJS |
1437 | </listitem> |
1438 | </varlistentry> | |
7585baa0 | 1439 | <varlistentry> |
1440 | <term><varname>Anonymize=</varname></term> | |
1441 | <listitem> | |
9b6ffef3 | 1442 | <para>Takes a boolean. When true, the options sent to the DHCP server will |
7585baa0 | 1443 | follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink> |
1444 | (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information. | |
1445 | Defaults to false.</para> | |
1446 | ||
1447 | <para>This option should only be set to true when | |
1448 | <varname>MACAddressPolicy=</varname> is set to <literal>random</literal> | |
1449 | (see <citerefentry | |
1450 | project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para> | |
1451 | ||
1452 | <para>Note that this configuration will overwrite others. | |
1453 | In concrete, the following variables will be ignored: | |
1454 | <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>, | |
1455 | <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>, | |
1456 | <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>, | |
1457 | <varname>UseTimezone=</varname>.</para> | |
fba10579 LP |
1458 | |
1459 | <para>With this option enabled DHCP requests will mimic those generated by Microsoft Windows, in | |
1460 | order to reduce the ability to fingerprint and recognize installations. This means DHCP request | |
1461 | sizes will grow and lease data will be more comprehensive than normally, though most of the | |
1462 | requested data is not actually used.</para> | |
7585baa0 | 1463 | </listitem> |
1464 | </varlistentry> | |
798d3a52 ZJS |
1465 | <varlistentry> |
1466 | <term><varname>SendHostname=</varname></term> | |
1467 | <listitem> | |
31ee3973 YW |
1468 | <para>When true (the default), the machine's hostname will be sent to the DHCP server. |
1469 | Note that the machine's hostname must consist only of 7-bit ASCII lower-case characters and | |
1470 | no spaces or dots, and be formatted as a valid DNS domain name. Otherwise, the hostname is not | |
cad8d671 | 1471 | sent even if this is set to true.</para> |
798d3a52 ZJS |
1472 | </listitem> |
1473 | </varlistentry> | |
1474 | <varlistentry> | |
1475 | <term><varname>UseHostname=</varname></term> | |
1476 | <listitem> | |
1477 | <para>When true (the default), the hostname received from | |
31ee3973 | 1478 | the DHCP server will be set as the transient hostname of the system. |
d59be2cf | 1479 | </para> |
798d3a52 ZJS |
1480 | </listitem> |
1481 | </varlistentry> | |
1adc5d0b | 1482 | <varlistentry> |
31ee3973 YW |
1483 | <term><varname>Hostname=</varname></term> |
1484 | <listitem> | |
1485 | <para>Use this value for the hostname which is sent to the DHCP server, instead of machine's hostname. | |
1486 | Note that the specified hostname must consist only of 7-bit ASCII lower-case characters and | |
1487 | no spaces or dots, and be formatted as a valid DNS domain name.</para> | |
1488 | </listitem> | |
1489 | </varlistentry> | |
798d3a52 ZJS |
1490 | <varlistentry> |
1491 | <term><varname>UseDomains=</varname></term> | |
1492 | <listitem> | |
9b6ffef3 | 1493 | <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name |
b2a81c0b LP |
1494 | received from the DHCP server will be used as DNS search domain over this link, similar to the effect of |
1495 | the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name received from | |
1496 | the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of | |
1497 | the <option>Domains=</option> setting when the argument is prefixed with <literal>~</literal>. Defaults to | |
1498 | false.</para> | |
1499 | ||
1500 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1e7a0e21 | 1501 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain |
b2a81c0b LP |
1502 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of |
1503 | single-label names.</para> | |
1504 | ||
1505 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1506 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
798d3a52 ZJS |
1507 | </listitem> |
1508 | </varlistentry> | |
1509 | <varlistentry> | |
1510 | <term><varname>UseRoutes=</varname></term> | |
1511 | <listitem> | |
d6eac9bd DW |
1512 | <para>When true (the default), the static routes will be requested from the DHCP server and added to the |
1513 | routing table with a metric of 1024, and a scope of "global", "link" or "host", depending on the route's | |
1514 | destination and gateway. If the destination is on the local host, e.g., 127.x.x.x, or the same as the | |
1515 | link's own address, the scope will be set to "host". Otherwise if the gateway is null (a direct route), a | |
1516 | "link" scope will be used. For anything else, scope defaults to "global".</para> | |
798d3a52 ZJS |
1517 | </listitem> |
1518 | </varlistentry> | |
ad943783 LP |
1519 | |
1520 | <varlistentry> | |
1521 | <term><varname>UseTimezone=</varname></term> | |
1522 | ||
1523 | <listitem><para>When true, the timezone received from the | |
7f3fdb7f | 1524 | DHCP server will be set as timezone of the local |
ad943783 LP |
1525 | system. Defaults to <literal>no</literal>.</para></listitem> |
1526 | </varlistentry> | |
1527 | ||
3e43b2cd JJ |
1528 | <varlistentry> |
1529 | <term><varname>ClientIdentifier=</varname></term> | |
1530 | <listitem> | |
dace710c YW |
1531 | <para>The DHCPv4 client identifier to use. Takes one of <literal>mac</literal>, <literal>duid</literal> or <literal>duid-only</literal>. |
1532 | If set to <literal>mac</literal>, the MAC address of the link is used. | |
1533 | If set to <literal>duid</literal>, an RFC4361-compliant Client ID, which is the combination of IAID and DUID (see below), is used. | |
1534 | 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. | |
1535 | Defaults to <literal>duid</literal>.</para> | |
3e43b2cd JJ |
1536 | </listitem> |
1537 | </varlistentry> | |
e2e08e77 | 1538 | |
798d3a52 ZJS |
1539 | <varlistentry> |
1540 | <term><varname>VendorClassIdentifier=</varname></term> | |
1541 | <listitem> | |
1542 | <para>The vendor class identifier used to identify vendor | |
1543 | type and configuration.</para> | |
1544 | </listitem> | |
1545 | </varlistentry> | |
076ea6f6 | 1546 | |
af1c0de0 SS |
1547 | <varlistentry> |
1548 | <term><varname>UserClass=</varname></term> | |
1549 | <listitem> | |
1550 | <para>A DHCPv4 client can use UserClass option to identify the type or category of user or applications | |
1551 | it represents. The information contained in this option is a string that represents the user class of which | |
1552 | the client is a member. Each class sets an identifying string of information to be used by the DHCP | |
1553 | service to classify clients. Takes a whitespace-separated list of strings.</para> | |
1554 | </listitem> | |
1555 | </varlistentry> | |
1556 | ||
715cedfb SS |
1557 | <varlistentry> |
1558 | <term><varname>MaxAttempts=</varname></term> | |
1559 | <listitem> | |
1560 | <para>Specifies how many times the DHCPv4 client configuration should be attempted. Takes a | |
1561 | number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>. | |
1562 | Note that the time between retries is increased exponentially, so the network will not be | |
1563 | overloaded even if this number is high.</para> | |
1564 | </listitem> | |
1565 | </varlistentry> | |
1566 | ||
e2e08e77 ZJS |
1567 | <varlistentry> |
1568 | <term><varname>DUIDType=</varname></term> | |
1569 | <listitem> | |
1570 | <para>Override the global <varname>DUIDType</varname> setting for this network. See | |
1571 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1572 | for a description of possible values.</para> | |
1573 | </listitem> | |
1574 | </varlistentry> | |
076ea6f6 | 1575 | |
e2e08e77 ZJS |
1576 | <varlistentry> |
1577 | <term><varname>DUIDRawData=</varname></term> | |
1578 | <listitem> | |
1579 | <para>Override the global <varname>DUIDRawData</varname> setting for this network. See | |
1580 | <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
1581 | for a description of possible values.</para> | |
076ea6f6 LP |
1582 | </listitem> |
1583 | </varlistentry> | |
e2e08e77 | 1584 | |
d05def16 LP |
1585 | <varlistentry> |
1586 | <term><varname>IAID=</varname></term> | |
1587 | <listitem> | |
1588 | <para>The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.</para> | |
1589 | </listitem> | |
1590 | </varlistentry> | |
1591 | ||
798d3a52 ZJS |
1592 | <varlistentry> |
1593 | <term><varname>RequestBroadcast=</varname></term> | |
1594 | <listitem> | |
1595 | <para>Request the server to use broadcast messages before | |
1596 | the IP address has been configured. This is necessary for | |
1597 | devices that cannot receive RAW packets, or that cannot | |
1598 | receive packets at all before an IP address has been | |
1599 | configured. On the other hand, this must not be enabled on | |
1600 | networks where broadcasts are filtered out.</para> | |
1601 | </listitem> | |
1602 | </varlistentry> | |
e2e08e77 | 1603 | |
798d3a52 ZJS |
1604 | <varlistentry> |
1605 | <term><varname>RouteMetric=</varname></term> | |
1606 | <listitem> | |
1607 | <para>Set the routing metric for routes specified by the | |
1608 | DHCP server.</para> | |
1609 | </listitem> | |
1610 | </varlistentry> | |
f594276b JK |
1611 | |
1612 | <varlistentry> | |
1613 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1614 | <listitem> | |
d11e656a | 1615 | <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to unset). |
f594276b JK |
1616 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. |
1617 | </para> | |
917b2260 AR |
1618 | <para>When used in combination with <varname>VRF=</varname> the |
1619 | VRF's routing table is used unless this parameter is specified. | |
1620 | </para> | |
f594276b JK |
1621 | </listitem> |
1622 | </varlistentry> | |
9faed222 SS |
1623 | |
1624 | <varlistentry> | |
1625 | <term><varname>ListenPort=</varname></term> | |
1626 | <listitem> | |
1627 | <para>Allow setting custom port for the DHCP client to listen on.</para> | |
1628 | </listitem> | |
1629 | </varlistentry> | |
fb5c8216 | 1630 | |
1501b429 SS |
1631 | <varlistentry> |
1632 | <term><varname>SendRelease=</varname></term> | |
1633 | <listitem> | |
1634 | <para>When true, the DHCPv4 client sends a DHCP release packet when it stops. | |
5f3b5f19 | 1635 | Defaults to true.</para> |
1501b429 SS |
1636 | </listitem> |
1637 | </varlistentry> | |
1638 | ||
caa8ca42 | 1639 | <varlistentry> |
5bc945be SS |
1640 | <term><varname>BlackList=</varname></term> |
1641 | <listitem> | |
1642 | <para>A whitespace-separated list of IPv4 addresses. DHCP offers from servers in the list are rejected.</para> | |
1643 | </listitem> | |
1644 | </varlistentry> | |
1645 | ||
1646 | <varlistentry> | |
1647 | <term><varname>RequestOptions=</varname></term> | |
caa8ca42 | 1648 | <listitem> |
5bc945be | 1649 | <para>A whitespace-separated list of integers in the range 1–254.</para> |
caa8ca42 SS |
1650 | </listitem> |
1651 | </varlistentry> | |
1652 | ||
cb29c156 | 1653 | <varlistentry> |
864edb39 | 1654 | <term><varname>SendOption=</varname></term> |
cb29c156 | 1655 | <listitem> |
586ec936 | 1656 | <para>Send an arbitrary option in the DHCPv4 request. Takes a DHCP option number, data type |
d8b736bd YW |
1657 | and data separated with a colon |
1658 | (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>). | |
1659 | The option number must be an interger in the range 1..254. The type takes one of <literal>uint8</literal>, | |
1660 | <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or | |
1661 | <literal>string</literal>. Special characters in the data string may be escaped using | |
a2cc708a | 1662 | <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style |
d8b736bd | 1663 | escapes</ulink>. This setting can be specified multiple times. If an empty string is specified, |
a2cc708a | 1664 | then all options specified earlier are cleared. Defaults to unset.</para> |
cb29c156 SS |
1665 | </listitem> |
1666 | </varlistentry> | |
caa8ca42 SS |
1667 | </variablelist> |
1668 | </refsect1> | |
1669 | ||
1670 | <refsect1> | |
1671 | <title>[DHCPv6] Section Options</title> | |
1672 | <para>The <literal>[DHCPv6]</literal> section configures the DHCPv6 client, if it is enabled with the | |
4f7331a8 | 1673 | <varname>DHCP=</varname> setting described above, or invoked by the IPv6 Router Advertisement:</para> |
caa8ca42 SS |
1674 | |
1675 | <variablelist class='network-directives'> | |
1676 | <varlistentry> | |
1677 | <term><varname>UseDNS=</varname></term> | |
1678 | <term><varname>UseNTP=</varname></term> | |
1679 | <listitem> | |
9fdae8d5 | 1680 | <para>As in the <literal>[DHCPv4]</literal> section.</para> |
caa8ca42 SS |
1681 | </listitem> |
1682 | </varlistentry> | |
1683 | ||
fb5c8216 SS |
1684 | <varlistentry> |
1685 | <term><varname>RapidCommit=</varname></term> | |
1686 | <listitem> | |
9b6ffef3 | 1687 | <para>Takes a boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through |
fb5c8216 SS |
1688 | a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both |
1689 | the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default | |
1690 | four-method exchange (solicit, advertise, request, and reply). The two-message exchange provides | |
1691 | faster client configuration and is beneficial in environments in which networks are under a heavy load. | |
1692 | See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details. | |
1693 | Defaults to true.</para> | |
1694 | </listitem> | |
1695 | </varlistentry> | |
1696 | ||
125f20b4 PF |
1697 | <varlistentry> |
1698 | <term><varname>ForceDHCPv6PDOtherInformation=</varname></term> | |
1699 | <listitem> | |
9b6ffef3 | 1700 | <para>Takes a boolean that enforces DHCPv6 stateful mode when the 'Other information' bit is set in |
125f20b4 PF |
1701 | Router Advertisement messages. By default setting only the 'O' bit in Router Advertisements |
1702 | makes DHCPv6 request network information in a stateless manner using a two-message Information | |
1703 | Request and Information Reply message exchange. | |
1704 | <ulink url="https://tools.ietf.org/html/rfc7084">RFC 7084</ulink>, requirement WPD-4, updates | |
1705 | this behavior for a Customer Edge router so that stateful DHCPv6 Prefix Delegation is also | |
1706 | requested when only the 'O' bit is set in Router Advertisements. This option enables such a CE | |
1707 | behavior as it is impossible to automatically distinguish the intention of the 'O' bit otherwise. | |
1708 | By default this option is set to 'false', enable it if no prefixes are delegated when the device | |
1709 | should be acting as a CE router.</para> | |
1710 | </listitem> | |
1711 | </varlistentry> | |
1712 | ||
2805536b SS |
1713 | <varlistentry> |
1714 | <term><varname>PrefixDelegationHint=</varname></term> | |
1715 | <listitem> | |
48daf510 | 1716 | <para>Takes an IPv6 address with prefix length as <varname>Address=</varname> in |
2805536b SS |
1717 | the "[Network]" section. Specifies the DHCPv6 client for the requesting router to include |
1718 | a prefix-hint in the DHCPv6 solicitation. Prefix ranges 1-128. Defaults to unset.</para> | |
1719 | </listitem> | |
1720 | </varlistentry> | |
ad943783 | 1721 | </variablelist> |
caa8ca42 | 1722 | </refsect1> |
413708d1 | 1723 | |
1e7a0e21 | 1724 | <refsect1> |
f921f573 LP |
1725 | <title>[IPv6AcceptRA] Section Options</title> |
1726 | <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement | |
1727 | (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described | |
1e7a0e21 LP |
1728 | above:</para> |
1729 | ||
1730 | <variablelist class='network-directives'> | |
1731 | <varlistentry> | |
1732 | <term><varname>UseDNS=</varname></term> | |
1733 | <listitem> | |
1734 | <para>When true (the default), the DNS servers received in the Router Advertisement will be used and take | |
1735 | precedence over any statically configured ones.</para> | |
1736 | ||
1737 | <para>This corresponds to the <option>nameserver</option> option in <citerefentry | |
1738 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1739 | </listitem> | |
1740 | </varlistentry> | |
1741 | ||
1742 | <varlistentry> | |
1743 | <term><varname>UseDomains=</varname></term> | |
1744 | <listitem> | |
9b6ffef3 | 1745 | <para>Takes a boolean, or the special value <literal>route</literal>. When true, the domain name |
1e7a0e21 LP |
1746 | received via IPv6 Router Advertisement (RA) will be used as DNS search domain over this link, similar to |
1747 | the effect of the <option>Domains=</option> setting. If set to <literal>route</literal>, the domain name | |
1748 | received via IPv6 RA will be used for routing DNS queries only, but not for searching, similar to the | |
1749 | effect of the <option>Domains=</option> setting when the argument is prefixed with | |
1750 | <literal>~</literal>. Defaults to false.</para> | |
1751 | ||
1752 | <para>It is recommended to enable this option only on trusted networks, as setting this affects resolution | |
1753 | of all host names, in particular of single-label names. It is generally safer to use the supplied domain | |
1754 | only as routing domain, rather than as search domain, in order to not have it affect local resolution of | |
1755 | single-label names.</para> | |
1756 | ||
1757 | <para>When set to true, this setting corresponds to the <option>domain</option> option in <citerefentry | |
1758 | project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
1759 | </listitem> | |
1760 | </varlistentry> | |
2ba31d29 JK |
1761 | |
1762 | <varlistentry> | |
1763 | <term><varname>RouteTable=<replaceable>num</replaceable></varname></term> | |
1764 | <listitem> | |
d11e656a ZJS |
1765 | <para>The table identifier for the routes received in the Router Advertisement |
1766 | (a number between 1 and 4294967295, or 0 to unset). | |
2ba31d29 JK |
1767 | The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>. |
1768 | </para> | |
1769 | </listitem> | |
1770 | </varlistentry> | |
062c2eea SS |
1771 | |
1772 | <varlistentry> | |
1773 | <term><varname>UseAutonomousPrefix=</varname></term> | |
1774 | <listitem> | |
1775 | <para>When true (the default), the autonomous prefix received in the Router Advertisement will be used and take | |
1776 | precedence over any statically configured ones.</para> | |
1777 | </listitem> | |
1778 | </varlistentry> | |
1779 | ||
1780 | <varlistentry> | |
1781 | <term><varname>UseOnLinkPrefix=</varname></term> | |
1782 | <listitem> | |
1783 | <para>When true (the default), the onlink prefix received in the Router Advertisement will be used and take | |
1784 | precedence over any statically configured ones.</para> | |
1785 | </listitem> | |
1786 | </varlistentry> | |
1787 | ||
e520ce64 SS |
1788 | <varlistentry> |
1789 | <term><varname>BlackList=</varname></term> | |
1790 | <listitem> | |
1791 | <para>A whitespace-separated list of IPv6 prefixes. IPv6 prefixes supplied via router advertisements in the list are ignored.</para> | |
1792 | </listitem> | |
1793 | </varlistentry> | |
1794 | ||
1e7a0e21 LP |
1795 | </variablelist> |
1796 | </refsect1> | |
1797 | ||
ad943783 LP |
1798 | <refsect1> |
1799 | <title>[DHCPServer] Section Options</title> | |
1800 | <para>The <literal>[DHCPServer]</literal> section contains | |
1801 | settings for the DHCP server, if enabled via the | |
1802 | <varname>DHCPServer=</varname> option described above:</para> | |
1803 | ||
1804 | <variablelist class='network-directives'> | |
1805 | ||
9b3a67c5 TG |
1806 | <varlistentry> |
1807 | <term><varname>PoolOffset=</varname></term> | |
1808 | <term><varname>PoolSize=</varname></term> | |
1809 | ||
1810 | <listitem><para>Configures the pool of addresses to hand out. The pool | |
1811 | is a contiguous sequence of IP addresses in the subnet configured for | |
1812 | the server address, which does not include the subnet nor the broadcast | |
1813 | address. <varname>PoolOffset=</varname> takes the offset of the pool | |
1814 | from the start of subnet, or zero to use the default value. | |
1815 | <varname>PoolSize=</varname> takes the number of IP addresses in the | |
b938cb90 | 1816 | pool or zero to use the default value. By default, the pool starts at |
9b3a67c5 TG |
1817 | the first address after the subnet address and takes up the rest of |
1818 | the subnet, excluding the broadcast address. If the pool includes | |
1819 | the server address (the default), this is reserved and not handed | |
1820 | out to clients.</para></listitem> | |
1821 | </varlistentry> | |
1822 | ||
ad943783 LP |
1823 | <varlistentry> |
1824 | <term><varname>DefaultLeaseTimeSec=</varname></term> | |
1825 | <term><varname>MaxLeaseTimeSec=</varname></term> | |
1826 | ||
1827 | <listitem><para>Control the default and maximum DHCP lease | |
1828 | time to pass to clients. These settings take time values in seconds or | |
1829 | another common time unit, depending on the suffix. The default | |
1830 | lease time is used for clients that did not ask for a specific | |
1831 | lease time. If a client asks for a lease time longer than the | |
b938cb90 | 1832 | maximum lease time, it is automatically shortened to the |
ad943783 LP |
1833 | specified time. The default lease time defaults to 1h, the |
1834 | maximum lease time to 12h. Shorter lease times are beneficial | |
1835 | if the configuration data in DHCP leases changes frequently | |
1836 | and clients shall learn the new settings with shorter | |
1837 | latencies. Longer lease times reduce the generated DHCP | |
1838 | network traffic.</para></listitem> | |
1839 | </varlistentry> | |
1840 | ||
1841 | <varlistentry> | |
1842 | <term><varname>EmitDNS=</varname></term> | |
1843 | <term><varname>DNS=</varname></term> | |
1844 | ||
9b6ffef3 YW |
1845 | <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out |
1846 | to clients shall contain DNS server information. Defaults to <literal>yes</literal>. | |
1847 | The DNS servers to pass to clients may be configured with the | |
ad943783 LP |
1848 | <varname>DNS=</varname> option, which takes a list of IPv4 |
1849 | addresses. If the <varname>EmitDNS=</varname> option is | |
b938cb90 | 1850 | enabled but no servers configured, the servers are |
ad943783 LP |
1851 | automatically propagated from an "uplink" interface that has |
1852 | appropriate servers set. The "uplink" interface is determined | |
1853 | by the default route of the system with the highest | |
1854 | priority. Note that this information is acquired at the time | |
1855 | the lease is handed out, and does not take uplink interfaces | |
1856 | into account that acquire DNS or NTP server information at a | |
1857 | later point. DNS server propagation does not take | |
1858 | <filename>/etc/resolv.conf</filename> into account. Also, note | |
a8eaaee7 | 1859 | that the leases are not refreshed if the uplink network |
ad943783 | 1860 | configuration changes. To ensure clients regularly acquire the |
b938cb90 | 1861 | most current uplink DNS server information, it is thus |
ad943783 LP |
1862 | advisable to shorten the DHCP lease time via |
1863 | <varname>MaxLeaseTimeSec=</varname> described | |
1864 | above.</para></listitem> | |
1865 | </varlistentry> | |
1866 | ||
1867 | <varlistentry> | |
1868 | <term><varname>EmitNTP=</varname></term> | |
1869 | <term><varname>NTP=</varname></term> | |
1870 | ||
1871 | <listitem><para>Similar to the <varname>EmitDNS=</varname> and | |
b938cb90 | 1872 | <varname>DNS=</varname> settings described above, these |
ad943783 LP |
1873 | settings configure whether and what NTP server information |
1874 | shall be emitted as part of the DHCP lease. The same syntax, | |
1875 | propagation semantics and defaults apply as for | |
1876 | <varname>EmitDNS=</varname> and | |
1877 | <varname>DNS=</varname>.</para></listitem> | |
1878 | </varlistentry> | |
1879 | ||
299d578f SS |
1880 | <varlistentry> |
1881 | <term><varname>EmitSIP=</varname></term> | |
1882 | <term><varname>SIP=</varname></term> | |
1883 | ||
1884 | <listitem><para>Similar to the <varname>EmitDNS=</varname> and | |
1885 | <varname>DNS=</varname> settings described above, these | |
1886 | settings configure whether and what SIP server information | |
1887 | shall be emitted as part of the DHCP lease. The same syntax, | |
1888 | propagation semantics and defaults apply as for | |
1889 | <varname>EmitDNS=</varname> and | |
1890 | <varname>DNS=</varname>.</para></listitem> | |
1891 | </varlistentry> | |
1892 | ||
77ff6022 CG |
1893 | <varlistentry> |
1894 | <term><varname>EmitRouter=</varname></term> | |
1895 | ||
1896 | <listitem><para>Similar to the <varname>EmitDNS=</varname> | |
1897 | setting described above, this setting configures whether the | |
1898 | DHCP lease should contain the router option. The same syntax, | |
1899 | propagation semantics and defaults apply as for | |
1900 | <varname>EmitDNS=</varname>.</para></listitem> | |
1901 | </varlistentry> | |
1902 | ||
ad943783 LP |
1903 | <varlistentry> |
1904 | <term><varname>EmitTimezone=</varname></term> | |
1905 | <term><varname>Timezone=</varname></term> | |
1906 | ||
9b6ffef3 YW |
1907 | <listitem><para>Takes a boolean. Configures whether the DHCP leases handed out |
1908 | to clients shall contain timezone information. Defaults to <literal>yes</literal>. The | |
ad943783 LP |
1909 | <varname>Timezone=</varname> setting takes a timezone string |
1910 | (such as <literal>Europe/Berlin</literal> or | |
1911 | <literal>UTC</literal>) to pass to clients. If no explicit | |
b938cb90 | 1912 | timezone is set, the system timezone of the local host is |
ad943783 LP |
1913 | propagated, as determined by the |
1914 | <filename>/etc/localtime</filename> symlink.</para></listitem> | |
1915 | </varlistentry> | |
1916 | ||
564ca984 | 1917 | <varlistentry> |
d8b736bd YW |
1918 | <term><varname>SendOption=</varname></term> |
1919 | <listitem> | |
1920 | <para>Send a raw option with value via DHCPv4 server. Takes a DHCP option number, data type | |
1921 | and data (<literal><replaceable>option</replaceable>:<replaceable>type</replaceable>:<replaceable>value</replaceable></literal>). | |
1922 | The option number is an integer in the range 1..254. The type takes one of <literal>uint8</literal>, | |
1923 | <literal>uint16</literal>, <literal>uint32</literal>, <literal>ipv4address</literal>, or | |
1924 | <literal>string</literal>. Special characters in the data string may be escaped using | |
1925 | <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style | |
1926 | escapes</ulink>. This setting can be specified multiple times. If an empty string is specified, | |
1927 | then all options specified earlier are cleared. Defaults to unset.</para> | |
1928 | </listitem> | |
564ca984 SS |
1929 | </varlistentry> |
1930 | ||
ad943783 LP |
1931 | </variablelist> |
1932 | </refsect1> | |
1933 | ||
798d3a52 | 1934 | <refsect1> |
3f9e0236 PF |
1935 | <title>[IPv6PrefixDelegation] Section Options</title> |
1936 | <para>The <literal>[IPv6PrefixDelegation]</literal> section contains | |
1937 | settings for sending IPv6 Router Advertisements and whether to act as | |
1938 | a router, if enabled via the <varname>IPv6PrefixDelegation=</varname> | |
1939 | option described above. IPv6 network prefixes are defined with one or | |
1940 | more <literal>[IPv6Prefix]</literal> sections.</para> | |
1941 | ||
1942 | <variablelist class='network-directives'> | |
1943 | ||
1944 | <varlistentry> | |
1945 | <term><varname>Managed=</varname></term> | |
1946 | <term><varname>OtherInformation=</varname></term> | |
1947 | ||
9b6ffef3 YW |
1948 | <listitem><para>Takes a boolean. Controls whether a DHCPv6 server is used to acquire IPv6 |
1949 | addresses on the network link when <varname>Managed=</varname> | |
3f9e0236 PF |
1950 | is set to <literal>true</literal> or if only additional network |
1951 | information can be obtained via DHCPv6 for the network link when | |
9b6ffef3 | 1952 | <varname>OtherInformation=</varname> is set to |
3f9e0236 PF |
1953 | <literal>true</literal>. Both settings default to |
1954 | <literal>false</literal>, which means that a DHCPv6 server is not being | |
1955 | used.</para></listitem> | |
1956 | </varlistentry> | |
1957 | ||
1958 | <varlistentry> | |
1959 | <term><varname>RouterLifetimeSec=</varname></term> | |
1960 | ||
9b6ffef3 | 1961 | <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. If set, |
3f9e0236 | 1962 | this host also announces itself in Router Advertisements as an IPv6 |
025314d9 | 1963 | router for the network link. When unset, the host is not acting as a router.</para> |
3f9e0236 PF |
1964 | </listitem> |
1965 | </varlistentry> | |
1966 | ||
1967 | <varlistentry> | |
1968 | <term><varname>RouterPreference=</varname></term> | |
1969 | ||
1970 | <listitem><para>Configures IPv6 router preference if | |
1971 | <varname>RouterLifetimeSec=</varname> is non-zero. Valid values are | |
1972 | <literal>high</literal>, <literal>medium</literal> and | |
1973 | <literal>low</literal>, with <literal>normal</literal> and | |
1974 | <literal>default</literal> added as synonyms for | |
1975 | <literal>medium</literal> just to make configuration easier. See | |
1976 | <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink> | |
1977 | for details. Defaults to <literal>medium</literal>.</para></listitem> | |
1978 | </varlistentry> | |
1979 | ||
1980 | <varlistentry> | |
4cb8478c | 1981 | <term><varname>EmitDNS=</varname></term> |
3f9e0236 PF |
1982 | <term><varname>DNS=</varname></term> |
1983 | ||
4cb8478c PF |
1984 | <listitem><para><varname>DNS=</varname> specifies a list of recursive |
1985 | DNS server IPv6 addresses that distributed via Router Advertisement | |
1986 | messages when <varname>EmitDNS=</varname> is true. If <varname>DNS= | |
1987 | </varname> is empty, DNS servers are read from the | |
1988 | <literal>[Network]</literal> section. If the | |
1989 | <literal>[Network]</literal> section does not contain any DNS servers | |
1990 | either, DNS servers from the uplink with the highest priority default | |
1991 | route are used. When <varname>EmitDNS=</varname> is false, no DNS server | |
1992 | information is sent in Router Advertisement messages. | |
1993 | <varname>EmitDNS=</varname> defaults to true. | |
3f9e0236 PF |
1994 | </para></listitem> |
1995 | </varlistentry> | |
1996 | ||
760021c0 | 1997 | <varlistentry> |
4cb8478c | 1998 | <term><varname>EmitDomains=</varname></term> |
760021c0 PF |
1999 | <term><varname>Domains=</varname></term> |
2000 | ||
4cb8478c PF |
2001 | <listitem><para>A list of DNS search domains distributed via Router |
2002 | Advertisement messages when <varname>EmitDomains=</varname> is true. If | |
2003 | <varname>Domains=</varname> is empty, DNS search domains are read from the | |
2004 | <literal>[Network]</literal> section. If the <literal>[Network]</literal> | |
2005 | section does not contain any DNS search domains either, DNS search | |
2006 | domains from the uplink with the highest priority default route are | |
2007 | used. When <varname>EmitDomains=</varname> is false, no DNS search domain | |
2008 | information is sent in Router Advertisement messages. | |
2009 | <varname>EmitDomains=</varname> defaults to true. | |
2010 | </para></listitem> | |
760021c0 PF |
2011 | </varlistentry> |
2012 | ||
3f9e0236 PF |
2013 | <varlistentry> |
2014 | <term><varname>DNSLifetimeSec=</varname></term> | |
2015 | ||
2016 | <listitem><para>Lifetime in seconds for the DNS server addresses listed | |
760021c0 PF |
2017 | in <varname>DNS=</varname> and search domains listed in |
2018 | <varname>Domains=</varname>.</para></listitem> | |
3f9e0236 PF |
2019 | </varlistentry> |
2020 | ||
2021 | </variablelist> | |
2022 | </refsect1> | |
2023 | ||
203d4df5 | 2024 | <refsect1> |
3f9e0236 PF |
2025 | <title>[IPv6Prefix] Section Options</title> |
2026 | <para>One or more <literal>[IPv6Prefix]</literal> sections contain the IPv6 | |
2027 | prefixes that are announced via Router Advertisements. See | |
2028 | <ulink url="https://tools.ietf.org/html/rfc4861">RFC 4861</ulink> | |
2029 | for further details.</para> | |
2030 | ||
2031 | <variablelist class='network-directives'> | |
2032 | ||
2033 | <varlistentry> | |
2034 | <term><varname>AddressAutoconfiguration=</varname></term> | |
2035 | <term><varname>OnLink=</varname></term> | |
2036 | ||
9b6ffef3 | 2037 | <listitem><para>Takes a boolean to specify whether IPv6 addresses can be |
3f9e0236 PF |
2038 | autoconfigured with this prefix and whether the prefix can be used for |
2039 | onlink determination. Both settings default to <literal>true</literal> | |
2040 | in order to ease configuration. | |
2041 | </para></listitem> | |
2042 | </varlistentry> | |
2043 | ||
2044 | <varlistentry> | |
2045 | <term><varname>Prefix=</varname></term> | |
2046 | ||
2047 | <listitem><para>The IPv6 prefix that is to be distributed to hosts. | |
2048 | Similarly to configuring static IPv6 addresses, the setting is | |
2049 | configured as an IPv6 prefix and its prefix length, separated by a | |
2050 | <literal>/</literal> character. Use multiple | |
2051 | <literal>[IPv6Prefix]</literal> sections to configure multiple IPv6 | |
2052 | prefixes since prefix lifetimes, address autoconfiguration and onlink | |
2053 | status may differ from one prefix to another.</para></listitem> | |
2054 | </varlistentry> | |
2055 | ||
2056 | <varlistentry> | |
2057 | <term><varname>PreferredLifetimeSec=</varname></term> | |
2058 | <term><varname>ValidLifetimeSec=</varname></term> | |
2059 | ||
2060 | <listitem><para>Preferred and valid lifetimes for the prefix measured in | |
2061 | seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800 | |
2062 | seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults | |
2063 | to 2592000 seconds (30 days).</para></listitem> | |
203d4df5 SS |
2064 | </varlistentry> |
2065 | ||
2066 | </variablelist> | |
2067 | </refsect1> | |
2068 | ||
2069 | <refsect1> | |
2070 | <title>[IPv6RoutePrefix] Section Options</title> | |
2071 | <para>One or more <literal>[IPv6RoutePrefix]</literal> sections contain the IPv6 | |
2072 | prefix routes that are announced via Router Advertisements. See | |
2073 | <ulink url="https://tools.ietf.org/html/rfc4191">RFC 4191</ulink> | |
2074 | for further details.</para> | |
2075 | ||
2076 | <variablelist class='network-directives'> | |
2077 | ||
2078 | <varlistentry> | |
2079 | <term><varname>Route=</varname></term> | |
2080 | ||
2081 | <listitem><para>The IPv6 route that is to be distributed to hosts. | |
2082 | Similarly to configuring static IPv6 routes, the setting is | |
2083 | configured as an IPv6 prefix routes and its prefix route length, | |
2084 | separated by a<literal>/</literal> character. Use multiple | |
2085 | <literal>[IPv6PrefixRoutes]</literal> sections to configure multiple IPv6 | |
2086 | prefix routes.</para></listitem> | |
2087 | </varlistentry> | |
2088 | ||
2089 | <varlistentry> | |
2090 | <term><varname>LifetimeSec=</varname></term> | |
2091 | ||
2092 | <listitem><para>Lifetime for the route prefix measured in | |
2093 | seconds. <varname>LifetimeSec=</varname> defaults to 604800 seconds (one week). | |
2094 | </para></listitem> | |
3f9e0236 PF |
2095 | </varlistentry> |
2096 | ||
2097 | </variablelist> | |
2098 | </refsect1> | |
2099 | ||
2100 | <refsect1> | |
798d3a52 ZJS |
2101 | <title>[Bridge] Section Options</title> |
2102 | <para>The <literal>[Bridge]</literal> section accepts the | |
2103 | following keys.</para> | |
2104 | <variablelist class='network-directives'> | |
165c41a9 SS |
2105 | <varlistentry> |
2106 | <term><varname>UnicastFlood=</varname></term> | |
2107 | <listitem> | |
9b6ffef3 | 2108 | <para>Takes a boolean. Controls whether the bridge should flood |
072f9e4a | 2109 | traffic for which an FDB entry is missing and the destination |
025314d9 | 2110 | is unknown through this port. When unset, the kernel's default will be used. |
47c7dfe2 | 2111 | </para> |
165c41a9 SS |
2112 | </listitem> |
2113 | </varlistentry> | |
7f15b714 TJ |
2114 | <varlistentry> |
2115 | <term><varname>MulticastFlood=</varname></term> | |
2116 | <listitem> | |
2117 | <para>Takes a boolean. Controls whether the bridge should flood | |
2118 | traffic for which an MDB entry is missing and the destination | |
2119 | is unknown through this port. When unset, the kernel's default will be used. | |
2120 | </para> | |
2121 | </listitem> | |
2122 | </varlistentry> | |
d3aa8b49 SS |
2123 | <varlistentry> |
2124 | <term><varname>MulticastToUnicast=</varname></term> | |
2125 | <listitem> | |
2126 | <para>Takes a boolean. Multicast to unicast works on top of the multicast snooping feature of | |
2127 | the bridge. Which means unicast copies are only delivered to hosts which are interested in it. | |
2128 | When unset, the kernel's default will be used. | |
2129 | </para> | |
2130 | </listitem> | |
2131 | </varlistentry> | |
7f15b714 TJ |
2132 | <varlistentry> |
2133 | <term><varname>NeighborSuppression=</varname></term> | |
2134 | <listitem> | |
2135 | <para>Takes a boolean. Configures whether ARP and ND neighbor suppression is enabled for | |
2136 | this port. When unset, the kernel's default will be used. | |
2137 | </para> | |
2138 | </listitem> | |
2139 | </varlistentry> | |
2140 | <varlistentry> | |
2141 | <term><varname>Learning=</varname></term> | |
2142 | <listitem> | |
2143 | <para>Takes a boolean. Configures whether MAC address learning is enabled for | |
2144 | this port. When unset, the kernel's default will be used. | |
2145 | </para> | |
2146 | </listitem> | |
2147 | </varlistentry> | |
165c41a9 SS |
2148 | <varlistentry> |
2149 | <term><varname>HairPin=</varname></term> | |
2150 | <listitem> | |
9b6ffef3 | 2151 | <para>Takes a boolean. Configures whether traffic may be sent back |
025314d9 YW |
2152 | out of the port on which it was received. When this flag is false, and the bridge |
2153 | will not forward traffic back out of the receiving port. | |
2154 | When unset, the kernel's default will be used.</para> | |
165c41a9 SS |
2155 | </listitem> |
2156 | </varlistentry> | |
2157 | <varlistentry> | |
84c34096 | 2158 | <term><varname>UseBPDU=</varname></term> |
165c41a9 | 2159 | <listitem> |
9b6ffef3 | 2160 | <para>Takes a boolean. Configures whether STP Bridge Protocol Data Units will be |
025314d9 | 2161 | processed by the bridge port. When unset, the kernel's default will be used.</para> |
165c41a9 SS |
2162 | </listitem> |
2163 | </varlistentry> | |
2164 | <varlistentry> | |
2165 | <term><varname>FastLeave=</varname></term> | |
2166 | <listitem> | |
9b6ffef3 | 2167 | <para>Takes a boolean. This flag allows the bridge to immediately stop multicast |
a8eaaee7 | 2168 | traffic on a port that receives an IGMP Leave message. It is only used with |
025314d9 | 2169 | IGMP snooping if enabled on the bridge. When unset, the kernel's default will be used.</para> |
165c41a9 SS |
2170 | </listitem> |
2171 | </varlistentry> | |
2172 | <varlistentry> | |
23da66bb | 2173 | <term><varname>AllowPortToBeRoot=</varname></term> |
165c41a9 | 2174 | <listitem> |
9b6ffef3 | 2175 | <para>Takes a boolean. Configures whether a given port is allowed to |
47c7dfe2 | 2176 | become a root port. Only used when STP is enabled on the bridge. |
025314d9 | 2177 | When unset, the kernel's default will be used.</para> |
165c41a9 SS |
2178 | </listitem> |
2179 | </varlistentry> | |
1087623b SS |
2180 | <varlistentry> |
2181 | <term><varname>ProxyARP=</varname></term> | |
2182 | <listitem> | |
2183 | <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port. | |
2184 | When unset, the kernel's default will be used.</para> | |
2185 | </listitem> | |
2186 | </varlistentry> | |
2187 | <varlistentry> | |
2188 | <term><varname>ProxyARPWiFi=</varname></term> | |
2189 | <listitem> | |
2190 | <para>Takes a boolean. Configures whether proxy ARP to be enabled on this port | |
2191 | which meets extended requirements by IEEE 802.11 and Hotspot 2.0 specifications. | |
2192 | When unset, the kernel's default will be used.</para> | |
2193 | </listitem> | |
2194 | </varlistentry> | |
0fadb2a4 SS |
2195 | <varlistentry> |
2196 | <term><varname>MulticastRouter=</varname></term> | |
2197 | <listitem> | |
2198 | <para>Configures this port for having multicast routers attached. A port with a multicast | |
2199 | router will receive all multicast traffic. Takes one of <literal>no</literal> | |
2200 | to disable multicast routers on this port, <literal>query</literal> to let the system detect | |
2201 | the presence of routers, <literal>permanent</literal> to permanently enable multicast traffic | |
2202 | forwarding on this port, or <literal>temporary</literal> to enable multicast routers temporarily | |
2203 | on this port, not depending on incoming queries. When unset, the kernel's default will be used.</para> | |
2204 | </listitem> | |
2205 | </varlistentry> | |
798d3a52 ZJS |
2206 | <varlistentry> |
2207 | <term><varname>Cost=</varname></term> | |
2208 | <listitem> | |
47c7dfe2 | 2209 | <para>Sets the "cost" of sending packets of this interface. |
a8eaaee7 | 2210 | Each port in a bridge may have a different speed and the cost |
798d3a52 | 2211 | is used to decide which link to use. Faster interfaces |
785889e5 | 2212 | should have lower costs. It is an integer value between 1 and |
b56be296 DJL |
2213 | 65535.</para> |
2214 | </listitem> | |
2215 | </varlistentry> | |
2216 | <varlistentry> | |
2217 | <term><varname>Priority=</varname></term> | |
2218 | <listitem> | |
2219 | <para>Sets the "priority" of sending packets on this interface. | |
2220 | Each port in a bridge may have a different priority which is used | |
2221 | to decide which link to use. Lower value means higher priority. | |
785889e5 | 2222 | It is an integer value between 0 to 63. Networkd does not set any |
b56be296 | 2223 | default, meaning the kernel default value of 32 is used.</para> |
798d3a52 ZJS |
2224 | </listitem> |
2225 | </varlistentry> | |
2226 | </variablelist> | |
2227 | </refsect1> | |
798d3a52 ZJS |
2228 | <refsect1> |
2229 | <title>[BridgeFDB] Section Options</title> | |
2230 | <para>The <literal>[BridgeFDB]</literal> section manages the | |
2231 | forwarding database table of a port and accepts the following | |
2232 | keys. Specify several <literal>[BridgeFDB]</literal> sections to | |
2233 | configure several static MAC table entries.</para> | |
2234 | ||
2235 | <variablelist class='network-directives'> | |
2236 | <varlistentry> | |
2237 | <term><varname>MACAddress=</varname></term> | |
2238 | <listitem> | |
2239 | <para>As in the <literal>[Network]</literal> section. This | |
2240 | key is mandatory.</para> | |
2241 | </listitem> | |
2242 | </varlistentry> | |
c2c2793f SS |
2243 | <varlistentry> |
2244 | <term><varname>Destination=</varname></term> | |
2245 | <listitem> | |
2246 | <para>Takes an IP address of the destination VXLAN tunnel endpoint.</para> | |
2247 | </listitem> | |
2248 | </varlistentry> | |
798d3a52 ZJS |
2249 | <varlistentry> |
2250 | <term><varname>VLANId=</varname></term> | |
2251 | <listitem> | |
a8eaaee7 | 2252 | <para>The VLAN ID for the new static MAC table entry. If |
db9b9fb9 | 2253 | omitted, no VLAN ID information is appended to the new static MAC |
798d3a52 ZJS |
2254 | table entry.</para> |
2255 | </listitem> | |
2256 | </varlistentry> | |
61b824c5 SS |
2257 | <varlistentry> |
2258 | <term><varname>VNI=</varname></term> | |
2259 | <listitem> | |
2260 | <para>The VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to | |
2261 | the remote VXLAN tunnel endpoint. Takes a number in the range 1-16777215. | |
2262 | Defaults to unset.</para> | |
2263 | </listitem> | |
2264 | </varlistentry> | |
bdb397ed SS |
2265 | <varlistentry> |
2266 | <term><varname>AssociatedWith=</varname></term> | |
2267 | <listitem> | |
2268 | <para>Specifies where the address is associated with. Takes one of <literal>use</literal>, | |
2269 | <literal>self</literal>, <literal>master</literal> or <literal>router</literal>. | |
2270 | <literal>use</literal> means the address is in use. User space can use this option to | |
2271 | indicate to the kernel that the fdb entry is in use. <literal>self</literal> means | |
2272 | the address is associated with the port drivers fdb. Usually hardware. <literal>master</literal> | |
2273 | means the address is associated with master devices fdb. <literal>router</literal> means | |
2274 | the destination address is associated with a router. Note that it's valid if the referenced | |
2275 | device is a VXLAN type device and has route shortcircuit enabled. Defaults to <literal>self</literal>.</para> | |
2276 | </listitem> | |
2277 | </varlistentry> | |
798d3a52 ZJS |
2278 | </variablelist> |
2279 | </refsect1> | |
06828bb6 HP |
2280 | |
2281 | <refsect1> | |
2282 | <title>[CAN] Section Options</title> | |
2283 | <para>The <literal>[CAN]</literal> section manages the Controller Area Network (CAN bus) and accepts the | |
2284 | following keys.</para> | |
2285 | <variablelist class='network-directives'> | |
2286 | <varlistentry> | |
2287 | <term><varname>BitRate=</varname></term> | |
2288 | <listitem> | |
2289 | <para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can | |
2290 | be used here.</para> | |
2291 | </listitem> | |
2292 | </varlistentry> | |
2293 | <varlistentry> | |
2294 | <term><varname>SamplePoint=</varname></term> | |
2295 | <listitem> | |
2296 | <para>Optional sample point in percent with one decimal (e.g. <literal>75%</literal>, | |
2297 | <literal>87.5%</literal>) or permille (e.g. <literal>875‰</literal>).</para> | |
2298 | </listitem> | |
2299 | </varlistentry> | |
2300 | <varlistentry> | |
2301 | <term><varname>RestartSec=</varname></term> | |
2302 | <listitem> | |
2303 | <para>Automatic restart delay time. If set to a non-zero value, a restart of the CAN controller will be | |
2304 | triggered automatically in case of a bus-off condition after the specified delay time. Subsecond delays can | |
2305 | be specified using decimals (e.g. <literal>0.1s</literal>) or a <literal>ms</literal> or | |
2306 | <literal>us</literal> postfix. Using <literal>infinity</literal> or <literal>0</literal> will turn the | |
2307 | automatic restart off. By default automatic restart is disabled.</para> | |
2308 | </listitem> | |
2309 | </varlistentry> | |
c423be28 CG |
2310 | <varlistentry> |
2311 | <term><varname>TripleSampling=</varname></term> | |
2312 | <listitem> | |
2313 | <para>Takes a boolean. When <literal>yes</literal>, three samples (instead of one) are used to determine | |
2314 | the value of a received bit by majority rule. When unset, the kernel's default will be used.</para> | |
2315 | </listitem> | |
2316 | </varlistentry> | |
06828bb6 HP |
2317 | </variablelist> |
2318 | </refsect1> | |
2319 | ||
0f5bd7fe SS |
2320 | <refsect1> |
2321 | <title>[TrafficControlQueueingDiscipline] Section Options</title> | |
2322 | <para>The <literal>[TrafficControlQueueingDiscipline]</literal> section manages the Traffic control. It can be used | |
2323 | to configure the kernel packet scheduler and simulate packet delay and loss for UDP or TCP applications, | |
2324 | or limit the bandwidth usage of a particular service to simulate internet connections.</para> | |
2325 | ||
2326 | <variablelist class='network-directives'> | |
2327 | <varlistentry> | |
2328 | <term><varname>Parent=</varname></term> | |
2329 | <listitem> | |
d8081020 SS |
2330 | <para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>, |
2331 | <literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para> | |
0f5bd7fe SS |
2332 | </listitem> |
2333 | </varlistentry> | |
2334 | ||
2335 | <varlistentry> | |
2336 | <term><varname>NetworkEmulatorDelaySec=</varname></term> | |
2337 | <listitem> | |
2338 | <para>Specifies the fixed amount of delay to be added to all packets going out of the | |
2339 | interface. Defaults to unset.</para> | |
2340 | </listitem> | |
2341 | </varlistentry> | |
2342 | ||
2343 | <varlistentry> | |
2344 | <term><varname>NetworkEmulatorDelayJitterSec=</varname></term> | |
2345 | <listitem> | |
2346 | <para>Specifies the chosen delay to be added to the packets outgoing to the network | |
2347 | interface. Defaults to unset.</para> | |
2348 | </listitem> | |
2349 | </varlistentry> | |
2350 | ||
2351 | <varlistentry> | |
2352 | <term><varname>NetworkEmulatorPacketLimit=</varname></term> | |
2353 | <listitem> | |
2354 | <para>Specifies the maximum number of packets the qdisc may hold queued at a time. | |
2355 | An unsigned integer ranges 0 to 4294967294. Defaults to 1000.</para> | |
2356 | </listitem> | |
2357 | </varlistentry> | |
2358 | ||
2359 | <varlistentry> | |
2360 | <term><varname>NetworkEmulatorLossRate=</varname></term> | |
2361 | <listitem> | |
2362 | <para>Specifies an independent loss probability to be added to the packets outgoing from the | |
2363 | network interface. Takes a percentage value, suffixed with "%". Defaults to unset.</para> | |
2364 | </listitem> | |
2365 | </varlistentry> | |
2366 | ||
b9c5aa3c SS |
2367 | <varlistentry> |
2368 | <term><varname>NetworkEmulatorDuplicateRate=</varname></term> | |
2369 | <listitem> | |
2370 | <para>Specifies that the chosen percent of packets is duplicated before queuing them. | |
2371 | Takes a percentage value, suffixed with "%". Defaults to unset.</para> | |
2372 | </listitem> | |
2373 | </varlistentry> | |
2374 | ||
ba5841b5 SS |
2375 | <varlistentry> |
2376 | <term><varname>TokenBufferFilterLatencySec=</varname></term> | |
2377 | <listitem> | |
2378 | <para>Specifies the latency parameter, which specifies the maximum amount of time a | |
2379 | packet can sit in the Token Buffer Filter (TBF). Defaults to unset.</para> | |
2380 | </listitem> | |
2381 | </varlistentry> | |
2382 | ||
dcfc23ae YW |
2383 | <varlistentry> |
2384 | <term><varname>TokenBufferFilterLimitSize=</varname></term> | |
2385 | <listitem> | |
2386 | <para>Takes the number of bytes that can be queued waiting for tokens to become available. | |
2387 | When the size is suffixed with K, M, or G, it is parsed as Kilobytes, Megabytes, or Gigabytes, | |
2388 | respectively, to the base of 1000. Defaults to unset.</para> | |
2389 | </listitem> | |
2390 | </varlistentry> | |
2391 | ||
ba5841b5 SS |
2392 | <varlistentry> |
2393 | <term><varname>TokenBufferFilterBurst=</varname></term> | |
2394 | <listitem> | |
2395 | <para>Specifies the size of the bucket. This is the maximum amount of bytes that tokens | |
2396 | can be available for instantaneous transfer. When the size is suffixed with K, M, or G, it is | |
2397 | parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to | |
2398 | unset.</para> | |
2399 | </listitem> | |
2400 | </varlistentry> | |
2401 | ||
2402 | <varlistentry> | |
2403 | <term><varname>TokenBufferFilterRate=</varname></term> | |
2404 | <listitem> | |
2405 | <para>Specifies the device specific bandwidth. When suffixed with K, M, or G, the specified | |
2406 | bandwidth is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000. | |
2407 | Defaults to unset.</para> | |
2408 | </listitem> | |
2409 | </varlistentry> | |
2410 | ||
dcfc23ae YW |
2411 | <varlistentry> |
2412 | <term><varname>TokenBufferFilterMPUBytes=</varname></term> | |
2413 | <listitem> | |
2414 | <para>The Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes) | |
2415 | for a packet. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, | |
2416 | Megabytes, or Gigabytes, respectively, to the base of 1000. Defaults to zero.</para> | |
2417 | </listitem> | |
2418 | </varlistentry> | |
2419 | ||
2420 | <varlistentry> | |
2421 | <term><varname>TokenBufferFilterPeakRate=</varname></term> | |
2422 | <listitem> | |
2423 | <para>Takes the maximum depletion rate of the bucket. When suffixed with K, M, or G, the | |
2424 | specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of | |
2425 | 1000. Defaults to unset.</para> | |
2426 | </listitem> | |
2427 | </varlistentry> | |
2428 | ||
2429 | <varlistentry> | |
2430 | <term><varname>TokenBufferFilterMTUBytes=</varname></term> | |
2431 | <listitem> | |
2432 | <para>Specifies the size of the peakrate bucket. When suffixed with K, M, or G, the specified | |
2433 | size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000. | |
2434 | Defaults to unset.</para> | |
2435 | </listitem> | |
2436 | </varlistentry> | |
2437 | ||
9942b710 SS |
2438 | <varlistentry> |
2439 | <term><varname>StochasticFairnessQueueingPerturbPeriodSec=</varname></term> | |
2440 | <listitem> | |
2441 | <para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para> | |
2442 | </listitem> | |
2443 | </varlistentry> | |
2444 | ||
4e5ef149 SS |
2445 | <varlistentry> |
2446 | <term><varname>FairQueuingControlledDelayPacketLimit=</varname></term> | |
2447 | <listitem> | |
2448 | <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are | |
2449 | dropped. Defaults to unset and kernel's default is used.</para> | |
2450 | </listitem> | |
2451 | </varlistentry> | |
2452 | ||
7234b915 SS |
2453 | <varlistentry> |
2454 | <term><varname>FairQueueTrafficPolicingPacketLimit=</varname></term> | |
2455 | <listitem> | |
2456 | <para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are | |
2457 | dropped. Defaults to unset and kernel's default is used.</para> | |
2458 | </listitem> | |
2459 | </varlistentry> | |
2460 | ||
0f5bd7fe SS |
2461 | </variablelist> |
2462 | </refsect1> | |
2463 | ||
13b498f9 TJ |
2464 | <refsect1> |
2465 | <title>[BridgeVLAN] Section Options</title> | |
2466 | <para>The <literal>[BridgeVLAN]</literal> section manages the VLAN ID configuration of a bridge port and accepts | |
2467 | the following keys. Specify several <literal>[BridgeVLAN]</literal> sections to configure several VLAN entries. | |
2468 | The <varname>VLANFiltering=</varname> option has to be enabled, see <literal>[Bridge]</literal> section in | |
2469 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
2470 | ||
2471 | <variablelist class='network-directives'> | |
2472 | <varlistentry> | |
2473 | <term><varname>VLAN=</varname></term> | |
2474 | <listitem> | |
2475 | <para>The VLAN ID allowed on the port. This can be either a single ID or a range M-N. VLAN IDs are valid | |
2476 | from 1 to 4094.</para> | |
2477 | </listitem> | |
2478 | </varlistentry> | |
2479 | <varlistentry> | |
2480 | <term><varname>EgressUntagged=</varname></term> | |
2481 | <listitem> | |
2482 | <para>The VLAN ID specified here will be used to untag frames on egress. Configuring | |
2483 | <varname>EgressUntagged=</varname> implicates the use of <varname>VLAN=</varname> above and will enable the | |
2484 | VLAN ID for ingress as well. This can be either a single ID or a range M-N.</para> | |
2485 | </listitem> | |
2486 | </varlistentry> | |
2487 | <varlistentry> | |
2488 | <term><varname>PVID=</varname></term> | |
2489 | <listitem> | |
2490 | <para>The Port VLAN ID specified here is assigned to all untagged frames at ingress. | |
2491 | <varname>PVID=</varname> can be used only once. Configuring <varname>PVID=</varname> implicates the use of | |
2492 | <varname>VLAN=</varname> above and will enable the VLAN ID for ingress as well.</para> | |
2493 | </listitem> | |
2494 | </varlistentry> | |
2495 | </variablelist> | |
2496 | </refsect1> | |
798d3a52 ZJS |
2497 | |
2498 | <refsect1> | |
9e35b3de | 2499 | <title>Examples</title> |
798d3a52 | 2500 | <example> |
9e35b3de | 2501 | <title>Static network configuration</title> |
798d3a52 | 2502 | |
9e35b3de ZJS |
2503 | <programlisting># /etc/systemd/network/50-static.network |
2504 | [Match] | |
eac684ef TG |
2505 | Name=enp2s0 |
2506 | ||
2507 | [Network] | |
2508 | Address=192.168.0.15/24 | |
2509 | Gateway=192.168.0.1</programlisting> | |
9e35b3de ZJS |
2510 | |
2511 | <para>This brings interface <literal>enp2s0</literal> up with a static address. The | |
2512 | specified gateway will be used for a default route.</para> | |
798d3a52 | 2513 | </example> |
eac684ef | 2514 | |
798d3a52 | 2515 | <example> |
9e35b3de | 2516 | <title>DHCP on ethernet links</title> |
eac684ef | 2517 | |
9e35b3de ZJS |
2518 | <programlisting># /etc/systemd/network/80-dhcp.network |
2519 | [Match] | |
eac684ef TG |
2520 | Name=en* |
2521 | ||
2522 | [Network] | |
9c8ca3f7 | 2523 | DHCP=yes</programlisting> |
9e35b3de ZJS |
2524 | |
2525 | <para>This will enable DHCPv4 and DHCPv6 on all interfaces with names starting with | |
2526 | <literal>en</literal> (i.e. ethernet interfaces).</para> | |
798d3a52 | 2527 | </example> |
eac684ef | 2528 | |
4c94a4c2 | 2529 | <example> |
2530 | <title>IPv6 Prefix Delegation</title> | |
2531 | ||
2532 | <programlisting># /etc/systemd/network/55-ipv6-pd-upstream.network | |
2533 | [Match] | |
2534 | Name=enp1s0 | |
2535 | ||
2536 | [Network] | |
2537 | DHCP=ipv6</programlisting> | |
2538 | ||
2539 | <programlisting># /etc/systemd/network/56-ipv6-pd-downstream.network | |
2540 | [Match] | |
2541 | Name=enp2s0 | |
2542 | ||
2543 | [Network] | |
2544 | IPv6PrefixDelegation=dhcpv6</programlisting> | |
2545 | ||
2546 | <para>This will enable IPv6 PD on the interface enp1s0 as an upstream interface where the | |
2547 | DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.</para> | |
2548 | </example> | |
2549 | ||
798d3a52 | 2550 | <example> |
9e35b3de | 2551 | <title>A bridge with two enslaved links</title> |
f47c5c47 | 2552 | |
9e35b3de ZJS |
2553 | <programlisting># /etc/systemd/network/25-bridge-static.network |
2554 | [Match] | |
f47c5c47 | 2555 | Name=bridge0 |
2556 | ||
2557 | [Network] | |
2558 | Address=192.168.0.15/24 | |
2559 | Gateway=192.168.0.1 | |
2560 | DNS=192.168.0.1</programlisting> | |
f47c5c47 | 2561 | |
9e35b3de ZJS |
2562 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-1.network |
2563 | [Match] | |
f47c5c47 | 2564 | Name=enp2s0 |
2565 | ||
2566 | [Network] | |
2567 | Bridge=bridge0</programlisting> | |
9e35b3de ZJS |
2568 | |
2569 | <programlisting># /etc/systemd/network/25-bridge-slave-interface-2.network | |
2570 | [Match] | |
2571 | Name=wlp3s0 | |
2572 | ||
2573 | [Network] | |
2574 | Bridge=bridge0</programlisting> | |
2575 | ||
2576 | <para>This creates a bridge and attaches devices <literal>enp2s0</literal> and | |
2577 | <literal>wlp3s0</literal> to it. The bridge will have the specified static address | |
2578 | and network assigned, and a default route via the specified gateway will be | |
2579 | added. The specified DNS server will be added to the global list of DNS resolvers. | |
2580 | </para> | |
13b498f9 | 2581 | </example> |
9e35b3de | 2582 | |
13b498f9 | 2583 | <example> |
9e35b3de | 2584 | <title></title> |
13b498f9 | 2585 | |
9e35b3de ZJS |
2586 | <programlisting> |
2587 | # /etc/systemd/network/20-bridge-slave-interface-vlan.network | |
2588 | [Match] | |
13b498f9 TJ |
2589 | Name=enp2s0 |
2590 | ||
2591 | [Network] | |
2592 | Bridge=bridge0 | |
2593 | ||
2594 | [BridgeVLAN] | |
2595 | VLAN=1-32 | |
2596 | PVID=42 | |
2597 | EgressUntagged=42 | |
2598 | ||
2599 | [BridgeVLAN] | |
2600 | VLAN=100-200 | |
2601 | ||
2602 | [BridgeVLAN] | |
2603 | EgressUntagged=300-400</programlisting> | |
0a8a0fad | 2604 | |
9e35b3de ZJS |
2605 | <para>This overrides the configuration specified in the previous example for the |
2606 | interface <literal>enp2s0</literal>, and enables VLAN on that bridge port. VLAN IDs | |
2607 | 1-32, 42, 100-400 will be allowed. Packets tagged with VLAN IDs 42, 300-400 will be | |
2608 | untagged when they leave on this interface. Untagged packets which arrive on this | |
2609 | interface will be assigned VLAN ID 42.</para> | |
798d3a52 | 2610 | </example> |
0a8a0fad | 2611 | |
798d3a52 | 2612 | <example> |
9e35b3de | 2613 | <title>Various tunnels</title> |
0a8a0fad | 2614 | |
9e35b3de ZJS |
2615 | <programlisting>/etc/systemd/network/25-tunnels.network |
2616 | [Match] | |
2617 | Name=ens1 | |
0a8a0fad TG |
2618 | |
2619 | [Network] | |
9e35b3de ZJS |
2620 | Tunnel=ipip-tun |
2621 | Tunnel=sit-tun | |
2622 | Tunnel=gre-tun | |
2623 | Tunnel=vti-tun | |
2624 | </programlisting> | |
2625 | ||
2626 | <programlisting>/etc/systemd/network/25-tunnel-ipip.netdev | |
2627 | [NetDev] | |
2628 | Name=ipip-tun | |
2629 | Kind=ipip | |
2630 | </programlisting> | |
2631 | ||
2632 | <programlisting>/etc/systemd/network/25-tunnel-sit.netdev | |
2633 | [NetDev] | |
2634 | Name=sit-tun | |
2635 | Kind=sit | |
2636 | </programlisting> | |
2637 | ||
2638 | <programlisting>/etc/systemd/network/25-tunnel-gre.netdev | |
2639 | [NetDev] | |
2640 | Name=gre-tun | |
2641 | Kind=gre | |
2642 | </programlisting> | |
2643 | ||
2644 | <programlisting>/etc/systemd/network/25-tunnel-vti.netdev | |
2645 | [NetDev] | |
2646 | Name=vti-tun | |
2647 | Kind=vti | |
2648 | </programlisting> | |
2649 | ||
2650 | <para>This will bring interface <literal>ens1</literal> up and create an IPIP tunnel, | |
2651 | a SIT tunnel, a GRE tunnel, and a VTI tunnel using it.</para> | |
798d3a52 | 2652 | </example> |
0a8a0fad | 2653 | |
798d3a52 | 2654 | <example> |
9e35b3de | 2655 | <title>A bond device</title> |
0a8a0fad | 2656 | |
9e35b3de ZJS |
2657 | <programlisting># /etc/systemd/network/30-bond1.network |
2658 | [Match] | |
2659 | Name=bond1 | |
0a8a0fad TG |
2660 | |
2661 | [Network] | |
9e35b3de ZJS |
2662 | DHCP=ipv6 |
2663 | </programlisting> | |
0a8a0fad | 2664 | |
9e35b3de ZJS |
2665 | <programlisting># /etc/systemd/network/30-bond1.netdev |
2666 | [NetDev] | |
2667 | Name=bond1 | |
2668 | Kind=bond | |
2669 | </programlisting> | |
0a8a0fad | 2670 | |
301a21a8 | 2671 | <programlisting># /etc/systemd/network/30-bond1-dev1.network |
9e35b3de ZJS |
2672 | [Match] |
2673 | MACAddress=52:54:00:e9:64:41 | |
0a8a0fad TG |
2674 | |
2675 | [Network] | |
9e35b3de ZJS |
2676 | Bond=bond1 |
2677 | </programlisting> | |
d94facdc | 2678 | |
301a21a8 | 2679 | <programlisting># /etc/systemd/network/30-bond1-dev2.network |
9e35b3de ZJS |
2680 | [Match] |
2681 | MACAddress=52:54:00:e9:64:42 | |
d94facdc MH |
2682 | |
2683 | [Network] | |
9e35b3de | 2684 | Bond=bond1 |
6cb955c6 | 2685 | </programlisting> |
9e35b3de ZJS |
2686 | |
2687 | <para>This will create a bond device <literal>bond1</literal> and enslave the two | |
2688 | devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP | |
2689 | will be used to acquire an address.</para> | |
6cb955c6 AR |
2690 | </example> |
2691 | ||
2692 | <example> | |
9e35b3de ZJS |
2693 | <title>Virtual Routing and Forwarding (VRF)</title> |
2694 | <para>Add the <literal>bond1</literal> interface to the VRF master interface | |
2695 | <literal>vrf1</literal>. This will redirect routes generated on this interface to be | |
11d38b90 AR |
2696 | within the routing table defined during VRF creation. For kernels before 4.8 traffic |
2697 | won't be redirected towards the VRFs routing table unless specific ip-rules are added. | |
2698 | </para> | |
9e35b3de ZJS |
2699 | <programlisting># /etc/systemd/network/25-vrf.network |
2700 | [Match] | |
6cb955c6 AR |
2701 | Name=bond1 |
2702 | ||
2703 | [Network] | |
9e35b3de | 2704 | VRF=vrf1 |
d94facdc MH |
2705 | </programlisting> |
2706 | </example> | |
2707 | ||
42125eda SS |
2708 | <example> |
2709 | <title>MacVTap</title> | |
2710 | <para>This brings up a network interface <literal>macvtap-test</literal> | |
2711 | and attaches it to <literal>enp0s25</literal>.</para> | |
83ddf5d3 | 2712 | <programlisting># /usr/lib/systemd/network/25-macvtap.network |
42125eda SS |
2713 | [Match] |
2714 | Name=enp0s25 | |
2715 | ||
2716 | [Network] | |
2717 | MACVTAP=macvtap-test | |
2718 | </programlisting> | |
2719 | </example> | |
98d20a17 | 2720 | |
2721 | <example> | |
2722 | <title>A Xfrm interface with physical underlying device.</title> | |
2723 | ||
2724 | <programlisting># /etc/systemd/network/27-xfrm.netdev | |
2725 | [NetDev] | |
2726 | Name=xfrm0 | |
2727 | ||
2728 | [Xfrm] | |
2729 | InterfaceId=7</programlisting> | |
2730 | ||
2731 | <programlisting># /etc/systemd/network/27-eth0.network | |
2732 | [Match] | |
2733 | Name=eth0 | |
2734 | ||
2735 | [Network] | |
2736 | Xfrm=xfrm0</programlisting> | |
2737 | ||
2738 | <para>This creates a <literal>xfrm0</literal> interface and binds it to the <literal>eth0</literal> device. | |
2739 | This allows hardware based ipsec offloading to the <literal>eth0</literal> nic. | |
2740 | If offloading is not needed, xfrm interfaces can be assigned to the <literal>lo</literal> device. | |
2741 | </para> | |
2742 | </example> | |
798d3a52 ZJS |
2743 | </refsect1> |
2744 | ||
2745 | <refsect1> | |
2746 | <title>See Also</title> | |
2747 | <para> | |
2748 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
f41b446a | 2749 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
798d3a52 | 2750 | <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
aaa297d4 LP |
2751 | <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
2752 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
798d3a52 ZJS |
2753 | </para> |
2754 | </refsect1> | |
eac684ef TG |
2755 | |
2756 | </refentry> |