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