]>
Commit | Line | Data |
---|---|---|
1 | <?xml version='1.0'?> | |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> | |
4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> | |
5 | ||
6 | <refentry id="systemd.link" | |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
8 | <refentryinfo> | |
9 | <title>systemd.link</title> | |
10 | <productname>systemd</productname> | |
11 | </refentryinfo> | |
12 | ||
13 | <refmeta> | |
14 | <refentrytitle>systemd.link</refentrytitle> | |
15 | <manvolnum>5</manvolnum> | |
16 | </refmeta> | |
17 | ||
18 | <refnamediv> | |
19 | <refname>systemd.link</refname> | |
20 | <refpurpose>Network device configuration</refpurpose> | |
21 | </refnamediv> | |
22 | ||
23 | <refsynopsisdiv> | |
24 | <para><filename><replaceable>link</replaceable>.link</filename></para> | |
25 | </refsynopsisdiv> | |
26 | ||
27 | <refsect1> | |
28 | <title>Description</title> | |
29 | ||
30 | <para>A plain ini-style text file that encodes configuration for matching network devices, used by | |
31 | <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> and in | |
32 | particular its <command>net_setup_link</command> builtin. See | |
33 | <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry> for a | |
34 | general description of the syntax.</para> | |
35 | ||
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 | ||
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 | |
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 | |
46 | <filename>/run/systemd/network</filename>, and the local administration network directory | |
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 | |
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 | |
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 | |
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> | |
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> | |
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> | |
72 | ||
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> | |
81 | </refsect1> | |
82 | ||
83 | <refsect1> | |
84 | <title>[Match] Section Options</title> | |
85 | ||
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: | |
90 | <programlisting>OriginalName=*</programlisting> | |
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> | |
93 | ||
94 | <variablelist class='network-directives'> | |
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'> | |
102 | <term><varname>MACAddress=</varname></term> | |
103 | <listitem> | |
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>. | |
112 | </para> | |
113 | ||
114 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
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>. | |
121 | </para> | |
122 | ||
123 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
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>. | |
130 | </para> | |
131 | ||
132 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
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>. | |
138 | </para> | |
139 | ||
140 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
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>. | |
146 | </para> | |
147 | ||
148 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
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> | |
156 | ||
157 | <xi:include href="version-info.xml" xpointer="v211"/> | |
158 | </listitem> | |
159 | </varlistentry> | |
160 | ||
161 | <varlistentry id='permanent-mac-address'> | |
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 | |
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> | |
171 | ||
172 | <xi:include href="version-info.xml" xpointer="v245"/> | |
173 | </listitem> | |
174 | </varlistentry> | |
175 | ||
176 | <varlistentry id='path'> | |
177 | <term><varname>Path=</varname></term> | |
178 | <listitem> | |
179 | <para>A whitespace-separated list of shell-style globs matching | |
180 | the persistent path, as exposed by the udev property | |
181 | <varname>ID_PATH</varname>.</para> | |
182 | ||
183 | <xi:include href="version-info.xml" xpointer="v211"/> | |
184 | </listitem> | |
185 | </varlistentry> | |
186 | ||
187 | <varlistentry id='driver'> | |
188 | <term><varname>Driver=</varname></term> | |
189 | <listitem> | |
190 | <para>A whitespace-separated list of shell-style globs matching the driver currently bound to the | |
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> | |
194 | ||
195 | <xi:include href="version-info.xml" xpointer="v211"/> | |
196 | </listitem> | |
197 | </varlistentry> | |
198 | ||
199 | <varlistentry id='type'> | |
200 | <term><varname>Type=</varname></term> | |
201 | <listitem> | |
202 | <para>A whitespace-separated list of shell-style globs matching the device type, as exposed by | |
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. | |
207 | </para> | |
208 | ||
209 | <xi:include href="version-info.xml" xpointer="v211"/> | |
210 | </listitem> | |
211 | </varlistentry> | |
212 | ||
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> | |
224 | ||
225 | <xi:include href="version-info.xml" xpointer="v251"/> | |
226 | </listitem> | |
227 | </varlistentry> | |
228 | ||
229 | <varlistentry id='property'> | |
230 | <term><varname>Property=</varname></term> | |
231 | <listitem> | |
232 | <para>A whitespace-separated list of udev property names with their values after equals sign | |
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> | |
242 | ||
243 | <xi:include href="version-info.xml" xpointer="v243"/> | |
244 | </listitem> | |
245 | </varlistentry> | |
246 | ||
247 | <varlistentry> | |
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> | |
254 | ||
255 | <xi:include href="version-info.xml" xpointer="v218"/> | |
256 | </listitem> | |
257 | </varlistentry> | |
258 | ||
259 | <varlistentry id='host'> | |
260 | <term><varname>Host=</varname></term> | |
261 | <listitem> | |
262 | <para>Matches against the hostname or machine ID of the host. See <varname>ConditionHost=</varname> in | |
263 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
264 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. | |
265 | If an empty string is assigned, the previously assigned value is cleared. | |
266 | </para> | |
267 | ||
268 | <xi:include href="version-info.xml" xpointer="v211"/> | |
269 | </listitem> | |
270 | </varlistentry> | |
271 | ||
272 | <varlistentry id='virtualization'> | |
273 | <term><varname>Virtualization=</varname></term> | |
274 | <listitem> | |
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 | |
277 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
278 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. | |
279 | If an empty string is assigned, the previously assigned value is cleared. | |
280 | </para> | |
281 | ||
282 | <xi:include href="version-info.xml" xpointer="v211"/> | |
283 | </listitem> | |
284 | </varlistentry> | |
285 | ||
286 | <varlistentry id='kernel-command-line'> | |
287 | <term><varname>KernelCommandLine=</varname></term> | |
288 | <listitem> | |
289 | <para>Checks whether a specific kernel command line option is set. See | |
290 | <varname>ConditionKernelCommandLine=</varname> in | |
291 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
292 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. | |
293 | If an empty string is assigned, the previously assigned value is cleared. | |
294 | </para> | |
295 | ||
296 | <xi:include href="version-info.xml" xpointer="v211"/> | |
297 | </listitem> | |
298 | </varlistentry> | |
299 | ||
300 | <varlistentry id='kernel-version'> | |
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. | |
307 | If an empty string is assigned, the previously assigned value is cleared. | |
308 | </para> | |
309 | ||
310 | <xi:include href="version-info.xml" xpointer="v237"/> | |
311 | </listitem> | |
312 | </varlistentry> | |
313 | ||
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 | ||
327 | <varlistentry id='credential'> | |
328 | <term><varname>Credential=</varname></term> | |
329 | <listitem> | |
330 | <para>Checks whether the specified credential was passed to the | |
331 | <filename>systemd-udevd.service</filename> service. See <ulink | |
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> | |
336 | ||
337 | <xi:include href="version-info.xml" xpointer="v252"/> | |
338 | </listitem> | |
339 | </varlistentry> | |
340 | ||
341 | <varlistentry id='architecture'> | |
342 | <term><varname>Architecture=</varname></term> | |
343 | <listitem> | |
344 | <para>Checks whether the system is running on a specific architecture. See | |
345 | <varname>ConditionArchitecture=</varname> in | |
346 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
347 | for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated. | |
348 | If an empty string is assigned, the previously assigned value is cleared. | |
349 | </para> | |
350 | ||
351 | <xi:include href="version-info.xml" xpointer="v211"/> | |
352 | </listitem> | |
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. | |
362 | If an empty string is assigned, the previously assigned value is cleared. | |
363 | </para> | |
364 | ||
365 | <xi:include href="version-info.xml" xpointer="v249"/> | |
366 | </listitem> | |
367 | </varlistentry> | |
368 | </variablelist> | |
369 | ||
370 | </refsect1> | |
371 | ||
372 | <refsect1> | |
373 | <title>[Link] Section Options</title> | |
374 | ||
375 | <para>The [Link] section accepts the following | |
376 | keys:</para> | |
377 | ||
378 | <variablelist class='network-directives'> | |
379 | <varlistentry> | |
380 | <term><varname>Description=</varname></term> | |
381 | <listitem> | |
382 | <para>A description of the device.</para> | |
383 | ||
384 | <xi:include href="version-info.xml" xpointer="v211"/> | |
385 | </listitem> | |
386 | </varlistentry> | |
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 | |
399 | <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
400 | and others. Use | |
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>UnsetProperty=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> | |
441 | <varlistentry> | |
442 | <term><varname>Alias=</varname></term> | |
443 | <listitem> | |
444 | <para>The <varname>ifalias</varname> interface property is set to this value.</para> | |
445 | ||
446 | <xi:include href="version-info.xml" xpointer="v211"/> | |
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> | |
455 | ||
456 | <variablelist> | |
457 | <varlistentry> | |
458 | <term><option>persistent</option></term> | |
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 | |
465 | which is otherwise random. This feature depends on ID_NET_NAME_* | |
466 | properties to exist for the link. On hardware where these | |
467 | properties are not set, the generation of a persistent MAC address | |
468 | will fail.</para> | |
469 | ||
470 | <xi:include href="version-info.xml" xpointer="v211"/> | |
471 | </listitem> | |
472 | </varlistentry> | |
473 | <varlistentry> | |
474 | <term><option>random</option></term> | |
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 | |
479 | boot. Either way, the random address will have the | |
480 | <literal>unicast</literal> and | |
481 | <literal>locally administered</literal> bits set.</para> | |
482 | ||
483 | <xi:include href="version-info.xml" xpointer="v211"/> | |
484 | </listitem> | |
485 | </varlistentry> | |
486 | <varlistentry> | |
487 | <term><option>none</option></term> | |
488 | <listitem> | |
489 | <para>Keeps the MAC address assigned by the kernel. Or use the MAC address specified in | |
490 | <varname>MACAddress=</varname>.</para> | |
491 | ||
492 | <xi:include href="version-info.xml" xpointer="v227"/> | |
493 | </listitem> | |
494 | </varlistentry> | |
495 | </variablelist> | |
496 | ||
497 | <para>An empty string assignment is equivalent to setting <literal>none</literal>.</para> | |
498 | ||
499 | <xi:include href="version-info.xml" xpointer="v211"/> | |
500 | </listitem> | |
501 | </varlistentry> | |
502 | <varlistentry> | |
503 | <term><varname>MACAddress=</varname></term> | |
504 | <listitem> | |
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> | |
508 | ||
509 | <xi:include href="version-info.xml" xpointer="v211"/> | |
510 | </listitem> | |
511 | </varlistentry> | |
512 | <varlistentry> | |
513 | <term><varname>NamePolicy=</varname></term> | |
514 | <listitem> | |
515 | <para>An ordered, space-separated list of policies by which the interface name should be set. | |
516 | <varname>NamePolicy=</varname> may be disabled by specifying <option>net.ifnames=0</option> on the | |
517 | kernel command line. Each of the policies may fail, and the first successful one is used. The name | |
518 | is not set directly, but is exported to udev as the property <option>ID_NET_NAME</option>, which | |
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: | |
522 | </para> | |
523 | ||
524 | <variablelist> | |
525 | <varlistentry> | |
526 | <term><option>kernel</option></term> | |
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> | |
531 | ||
532 | <xi:include href="version-info.xml" xpointer="v216"/> | |
533 | </listitem> | |
534 | </varlistentry> | |
535 | <varlistentry> | |
536 | <term><option>database</option></term> | |
537 | <listitem> | |
538 | <para>The name is set based on entries in the udev's | |
539 | Hardware Database with the key | |
540 | <varname>ID_NET_NAME_FROM_DATABASE</varname>. | |
541 | </para> | |
542 | ||
543 | <xi:include href="version-info.xml" xpointer="v211"/> | |
544 | </listitem> | |
545 | </varlistentry> | |
546 | <varlistentry> | |
547 | <term><option>onboard</option></term> | |
548 | <listitem> | |
549 | <para>The name is set based on information given by | |
550 | the firmware for on-board devices, as exported by the | |
551 | udev property <varname>ID_NET_NAME_ONBOARD</varname>. | |
552 | See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
553 | </para> | |
554 | ||
555 | <xi:include href="version-info.xml" xpointer="v211"/> | |
556 | </listitem> | |
557 | </varlistentry> | |
558 | <varlistentry> | |
559 | <term><option>slot</option></term> | |
560 | <listitem> | |
561 | <para>The name is set based on information given by | |
562 | the firmware for hot-plug devices, as exported by the | |
563 | udev property <varname>ID_NET_NAME_SLOT</varname>. | |
564 | See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
565 | </para> | |
566 | ||
567 | <xi:include href="version-info.xml" xpointer="v211"/> | |
568 | </listitem> | |
569 | </varlistentry> | |
570 | <varlistentry> | |
571 | <term><option>path</option></term> | |
572 | <listitem> | |
573 | <para>The name is set based on the device's physical | |
574 | location, as exported by the udev property | |
575 | <varname>ID_NET_NAME_PATH</varname>. | |
576 | See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
577 | </para> | |
578 | ||
579 | <xi:include href="version-info.xml" xpointer="v211"/> | |
580 | </listitem> | |
581 | </varlistentry> | |
582 | <varlistentry> | |
583 | <term><option>mac</option></term> | |
584 | <listitem> | |
585 | <para>The name is set based on the device's persistent | |
586 | MAC address, as exported by the udev property | |
587 | <varname>ID_NET_NAME_MAC</varname>. | |
588 | See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
589 | </para> | |
590 | ||
591 | <xi:include href="version-info.xml" xpointer="v211"/> | |
592 | </listitem> | |
593 | </varlistentry> | |
594 | <varlistentry> | |
595 | <term><option>keep</option></term> | |
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> | |
599 | ||
600 | <xi:include href="version-info.xml" xpointer="v241"/> | |
601 | </listitem> | |
602 | </varlistentry> | |
603 | </variablelist> | |
604 | ||
605 | <xi:include href="version-info.xml" xpointer="v211"/> | |
606 | </listitem> | |
607 | </varlistentry> | |
608 | <varlistentry> | |
609 | <term><varname>Name=</varname></term> | |
610 | <listitem> | |
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> | |
615 | ||
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 | |
626 | an allowed character, it is recommended to avoid it when naming interfaces as various tools (such as | |
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 | |
629 | ambiguity with interface specification by numeric indexes), nor are the special strings | |
630 | <literal>.</literal>, <literal>..</literal>, <literal>all</literal> and | |
631 | <literal>default</literal>.</para> | |
632 | ||
633 | <xi:include href="version-info.xml" xpointer="v211"/> | |
634 | </listitem> | |
635 | </varlistentry> | |
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> | |
645 | ||
646 | <xi:include href="version-info.xml" xpointer="v245"/> | |
647 | </listitem> | |
648 | </varlistentry> | |
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 | |
654 | have no effect. If the kernel does not support the alternative names, then this setting will | |
655 | be ignored.</para> | |
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> | |
662 | ||
663 | <xi:include href="version-info.xml" xpointer="v245"/> | |
664 | </listitem> | |
665 | </varlistentry> | |
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> | |
671 | ||
672 | <xi:include href="version-info.xml" xpointer="v248"/> | |
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> | |
680 | ||
681 | <xi:include href="version-info.xml" xpointer="v248"/> | |
682 | </listitem> | |
683 | </varlistentry> | |
684 | <varlistentry> | |
685 | <term><varname>TransmitQueueLength=</varname></term> | |
686 | <listitem> | |
687 | <para>Specifies the transmit queue length of the device in number of packets. An unsigned integer | |
688 | in the range 0…4294967294. When unset, the kernel's default will be used.</para> | |
689 | ||
690 | <xi:include href="version-info.xml" xpointer="v248"/> | |
691 | </listitem> | |
692 | </varlistentry> | |
693 | <varlistentry> | |
694 | <term><varname>MTUBytes=</varname></term> | |
695 | <listitem> | |
696 | <para>The maximum transmission unit in bytes to set for the | |
697 | device. The usual suffixes K, M, G are supported and are | |
698 | understood to the base of 1024.</para> | |
699 | ||
700 | <xi:include href="version-info.xml" xpointer="v211"/> | |
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 | |
707 | down to the nearest Mbps. The usual suffixes K, M, G are | |
708 | supported and are understood to the base of 1000.</para> | |
709 | ||
710 | <xi:include href="version-info.xml" xpointer="v211"/> | |
711 | </listitem> | |
712 | </varlistentry> | |
713 | <varlistentry> | |
714 | <term><varname>Duplex=</varname></term> | |
715 | <listitem> | |
716 | <para>The duplex mode to set for the device. The accepted values are <option>half</option> and | |
717 | <option>full</option>.</para> | |
718 | ||
719 | <xi:include href="version-info.xml" xpointer="v211"/> | |
720 | </listitem> | |
721 | </varlistentry> | |
722 | <varlistentry> | |
723 | <term><varname>AutoNegotiation=</varname></term> | |
724 | <listitem> | |
725 | <para>Takes a boolean. If set to yes, automatic negotiation of transmission parameters is enabled. | |
726 | Autonegotiation is a procedure by which two connected ethernet devices choose | |
727 | common transmission parameters, such as speed, duplex mode, and flow control. | |
728 | When unset, the kernel's default will be used.</para> | |
729 | ||
730 | <para>Note that if autonegotiation is enabled, speed and duplex settings are | |
731 | read-only. If autonegotiation is disabled, speed and duplex settings are writable | |
732 | if the driver supports multiple link modes.</para> | |
733 | ||
734 | <xi:include href="version-info.xml" xpointer="v233"/> | |
735 | </listitem> | |
736 | </varlistentry> | |
737 | <varlistentry> | |
738 | <term><varname>WakeOnLan=</varname></term> | |
739 | <listitem> | |
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> | |
743 | ||
744 | <variablelist> | |
745 | <varlistentry> | |
746 | <term><option>phy</option></term> | |
747 | <listitem> | |
748 | <para>Wake on PHY activity.</para> | |
749 | ||
750 | <xi:include href="version-info.xml" xpointer="v211"/> | |
751 | </listitem> | |
752 | </varlistentry> | |
753 | <varlistentry> | |
754 | <term><option>unicast</option></term> | |
755 | <listitem> | |
756 | <para>Wake on unicast messages.</para> | |
757 | ||
758 | <xi:include href="version-info.xml" xpointer="v235"/> | |
759 | </listitem> | |
760 | </varlistentry> | |
761 | <varlistentry> | |
762 | <term><option>multicast</option></term> | |
763 | <listitem> | |
764 | <para>Wake on multicast messages.</para> | |
765 | ||
766 | <xi:include href="version-info.xml" xpointer="v235"/> | |
767 | </listitem> | |
768 | </varlistentry> | |
769 | <varlistentry> | |
770 | <term><option>broadcast</option></term> | |
771 | <listitem> | |
772 | <para>Wake on broadcast messages.</para> | |
773 | ||
774 | <xi:include href="version-info.xml" xpointer="v235"/> | |
775 | </listitem> | |
776 | </varlistentry> | |
777 | <varlistentry> | |
778 | <term><option>arp</option></term> | |
779 | <listitem> | |
780 | <para>Wake on ARP.</para> | |
781 | ||
782 | <xi:include href="version-info.xml" xpointer="v235"/> | |
783 | </listitem> | |
784 | </varlistentry> | |
785 | <varlistentry> | |
786 | <term><option>magic</option></term> | |
787 | <listitem> | |
788 | <para>Wake on receipt of a magic packet. | |
789 | </para> | |
790 | ||
791 | <xi:include href="version-info.xml" xpointer="v211"/> | |
792 | </listitem> | |
793 | </varlistentry> | |
794 | <varlistentry> | |
795 | <term><option>secureon</option></term> | |
796 | <listitem> | |
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 | |
803 | <varname>ImportCredential=</varname>/<varname>LoadCredential=</varname>/<varname>SetCredential=</varname> in | |
804 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
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> | |
808 | ||
809 | <xi:include href="version-info.xml" xpointer="v235"/> | |
810 | </listitem> | |
811 | </varlistentry> | |
812 | </variablelist> | |
813 | ||
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> | |
817 | ||
818 | <xi:include href="version-info.xml" xpointer="v211"/> | |
819 | </listitem> | |
820 | </varlistentry> | |
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> | |
832 | ||
833 | <xi:include href="version-info.xml" xpointer="v250"/> | |
834 | </listitem> | |
835 | </varlistentry> | |
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> | |
844 | <term><option>tp</option></term> | |
845 | <listitem> | |
846 | <para>An Ethernet interface using Twisted-Pair cable as the medium.</para> | |
847 | ||
848 | <xi:include href="version-info.xml" xpointer="v234"/> | |
849 | </listitem> | |
850 | </varlistentry> | |
851 | <varlistentry> | |
852 | <term><option>aui</option></term> | |
853 | <listitem> | |
854 | <para>Attachment Unit Interface (AUI). Normally used with hubs. | |
855 | </para> | |
856 | ||
857 | <xi:include href="version-info.xml" xpointer="v234"/> | |
858 | </listitem> | |
859 | </varlistentry> | |
860 | <varlistentry> | |
861 | <term><option>bnc</option></term> | |
862 | <listitem> | |
863 | <para>An Ethernet interface using BNC connectors and co-axial cable.</para> | |
864 | ||
865 | <xi:include href="version-info.xml" xpointer="v234"/> | |
866 | </listitem> | |
867 | </varlistentry> | |
868 | <varlistentry> | |
869 | <term><option>mii</option></term> | |
870 | <listitem> | |
871 | <para>An Ethernet interface using a Media Independent Interface (MII).</para> | |
872 | ||
873 | <xi:include href="version-info.xml" xpointer="v234"/> | |
874 | </listitem> | |
875 | </varlistentry> | |
876 | <varlistentry> | |
877 | <term><option>fibre</option></term> | |
878 | <listitem> | |
879 | <para>An Ethernet interface using Optical Fibre as the medium.</para> | |
880 | ||
881 | <xi:include href="version-info.xml" xpointer="v234"/> | |
882 | </listitem> | |
883 | </varlistentry> | |
884 | </variablelist> | |
885 | ||
886 | <xi:include href="version-info.xml" xpointer="v234"/> | |
887 | </listitem> | |
888 | </varlistentry> | |
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. | |
893 | This implies <literal>AutoNegotiation=yes</literal>. The supported values are: | |
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> | |
907 | <xi:include href="ethtool-link-mode.xml" /> | |
908 | </tgroup> | |
909 | </table> | |
910 | ||
911 | By default, this is unset, i.e. all possible modes will be advertised. | |
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> | |
915 | ||
916 | <xi:include href="version-info.xml" xpointer="v240"/> | |
917 | </listitem> | |
918 | </varlistentry> | |
919 | <varlistentry> | |
920 | <term><varname>ReceiveChecksumOffload=</varname></term> | |
921 | <listitem> | |
922 | <para>Takes a boolean. If set to true, hardware offload for checksumming of ingress | |
923 | network packets is enabled. When unset, the kernel's default will be used.</para> | |
924 | ||
925 | <xi:include href="version-info.xml" xpointer="v245"/> | |
926 | </listitem> | |
927 | </varlistentry> | |
928 | <varlistentry> | |
929 | <term><varname>TransmitChecksumOffload=</varname></term> | |
930 | <listitem> | |
931 | <para>Takes a boolean. If set to true, hardware offload for checksumming of egress | |
932 | network packets is enabled. When unset, the kernel's default will be used.</para> | |
933 | ||
934 | <xi:include href="version-info.xml" xpointer="v245"/> | |
935 | </listitem> | |
936 | </varlistentry> | |
937 | <varlistentry> | |
938 | <term><varname>TCPSegmentationOffload=</varname></term> | |
939 | <listitem> | |
940 | <para>Takes a boolean. If set to true, TCP Segmentation Offload (TSO) is enabled. | |
941 | When unset, the kernel's default will be used.</para> | |
942 | ||
943 | <xi:include href="version-info.xml" xpointer="v232"/> | |
944 | </listitem> | |
945 | </varlistentry> | |
946 | <varlistentry> | |
947 | <term><varname>TCP6SegmentationOffload=</varname></term> | |
948 | <listitem> | |
949 | <para>Takes a boolean. If set to true, TCP6 Segmentation Offload (tx-tcp6-segmentation) is enabled. | |
950 | When unset, the kernel's default will be used.</para> | |
951 | ||
952 | <xi:include href="version-info.xml" xpointer="v235"/> | |
953 | </listitem> | |
954 | </varlistentry> | |
955 | <varlistentry> | |
956 | <term><varname>GenericSegmentationOffload=</varname></term> | |
957 | <listitem> | |
958 | <para>Takes a boolean. If set to true, Generic Segmentation Offload (GSO) is enabled. | |
959 | When unset, the kernel's default will be used.</para> | |
960 | ||
961 | <xi:include href="version-info.xml" xpointer="v232"/> | |
962 | </listitem> | |
963 | </varlistentry> | |
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> | |
976 | <varlistentry> | |
977 | <term><varname>GenericReceiveOffload=</varname></term> | |
978 | <listitem> | |
979 | <para>Takes a boolean. If set to true, Generic Receive Offload (GRO) is enabled. | |
980 | When unset, the kernel's default will be used.</para> | |
981 | ||
982 | <xi:include href="version-info.xml" xpointer="v232"/> | |
983 | </listitem> | |
984 | </varlistentry> | |
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> | |
990 | ||
991 | <xi:include href="version-info.xml" xpointer="v250"/> | |
992 | </listitem> | |
993 | </varlistentry> | |
994 | <varlistentry> | |
995 | <term><varname>LargeReceiveOffload=</varname></term> | |
996 | <listitem> | |
997 | <para>Takes a boolean. If set to true, Large Receive Offload (LRO) is enabled. | |
998 | When unset, the kernel's default will be used.</para> | |
999 | ||
1000 | <xi:include href="version-info.xml" xpointer="v232"/> | |
1001 | </listitem> | |
1002 | </varlistentry> | |
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, | |
1008 | takes the special value <literal>all</literal>, which will include all available CPUs in the mask. | |
1009 | CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. <literal>2-6</literal>). | |
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. | |
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> | |
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> | |
1023 | ||
1024 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1032 | ||
1033 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1041 | ||
1042 | <xi:include href="version-info.xml" xpointer="v250"/> | |
1043 | </listitem> | |
1044 | </varlistentry> | |
1045 | <varlistentry> | |
1046 | <term><varname>TransmitVLANSTAGHardwareAcceleration=</varname></term> | |
1047 | <listitem> | |
1048 | <para>Takes a boolean. If set to true, transmit VLAN STAG hardware acceleration is enabled. | |
1049 | When unset, the kernel's default will be used.</para> | |
1050 | ||
1051 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1059 | ||
1060 | <xi:include href="version-info.xml" xpointer="v250"/> | |
1061 | </listitem> | |
1062 | </varlistentry> | |
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> | |
1082 | <varlistentry> | |
1083 | <term><varname>RxChannels=</varname></term> | |
1084 | <term><varname>TxChannels=</varname></term> | |
1085 | <term><varname>OtherChannels=</varname></term> | |
1086 | <term><varname>CombinedChannels=</varname></term> | |
1087 | <listitem> | |
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> | |
1092 | ||
1093 | <xi:include href="version-info.xml" xpointer="v239"/> | |
1094 | </listitem> | |
1095 | </varlistentry> | |
1096 | <varlistentry> | |
1097 | <term><varname>RxBufferSize=</varname></term> | |
1098 | <term><varname>RxMiniBufferSize=</varname></term> | |
1099 | <term><varname>RxJumboBufferSize=</varname></term> | |
1100 | <term><varname>TxBufferSize=</varname></term> | |
1101 | <listitem> | |
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> | |
1107 | ||
1108 | <xi:include href="version-info.xml" xpointer="v244"/> | |
1109 | </listitem> | |
1110 | </varlistentry> | |
1111 | <varlistentry> | |
1112 | <term><varname>RxFlowControl=</varname></term> | |
1113 | <listitem> | |
1114 | <para>Takes a boolean. When set, enables receive flow control, also known as the ethernet | |
1115 | receive PAUSE message (generate and send ethernet PAUSE frames). When unset, the kernel's | |
1116 | default will be used.</para> | |
1117 | ||
1118 | <xi:include href="version-info.xml" xpointer="v246"/> | |
1119 | </listitem> | |
1120 | </varlistentry> | |
1121 | <varlistentry> | |
1122 | <term><varname>TxFlowControl=</varname></term> | |
1123 | <listitem> | |
1124 | <para>Takes a boolean. When set, enables transmit flow control, also known as the ethernet | |
1125 | transmit PAUSE message (respond to received ethernet PAUSE frames). When unset, the kernel's | |
1126 | default will be used.</para> | |
1127 | ||
1128 | <xi:include href="version-info.xml" xpointer="v246"/> | |
1129 | </listitem> | |
1130 | </varlistentry> | |
1131 | <varlistentry> | |
1132 | <term><varname>AutoNegotiationFlowControl=</varname></term> | |
1133 | <listitem> | |
1134 | <para>Takes a boolean. When set, auto negotiation enables the interface to exchange state | |
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> | |
1137 | ||
1138 | <xi:include href="version-info.xml" xpointer="v246"/> | |
1139 | </listitem> | |
1140 | </varlistentry> | |
1141 | <varlistentry> | |
1142 | <term><varname>GenericSegmentOffloadMaxBytes=</varname></term> | |
1143 | <listitem> | |
1144 | <para>Specifies the maximum size of a Generic Segment Offload (GSO) packet the | |
1145 | device should accept. The usual suffixes K, M, G are supported and are | |
1146 | understood to the base of 1024. An unsigned integer in the range 1…65536. | |
1147 | Defaults to unset.</para> | |
1148 | ||
1149 | <xi:include href="version-info.xml" xpointer="v248"/> | |
1150 | </listitem> | |
1151 | </varlistentry> | |
1152 | <varlistentry> | |
1153 | <term><varname>GenericSegmentOffloadMaxSegments=</varname></term> | |
1154 | <listitem> | |
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> | |
1157 | ||
1158 | <xi:include href="version-info.xml" xpointer="v248"/> | |
1159 | </listitem> | |
1160 | </varlistentry> | |
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> | |
1167 | ||
1168 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1187 | ||
1188 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1207 | ||
1208 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1219 | ||
1220 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1230 | ||
1231 | <xi:include href="version-info.xml" xpointer="v250"/> | |
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> | |
1240 | ||
1241 | <xi:include href="version-info.xml" xpointer="v250"/> | |
1242 | </listitem> | |
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> | |
1257 | ||
1258 | <xi:include href="version-info.xml" xpointer="v251"/> | |
1259 | </listitem> | |
1260 | </varlistentry> | |
1261 | ||
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> | |
1268 | ||
1269 | <xi:include href="version-info.xml" xpointer="v251"/> | |
1270 | </listitem> | |
1271 | </varlistentry> | |
1272 | ||
1273 | </variablelist> | |
1274 | </refsect1> | |
1275 | ||
1276 | <refsect1 id='sr-iov'> | |
1277 | <title>[SR-IOV] Section Options</title> | |
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> | |
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> | |
1298 | ||
1299 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1307 | ||
1308 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1317 | ||
1318 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1327 | ||
1328 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1337 | ||
1338 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1349 | ||
1350 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1360 | ||
1361 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1374 | ||
1375 | <xi:include href="version-info.xml" xpointer="v251"/> | |
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> | |
1383 | ||
1384 | <xi:include href="version-info.xml" xpointer="v251"/> | |
1385 | </listitem> | |
1386 | </varlistentry> | |
1387 | </variablelist> | |
1388 | </refsect1> | |
1389 | ||
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> | |
1397 | <term><varname>Enable=</varname></term> | |
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 | ||
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 | ||
1483 | <refsect1> | |
1484 | <title>Examples</title> | |
1485 | ||
1486 | <example> | |
1487 | <title>/usr/lib/systemd/network/99-default.link</title> | |
1488 | ||
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> | |
1491 | ||
1492 | <programlisting>[Match] | |
1493 | OriginalName=* | |
1494 | ||
1495 | [Link] | |
1496 | NamePolicy=keep kernel database onboard slot path | |
1497 | AlternativeNamesPolicy=database onboard slot path | |
1498 | MACAddressPolicy=persistent</programlisting> | |
1499 | </example> | |
1500 | ||
1501 | <example> | |
1502 | <title>/etc/systemd/network/10-dmz.link</title> | |
1503 | ||
1504 | <para>This example assigns the fixed name <literal>dmz0</literal> to the interface with the MAC address | |
1505 | 00:a0:de:63:7a:e6:</para> | |
1506 | ||
1507 | <programlisting>[Match] | |
1508 | MACAddress=00:a0:de:63:7a:e6 | |
1509 | ||
1510 | [Link] | |
1511 | Name=dmz0</programlisting> | |
1512 | ||
1513 | <para><varname>NamePolicy=</varname> is not set, so <varname>Name=</varname> takes effect. We use the | |
1514 | <literal>10-</literal> prefix to order this file early in the list. Note that it needs to be before | |
1515 | <filename>99-default.link</filename>, i.e. it needs a numerical prefix, to have any effect at all.</para> | |
1516 | </example> | |
1517 | ||
1518 | <example> | |
1519 | <title>(Re-)applying a .link file to an interface</title> | |
1520 | ||
1521 | <para>After a new .link file has been created, or an existing .link file modified, the new settings | |
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. | |
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 | |
1532 | <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
1533 | </example> | |
1534 | ||
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 | … | |
1540 | Parsed configuration file /usr/lib/systemd/network/99-default.link | |
1541 | Parsed configuration file /etc/systemd/network/10-eth0.link | |
1542 | ID_NET_DRIVER=cdc_ether | |
1543 | Config file /etc/systemd/network/10-eth0.link applies to device hub0 | |
1544 | link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. | |
1545 | hub0: Device has name_assign_type=4 | |
1546 | Using default interface naming scheme 'v240'. | |
1547 | hub0: Policies did not yield a name, using specified Name=hub0. | |
1548 | ID_NET_LINK_FILE=/etc/systemd/network/10-eth0.link | |
1549 | ID_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 | … | |
1556 | Parsed configuration file /usr/lib/systemd/network/99-default.link | |
1557 | Parsed configuration file /etc/systemd/network/10-eth0.link | |
1558 | Created link configuration context. | |
1559 | ID_NET_DRIVER=e1000e | |
1560 | Config file /usr/lib/systemd/network/99-default.link applies to device enp0s31f6 | |
1561 | link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. | |
1562 | enp0s31f6: Device has name_assign_type=4 | |
1563 | Using default interface naming scheme 'v240'. | |
1564 | enp0s31f6: Policy *keep*: keeping existing userspace name | |
1565 | enp0s31f6: Device has addr_assign_type=0 | |
1566 | enp0s31f6: MAC on the device already matches policy *persistent* | |
1567 | ID_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 | |
1572 | the first option in <filename index="false">99-default.link</filename> means that the existing name is | |
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". | |
1577 | enp0s31f6: Device has addr_assign_type=0 | |
1578 | enp0s31f6: MAC on the device already matches policy *persistent* | |
1579 | ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link | |
1580 | ID_NET_NAME=enp0s31f6 | |
1581 | … | |
1582 | </programlisting> | |
1583 | ||
1584 | <para>Please note that the details of output are subject to change.</para> | |
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] | |
1595 | Path=pci-0000:00:1a.0-* | |
1596 | ||
1597 | [Link] | |
1598 | Name=internet0</programlisting> | |
1599 | </example> | |
1600 | ||
1601 | <example> | |
1602 | <title>/etc/systemd/network/25-wireless.link</title> | |
1603 | ||
1604 | <para>Here's an overly complex example that shows the use of a large number of [Match] and [Link] settings.</para> | |
1605 | ||
1606 | <programlisting>[Match] | |
1607 | MACAddress=12:34:56:78:9a:bc | |
1608 | Driver=brcmsmac | |
1609 | Path=pci-0000:02:00.0-* | |
1610 | Type=wlan | |
1611 | Virtualization=no | |
1612 | Host=my-laptop | |
1613 | Architecture=x86-64 | |
1614 | ||
1615 | [Link] | |
1616 | Name=wireless0 | |
1617 | MTUBytes=1450 | |
1618 | BitsPerSecond=10M | |
1619 | WakeOnLan=magic | |
1620 | MACAddress=cb:a9:87:65:43:21</programlisting> | |
1621 | </example> | |
1622 | </refsect1> | |
1623 | ||
1624 | <refsect1> | |
1625 | <title>See Also</title> | |
1626 | <para><simplelist type="inline"> | |
1627 | <member><citerefentry> | |
1628 | <refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum> | |
1629 | </citerefentry></member> | |
1630 | <member><citerefentry> | |
1631 | <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum> | |
1632 | </citerefentry></member> | |
1633 | <member><citerefentry> | |
1634 | <refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum> | |
1635 | </citerefentry></member> | |
1636 | <member><citerefentry> | |
1637 | <refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum> | |
1638 | </citerefentry></member> | |
1639 | <member><citerefentry> | |
1640 | <refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum> | |
1641 | </citerefentry></member> | |
1642 | </simplelist></para> | |
1643 | </refsect1> | |
1644 | ||
1645 | </refentry> |