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 -->
6 <refentry id=
"systemd.link"
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
9 <title>systemd.link
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>systemd.link
</refentrytitle>
15 <manvolnum>5</manvolnum>
19 <refname>systemd.link
</refname>
20 <refpurpose>Network device configuration
</refpurpose>
24 <para><filename><replaceable>link
</replaceable>.link
</filename></para>
28 <title>Description
</title>
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>
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>
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
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>
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>
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>
79 <para>See
<citerefentry><refentrytitle>udevadm
</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
80 diagnosing problems with
<filename>.link
</filename> files.
</para>
84 <title>[Match] Section Options
</title>
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>
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
101 <varlistentry id='mac-address'
>
102 <term><varname>MACAddress=
</varname></term>
104 <para>A whitespace-separated list of hardware addresses. The acceptable formats are:
</para>
108 <term><option>colon-delimited hexadecimal
</option></term>
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>.
114 <xi:include href=
"version-info.xml" xpointer=
"v250"/></listitem>
117 <term><option>hyphen-delimited hexadecimal
</option></term>
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>.
123 <xi:include href=
"version-info.xml" xpointer=
"v250"/></listitem>
126 <term><option>dot-delimited hexadecimal
</option></term>
128 Each field must be two bytes.
129 E.g.
<literal>1234.5678.90ab
</literal> or
<literal>AABB.CCDD.EEFF
</literal>.
132 <xi:include href=
"version-info.xml" xpointer=
"v250"/></listitem>
135 <term><option>IPv4 address format
</option></term>
137 E.g.
<literal>127.0.0.1</literal> or
<literal>192.168.0.1</literal>.
140 <xi:include href=
"version-info.xml" xpointer=
"v250"/></listitem>
143 <term><option>IPv6 address format
</option></term>
145 E.g.
<literal>2001:
0db8:
85a3::
8a2e:
0370:
7334</literal> or
<literal>::
1</literal>.
148 <xi:include href=
"version-info.xml" xpointer=
"v250"/></listitem>
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>
157 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
161 <varlistentry id='permanent-mac-address'
>
162 <term><varname>PermanentMACAddress=
</varname></term>
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
172 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
176 <varlistentry id='path'
>
177 <term><varname>Path=
</varname></term>
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>
183 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
187 <varlistentry id='driver'
>
188 <term><varname>Driver=
</varname></term>
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>
195 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
199 <varlistentry id='type'
>
200 <term><varname>Type=
</varname></term>
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.
209 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
213 <varlistentry id='kind'
>
214 <term><varname>Kind=
</varname></term>
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.
225 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
229 <varlistentry id='property'
>
230 <term><varname>Property=
</varname></term>
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>
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.
243 <xi:include href=
"version-info.xml" xpointer=
"v243"/>
248 <term><varname>OriginalName=
</varname></term>
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>
255 <xi:include href=
"version-info.xml" xpointer=
"v218"/>
259 <varlistentry id='host'
>
260 <term><varname>Host=
</varname></term>
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.
268 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
272 <varlistentry id='virtualization'
>
273 <term><varname>Virtualization=
</varname></term>
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.
282 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
286 <varlistentry id='kernel-command-line'
>
287 <term><varname>KernelCommandLine=
</varname></term>
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.
296 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
300 <varlistentry id='kernel-version'
>
301 <term><varname>KernelVersion=
</varname></term>
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.
310 <xi:include href=
"version-info.xml" xpointer=
"v237"/>
314 <varlistentry id='version'
>
315 <term><varname>Version=
</varname></term>
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>
323 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
327 <varlistentry id='credential'
>
328 <term><varname>Credential=
</varname></term>
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.
337 <xi:include href=
"version-info.xml" xpointer=
"v252"/>
341 <varlistentry id='architecture'
>
342 <term><varname>Architecture=
</varname></term>
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.
351 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
355 <varlistentry id='firmware'
>
356 <term><varname>Firmware=
</varname></term>
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.
365 <xi:include href=
"version-info.xml" xpointer=
"v249"/>
373 <title>[Link] Section Options
</title>
375 <para>The [Link] section accepts the following
378 <variablelist class='network-directives'
>
380 <term><varname>Description=
</varname></term>
382 <para>A description of the device.
</para>
384 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
388 <term><varname>Property=
</varname></term>
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>
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>
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>
407 <xi:include href=
"version-info.xml" xpointer=
"v256"/>
411 <term><varname>ImportProperty=
</varname></term>
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>.
422 <xi:include href=
"version-info.xml" xpointer=
"v256"/>
426 <term><varname>UnsetProperty=
</varname></term>
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>
438 <xi:include href=
"version-info.xml" xpointer=
"v256"/>
442 <term><varname>Alias=
</varname></term>
444 <para>The
<varname>ifalias
</varname> interface property is set to this value.
</para>
446 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
450 <term><varname>MACAddressPolicy=
</varname></term>
452 <para>The policy by which the MAC address should be set. The
453 available policies are:
458 <term><option>persistent
</option></term>
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
470 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
474 <term><option>random
</option></term>
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>
483 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
487 <term><option>none
</option></term>
489 <para>Keeps the MAC address assigned by the kernel. Or use the MAC address specified in
490 <varname>MACAddress=
</varname>.
</para>
492 <xi:include href=
"version-info.xml" xpointer=
"v227"/>
497 <para>An empty string assignment is equivalent to setting
<literal>none
</literal>.
</para>
499 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
503 <term><varname>MACAddress=
</varname></term>
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>.
509 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
513 <term><varname>NamePolicy=
</varname></term>
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:
526 <term><option>kernel
</option></term>
528 <para>If the kernel claims that the name it has set
529 for a device is predictable, then no renaming is
532 <xi:include href=
"version-info.xml" xpointer=
"v216"/>
536 <term><option>database
</option></term>
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>.
543 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
547 <term><option>onboard
</option></term>
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>.
555 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
559 <term><option>slot
</option></term>
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>.
567 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
571 <term><option>path
</option></term>
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>.
579 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
583 <term><option>mac
</option></term>
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>.
591 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
595 <term><option>keep
</option></term>
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>
600 <xi:include href=
"version-info.xml" xpointer=
"v241"/>
605 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
609 <term><varname>Name=
</varname></term>
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>
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>
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>
633 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
637 <term><varname>AlternativeNamesPolicy=
</varname></term>
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.
646 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
650 <term><varname>AlternativeName=
</varname></term>
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
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>
663 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
667 <term><varname>TransmitQueues=
</varname></term>
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>
672 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
676 <term><varname>ReceiveQueues=
</varname></term>
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>
681 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
685 <term><varname>TransmitQueueLength=
</varname></term>
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>
690 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
694 <term><varname>MTUBytes=
</varname></term>
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>
700 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
704 <term><varname>BitsPerSecond=
</varname></term>
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>
710 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
714 <term><varname>Duplex=
</varname></term>
716 <para>The duplex mode to set for the device. The accepted values are
<option>half
</option> and
717 <option>full
</option>.
</para>
719 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
723 <term><varname>AutoNegotiation=
</varname></term>
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>
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>
734 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
738 <term><varname>WakeOnLan=
</varname></term>
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
746 <term><option>phy
</option></term>
748 <para>Wake on PHY activity.
</para>
750 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
754 <term><option>unicast
</option></term>
756 <para>Wake on unicast messages.
</para>
758 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
762 <term><option>multicast
</option></term>
764 <para>Wake on multicast messages.
</para>
766 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
770 <term><option>broadcast
</option></term>
772 <para>Wake on broadcast messages.
</para>
774 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
778 <term><option>arp
</option></term>
780 <para>Wake on ARP.
</para>
782 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
786 <term><option>magic
</option></term>
788 <para>Wake on receipt of a magic packet.
791 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
795 <term><option>secureon
</option></term>
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>
809 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
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
818 <xi:include href=
"version-info.xml" xpointer=
"v211"/>
822 <term><varname>WakeOnLanPassword=
</varname></term>
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>
833 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
837 <term><varname>Port=
</varname></term>
839 <para>The port option is used to select the device port. The
840 supported values are:
</para>
844 <term><option>tp
</option></term>
846 <para>An Ethernet interface using Twisted-Pair cable as the medium.
</para>
848 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
852 <term><option>aui
</option></term>
854 <para>Attachment Unit Interface (AUI). Normally used with hubs.
857 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
861 <term><option>bnc
</option></term>
863 <para>An Ethernet interface using BNC connectors and co-axial cable.
</para>
865 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
869 <term><option>mii
</option></term>
871 <para>An Ethernet interface using a Media Independent Interface (MII).
</para>
873 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
877 <term><option>fibre
</option></term>
879 <para>An Ethernet interface using Optical Fibre as the medium.
</para>
881 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
886 <xi:include href=
"version-info.xml" xpointer=
"v234"/>
890 <term><varname>Advertise=
</varname></term>
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:
896 <title>Supported advertise values
</title>
898 <colspec colname='Advertise'
/>
899 <colspec colname='Speed'
/>
900 <colspec colname='Duplex Mode'
/>
903 <entry>Advertise
</entry>
904 <entry>Speed (Mbps)
</entry>
905 <entry>Duplex Mode
</entry>
907 <xi:include href=
"ethtool-link-mode.xml" />
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.
916 <xi:include href=
"version-info.xml" xpointer=
"v240"/>
920 <term><varname>ReceiveChecksumOffload=
</varname></term>
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>
925 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
929 <term><varname>TransmitChecksumOffload=
</varname></term>
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>
934 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
938 <term><varname>TCPSegmentationOffload=
</varname></term>
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>
943 <xi:include href=
"version-info.xml" xpointer=
"v232"/>
947 <term><varname>TCP6SegmentationOffload=
</varname></term>
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>
952 <xi:include href=
"version-info.xml" xpointer=
"v235"/>
956 <term><varname>GenericSegmentationOffload=
</varname></term>
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>
961 <xi:include href=
"version-info.xml" xpointer=
"v232"/>
965 <term><varname>PartialGenericSegmentationOffload=
</varname></term>
967 <para>Takes a boolean. If set to true, Partial Generic Segmentation Offload (GSO_Partial) is
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>
973 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
977 <term><varname>GenericReceiveOffload=
</varname></term>
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>
982 <xi:include href=
"version-info.xml" xpointer=
"v232"/>
986 <term><varname>GenericReceiveOffloadHardware=
</varname></term>
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>
991 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
995 <term><varname>LargeReceiveOffload=
</varname></term>
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>
1000 <xi:include href=
"version-info.xml" xpointer=
"v232"/>
1004 <term><varname>ReceivePacketSteeringCPUMask=
</varname></term>
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>
1015 <xi:include href=
"version-info.xml" xpointer=
"v256"/>
1019 <term><varname>ReceiveVLANCTAGHardwareAcceleration=
</varname></term>
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>
1024 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1028 <term><varname>TransmitVLANCTAGHardwareAcceleration=
</varname></term>
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>
1033 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1037 <term><varname>ReceiveVLANCTAGFilter=
</varname></term>
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>
1042 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1046 <term><varname>TransmitVLANSTAGHardwareAcceleration=
</varname></term>
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>
1051 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1055 <term><varname>NTupleFilter=
</varname></term>
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>
1060 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1064 <term><varname>ReceiveFCS=
</varname></term>
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>
1070 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1074 <term><varname>ReceiveAll=
</varname></term>
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>
1079 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1083 <term><varname>RxChannels=
</varname></term>
1084 <term><varname>TxChannels=
</varname></term>
1085 <term><varname>OtherChannels=
</varname></term>
1086 <term><varname>CombinedChannels=
</varname></term>
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>
1093 <xi:include href=
"version-info.xml" xpointer=
"v239"/>
1097 <term><varname>RxBufferSize=
</varname></term>
1098 <term><varname>RxMiniBufferSize=
</varname></term>
1099 <term><varname>RxJumboBufferSize=
</varname></term>
1100 <term><varname>TxBufferSize=
</varname></term>
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>
1108 <xi:include href=
"version-info.xml" xpointer=
"v244"/>
1112 <term><varname>RxFlowControl=
</varname></term>
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>
1118 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
1122 <term><varname>TxFlowControl=
</varname></term>
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>
1128 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
1132 <term><varname>AutoNegotiationFlowControl=
</varname></term>
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>
1138 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
1142 <term><varname>GenericSegmentOffloadMaxBytes=
</varname></term>
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>
1149 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
1153 <term><varname>GenericSegmentOffloadMaxSegments=
</varname></term>
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>
1158 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
1162 <term><varname>UseAdaptiveRxCoalesce=
</varname></term>
1163 <term><varname>UseAdaptiveTxCoalesce=
</varname></term>
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>
1168 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
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>
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
1188 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
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>
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>
1208 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1212 <term><varname>CoalescePacketRateLow=
</varname></term>
1213 <term><varname>CoalescePacketRateHigh=
</varname></term>
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>
1220 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1224 <term><varname>CoalescePacketRateSampleIntervalSec=
</varname></term>
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>
1231 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1235 <term><varname>StatisticsBlockCoalesceSec=
</varname></term>
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>
1241 <xi:include href=
"version-info.xml" xpointer=
"v250"/>
1246 <term><varname>MDI=
</varname></term>
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>
1258 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1263 <term><varname>SR-IOVVirtualFunctions=
</varname></term>
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>
1269 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
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.
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>
1289 <para>The [SR-IOV] section accepts the following keys.
</para>
1291 <variablelist class='network-directives'
>
1293 <term><varname>VirtualFunction=
</varname></term>
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.
1299 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1304 <term><varname>VLANId=
</varname></term>
1306 <para>Specifies VLAN ID of the virtual function. Takes an integer in the range
1…
4095.
</para>
1308 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1313 <term><varname>QualityOfService=
</varname></term>
1315 <para>Specifies quality of service of the virtual function. Takes an integer in the range
1316 1…
4294967294.
</para>
1318 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1323 <term><varname>VLANProtocol=
</varname></term>
1325 <para>Specifies VLAN protocol of the virtual function. Takes
<literal>802.1Q
</literal> or
1326 <literal>802.1ad
</literal>.
</para>
1328 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1333 <term><varname>MACSpoofCheck=
</varname></term>
1335 <para>Takes a boolean. Controls the MAC spoof checking. When unset, the kernel's default will
1338 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1343 <term><varname>QueryReceiveSideScaling=
</varname></term>
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>
1350 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1355 <term><varname>Trust=
</varname></term>
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>
1361 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1366 <term><varname>LinkState=
</varname></term>
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>
1375 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
1380 <term><varname>MACAddress=
</varname></term>
1382 <para>Specifies the MAC address for the virtual function.
</para>
1384 <xi:include href=
"version-info.xml" xpointer=
"v251"/>
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>
1395 <variablelist class='network-directives'
>
1397 <term><varname>Enable=
</varname></term>
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>
1402 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1407 <term><varname>TxLowPowerIdle=
</varname></term>
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>
1413 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1418 <term><varname>TxLowPowerIdleSec=
</varname></term>
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>
1424 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1429 <term><varname>LinkMode=
</varname></term>
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>
1436 <xi:include href=
"version-info.xml" xpointer=
"v258"/>
1443 <title>Specifiers
</title>
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>
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" />
1457 <entry>Specifier
</entry>
1458 <entry>Meaning
</entry>
1459 <entry>Details
</entry>
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"/>
1484 <title>Examples
</title>
1487 <title>/usr/lib/systemd/network/
99-default.link
</title>
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>
1492 <programlisting>[Match]
1496 NamePolicy=keep kernel database onboard slot path
1497 AlternativeNamesPolicy=database onboard slot path
1498 MACAddressPolicy=persistent
</programlisting>
1502 <title>/etc/systemd/network/
10-dmz.link
</title>
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>
1507 <programlisting>[Match]
1508 MACAddress=
00:a0:de:
63:
7a:e6
1511 Name=dmz0
</programlisting>
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>
1519 <title>(Re-)applying a .link file to an interface
</title>
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>
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>
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>
1536 <title>Debugging
<varname>NamePolicy=
</varname> assignments
</title>
1538 <programlisting>$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/hub0
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
1552 <para>Explicit
<varname>Name=
</varname> configuration wins in this case.
</para>
1554 <programlisting>sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/enp0s31f6
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
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>
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
1584 <para>Please note that the details of output are subject to change.
</para>
1588 <title>/etc/systemd/network/
10-internet.link
</title>
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>
1594 <programlisting>[Match]
1595 Path=pci-
0000:
00:
1a
.0-*
1598 Name=internet0
</programlisting>
1602 <title>/etc/systemd/network/
25-wireless.link
</title>
1604 <para>Here's an overly complex example that shows the use of a large number of [Match] and [Link] settings.
</para>
1606 <programlisting>[Match]
1607 MACAddress=
12:
34:
56:
78:
9a:bc
1609 Path=pci-
0000:
02:
00.0-*
1620 MACAddress=cb:a9:
87:
65:
43:
21</programlisting>
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>