]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.link.xml
man/systemd-sysext: list ephemeral/ephemeral-import in the list of options
[thirdparty/systemd.git] / man / systemd.link.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
eea10b26 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
db9ecf05 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
1ff28eae 5
c18dde32
ZJS
6<refentry id="systemd.link"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
798d3a52
ZJS
8 <refentryinfo>
9 <title>systemd.link</title>
10 <productname>systemd</productname>
798d3a52 11 </refentryinfo>
1ff28eae 12
798d3a52
ZJS
13 <refmeta>
14 <refentrytitle>systemd.link</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
1ff28eae 17
798d3a52
ZJS
18 <refnamediv>
19 <refname>systemd.link</refname>
20 <refpurpose>Network device configuration</refpurpose>
21 </refnamediv>
1ff28eae 22
798d3a52
ZJS
23 <refsynopsisdiv>
24 <para><filename><replaceable>link</replaceable>.link</filename></para>
25 </refsynopsisdiv>
1ff28eae 26
798d3a52
ZJS
27 <refsect1>
28 <title>Description</title>
1ff28eae 29
d4de2b2a 30 <para>A plain ini-style text file that encodes configuration for matching network devices, used by
55cf7779 31 <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> and in
d4de2b2a 32 particular its <command>net_setup_link</command> builtin. See
675fa6ea 33 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry> for a
d4de2b2a 34 general description of the syntax.</para>
1ff28eae 35
a50fa2a4
TS
36 <para>Note that some distributions may incorporate <filename>.link</filename> files in their early boot
37 facilities (e.g. by including copies of the <filename>.link</filename> files in initramfs). As such it
38 may be necessary to take manual steps to ensure that any local changes are consistent with early-boot
39 storage facilities. The relevant distribution-specific documentation should be consulted.</para>
40
cc9b6bdc
YW
41 <para>The <filename>.link</filename> files are read from the files located in the system network
42 directory <filename>/usr/lib/systemd/network</filename> and
7b529bfc
ZJS
43 <filename>/usr/local/lib/systemd/network</filename>
44 <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />,
45 the volatile runtime network directory
e406e8a2 46 <filename>/run/systemd/network</filename>, and the local administration network directory
cc9b6bdc
YW
47 <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
48 processed in alphanumeric order, regardless of the directories in which they live. However, files
49 with identical filenames replace each other. It is recommended that each filename is prefixed with
2c453485
YW
50 a number smaller than <literal>70</literal> (e.g. <filename>10-eth0.link</filename>). Otherwise, the
51 default <filename>.link</filename> files or those generated by
cc9b6bdc
YW
52 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
53 may take precedence over user configured files. Files in <filename>/etc/</filename> have the
54 highest priority, files in <filename>/run/</filename> take precedence over files with the same name
55 in <filename>/usr/lib/</filename>. This can be used to override a system-supplied link file with a
e406e8a2
YW
56 local file if needed. As a special case, an empty file (file size 0) or symlink with the same name
57 pointing to <filename>/dev/null</filename> disables the configuration file entirely (it is
58 "masked").</para>
59
60 <para>Along with the link file <filename>foo.link</filename>, a "drop-in" directory
61 <filename>foo.link.d/</filename> may exist. All files with the suffix <literal>.conf</literal>
e6655fbe
YW
62 from this directory will be merged in the alphanumeric order and parsed after the main file itself
63 has been parsed. This is useful to alter or add configuration settings, without having to modify
64 the main configuration file. Each drop-in file must have appropriate section headers.</para>
e406e8a2
YW
65
66 <para>In addition to <filename>/etc/systemd/network</filename>, drop-in <literal>.d</literal>
67 directories can be placed in <filename>/usr/lib/systemd/network</filename> or
68 <filename>/run/systemd/network</filename> directories. Drop-in files in <filename>/etc/</filename>
69 take precedence over those in <filename>/run/</filename> which in turn take precedence over those
70 in <filename>/usr/lib/</filename>. Drop-in files under any of these directories take precedence
71 over the main link file wherever located.</para>
1ff28eae 72
d7dce7b6
ZJS
73 <para>The link file contains a [Match] section, which determines if a given link file may be applied to a
74 given device, as well as a [Link] section specifying how the device should be configured. The first (in
75 lexical order) of the link files that matches a given device is applied. Note that a default file
76 <filename>99-default.link</filename> is shipped by the system. Any user-supplied
77 <filename>.link</filename> should hence have a lexically earlier name to be considered at all.</para>
78
79 <para>See <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
80 diagnosing problems with <filename>.link</filename> files.</para>
798d3a52 81 </refsect1>
102bd40e 82
798d3a52
ZJS
83 <refsect1>
84 <title>[Match] Section Options</title>
1ff28eae 85
cc9b6bdc
YW
86 <para>A link file is said to match an interface if all matches specified by the [Match] section are
87 satisfied. When a link file does not contain valid settings in [Match] section, then the file will
88 match all interfaces and <command>systemd-udevd</command> warns about that. Hint: to avoid the
89 warning and to make it clear that all interfaces shall be matched, add the following:
84ea567e 90 <programlisting>OriginalName=*</programlisting>
cc9b6bdc
YW
91 The first (in alphanumeric order) of the link files that matches a given interface is applied, all
92 later files are ignored, even if they match as well. The following keys are accepted:</para>
1ff28eae 93
798d3a52 94 <variablelist class='network-directives'>
d9b20454
ZJS
95 <!-- This list is reused in systemd.network(3), hence maintain a specific order:
96 1. device matches shared between the two lists
97 2. non-shared settings
98 3. host matches shared between the two lists
99 -->
100
101 <varlistentry id='mac-address'>
798d3a52
ZJS
102 <term><varname>MACAddress=</varname></term>
103 <listitem>
52135071
YW
104 <para>A whitespace-separated list of hardware addresses. The acceptable formats are:</para>
105
106 <variablelist>
107 <varlistentry>
108 <term><option>colon-delimited hexadecimal</option></term>
109 <listitem><para>
110 Each field must be one byte.
111 E.g. <literal>12:34:56:78:90:ab</literal> or <literal>AA:BB:CC:DD:EE:FF</literal>.
ec07c3c8
AK
112 </para>
113
114 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
52135071
YW
115 </varlistentry>
116 <varlistentry>
117 <term><option>hyphen-delimited hexadecimal</option></term>
118 <listitem><para>
119 Each field must be one byte.
120 E.g. <literal>12-34-56-78-90-ab</literal> or <literal>AA-BB-CC-DD-EE-FF</literal>.
ec07c3c8
AK
121 </para>
122
123 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
52135071
YW
124 </varlistentry>
125 <varlistentry>
126 <term><option>dot-delimited hexadecimal</option></term>
127 <listitem><para>
128 Each field must be two bytes.
129 E.g. <literal>1234.5678.90ab</literal> or <literal>AABB.CCDD.EEFF</literal>.
ec07c3c8
AK
130 </para>
131
132 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
52135071
YW
133 </varlistentry>
134 <varlistentry>
135 <term><option>IPv4 address format</option></term>
136 <listitem><para>
137 E.g. <literal>127.0.0.1</literal> or <literal>192.168.0.1</literal>.
ec07c3c8
AK
138 </para>
139
140 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
52135071
YW
141 </varlistentry>
142 <varlistentry>
143 <term><option>IPv6 address format</option></term>
144 <listitem><para>
145 E.g. <literal>2001:0db8:85a3::8a2e:0370:7334</literal> or <literal>::1</literal>.
ec07c3c8
AK
146 </para>
147
148 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
52135071
YW
149 </varlistentry>
150 </variablelist>
151
152 <para>The total length of each MAC address must be 4 (for IPv4 tunnel), 6 (for Ethernet), 16
153 (for IPv6 tunnel), or 20 (for InfiniBand). This option may appear more than once, in which
154 case the lists are merged. If the empty string is assigned to this option, the list of
155 hardware addresses defined prior to this is reset. Defaults to unset.</para>
aefdc112
AK
156
157 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
158 </listitem>
159 </varlistentry>
d9b20454
ZJS
160
161 <varlistentry id='permanent-mac-address'>
4bb7cc82
YW
162 <term><varname>PermanentMACAddress=</varname></term>
163 <listitem>
164 <para>A whitespace-separated list of hardware's permanent addresses. While
165 <varname>MACAddress=</varname> matches the device's current MAC address, this matches the
166 device's permanent MAC address, which may be different from the current one. Use full
52135071
YW
167 colon-, hyphen- or dot-delimited hexadecimal, or IPv4 or IPv6 address format. This option may
168 appear more than once, in which case the lists are merged. If the empty string is assigned to
169 this option, the list of hardware addresses defined prior to this is reset. Defaults to
170 unset.</para>
ec07c3c8
AK
171
172 <xi:include href="version-info.xml" xpointer="v245"/>
4bb7cc82
YW
173 </listitem>
174 </varlistentry>
d9b20454
ZJS
175
176 <varlistentry id='path'>
798d3a52
ZJS
177 <term><varname>Path=</varname></term>
178 <listitem>
5256e00e
TG
179 <para>A whitespace-separated list of shell-style globs matching
180 the persistent path, as exposed by the udev property
d7dce7b6 181 <varname>ID_PATH</varname>.</para>
aefdc112
AK
182
183 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
184 </listitem>
185 </varlistentry>
d9b20454
ZJS
186
187 <varlistentry id='driver'>
798d3a52
ZJS
188 <term><varname>Driver=</varname></term>
189 <listitem>
d7dce7b6 190 <para>A whitespace-separated list of shell-style globs matching the driver currently bound to the
d9b20454
ZJS
191 device, as exposed by the udev property <varname>ID_NET_DRIVER</varname> of its parent device, or
192 if that is not set, the driver as exposed by <command>ethtool -i</command> of the device itself.
193 If the list is prefixed with a "!", the test is inverted.</para>
aefdc112
AK
194
195 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
196 </listitem>
197 </varlistentry>
d9b20454
ZJS
198
199 <varlistentry id='type'>
798d3a52
ZJS
200 <term><varname>Type=</varname></term>
201 <listitem>
ef62949a 202 <para>A whitespace-separated list of shell-style globs matching the device type, as exposed by
2480ca95
LM
203 <command>networkctl list</command>. If the list is prefixed with a "!", the test is inverted.
204 Some valid values are <literal>ether</literal>, <literal>loopback</literal>, <literal>wlan</literal>, <literal>wwan</literal>.
205 Valid types are named either from the udev <literal>DEVTYPE</literal> attribute, or
206 <literal>ARPHRD_</literal> macros in <filename>linux/if_arp.h</filename>, so this is not comprehensive.
ef62949a 207 </para>
aefdc112
AK
208
209 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
210 </listitem>
211 </varlistentry>
d9b20454 212
65022cd7
YW
213 <varlistentry id='kind'>
214 <term><varname>Kind=</varname></term>
215 <listitem>
216 <para>A whitespace-separated list of shell-style globs matching the device kind, as exposed by
217 <command>networkctl status <replaceable>INTERFACE</replaceable></command> or
218 <command>ip -d link show <replaceable>INTERFACE</replaceable></command>. If the list is
219 prefixed with a "!", the test is inverted. Some valid values are <literal>bond</literal>,
220 <literal>bridge</literal>, <literal>gre</literal>, <literal>tun</literal>,
221 <literal>veth</literal>. Valid kinds are given by netlink's <literal>IFLA_INFO_KIND</literal>
222 attribute, so this is not comprehensive.
223 </para>
ec07c3c8
AK
224
225 <xi:include href="version-info.xml" xpointer="v251"/>
65022cd7
YW
226 </listitem>
227 </varlistentry>
228
d9b20454 229 <varlistentry id='property'>
44005bfb
YW
230 <term><varname>Property=</varname></term>
231 <listitem>
387f6955 232 <para>A whitespace-separated list of udev property names with their values after equals sign
44005bfb
YW
233 (<literal>=</literal>). If multiple properties are specified, the test results are ANDed.
234 If the list is prefixed with a "!", the test is inverted. If a value contains white
235 spaces, then please quote whole key and value pair. If a value contains quotation, then
236 please escape the quotation with <literal>\</literal>.</para>
237
238 <para>Example: if a .link file has the following:
239 <programlisting>Property=ID_MODEL_ID=9999 "ID_VENDOR_FROM_DATABASE=vendor name" "KEY=with \"quotation\""</programlisting>
240 then, the .link file matches only when an interface has all the above three properties.
241 </para>
ec07c3c8
AK
242
243 <xi:include href="version-info.xml" xpointer="v243"/>
44005bfb
YW
244 </listitem>
245 </varlistentry>
d9b20454 246
798d3a52 247 <varlistentry>
d9b20454
ZJS
248 <term><varname>OriginalName=</varname></term>
249 <listitem>
250 <para>A whitespace-separated list of shell-style globs matching the device name, as exposed by the
251 udev property "INTERFACE". This cannot be used to match on names that have already been changed
252 from userspace. Caution is advised when matching on kernel-assigned names, as they are known to be
253 unstable between reboots.</para>
ec07c3c8
AK
254
255 <xi:include href="version-info.xml" xpointer="v218"/>
d9b20454
ZJS
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id='host'>
798d3a52
ZJS
260 <term><varname>Host=</varname></term>
261 <listitem>
d689bbca 262 <para>Matches against the hostname or machine ID of the host. See <varname>ConditionHost=</varname> in
798d3a52 263 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
d689bbca 264 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 265 If an empty string is assigned, the previously assigned value is cleared.
d689bbca 266 </para>
aefdc112
AK
267
268 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
269 </listitem>
270 </varlistentry>
d9b20454
ZJS
271
272 <varlistentry id='virtualization'>
798d3a52
ZJS
273 <term><varname>Virtualization=</varname></term>
274 <listitem>
d689bbca
YW
275 <para>Checks whether the system is executed in a virtualized environment and optionally test
276 whether it is a specific implementation. See <varname>ConditionVirtualization=</varname> in
798d3a52 277 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
d689bbca 278 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 279 If an empty string is assigned, the previously assigned value is cleared.
d689bbca 280 </para>
aefdc112
AK
281
282 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
283 </listitem>
284 </varlistentry>
d9b20454
ZJS
285
286 <varlistentry id='kernel-command-line'>
798d3a52
ZJS
287 <term><varname>KernelCommandLine=</varname></term>
288 <listitem>
d689bbca 289 <para>Checks whether a specific kernel command line option is set. See
d7dce7b6 290 <varname>ConditionKernelCommandLine=</varname> in
798d3a52 291 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
d689bbca 292 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 293 If an empty string is assigned, the previously assigned value is cleared.
d689bbca 294 </para>
aefdc112
AK
295
296 <xi:include href="version-info.xml" xpointer="v211"/>
d689bbca
YW
297 </listitem>
298 </varlistentry>
d9b20454
ZJS
299
300 <varlistentry id='kernel-version'>
d689bbca
YW
301 <term><varname>KernelVersion=</varname></term>
302 <listitem>
303 <para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain
304 expression. See <varname>ConditionKernelVersion=</varname> in
305 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
306 details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 307 If an empty string is assigned, the previously assigned value is cleared.
d689bbca 308 </para>
ec07c3c8
AK
309
310 <xi:include href="version-info.xml" xpointer="v237"/>
798d3a52
ZJS
311 </listitem>
312 </varlistentry>
d9b20454 313
c154bb65
MC
314 <varlistentry id='version'>
315 <term><varname>Version=</varname></term>
316 <listitem>
317 <para>Checks whether a software version matches a certain expression. See
318 <varname>ConditionVersion=</varname> in
319 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
320 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
321 If an empty string is assigned, the previously assigned value is cleared.</para>
322
323 <xi:include href="version-info.xml" xpointer="v258"/>
324 </listitem>
325 </varlistentry>
326
4f80cfca
LP
327 <varlistentry id='credential'>
328 <term><varname>Credential=</varname></term>
329 <listitem>
330 <para>Checks whether the specified credential was passed to the
425e2934 331 <filename>systemd-udevd.service</filename> service. See <ulink
4f80cfca
LP
332 url="https://systemd.io/CREDENTIALS">System and Service Credentials</ulink> for details. When
333 prefixed with an exclamation mark (<literal>!</literal>), the result is negated. If an empty
334 string is assigned, the previously assigned value is cleared.
335 </para>
ec07c3c8
AK
336
337 <xi:include href="version-info.xml" xpointer="v252"/>
4f80cfca
LP
338 </listitem>
339 </varlistentry>
340
d9b20454 341 <varlistentry id='architecture'>
798d3a52
ZJS
342 <term><varname>Architecture=</varname></term>
343 <listitem>
d689bbca
YW
344 <para>Checks whether the system is running on a specific architecture. See
345 <varname>ConditionArchitecture=</varname> in
798d3a52 346 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
d689bbca 347 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 348 If an empty string is assigned, the previously assigned value is cleared.
d689bbca 349 </para>
aefdc112
AK
350
351 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52 352 </listitem>
cbcdcaaa
UKK
353 </varlistentry>
354
355 <varlistentry id='firmware'>
356 <term><varname>Firmware=</varname></term>
357 <listitem>
358 <para>Checks whether the system is running on a machine with the specified firmware. See
359 <varname>ConditionFirmware=</varname> in
360 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
361 for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
462511c8 362 If an empty string is assigned, the previously assigned value is cleared.
cbcdcaaa 363 </para>
ec07c3c8
AK
364
365 <xi:include href="version-info.xml" xpointer="v249"/>
cbcdcaaa 366 </listitem>
798d3a52
ZJS
367 </varlistentry>
368 </variablelist>
1ff28eae 369
798d3a52 370 </refsect1>
102bd40e 371
798d3a52
ZJS
372 <refsect1>
373 <title>[Link] Section Options</title>
102bd40e 374
d7dce7b6 375 <para>The [Link] section accepts the following
798d3a52 376 keys:</para>
1ff28eae 377
798d3a52
ZJS
378 <variablelist class='network-directives'>
379 <varlistentry>
380 <term><varname>Description=</varname></term>
381 <listitem>
382 <para>A description of the device.</para>
aefdc112 383
12b1e040 384 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
385 </listitem>
386 </varlistentry>
046286e8
YW
387 <varlistentry>
388 <term><varname>Property=</varname></term>
389 <listitem>
390 <para>Set specified udev properties. This takes space separated list of key-value pairs
391 concatenated with equal sign (<literal>=</literal>). Example:
392 <programlisting>Property=HOGE=foo BAR=baz</programlisting>
393 This option supports simple specifier expansion, see the Specifiers section below.
394 This option can be specified multiple times. If an empty string is assigned, then the all previous
395 assignments are cleared.</para>
396
397 <para>This setting is useful to configure the <literal>ID_NET_MANAGED_BY=</literal> property which
398 declares which network management service shall manage the interface, which is respected by
b082968d
ZJS
399 <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
400 and others. Use
046286e8
YW
401 <programlisting>Property=ID_NET_MANAGED_BY=io.systemd.Network</programlisting>
402 to declare explicitly that <command>systemd-networkd</command> shall manage the interface, or set
403 the property to something else to declare explicitly it shall not do so. See
404 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
405 for details how this property is used to match interface names.</para>
406
407 <xi:include href="version-info.xml" xpointer="v256"/>
408 </listitem>
409 </varlistentry>
410 <varlistentry>
411 <term><varname>ImportProperty=</varname></term>
412 <listitem>
413 <para>Import specified udev properties from the saved database. This takes space separated list of
414 property names. Example: <programlisting>ImportProperty=HOGE BAR</programlisting>
415 This option supports simple specifier expansion, see the Specifiers section below.
416 This option can be specified multiple times. If an empty string is assigned, then the all previous
417 assignments are cleared.</para>
418 <para>If the same property is also set in <varname>Property=</varname> in the above, then the
419 imported property value will be overridden by the value specified in <varname>Property=</varname>.
420 </para>
421
422 <xi:include href="version-info.xml" xpointer="v256"/>
423 </listitem>
424 </varlistentry>
425 <varlistentry>
426 <term><varname>UnsetProperty=</varname></term>
427 <listitem>
428 <para>Unset specified udev properties. This takes space separated list of
429 property names. Example: <programlisting>ImportProperty=HOGE BAR</programlisting>
430 This option supports simple specifier expansion, see the Specifiers section below.
431 This option can be specified multiple times. If an empty string is assigned, then the all previous
432 assignments are cleared.</para>
433 <para>This setting is applied after <varname>ImportProperty=</varname> and
434 <varname>Property=</varname> are applied. Hence, if the same property is specified in
435 <varname>ImportProperty=</varname> or <varname>Property=</varname>, then the imported or specified
436 property value will be ignored, and the property will be unset.</para>
437
438 <xi:include href="version-info.xml" xpointer="v256"/>
439 </listitem>
440 </varlistentry>
798d3a52
ZJS
441 <varlistentry>
442 <term><varname>Alias=</varname></term>
443 <listitem>
d7dce7b6 444 <para>The <varname>ifalias</varname> interface property is set to this value.</para>
aefdc112 445
12b1e040 446 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
447 </listitem>
448 </varlistentry>
449 <varlistentry>
450 <term><varname>MACAddressPolicy=</varname></term>
451 <listitem>
452 <para>The policy by which the MAC address should be set. The
453 available policies are:
454 </para>
1ff28eae 455
798d3a52
ZJS
456 <variablelist>
457 <varlistentry>
d7dce7b6 458 <term><option>persistent</option></term>
798d3a52
ZJS
459 <listitem>
460 <para>If the hardware has a persistent MAC address, as
461 most hardware should, and if it is used by the kernel,
462 nothing is done. Otherwise, a new MAC address is
463 generated which is guaranteed to be the same on every
464 boot for the given machine and the given device, but
1c25683e 465 which is otherwise random. This feature depends on ID_NET_NAME_*
a8eaaee7 466 properties to exist for the link. On hardware where these
b938cb90 467 properties are not set, the generation of a persistent MAC address
1c25683e 468 will fail.</para>
aefdc112
AK
469
470 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
471 </listitem>
472 </varlistentry>
473 <varlistentry>
d7dce7b6 474 <term><option>random</option></term>
798d3a52
ZJS
475 <listitem>
476 <para>If the kernel is using a random MAC address,
477 nothing is done. Otherwise, a new address is randomly
478 generated each time the device appears, typically at
b938cb90 479 boot. Either way, the random address will have the
2e229e0c
TG
480 <literal>unicast</literal> and
481 <literal>locally administered</literal> bits set.</para>
aefdc112
AK
482
483 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
484 </listitem>
485 </varlistentry>
66d3752e 486 <varlistentry>
d7dce7b6 487 <term><option>none</option></term>
66d3752e 488 <listitem>
6ca4a070
YW
489 <para>Keeps the MAC address assigned by the kernel. Or use the MAC address specified in
490 <varname>MACAddress=</varname>.</para>
ec07c3c8
AK
491
492 <xi:include href="version-info.xml" xpointer="v227"/>
66d3752e
JK
493 </listitem>
494 </varlistentry>
798d3a52 495 </variablelist>
6ca4a070
YW
496
497 <para>An empty string assignment is equivalent to setting <literal>none</literal>.</para>
aefdc112
AK
498
499 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
500 </listitem>
501 </varlistentry>
502 <varlistentry>
503 <term><varname>MACAddress=</varname></term>
504 <listitem>
6ca4a070
YW
505 <para>The interface MAC address to use. For this setting to take effect,
506 <varname>MACAddressPolicy=</varname> must either be unset, empty, or <literal>none</literal>.
507 </para>
ec07c3c8 508
aefdc112 509 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
510 </listitem>
511 </varlistentry>
512 <varlistentry>
513 <term><varname>NamePolicy=</varname></term>
514 <listitem>
3907446f 515 <para>An ordered, space-separated list of policies by which the interface name should be set.
d7dce7b6 516 <varname>NamePolicy=</varname> may be disabled by specifying <option>net.ifnames=0</option> on the
58576937 517 kernel command line. Each of the policies may fail, and the first successful one is used. The name
d7dce7b6 518 is not set directly, but is exported to udev as the property <option>ID_NET_NAME</option>, which
58576937
ZJS
519 is, by default, used by a
520 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
521 rule to set <varname>NAME</varname>. The available policies are:
3907446f 522 </para>
1ff28eae 523
798d3a52
ZJS
524 <variablelist>
525 <varlistentry>
d7dce7b6 526 <term><option>kernel</option></term>
798d3a52
ZJS
527 <listitem>
528 <para>If the kernel claims that the name it has set
529 for a device is predictable, then no renaming is
530 performed.</para>
ec07c3c8
AK
531
532 <xi:include href="version-info.xml" xpointer="v216"/>
798d3a52
ZJS
533 </listitem>
534 </varlistentry>
535 <varlistentry>
d7dce7b6 536 <term><option>database</option></term>
798d3a52
ZJS
537 <listitem>
538 <para>The name is set based on entries in the udev's
539 Hardware Database with the key
d7dce7b6 540 <varname>ID_NET_NAME_FROM_DATABASE</varname>.
798d3a52 541 </para>
aefdc112
AK
542
543 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
544 </listitem>
545 </varlistentry>
546 <varlistentry>
d7dce7b6 547 <term><option>onboard</option></term>
798d3a52
ZJS
548 <listitem>
549 <para>The name is set based on information given by
550 the firmware for on-board devices, as exported by the
d7dce7b6 551 udev property <varname>ID_NET_NAME_ONBOARD</varname>.
0b1e5b6e 552 See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
798d3a52 553 </para>
aefdc112
AK
554
555 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
556 </listitem>
557 </varlistentry>
558 <varlistentry>
d7dce7b6 559 <term><option>slot</option></term>
798d3a52
ZJS
560 <listitem>
561 <para>The name is set based on information given by
562 the firmware for hot-plug devices, as exported by the
d7dce7b6 563 udev property <varname>ID_NET_NAME_SLOT</varname>.
0b1e5b6e 564 See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
798d3a52 565 </para>
aefdc112
AK
566
567 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
568 </listitem>
569 </varlistentry>
570 <varlistentry>
d7dce7b6 571 <term><option>path</option></term>
798d3a52
ZJS
572 <listitem>
573 <para>The name is set based on the device's physical
574 location, as exported by the udev property
0b1e5b6e
ZJS
575 <varname>ID_NET_NAME_PATH</varname>.
576 See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
577 </para>
aefdc112
AK
578
579 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
580 </listitem>
581 </varlistentry>
582 <varlistentry>
d7dce7b6 583 <term><option>mac</option></term>
798d3a52
ZJS
584 <listitem>
585 <para>The name is set based on the device's persistent
586 MAC address, as exported by the udev property
0b1e5b6e
ZJS
587 <varname>ID_NET_NAME_MAC</varname>.
588 See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
589 </para>
aefdc112
AK
590
591 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
592 </listitem>
593 </varlistentry>
3907446f 594 <varlistentry>
d7dce7b6 595 <term><option>keep</option></term>
3907446f
ZJS
596 <listitem>
597 <para>If the device already had a name given by userspace (as part of creation of the device
598 or a rename), keep it.</para>
ec07c3c8
AK
599
600 <xi:include href="version-info.xml" xpointer="v241"/>
798d3a52
ZJS
601 </listitem>
602 </varlistentry>
603 </variablelist>
aefdc112
AK
604
605 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
606 </listitem>
607 </varlistentry>
608 <varlistentry>
609 <term><varname>Name=</varname></term>
610 <listitem>
58576937
ZJS
611 <para>The interface name to use. This option has lower precedence than
612 <varname>NamePolicy=</varname>, so for this setting to take effect, <varname>NamePolicy=</varname>
613 must either be unset, empty, disabled, or all policies configured there must fail. Also see the
614 example below with <literal>Name=dmz0</literal>.</para>
1b934761 615
8f598a46
LP
616 <para>Note that specifying a name that the kernel might use for another interface (for example
617 <literal>eth0</literal>) is dangerous because the name assignment done by udev will race with the
618 assignment done by the kernel, and only one interface may use the name. Depending on the order of
619 operations, either udev or the kernel will win, making the naming unpredictable. It is best to use
620 some different prefix, for example <literal>internal0</literal>/<literal>external0</literal> or
621 <literal>lan0</literal>/<literal>lan1</literal>/<literal>lan3</literal>.</para>
622
623 <para>Interface names must have a minimum length of 1 character and a maximum length of 15
624 characters, and may contain any 7bit ASCII character, with the exception of control characters,
625 <literal>:</literal>, <literal>/</literal> and <literal>%</literal>. While <literal>.</literal> is
44855c77 626 an allowed character, it is recommended to avoid it when naming interfaces as various tools (such as
8f598a46
LP
627 <citerefentry><refentrytitle>resolvconf</refentrytitle><manvolnum>1</manvolnum></citerefentry>) use
628 it as separator character. Also, fully numeric interface names are not allowed (in order to avoid
2fa7626e 629 ambiguity with interface specification by numeric indexes), nor are the special strings
8f598a46
LP
630 <literal>.</literal>, <literal>..</literal>, <literal>all</literal> and
631 <literal>default</literal>.</para>
aefdc112
AK
632
633 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
634 </listitem>
635 </varlistentry>
ef1d2c07
YW
636 <varlistentry>
637 <term><varname>AlternativeNamesPolicy=</varname></term>
638 <listitem>
639 <para>A space-separated list of policies by which the interface's alternative names
640 should be set. Each of the policies may fail, and all successful policies are used. The
641 available policies are <literal>database</literal>, <literal>onboard</literal>,
642 <literal>slot</literal>, <literal>path</literal>, and <literal>mac</literal>. If the
643 kernel does not support the alternative names, then this setting will be ignored.
644 </para>
ec07c3c8
AK
645
646 <xi:include href="version-info.xml" xpointer="v245"/>
ef1d2c07
YW
647 </listitem>
648 </varlistentry>
a5053a15
YW
649 <varlistentry>
650 <term><varname>AlternativeName=</varname></term>
651 <listitem>
652 <para>The alternative interface name to use. This option can be specified multiple times.
653 If the empty string is assigned to this option, the list is reset, and all prior assignments
bb181dd4
YW
654 have no effect. If the kernel does not support the alternative names, then this setting will
655 be ignored.</para>
8f598a46
LP
656
657 <para>Alternative interface names may be used to identify interfaces in various tools. In contrast
658 to the primary name (as configured with <varname>Name=</varname> above) there may be multiple
659 alternative names referring to the same interface. Alternative names may have a maximum length of
660 127 characters, in contrast to the 15 allowed for the primary interface name, but otherwise are
661 subject to the same naming constraints.</para>
ec07c3c8
AK
662
663 <xi:include href="version-info.xml" xpointer="v245"/>
a5053a15
YW
664 </listitem>
665 </varlistentry>
face9fcc
YW
666 <varlistentry>
667 <term><varname>TransmitQueues=</varname></term>
668 <listitem>
669 <para>Specifies the device's number of transmit queues. An integer in the range 1…4096.
670 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
671
672 <xi:include href="version-info.xml" xpointer="v248"/>
face9fcc
YW
673 </listitem>
674 </varlistentry>
675 <varlistentry>
676 <term><varname>ReceiveQueues=</varname></term>
677 <listitem>
678 <para>Specifies the device's number of receive queues. An integer in the range 1…4096.
679 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
680
681 <xi:include href="version-info.xml" xpointer="v248"/>
face9fcc
YW
682 </listitem>
683 </varlistentry>
ef4a91a7 684 <varlistentry>
1f8dc96c 685 <term><varname>TransmitQueueLength=</varname></term>
ef4a91a7
686 <listitem>
687 <para>Specifies the transmit queue length of the device in number of packets. An unsigned integer
1d3a473b 688 in the range 0…4294967294. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
689
690 <xi:include href="version-info.xml" xpointer="v248"/>
ef4a91a7
691 </listitem>
692 </varlistentry>
798d3a52
ZJS
693 <varlistentry>
694 <term><varname>MTUBytes=</varname></term>
695 <listitem>
696 <para>The maximum transmission unit in bytes to set for the
be0d27ee 697 device. The usual suffixes K, M, G are supported and are
798d3a52 698 understood to the base of 1024.</para>
aefdc112
AK
699
700 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
701 </listitem>
702 </varlistentry>
703 <varlistentry>
704 <term><varname>BitsPerSecond=</varname></term>
705 <listitem>
706 <para>The speed to set for the device, the value is rounded
be0d27ee 707 down to the nearest Mbps. The usual suffixes K, M, G are
798d3a52 708 supported and are understood to the base of 1000.</para>
aefdc112
AK
709
710 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
711 </listitem>
712 </varlistentry>
713 <varlistentry>
714 <term><varname>Duplex=</varname></term>
715 <listitem>
d7dce7b6
ZJS
716 <para>The duplex mode to set for the device. The accepted values are <option>half</option> and
717 <option>full</option>.</para>
aefdc112
AK
718
719 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
720 </listitem>
721 </varlistentry>
a39f92d3
SS
722 <varlistentry>
723 <term><varname>AutoNegotiation=</varname></term>
724 <listitem>
9b6ffef3 725 <para>Takes a boolean. If set to yes, automatic negotiation of transmission parameters is enabled.
a39f92d3
SS
726 Autonegotiation is a procedure by which two connected ethernet devices choose
727 common transmission parameters, such as speed, duplex mode, and flow control.
9b6ffef3 728 When unset, the kernel's default will be used.</para>
a39f92d3 729
a0e1ad10 730 <para>Note that if autonegotiation is enabled, speed and duplex settings are
11fcfc53 731 read-only. If autonegotiation is disabled, speed and duplex settings are writable
a39f92d3 732 if the driver supports multiple link modes.</para>
ec07c3c8
AK
733
734 <xi:include href="version-info.xml" xpointer="v233"/>
a39f92d3
SS
735 </listitem>
736 </varlistentry>
798d3a52
ZJS
737 <varlistentry>
738 <term><varname>WakeOnLan=</varname></term>
739 <listitem>
c50404ae
YW
740 <para>The Wake-on-LAN policy to set for the device. Takes the special value
741 <literal>off</literal> which disables Wake-on-LAN, or space separated list of the following
742 words:</para>
1ff28eae 743
798d3a52
ZJS
744 <variablelist>
745 <varlistentry>
d7dce7b6 746 <term><option>phy</option></term>
798d3a52
ZJS
747 <listitem>
748 <para>Wake on PHY activity.</para>
aefdc112
AK
749
750 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
751 </listitem>
752 </varlistentry>
617da14c 753 <varlistentry>
d7dce7b6 754 <term><option>unicast</option></term>
617da14c
SS
755 <listitem>
756 <para>Wake on unicast messages.</para>
ec07c3c8
AK
757
758 <xi:include href="version-info.xml" xpointer="v235"/>
617da14c
SS
759 </listitem>
760 </varlistentry>
761 <varlistentry>
d7dce7b6 762 <term><option>multicast</option></term>
617da14c
SS
763 <listitem>
764 <para>Wake on multicast messages.</para>
ec07c3c8
AK
765
766 <xi:include href="version-info.xml" xpointer="v235"/>
617da14c
SS
767 </listitem>
768 </varlistentry>
769 <varlistentry>
d7dce7b6 770 <term><option>broadcast</option></term>
617da14c
SS
771 <listitem>
772 <para>Wake on broadcast messages.</para>
ec07c3c8
AK
773
774 <xi:include href="version-info.xml" xpointer="v235"/>
617da14c
SS
775 </listitem>
776 </varlistentry>
777 <varlistentry>
d7dce7b6 778 <term><option>arp</option></term>
617da14c
SS
779 <listitem>
780 <para>Wake on ARP.</para>
ec07c3c8
AK
781
782 <xi:include href="version-info.xml" xpointer="v235"/>
617da14c
SS
783 </listitem>
784 </varlistentry>
798d3a52 785 <varlistentry>
d7dce7b6 786 <term><option>magic</option></term>
798d3a52
ZJS
787 <listitem>
788 <para>Wake on receipt of a magic packet.
789 </para>
aefdc112
AK
790
791 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
792 </listitem>
793 </varlistentry>
617da14c 794 <varlistentry>
d7dce7b6 795 <term><option>secureon</option></term>
617da14c 796 <listitem>
d3867133
YW
797 <para>Enable SecureOn password for MagicPacket. Implied when
798 <varname>WakeOnLanPassword=</varname> is specified. If specified without
799 <varname>WakeOnLanPassword=</varname> option, then the password is read from the
800 credential <literal><replaceable>LINK</replaceable>.link.wol.password</literal> (e.g.,
801 <literal>60-foo.link.wol.password</literal>), and if the credential not found, then
802 read from <literal>wol.password</literal>. See
bbfb25f4 803 <varname>ImportCredential=</varname>/<varname>LoadCredential=</varname>/<varname>SetCredential=</varname> in
658dc909 804 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
d3867133
YW
805 for details. The password in the credential, must be 6 bytes in hex format with each
806 byte separated by a colon (<literal>:</literal>) like an Ethernet MAC address, e.g.,
807 <literal>aa:bb:cc:dd:ee:ff</literal>.</para>
ec07c3c8
AK
808
809 <xi:include href="version-info.xml" xpointer="v235"/>
617da14c
SS
810 </listitem>
811 </varlistentry>
798d3a52 812 </variablelist>
c605bd00 813
c50404ae
YW
814 <para>Defaults to unset, and the device's default will be used. This setting can be specified
815 multiple times. If an empty string is assigned, then the all previous assignments are
816 cleared.</para>
aefdc112
AK
817
818 <xi:include href="version-info.xml" xpointer="v211"/>
798d3a52
ZJS
819 </listitem>
820 </varlistentry>
d3867133
YW
821 <varlistentry>
822 <term><varname>WakeOnLanPassword=</varname></term>
823 <listitem>
824 <para>Specifies the SecureOn password for MagicPacket. Takes an absolute path to a regular
825 file or an <constant>AF_UNIX</constant> stream socket, or the plain password. When a path to
826 a regular file is specified, the password is read from it. When an
827 <constant>AF_UNIX</constant> stream socket is specified, a connection is made to it and the
828 password is read from it. The password must be 6 bytes in hex format with each byte separated
829 by a colon (<literal>:</literal>) like an Ethernet MAC address, e.g.,
830 <literal>aa:bb:cc:dd:ee:ff</literal>. This implies <varname>WakeOnLan=secureon</varname>.
831 Defaults to unset, and the current value will not be changed.</para>
ec07c3c8
AK
832
833 <xi:include href="version-info.xml" xpointer="v250"/>
d3867133
YW
834 </listitem>
835 </varlistentry>
593022fa
SS
836 <varlistentry>
837 <term><varname>Port=</varname></term>
838 <listitem>
839 <para>The port option is used to select the device port. The
840 supported values are:</para>
841
842 <variablelist>
843 <varlistentry>
d7dce7b6 844 <term><option>tp</option></term>
593022fa
SS
845 <listitem>
846 <para>An Ethernet interface using Twisted-Pair cable as the medium.</para>
ec07c3c8
AK
847
848 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
849 </listitem>
850 </varlistentry>
851 <varlistentry>
d7dce7b6 852 <term><option>aui</option></term>
593022fa
SS
853 <listitem>
854 <para>Attachment Unit Interface (AUI). Normally used with hubs.
855 </para>
ec07c3c8
AK
856
857 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
858 </listitem>
859 </varlistentry>
860 <varlistentry>
d7dce7b6 861 <term><option>bnc</option></term>
593022fa
SS
862 <listitem>
863 <para>An Ethernet interface using BNC connectors and co-axial cable.</para>
ec07c3c8
AK
864
865 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
866 </listitem>
867 </varlistentry>
868 <varlistentry>
d7dce7b6 869 <term><option>mii</option></term>
593022fa
SS
870 <listitem>
871 <para>An Ethernet interface using a Media Independent Interface (MII).</para>
ec07c3c8
AK
872
873 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
874 </listitem>
875 </varlistentry>
876 <varlistentry>
d7dce7b6 877 <term><option>fibre</option></term>
593022fa
SS
878 <listitem>
879 <para>An Ethernet interface using Optical Fibre as the medium.</para>
ec07c3c8
AK
880
881 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
882 </listitem>
883 </varlistentry>
884 </variablelist>
ec07c3c8
AK
885
886 <xi:include href="version-info.xml" xpointer="v234"/>
593022fa
SS
887 </listitem>
888 </varlistentry>
6cf0a204
SS
889 <varlistentry>
890 <term><varname>Advertise=</varname></term>
891 <listitem>
892 <para>This sets what speeds and duplex modes of operation are advertised for auto-negotiation.
a0e1ad10 893 This implies <literal>AutoNegotiation=yes</literal>. The supported values are:
6cf0a204
SS
894
895 <table>
896 <title>Supported advertise values</title>
897 <tgroup cols='3'>
898 <colspec colname='Advertise' />
899 <colspec colname='Speed' />
900 <colspec colname='Duplex Mode' />
901
902 <thead><row>
903 <entry>Advertise</entry>
904 <entry>Speed (Mbps)</entry>
905 <entry>Duplex Mode</entry>
906 </row></thead>
c18dde32 907 <xi:include href="ethtool-link-mode.xml" />
6cf0a204
SS
908 </tgroup>
909 </table>
910
c592ebdf 911 By default, this is unset, i.e. all possible modes will be advertised.
6cf0a204
SS
912 This option may be specified more than once, in which case all specified speeds and modes are advertised.
913 If the empty string is assigned to this option, the list is reset, and all prior assignments have no effect.
914 </para>
ec07c3c8
AK
915
916 <xi:include href="version-info.xml" xpointer="v240"/>
6cf0a204
SS
917 </listitem>
918 </varlistentry>
bf2334c0
YW
919 <varlistentry>
920 <term><varname>ReceiveChecksumOffload=</varname></term>
921 <listitem>
f20710c7 922 <para>Takes a boolean. If set to true, hardware offload for checksumming of ingress
bf2334c0 923 network packets is enabled. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
924
925 <xi:include href="version-info.xml" xpointer="v245"/>
bf2334c0
YW
926 </listitem>
927 </varlistentry>
928 <varlistentry>
929 <term><varname>TransmitChecksumOffload=</varname></term>
930 <listitem>
f20710c7 931 <para>Takes a boolean. If set to true, hardware offload for checksumming of egress
bf2334c0 932 network packets is enabled. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
933
934 <xi:include href="version-info.xml" xpointer="v245"/>
bf2334c0
YW
935 </listitem>
936 </varlistentry>
50725d10
SS
937 <varlistentry>
938 <term><varname>TCPSegmentationOffload=</varname></term>
939 <listitem>
f20710c7 940 <para>Takes a boolean. If set to true, TCP Segmentation Offload (TSO) is enabled.
025314d9 941 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
942
943 <xi:include href="version-info.xml" xpointer="v232"/>
50725d10 944 </listitem>
ffa69a04
SS
945 </varlistentry>
946 <varlistentry>
947 <term><varname>TCP6SegmentationOffload=</varname></term>
948 <listitem>
f20710c7 949 <para>Takes a boolean. If set to true, TCP6 Segmentation Offload (tx-tcp6-segmentation) is enabled.
025314d9 950 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
951
952 <xi:include href="version-info.xml" xpointer="v235"/>
ffa69a04 953 </listitem>
50725d10
SS
954 </varlistentry>
955 <varlistentry>
956 <term><varname>GenericSegmentationOffload=</varname></term>
957 <listitem>
f20710c7 958 <para>Takes a boolean. If set to true, Generic Segmentation Offload (GSO) is enabled.
025314d9 959 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
960
961 <xi:include href="version-info.xml" xpointer="v232"/>
50725d10
SS
962 </listitem>
963 </varlistentry>
844295b2
YW
964 <varlistentry>
965 <term><varname>PartialGenericSegmentationOffload=</varname></term>
966 <listitem>
967 <para>Takes a boolean. If set to true, Partial Generic Segmentation Offload (GSO_Partial) is
968 enabled. See
969 <ulink url="https://docs.kernel.org/networking/segmentation-offloads.html#partial-generic-segmentation-offload">
970 Partial Generic Segmentation Offload</ulink> for more details.
971 When unset, the kernel's default will be used.</para>
972
973 <xi:include href="version-info.xml" xpointer="v258"/>
974 </listitem>
975 </varlistentry>
bf2334c0 976 <varlistentry>
f7ea90fb
SS
977 <term><varname>GenericReceiveOffload=</varname></term>
978 <listitem>
f20710c7 979 <para>Takes a boolean. If set to true, Generic Receive Offload (GRO) is enabled.
025314d9 980 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
981
982 <xi:include href="version-info.xml" xpointer="v232"/>
f7ea90fb
SS
983 </listitem>
984 </varlistentry>
8f821d90
DDM
985 <varlistentry>
986 <term><varname>GenericReceiveOffloadHardware=</varname></term>
987 <listitem>
988 <para>Takes a boolean. If set to true, hardware accelerated Generic Receive Offload (GRO) is
989 enabled. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
990
991 <xi:include href="version-info.xml" xpointer="v250"/>
8f821d90
DDM
992 </listitem>
993 </varlistentry>
f7ea90fb
SS
994 <varlistentry>
995 <term><varname>LargeReceiveOffload=</varname></term>
996 <listitem>
f20710c7 997 <para>Takes a boolean. If set to true, Large Receive Offload (LRO) is enabled.
025314d9 998 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
999
1000 <xi:include href="version-info.xml" xpointer="v232"/>
f7ea90fb
SS
1001 </listitem>
1002 </varlistentry>
0f30bf58
RRZ
1003 <varlistentry>
1004 <term><varname>ReceivePacketSteeringCPUMask=</varname></term>
1005 <listitem>
1006 <para>Configures Receive Packet Steering (RPS) list of CPUs to which RPS may forward traffic.
1007 Takes a list of CPU indices or ranges separated by either whitespace or commas. Alternatively,
4ebbb5bf 1008 takes the special value <literal>all</literal>, which will include all available CPUs in the mask.
0f30bf58 1009 CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. <literal>2-6</literal>).
4ebbb5bf
YW
1010 This option may be specified more than once, in which case the specified list of CPU ranges are merged.
1011 If an empty string is assigned, the list is reset, all assignments prior to this will have no effect.
0f30bf58
RRZ
1012 Defaults to unset and RPS CPU list is unchanged. To disable RPS when it was previously enabled, use the
1013 special value <literal>disable</literal>.</para>
1014
1015 <xi:include href="version-info.xml" xpointer="v256"/>
1016 </listitem>
1017 </varlistentry>
2b33e41a
AZ
1018 <varlistentry>
1019 <term><varname>ReceiveVLANCTAGHardwareAcceleration=</varname></term>
1020 <listitem>
1021 <para>Takes a boolean. If set to true, receive VLAN CTAG hardware acceleration is enabled.
1022 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1023
1024 <xi:include href="version-info.xml" xpointer="v250"/>
2b33e41a
AZ
1025 </listitem>
1026 </varlistentry>
1027 <varlistentry>
1028 <term><varname>TransmitVLANCTAGHardwareAcceleration=</varname></term>
1029 <listitem>
1030 <para>Takes a boolean. If set to true, transmit VLAN CTAG hardware acceleration is enabled.
1031 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1032
1033 <xi:include href="version-info.xml" xpointer="v250"/>
2b33e41a
AZ
1034 </listitem>
1035 </varlistentry>
1036 <varlistentry>
1037 <term><varname>ReceiveVLANCTAGFilter=</varname></term>
1038 <listitem>
1039 <para>Takes a boolean. If set to true, receive filtering on VLAN CTAGs is enabled.
1040 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1041
1042 <xi:include href="version-info.xml" xpointer="v250"/>
2b33e41a
AZ
1043 </listitem>
1044 </varlistentry>
1045 <varlistentry>
1046 <term><varname>TransmitVLANSTAGHardwareAcceleration=</varname></term>
1047 <listitem>
fe003f02 1048 <para>Takes a boolean. If set to true, transmit VLAN STAG hardware acceleration is enabled.
2b33e41a 1049 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1050
1051 <xi:include href="version-info.xml" xpointer="v250"/>
2b33e41a
AZ
1052 </listitem>
1053 </varlistentry>
1054 <varlistentry>
1055 <term><varname>NTupleFilter=</varname></term>
1056 <listitem>
1057 <para>Takes a boolean. If set to true, receive N-tuple filters and actions are enabled.
1058 When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1059
1060 <xi:include href="version-info.xml" xpointer="v250"/>
2b33e41a
AZ
1061 </listitem>
1062 </varlistentry>
ac24d356
YW
1063 <varlistentry>
1064 <term><varname>ReceiveFCS=</varname></term>
1065 <listitem>
1066 <para>Takes a boolean. If set to true, pass the Frame Check Sequence (FCS) value up the stack
1067 without trimming it, and allow userspace to calculate error rate or link health.
1068 When unset, the kernel's default will be used.</para>
1069
1070 <xi:include href="version-info.xml" xpointer="v258"/>
1071 </listitem>
1072 </varlistentry>
1073 <varlistentry>
1074 <term><varname>ReceiveAll=</varname></term>
1075 <listitem>
1076 <para>Takes a boolean. If set to true, allow to also receive damaged ethernet frames.
1077 When unset, the kernel's default will be used.</para>
1078
1079 <xi:include href="version-info.xml" xpointer="v258"/>
1080 </listitem>
1081 </varlistentry>
5f945202
SS
1082 <varlistentry>
1083 <term><varname>RxChannels=</varname></term>
5f945202 1084 <term><varname>TxChannels=</varname></term>
5f945202 1085 <term><varname>OtherChannels=</varname></term>
5f945202
SS
1086 <term><varname>CombinedChannels=</varname></term>
1087 <listitem>
0d341ecc
YW
1088 <para>Specifies the number of receive, transmit, other, or combined channels, respectively.
1089 Takes an unsigned integer in the range 1…4294967295 or <literal>max</literal>. If set to
1090 <literal>max</literal>, the advertised maximum value of the hardware will be used. When
1091 unset, the number will not be changed. Defaults to unset.</para>
aefdc112
AK
1092
1093 <xi:include href="version-info.xml" xpointer="v239"/>
5f945202
SS
1094 </listitem>
1095 </varlistentry>
224ded67
SS
1096 <varlistentry>
1097 <term><varname>RxBufferSize=</varname></term>
e81f5fc4 1098 <term><varname>RxMiniBufferSize=</varname></term>
e81f5fc4 1099 <term><varname>RxJumboBufferSize=</varname></term>
224ded67
SS
1100 <term><varname>TxBufferSize=</varname></term>
1101 <listitem>
0d341ecc
YW
1102 <para>Specifies the maximum number of pending packets in the NIC receive buffer, mini receive
1103 buffer, jumbo receive buffer, or transmit buffer, respectively. Takes an unsigned integer in
1104 the range 1…4294967295 or <literal>max</literal>. If set to <literal>max</literal>, the
1105 advertised maximum value of the hardware will be used. When unset, the number will not be
1106 changed. Defaults to unset.</para>
aefdc112
AK
1107
1108 <xi:include href="version-info.xml" xpointer="v244"/>
224ded67
SS
1109 </listitem>
1110 </varlistentry>
a34811e4
YW
1111 <varlistentry>
1112 <term><varname>RxFlowControl=</varname></term>
1113 <listitem>
f20710c7 1114 <para>Takes a boolean. When set, enables receive flow control, also known as the ethernet
a34811e4
YW
1115 receive PAUSE message (generate and send ethernet PAUSE frames). When unset, the kernel's
1116 default will be used.</para>
ec07c3c8
AK
1117
1118 <xi:include href="version-info.xml" xpointer="v246"/>
a34811e4
YW
1119 </listitem>
1120 </varlistentry>
1121 <varlistentry>
1122 <term><varname>TxFlowControl=</varname></term>
1123 <listitem>
f20710c7 1124 <para>Takes a boolean. When set, enables transmit flow control, also known as the ethernet
a34811e4
YW
1125 transmit PAUSE message (respond to received ethernet PAUSE frames). When unset, the kernel's
1126 default will be used.</para>
ec07c3c8
AK
1127
1128 <xi:include href="version-info.xml" xpointer="v246"/>
a34811e4
YW
1129 </listitem>
1130 </varlistentry>
1131 <varlistentry>
1132 <term><varname>AutoNegotiationFlowControl=</varname></term>
1133 <listitem>
f20710c7 1134 <para>Takes a boolean. When set, auto negotiation enables the interface to exchange state
a34811e4
YW
1135 advertisements with the connected peer so that the two devices can agree on the ethernet
1136 PAUSE configuration. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1137
1138 <xi:include href="version-info.xml" xpointer="v246"/>
a34811e4
YW
1139 </listitem>
1140 </varlistentry>
1e270127
SS
1141 <varlistentry>
1142 <term><varname>GenericSegmentOffloadMaxBytes=</varname></term>
1143 <listitem>
1144 <para>Specifies the maximum size of a Generic Segment Offload (GSO) packet the
be0d27ee 1145 device should accept. The usual suffixes K, M, G are supported and are
1d3a473b 1146 understood to the base of 1024. An unsigned integer in the range 1…65536.
1e270127 1147 Defaults to unset.</para>
ec07c3c8
AK
1148
1149 <xi:include href="version-info.xml" xpointer="v248"/>
1e270127
SS
1150 </listitem>
1151 </varlistentry>
1152 <varlistentry>
1153 <term><varname>GenericSegmentOffloadMaxSegments=</varname></term>
1154 <listitem>
be0d27ee
ZJS
1155 <para>Specifies the maximum number of Generic Segment Offload (GSO) segments the device should
1156 accept. An unsigned integer in the range 1…65535. Defaults to unset.</para>
ec07c3c8
AK
1157
1158 <xi:include href="version-info.xml" xpointer="v248"/>
1e270127
SS
1159 </listitem>
1160 </varlistentry>
6c35ea5e
DDM
1161 <varlistentry>
1162 <term><varname>UseAdaptiveRxCoalesce=</varname></term>
1163 <term><varname>UseAdaptiveTxCoalesce=</varname></term>
1164 <listitem>
1165 <para>Boolean properties that, when set, enable/disable adaptive Rx/Tx coalescing if the hardware
1166 supports it. When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1167
1168 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e
DDM
1169 </listitem>
1170 </varlistentry>
1171 <varlistentry>
1172 <term><varname>RxCoalesceSec=</varname></term>
1173 <term><varname>RxCoalesceIrqSec=</varname></term>
1174 <term><varname>RxCoalesceLowSec=</varname></term>
1175 <term><varname>RxCoalesceHighSec=</varname></term>
1176 <term><varname>TxCoalesceSec=</varname></term>
1177 <term><varname>TxCoalesceIrqSec=</varname></term>
1178 <term><varname>TxCoalesceLowSec=</varname></term>
1179 <term><varname>TxCoalesceHighSec=</varname></term>
1180 <listitem>
1181 <para>These properties configure the delay before Rx/Tx interrupts are generated after a packet is
1182 sent/received. The <literal>Irq</literal> properties come into effect when the host is servicing an
1183 IRQ. The <literal>Low</literal> and <literal>High</literal> properties come into effect when the
1184 packet rate drops below the low packet rate threshold or exceeds the high packet rate threshold
1185 respectively if adaptive Rx/Tx coalescing is enabled. When unset, the kernel's defaults will be
1186 used.</para>
ec07c3c8
AK
1187
1188 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e
DDM
1189 </listitem>
1190 </varlistentry>
1191 <varlistentry>
1192 <term><varname>RxMaxCoalescedFrames=</varname></term>
1193 <term><varname>RxMaxCoalescedIrqFrames=</varname></term>
1194 <term><varname>RxMaxCoalescedLowFrames=</varname></term>
1195 <term><varname>RxMaxCoalescedHighFrames=</varname></term>
1196 <term><varname>TxMaxCoalescedFrames=</varname></term>
1197 <term><varname>TxMaxCoalescedIrqFrames=</varname></term>
1198 <term><varname>TxMaxCoalescedLowFrames=</varname></term>
1199 <term><varname>TxMaxCoalescedHighFrames=</varname></term>
1200 <listitem>
1201 <para>These properties configure the maximum number of frames that are sent/received before a Rx/Tx
1202 interrupt is generated. The <literal>Irq</literal> properties come into effect when the host is
1203 servicing an IRQ. The <literal>Low</literal> and <literal>High</literal> properties come into
1204 effect when the packet rate drops below the low packet rate threshold or exceeds the high packet
1205 rate threshold respectively if adaptive Rx/Tx coalescing is enabled. When unset, the kernel's
1206 defaults will be used.</para>
ec07c3c8
AK
1207
1208 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e
DDM
1209 </listitem>
1210 </varlistentry>
1211 <varlistentry>
1212 <term><varname>CoalescePacketRateLow=</varname></term>
1213 <term><varname>CoalescePacketRateHigh=</varname></term>
1214 <listitem>
1215 <para>These properties configure the low and high packet rate (expressed in packets per second)
1216 threshold respectively and are used to determine when the corresponding coalescing settings for low
1217 and high packet rates come into effect if adaptive Rx/Tx coalescing is enabled. If unset, the
1218 kernel's defaults will be used.</para>
ec07c3c8
AK
1219
1220 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e
DDM
1221 </listitem>
1222 </varlistentry>
1223 <varlistentry>
1224 <term><varname>CoalescePacketRateSampleIntervalSec=</varname></term>
1225 <listitem>
1226 <para>Configures how often to sample the packet rate used for adaptive Rx/Tx coalescing. This
1227 property cannot be zero. This lowest time granularity supported by this property is seconds.
1228 Partial seconds will be rounded up before being passed to the kernel. If unset, the kernel's
1229 default will be used.</para>
ec07c3c8
AK
1230
1231 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e
DDM
1232 </listitem>
1233 </varlistentry>
1234 <varlistentry>
1235 <term><varname>StatisticsBlockCoalesceSec=</varname></term>
1236 <listitem>
1237 <para>How long to delay driver in-memory statistics block updates. If the driver does not have an
1238 in-memory statistic block, this property is ignored. This property cannot be zero. If unset, the
1239 kernel's default will be used.</para>
ec07c3c8
AK
1240
1241 <xi:include href="version-info.xml" xpointer="v250"/>
6c35ea5e 1242 </listitem>
18f84f8a
YW
1243 </varlistentry>
1244
1245 <varlistentry>
1246 <term><varname>MDI=</varname></term>
1247 <listitem>
1248 <para>Specifies the medium dependent interface (MDI) mode for the interface. A MDI describes
1249 the interface from a physical layer implementation to the physical medium used to carry the
1250 transmission. Takes one of the following words: <literal>straight</literal> (or equivalently:
1251 <literal>mdi</literal>), <literal>crossover</literal> (or equivalently:
1252 <literal>mdi-x</literal>, <literal>mdix</literal>), and <literal>auto</literal>. When
1253 <literal>straight</literal>, the MDI straight through mode will be used. When
1254 <literal>crossover</literal>, the MDI crossover (MDI-X) mode will be used. When
1255 <literal>auto</literal>, the MDI status is automatically detected. Defaults to unset, and the
1256 kernel's default will be used.</para>
ec07c3c8
AK
1257
1258 <xi:include href="version-info.xml" xpointer="v251"/>
18f84f8a 1259 </listitem>
6c35ea5e 1260 </varlistentry>
224ded67 1261
41ce9d76
YW
1262 <varlistentry>
1263 <term><varname>SR-IOVVirtualFunctions=</varname></term>
1264 <listitem>
1265 <para>Specifies the number of SR-IOV virtual functions. Takes an integer in the range
1266 0…2147483647. Defaults to unset, and automatically determined from the values specified in
1267 the <varname>VirtualFunction=</varname> settings in the [SR-IOV] sections.</para>
ec07c3c8
AK
1268
1269 <xi:include href="version-info.xml" xpointer="v251"/>
41ce9d76
YW
1270 </listitem>
1271 </varlistentry>
1272
798d3a52
ZJS
1273 </variablelist>
1274 </refsect1>
1ff28eae 1275
bd29dfef
YW
1276 <refsect1 id='sr-iov'>
1277 <title>[SR-IOV] Section Options</title>
8e24558e
TS
1278 <para>SR-IOV provides the ability to partition a single physical PCI resource into virtual PCI
1279 functions which can then be e.g. injected into a VM. In the case of network VFs, SR-IOV reduces
1280 latency and CPU utilisation for north-south network traffic (that is, traffic with endpoints
1281 outside the host machine), by allowing traffic to bypass the host machine’s network stack.
1282 </para>
1283
1284 <para>The presence of an [SR-IOV] section in a .link file will cause the creation and
1285 configuration of the specified virtual function. Within a .network file, the specified virtual
1286 function will be configured, but must already exist. Specify several [SR-IOV] sections to
1287 configure several SR-IOVs.</para>
1288
1289 <para>The [SR-IOV] section accepts the following keys.</para>
bd29dfef
YW
1290
1291 <variablelist class='network-directives'>
1292 <varlistentry>
1293 <term><varname>VirtualFunction=</varname></term>
1294 <listitem>
1295 <para>Specifies a Virtual Function (VF), lightweight PCIe function designed solely to move
1296 data in and out. Takes an integer in the range 0…2147483646. This option is compulsory.
1297 </para>
ec07c3c8
AK
1298
1299 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1300 </listitem>
1301 </varlistentry>
1302
1303 <varlistentry>
1304 <term><varname>VLANId=</varname></term>
1305 <listitem>
1306 <para>Specifies VLAN ID of the virtual function. Takes an integer in the range 1…4095.</para>
ec07c3c8
AK
1307
1308 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1309 </listitem>
1310 </varlistentry>
1311
1312 <varlistentry>
1313 <term><varname>QualityOfService=</varname></term>
1314 <listitem>
1315 <para>Specifies quality of service of the virtual function. Takes an integer in the range
1316 1…4294967294.</para>
ec07c3c8
AK
1317
1318 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1319 </listitem>
1320 </varlistentry>
1321
1322 <varlistentry>
1323 <term><varname>VLANProtocol=</varname></term>
1324 <listitem>
1325 <para>Specifies VLAN protocol of the virtual function. Takes <literal>802.1Q</literal> or
1326 <literal>802.1ad</literal>.</para>
ec07c3c8
AK
1327
1328 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1329 </listitem>
1330 </varlistentry>
1331
1332 <varlistentry>
1333 <term><varname>MACSpoofCheck=</varname></term>
1334 <listitem>
1335 <para>Takes a boolean. Controls the MAC spoof checking. When unset, the kernel's default will
1336 be used.</para>
ec07c3c8
AK
1337
1338 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1339 </listitem>
1340 </varlistentry>
1341
1342 <varlistentry>
1343 <term><varname>QueryReceiveSideScaling=</varname></term>
1344 <listitem>
1345 <para>Takes a boolean. Toggle the ability of querying the receive side scaling (RSS)
1346 configuration of the virtual function (VF). The VF RSS information like RSS hash key may be
1347 considered sensitive on some devices where this information is shared between VF and the
1348 physical function (PF). When unset, the kernel's default will be used.</para>
ec07c3c8
AK
1349
1350 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1351 </listitem>
1352 </varlistentry>
1353
1354 <varlistentry>
1355 <term><varname>Trust=</varname></term>
1356 <listitem>
1357 <para>Takes a boolean. Allows one to set trust mode of the virtual function (VF). When set,
1358 VF users can set a specific feature which may impact security and/or performance. When unset,
1359 the kernel's default will be used.</para>
ec07c3c8
AK
1360
1361 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1362 </listitem>
1363 </varlistentry>
1364
1365 <varlistentry>
1366 <term><varname>LinkState=</varname></term>
1367 <listitem>
1368 <para>Allows one to set the link state of the virtual function (VF). Takes a boolean or a
1369 special value <literal>auto</literal>. Setting to <literal>auto</literal> means a
1370 reflection of the physical function (PF) link state, <literal>yes</literal> lets the VF to
1371 communicate with other VFs on this host even if the PF link state is down,
1372 <literal>no</literal> causes the hardware to drop any packets sent by the VF. When unset,
1373 the kernel's default will be used.</para>
ec07c3c8
AK
1374
1375 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1376 </listitem>
1377 </varlistentry>
1378
1379 <varlistentry>
1380 <term><varname>MACAddress=</varname></term>
1381 <listitem>
1382 <para>Specifies the MAC address for the virtual function.</para>
ec07c3c8
AK
1383
1384 <xi:include href="version-info.xml" xpointer="v251"/>
bd29dfef
YW
1385 </listitem>
1386 </varlistentry>
1387 </variablelist>
1388 </refsect1>
1389
cdc9be29
YW
1390 <refsect1>
1391 <title>[EnergyEfficientEthernet] Section Options</title>
1392 <para>The [EnergyEfficientEthernet] section controls the Energy Efficient Ethernet (EEE) feature of the
1393 interface, and accepts the following keys.</para>
1394
1395 <variablelist class='network-directives'>
1396 <varlistentry>
86cbb13a 1397 <term><varname>Enable=</varname></term>
cdc9be29
YW
1398 <listitem>
1399 <para>Takes a boolean argument. When true, the Energy Efficient Ethernet (EEE) feature will be
1400 enabled on the interface. Defaults to unset, and the enablement of EEE will be unchanged.</para>
1401
1402 <xi:include href="version-info.xml" xpointer="v258"/>
1403 </listitem>
1404 </varlistentry>
1405
1406 <varlistentry>
1407 <term><varname>TxLowPowerIdle=</varname></term>
1408 <listitem>
1409 <para>Takes a boolean argument. When true, the transmit Low Power Idle (Tx-LPI) mode of the Energy
1410 Efficient Ethernet feature will be enabled on the interface. Defaults to unset, and the enablement
1411 of the mode will be unchanged.</para>
1412
1413 <xi:include href="version-info.xml" xpointer="v258"/>
1414 </listitem>
1415 </varlistentry>
1416
1417 <varlistentry>
1418 <term><varname>TxLowPowerIdleSec=</varname></term>
1419 <listitem>
1420 <para>Takes a timespan. This configures how long the interface should not enter the Low Power Idle
1421 mode after transmission. If it is too short, may decrease performance. If it is too long, may not
1422 gain energy saving. Defaults to unset, and the timespan will be unchanged.</para>
1423
1424 <xi:include href="version-info.xml" xpointer="v258"/>
1425 </listitem>
1426 </varlistentry>
1427
1428 <varlistentry>
1429 <term><varname>LinkMode=</varname></term>
1430 <listitem>
1431 <para>Takes a list of link modes, e.g. <literal>1000baset-full</literal>. See the table for
1432 <varname>Advertise=</varname> setting in [Link] section in the above for possible values. This
1433 configures the Energy Efficient Ethernet capable connection modes to be advertised. Defaults to
1434 unset, and the advertised modes will be unchanged.</para>
1435
1436 <xi:include href="version-info.xml" xpointer="v258"/>
1437 </listitem>
1438 </varlistentry>
1439 </variablelist>
1440 </refsect1>
1441
046286e8
YW
1442 <refsect1>
1443 <title>Specifiers</title>
1444
1445 <para>Some settings resolve specifiers which may be used to write generic unit files referring to runtime
1446 or unit parameters that are replaced when the unit files are loaded. Specifiers must be known and
1447 resolvable for the setting to be valid. The following specifiers are understood:</para>
1448
1449 <table class='specifiers'>
1450 <title>Specifiers available in unit files</title>
1451 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
1452 <colspec colname="spec" />
1453 <colspec colname="mean" />
1454 <colspec colname="detail" />
1455 <thead>
1456 <row>
1457 <entry>Specifier</entry>
1458 <entry>Meaning</entry>
1459 <entry>Details</entry>
1460 </row>
1461 </thead>
1462 <tbody>
1463 <xi:include href="standard-specifiers.xml" xpointer="a"/>
1464 <xi:include href="standard-specifiers.xml" xpointer="A"/>
1465 <xi:include href="standard-specifiers.xml" xpointer="b"/>
1466 <xi:include href="standard-specifiers.xml" xpointer="B"/>
1467 <xi:include href="standard-specifiers.xml" xpointer="H"/>
1468 <xi:include href="standard-specifiers.xml" xpointer="l"/>
1469 <xi:include href="standard-specifiers.xml" xpointer="m"/>
1470 <xi:include href="standard-specifiers.xml" xpointer="M"/>
1471 <xi:include href="standard-specifiers.xml" xpointer="o"/>
1472 <xi:include href="standard-specifiers.xml" xpointer="q"/>
1473 <xi:include href="standard-specifiers.xml" xpointer="T"/>
1474 <xi:include href="standard-specifiers.xml" xpointer="v"/>
1475 <xi:include href="standard-specifiers.xml" xpointer="V"/>
1476 <xi:include href="standard-specifiers.xml" xpointer="w"/>
1477 <xi:include href="standard-specifiers.xml" xpointer="W"/>
1478 </tbody>
1479 </tgroup>
1480 </table>
1481 </refsect1>
1482
798d3a52 1483 <refsect1>
b97e7fab
LP
1484 <title>Examples</title>
1485
1486 <example>
1487 <title>/usr/lib/systemd/network/99-default.link</title>
1488
9b7f499f
YW
1489 <para>The link file <filename>99-default.link</filename> that is shipped with systemd defines the
1490 default policies for the interface name, alternative names, and MAC address of links.</para>
b97e7fab 1491
9b7f499f
YW
1492 <programlisting>[Match]
1493OriginalName=*
1494
1495[Link]
1496NamePolicy=keep kernel database onboard slot path
1497AlternativeNamesPolicy=database onboard slot path
b97e7fab
LP
1498MACAddressPolicy=persistent</programlisting>
1499 </example>
1500
1501 <example>
1502 <title>/etc/systemd/network/10-dmz.link</title>
1503
58576937 1504 <para>This example assigns the fixed name <literal>dmz0</literal> to the interface with the MAC address
b97e7fab
LP
1505 00:a0:de:63:7a:e6:</para>
1506
1507 <programlisting>[Match]
1508MACAddress=00:a0:de:63:7a:e6
1509
1510[Link]
1511Name=dmz0</programlisting>
58576937 1512
7a447d21 1513 <para><varname>NamePolicy=</varname> is not set, so <varname>Name=</varname> takes effect. We use the
a19b9a38 1514 <literal>10-</literal> prefix to order this file early in the list. Note that it needs to be before
9b7f499f 1515 <filename>99-default.link</filename>, i.e. it needs a numerical prefix, to have any effect at all.</para>
7a447d21
ZJS
1516 </example>
1517
181d7195
YW
1518 <example>
1519 <title>(Re-)applying a .link file to an interface</title>
1520
94d82b59 1521 <para>After a new .link file has been created, or an existing .link file modified, the new settings
181d7195
YW
1522 may be applied to the matching interface with the following commands:</para>
1523
1524 <programlisting>$ sudo udevadm control --reload
1525$ sudo ip link set eth0 down
1526$ sudo udevadm trigger --verbose --settle --action add /sys/class/net/eth0</programlisting>
1527
1528 <para>You may also need to stop the service that manages the network interface, e.g.
bf63dadb
ZJS
1529 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1530 or <filename>NetworkManager.service</filename> before the above operation, and then restart the service
1531 after that. For more details about <command>udevadm</command> command, see
181d7195
YW
1532 <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
1533 </example>
1534
7a447d21
ZJS
1535 <example>
1536 <title>Debugging <varname>NamePolicy=</varname> assignments</title>
1537
1538 <programlisting>$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/hub0
1539
1540Parsed configuration file /usr/lib/systemd/network/99-default.link
1541Parsed configuration file /etc/systemd/network/10-eth0.link
1542ID_NET_DRIVER=cdc_ether
1543Config file /etc/systemd/network/10-eth0.link applies to device hub0
1544link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
1545hub0: Device has name_assign_type=4
1546Using default interface naming scheme 'v240'.
44855c77 1547hub0: Policies did not yield a name, using specified Name=hub0.
7a447d21
ZJS
1548ID_NET_LINK_FILE=/etc/systemd/network/10-eth0.link
1549ID_NET_NAME=hub0
1550…</programlisting>
1551
1552 <para>Explicit <varname>Name=</varname> configuration wins in this case.</para>
1553
1554 <programlisting>sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/enp0s31f6
1555
1556Parsed configuration file /usr/lib/systemd/network/99-default.link
1557Parsed configuration file /etc/systemd/network/10-eth0.link
1558Created link configuration context.
1559ID_NET_DRIVER=e1000e
1560Config file /usr/lib/systemd/network/99-default.link applies to device enp0s31f6
1561link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
1562enp0s31f6: Device has name_assign_type=4
1563Using default interface naming scheme 'v240'.
1564enp0s31f6: Policy *keep*: keeping existing userspace name
1565enp0s31f6: Device has addr_assign_type=0
1566enp0s31f6: MAC on the device already matches policy *persistent*
1567ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
1568
1569</programlisting>
1570
1571 <para>In this case, the interface was already renamed, so the <option>keep</option> policy specified as
b0343f8c 1572 the first option in <filename index="false">99-default.link</filename> means that the existing name is
7a447d21
ZJS
1573 preserved. If <option>keep</option> was removed, or if were in boot before the renaming has happened,
1574 we might get the following instead:</para>
1575
1576 <programlisting>enp0s31f6: Policy *path* yields "enp0s31f6".
1577enp0s31f6: Device has addr_assign_type=0
1578enp0s31f6: MAC on the device already matches policy *persistent*
1579ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
1580ID_NET_NAME=enp0s31f6
1581
1582</programlisting>
1583
1584 <para>Please note that the details of output are subject to change.</para>
b97e7fab
LP
1585 </example>
1586
1587 <example>
1588 <title>/etc/systemd/network/10-internet.link</title>
1589
1590 <para>This example assigns the fixed name
1591 <literal>internet0</literal> to the interface with the device
1592 path <literal>pci-0000:00:1a.0-*</literal>:</para>
1593
1594 <programlisting>[Match]
1595Path=pci-0000:00:1a.0-*
1596
1597[Link]
1598Name=internet0</programlisting>
1599 </example>
1600
798d3a52 1601 <example>
6c1695be 1602 <title>/etc/systemd/network/25-wireless.link</title>
1ff28eae 1603
b97e7fab
LP
1604 <para>Here's an overly complex example that shows the use of a large number of [Match] and [Link] settings.</para>
1605
798d3a52 1606 <programlisting>[Match]
7abaad1a 1607MACAddress=12:34:56:78:9a:bc
1608Driver=brcmsmac
1609Path=pci-0000:02:00.0-*
1610Type=wlan
1611Virtualization=no
1612Host=my-laptop
1613Architecture=x86-64
1ff28eae 1614
7abaad1a 1615[Link]
1616Name=wireless0
1617MTUBytes=1450
1618BitsPerSecond=10M
1619WakeOnLan=magic
1620MACAddress=cb:a9:87:65:43:21</programlisting>
798d3a52
ZJS
1621 </example>
1622 </refsect1>
1ff28eae 1623
798d3a52
ZJS
1624 <refsect1>
1625 <title>See Also</title>
13a69c12
DT
1626 <para><simplelist type="inline">
1627 <member><citerefentry>
798d3a52 1628 <refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum>
13a69c12
DT
1629 </citerefentry></member>
1630 <member><citerefentry>
798d3a52 1631 <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
13a69c12
DT
1632 </citerefentry></member>
1633 <member><citerefentry>
798d3a52 1634 <refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum>
13a69c12
DT
1635 </citerefentry></member>
1636 <member><citerefentry>
798d3a52 1637 <refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum>
13a69c12
DT
1638 </citerefentry></member>
1639 <member><citerefentry>
cc9b6bdc 1640 <refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum>
13a69c12
DT
1641 </citerefentry></member>
1642 </simplelist></para>
798d3a52 1643 </refsect1>
1ff28eae
TG
1644
1645</refentry>