1SYSTEMD.LINK(5)                  systemd.link                  SYSTEMD.LINK(5)
2
3
4

NAME

6       systemd.link - Network device configuration
7

SYNOPSIS

9       link.link
10

DESCRIPTION

12       A plain ini-style text file that encodes configuration for matching
13       network devices, used by systemd-udevd(8) and in particular its
14       net_setup_link builtin. See systemd.syntax(7) for a general description
15       of the syntax.
16
17       The .link files are read from the files located in the system network
18       directory /usr/lib/systemd/network and /usr/local/lib/systemd/network,
19       the volatile runtime network directory /run/systemd/network, and the
20       local administration network directory /etc/systemd/network. All
21       configuration files are collectively sorted and processed in
22       alphanumeric order, regardless of the directories in which they live.
23       However, files with identical filenames replace each other. It is
24       recommended that each filename is prefixed with a number (e.g.
25       10-eth0.link). Otherwise, the default .link files or those generated by
26       systemd-network-generator.service(8) may take precedence over user
27       configured files. Files in /etc/ have the highest priority, files in
28       /run/ take precedence over files with the same name in /usr/lib/. This
29       can be used to override a system-supplied link file with a local file
30       if needed. As a special case, an empty file (file size 0) or symlink
31       with the same name pointing to /dev/null disables the configuration
32       file entirely (it is "masked").
33
34       Along with the link file foo.link, a "drop-in" directory foo.link.d/
35       may exist. All files with the suffix ".conf" from this directory will
36       be merged in the alphanumeric order and parsed after the main file
37       itself has been parsed. This is useful to alter or add configuration
38       settings, without having to modify the main configuration file. Each
39       drop-in file must have appropriate section headers.
40
41       In addition to /etc/systemd/network, drop-in ".d" directories can be
42       placed in /usr/lib/systemd/network or /run/systemd/network directories.
43       Drop-in files in /etc/ take precedence over those in /run/ which in
44       turn take precedence over those in /usr/lib/. Drop-in files under any
45       of these directories take precedence over the main link file wherever
46       located.
47
48       The link file contains a [Match] section, which determines if a given
49       link file may be applied to a given device, as well as a [Link] section
50       specifying how the device should be configured. The first (in lexical
51       order) of the link files that matches a given device is applied. Note
52       that a default file 99-default.link is shipped by the system. Any
53       user-supplied .link should hence have a lexically earlier name to be
54       considered at all.
55
56       See udevadm(8) for diagnosing problems with .link files.
57

[MATCH] SECTION OPTIONS

59       A link file is said to match an interface if all matches specified by
60       the [Match] section are satisfied. When a link file does not contain
61       valid settings in [Match] section, then the file will match all
62       interfaces and systemd-udevd warns about that. Hint: to avoid the
63       warning and to make it clear that all interfaces shall be matched, add
64       the following:
65
66           OriginalName=*
67
68       The first (in alphanumeric order) of the link files that matches a
69       given interface is applied, all later files are ignored, even if they
70       match as well. The following keys are accepted:
71
72       MACAddress=
73           A whitespace-separated list of hardware addresses. The acceptable
74           formats are:
75
76           colon-delimited hexadecimal
77               Each field must be one byte. E.g.  "12:34:56:78:90:ab" or
78               "AA:BB:CC:DD:EE:FF".
79
80           hyphen-delimited hexadecimal
81               Each field must be one byte. E.g.  "12-34-56-78-90-ab" or
82               "AA-BB-CC-DD-EE-FF".
83
84           dot-delimited hexadecimal
85               Each field must be two bytes. E.g.  "1234.5678.90ab" or
86               "AABB.CCDD.EEFF".
87
88           IPv4 address format
89               E.g.  "127.0.0.1" or "192.168.0.1".
90
91           IPv6 address format
92               E.g.  "2001:0db8:85a3::8a2e:0370:7334" or "::1".
93
94           The total length of each MAC address must be 4 (for IPv4 tunnel), 6
95           (for Ethernet), 16 (for IPv6 tunnel), or 20 (for InfiniBand). This
96           option may appear more than once, in which case the lists are
97           merged. If the empty string is assigned to this option, the list of
98           hardware addresses defined prior to this is reset. Defaults to
99           unset.
100
101       PermanentMACAddress=
102           A whitespace-separated list of hardware's permanent addresses.
103           While MACAddress= matches the device's current MAC address, this
104           matches the device's permanent MAC address, which may be different
105           from the current one. Use full colon-, hyphen- or dot-delimited
106           hexadecimal, or IPv4 or IPv6 address format. This option may appear
107           more than once, in which case the lists are merged. If the empty
108           string is assigned to this option, the list of hardware addresses
109           defined prior to this is reset. Defaults to unset.
110
111       Path=
112           A whitespace-separated list of shell-style globs matching the
113           persistent path, as exposed by the udev property ID_PATH.
114
115       Driver=
116           A whitespace-separated list of shell-style globs matching the
117           driver currently bound to the device, as exposed by the udev
118           property ID_NET_DRIVER of its parent device, or if that is not set,
119           the driver as exposed by ethtool -i of the device itself. If the
120           list is prefixed with a "!", the test is inverted.
121
122       Type=
123           A whitespace-separated list of shell-style globs matching the
124           device type, as exposed by networkctl list. If the list is prefixed
125           with a "!", the test is inverted. Some valid values are "ether",
126           "loopback", "wlan", "wwan". Valid types are named either from the
127           udev "DEVTYPE" attribute, or "ARPHRD_" macros in linux/if_arp.h, so
128           this is not comprehensive.
129
130       Kind=
131           A whitespace-separated list of shell-style globs matching the
132           device kind, as exposed by networkctl status INTERFACE or ip -d
133           link show INTERFACE. If the list is prefixed with a "!", the test
134           is inverted. Some valid values are "bond", "bridge", "gre", "tun",
135           "veth". Valid kinds are given by netlink's "IFLA_INFO_KIND"
136           attribute, so this is not comprehensive.
137
138       Property=
139           A whitespace-separated list of udev property names with their
140           values after equals sign ("="). If multiple properties are
141           specified, the test results are ANDed. If the list is prefixed with
142           a "!", the test is inverted. If a value contains white spaces, then
143           please quote whole key and value pair. If a value contains
144           quotation, then please escape the quotation with "\".
145
146           Example: if a .link file has the following:
147
148               Property=ID_MODEL_ID=9999 "ID_VENDOR_FROM_DATABASE=vendor name" "KEY=with \"quotation\""
149
150           then, the .link file matches only when an interface has all the
151           above three properties.
152
153       OriginalName=
154           A whitespace-separated list of shell-style globs matching the
155           device name, as exposed by the udev property "INTERFACE". This
156           cannot be used to match on names that have already been changed
157           from userspace. Caution is advised when matching on kernel-assigned
158           names, as they are known to be unstable between reboots.
159
160       Host=
161           Matches against the hostname or machine ID of the host. See
162           ConditionHost= in systemd.unit(5) for details. When prefixed with
163           an exclamation mark ("!"), the result is negated. If an empty
164           string is assigned, then previously assigned value is cleared.
165
166       Virtualization=
167           Checks whether the system is executed in a virtualized environment
168           and optionally test whether it is a specific implementation. See
169           ConditionVirtualization= in systemd.unit(5) for details. When
170           prefixed with an exclamation mark ("!"), the result is negated. If
171           an empty string is assigned, then previously assigned value is
172           cleared.
173
174       KernelCommandLine=
175           Checks whether a specific kernel command line option is set. See
176           ConditionKernelCommandLine= in systemd.unit(5) for details. When
177           prefixed with an exclamation mark ("!"), the result is negated. If
178           an empty string is assigned, then previously assigned value is
179           cleared.
180
181       KernelVersion=
182           Checks whether the kernel version (as reported by uname -r) matches
183           a certain expression. See ConditionKernelVersion= in
184           systemd.unit(5) for details. When prefixed with an exclamation mark
185           ("!"), the result is negated. If an empty string is assigned, then
186           previously assigned value is cleared.
187
188       Architecture=
189           Checks whether the system is running on a specific architecture.
190           See ConditionArchitecture= in systemd.unit(5) for details. When
191           prefixed with an exclamation mark ("!"), the result is negated. If
192           an empty string is assigned, then previously assigned value is
193           cleared.
194
195       Firmware=
196           Checks whether the system is running on a machine with the
197           specified firmware. See ConditionFirmware= in systemd.unit(5) for
198           details. When prefixed with an exclamation mark ("!"), the result
199           is negated. If an empty string is assigned, then previously
200           assigned value is cleared.
201

[LINK] SECTION OPTIONS

203       The [Link] section accepts the following keys:
204
205       Description=
206           A description of the device.
207
208       Alias=
209           The ifalias interface property is set to this value.
210
211       MACAddressPolicy=
212           The policy by which the MAC address should be set. The available
213           policies are:
214
215           persistent
216               If the hardware has a persistent MAC address, as most hardware
217               should, and if it is used by the kernel, nothing is done.
218               Otherwise, a new MAC address is generated which is guaranteed
219               to be the same on every boot for the given machine and the
220               given device, but which is otherwise random. This feature
221               depends on ID_NET_NAME_* properties to exist for the link. On
222               hardware where these properties are not set, the generation of
223               a persistent MAC address will fail.
224
225           random
226               If the kernel is using a random MAC address, nothing is done.
227               Otherwise, a new address is randomly generated each time the
228               device appears, typically at boot. Either way, the random
229               address will have the "unicast" and "locally administered" bits
230               set.
231
232           none
233               Keeps the MAC address assigned by the kernel. Or use the MAC
234               address specified in MACAddress=.
235
236           An empty string assignment is equivalent to setting "none".
237
238       MACAddress=
239           The interface MAC address to use. For this setting to take effect,
240           MACAddressPolicy= must either be unset, empty, or "none".
241
242       NamePolicy=
243           An ordered, space-separated list of policies by which the interface
244           name should be set.  NamePolicy= may be disabled by specifying
245           net.ifnames=0 on the kernel command line. Each of the policies may
246           fail, and the first successful one is used. The name is not set
247           directly, but is exported to udev as the property ID_NET_NAME,
248           which is, by default, used by a udev(7), rule to set NAME. The
249           available policies are:
250
251           kernel
252               If the kernel claims that the name it has set for a device is
253               predictable, then no renaming is performed.
254
255           database
256               The name is set based on entries in the udev's Hardware
257               Database with the key ID_NET_NAME_FROM_DATABASE.
258
259           onboard
260               The name is set based on information given by the firmware for
261               on-board devices, as exported by the udev property
262               ID_NET_NAME_ONBOARD. See systemd.net-naming-scheme(7).
263
264           slot
265               The name is set based on information given by the firmware for
266               hot-plug devices, as exported by the udev property
267               ID_NET_NAME_SLOT. See systemd.net-naming-scheme(7).
268
269           path
270               The name is set based on the device's physical location, as
271               exported by the udev property ID_NET_NAME_PATH. See
272               systemd.net-naming-scheme(7).
273
274           mac
275               The name is set based on the device's persistent MAC address,
276               as exported by the udev property ID_NET_NAME_MAC. See
277               systemd.net-naming-scheme(7).
278
279           keep
280               If the device already had a name given by userspace (as part of
281               creation of the device or a rename), keep it.
282
283       Name=
284           The interface name to use. This option has lower precedence than
285           NamePolicy=, so for this setting to take effect, NamePolicy= must
286           either be unset, empty, disabled, or all policies configured there
287           must fail. Also see the example below with "Name=dmz0".
288
289           Note that specifying a name that the kernel might use for another
290           interface (for example "eth0") is dangerous because the name
291           assignment done by udev will race with the assignment done by the
292           kernel, and only one interface may use the name. Depending on the
293           order of operations, either udev or the kernel will win, making the
294           naming unpredictable. It is best to use some different prefix, for
295           example "internal0"/"external0" or "lan0"/"lan1"/"lan3".
296
297           Interface names must have a minimum length of 1 character and a
298           maximum length of 15 characters, and may contain any 7bit ASCII
299           character, with the exception of control characters, ":", "/" and
300           "%". While "."  is an allowed character, it's recommended to avoid
301           it when naming interfaces as various tools (such as resolvconf(1))
302           use it as separator character. Also, fully numeric interface names
303           are not allowed (in order to avoid ambiguity with interface
304           specification by numeric indexes), as are the special strings ".",
305           "..", "all" and "default".
306
307       AlternativeNamesPolicy=
308           A space-separated list of policies by which the interface's
309           alternative names should be set. Each of the policies may fail, and
310           all successful policies are used. The available policies are
311           "database", "onboard", "slot", "path", and "mac". If the kernel
312           does not support the alternative names, then this setting will be
313           ignored.
314
315       AlternativeName=
316           The alternative interface name to use. This option can be specified
317           multiple times. If the empty string is assigned to this option, the
318           list is reset, and all prior assignments have no effect. If the
319           kernel does not support the alternative names, then this setting
320           will be ignored.
321
322           Alternative interface names may be used to identify interfaces in
323           various tools. In contrast to the primary name (as configured with
324           Name= above) there may be multiple alternative names referring to
325           the same interface. Alternative names may have a maximum length of
326           127 characters, in contrast to the 15 allowed for the primary
327           interface name, but otherwise are subject to the same naming
328           constraints.
329
330       TransmitQueues=
331           Specifies the device's number of transmit queues. An integer in the
332           range 1...4096. When unset, the kernel's default will be used.
333
334       ReceiveQueues=
335           Specifies the device's number of receive queues. An integer in the
336           range 1...4096. When unset, the kernel's default will be used.
337
338       TransmitQueueLength=
339           Specifies the transmit queue length of the device in number of
340           packets. An unsigned integer in the range 0...4294967294. When
341           unset, the kernel's default will be used.
342
343       MTUBytes=
344           The maximum transmission unit in bytes to set for the device. The
345           usual suffixes K, M, G are supported and are understood to the base
346           of 1024.
347
348       BitsPerSecond=
349           The speed to set for the device, the value is rounded down to the
350           nearest Mbps. The usual suffixes K, M, G are supported and are
351           understood to the base of 1000.
352
353       Duplex=
354           The duplex mode to set for the device. The accepted values are half
355           and full.
356
357       AutoNegotiation=
358           Takes a boolean. If set to yes, automatic negotiation of
359           transmission parameters is enabled. Autonegotiation is a procedure
360           by which two connected ethernet devices choose common transmission
361           parameters, such as speed, duplex mode, and flow control. When
362           unset, the kernel's default will be used.
363
364           Note that if autonegotiation is enabled, speed and duplex settings
365           are read-only. If autonegotiation is disabled, speed and duplex
366           settings are writable if the driver supports multiple link modes.
367
368       WakeOnLan=
369           The Wake-on-LAN policy to set for the device. Takes the special
370           value "off" which disables Wake-on-LAN, or space separated list of
371           the following words:
372
373           phy
374               Wake on PHY activity.
375
376           unicast
377               Wake on unicast messages.
378
379           multicast
380               Wake on multicast messages.
381
382           broadcast
383               Wake on broadcast messages.
384
385           arp
386               Wake on ARP.
387
388           magic
389               Wake on receipt of a magic packet.
390
391           secureon
392               Enable SecureOn password for MagicPacket. Implied when
393               WakeOnLanPassword= is specified. If specified without
394               WakeOnLanPassword= option, then the password is read from the
395               credential "LINK.link.wol.password" (e.g.,
396               "60-foo.link.wol.password"), and if the credential not found,
397               then read from "wol.password". See
398               LoadCredential=/SetCredential= in systemd.exec(1) for details.
399               The password in the credential, must be 6 bytes in hex format
400               with each byte separated by a colon (":") like an Ethernet MAC
401               address, e.g., "aa:bb:cc:dd:ee:ff".
402
403           Defaults to unset, and the device's default will be used. This
404           setting can be specified multiple times. If an empty string is
405           assigned, then the all previous assignments are cleared.
406
407       WakeOnLanPassword=
408           Specifies the SecureOn password for MagicPacket. Takes an absolute
409           path to a regular file or an AF_UNIX stream socket, or the plain
410           password. When a path to a regular file is specified, the password
411           is read from it. When an AF_UNIX stream socket is specified, a
412           connection is made to it and the password is read from it. The
413           password must be 6 bytes in hex format with each byte separated by
414           a colon (":") like an Ethernet MAC address, e.g.,
415           "aa:bb:cc:dd:ee:ff". This implies WakeOnLan=secureon. Defaults to
416           unset, and the current value will not be changed.
417
418       Port=
419           The port option is used to select the device port. The supported
420           values are:
421
422           tp
423               An Ethernet interface using Twisted-Pair cable as the medium.
424
425           aui
426               Attachment Unit Interface (AUI). Normally used with hubs.
427
428           bnc
429               An Ethernet interface using BNC connectors and co-axial cable.
430
431           mii
432               An Ethernet interface using a Media Independent Interface
433               (MII).
434
435           fibre
436               An Ethernet interface using Optical Fibre as the medium.
437
438       Advertise=
439           This sets what speeds and duplex modes of operation are advertised
440           for auto-negotiation. This implies "AutoNegotiation=yes". The
441           supported values are:
442
443           Table 1. Supported advertise values
444           ┌───────────────────┬──────────────┬─────────────┐
445Advertise          Speed (Mbps) Duplex Mode 
446           ├───────────────────┼──────────────┼─────────────┤
44710baset-half       │ 10           │ half        │
448           ├───────────────────┼──────────────┼─────────────┤
44910baset-full       │ 10           │ full        │
450           ├───────────────────┼──────────────┼─────────────┤
451100baset-half      │ 100          │ half        │
452           ├───────────────────┼──────────────┼─────────────┤
453100baset-full      │ 100          │ full        │
454           ├───────────────────┼──────────────┼─────────────┤
4551000baset-half     │ 1000         │ half        │
456           ├───────────────────┼──────────────┼─────────────┤
4571000baset-full     │ 1000         │ full        │
458           ├───────────────────┼──────────────┼─────────────┤
45910000baset-full    │ 10000        │ full        │
460           ├───────────────────┼──────────────┼─────────────┤
4612500basex-full     │ 2500         │ full        │
462           ├───────────────────┼──────────────┼─────────────┤
4631000basekx-full    │ 1000         │ full        │
464           ├───────────────────┼──────────────┼─────────────┤
46510000basekx4-full  │ 10000        │ full        │
466           ├───────────────────┼──────────────┼─────────────┤
46710000basekr-full   │ 10000        │ full        │
468           ├───────────────────┼──────────────┼─────────────┤
46910000baser-fec     │ 10000        │ full        │
470           ├───────────────────┼──────────────┼─────────────┤
47120000basemld2-full │ 20000        │ full        │
472           ├───────────────────┼──────────────┼─────────────┤
47320000basekr2-full  │ 20000        │ full        │
474           └───────────────────┴──────────────┴─────────────┘
475           By default this is unset, i.e. all possible modes will be
476           advertised. This option may be specified more than once, in which
477           case all specified speeds and modes are advertised. If the empty
478           string is assigned to this option, the list is reset, and all prior
479           assignments have no effect.
480
481       ReceiveChecksumOffload=
482           Takes a boolean. If set to true, hardware offload for checksumming
483           of ingress network packets is enabled. When unset, the kernel's
484           default will be used.
485
486       TransmitChecksumOffload=
487           Takes a boolean. If set to true, hardware offload for checksumming
488           of egress network packets is enabled. When unset, the kernel's
489           default will be used.
490
491       TCPSegmentationOffload=
492           Takes a boolean. If set to true, TCP Segmentation Offload (TSO) is
493           enabled. When unset, the kernel's default will be used.
494
495       TCP6SegmentationOffload=
496           Takes a boolean. If set to true, TCP6 Segmentation Offload
497           (tx-tcp6-segmentation) is enabled. When unset, the kernel's default
498           will be used.
499
500       GenericSegmentationOffload=
501           Takes a boolean. If set to true, Generic Segmentation Offload (GSO)
502           is enabled. When unset, the kernel's default will be used.
503
504       GenericReceiveOffload=
505           Takes a boolean. If set to true, Generic Receive Offload (GRO) is
506           enabled. When unset, the kernel's default will be used.
507
508       GenericReceiveOffloadHardware=
509           Takes a boolean. If set to true, hardware accelerated Generic
510           Receive Offload (GRO) is enabled. When unset, the kernel's default
511           will be used.
512
513       LargeReceiveOffload=
514           Takes a boolean. If set to true, Large Receive Offload (LRO) is
515           enabled. When unset, the kernel's default will be used.
516
517       ReceiveVLANCTAGHardwareAcceleration=
518           Takes a boolean. If set to true, receive VLAN CTAG hardware
519           acceleration is enabled. When unset, the kernel's default will be
520           used.
521
522       TransmitVLANCTAGHardwareAcceleration=
523           Takes a boolean. If set to true, transmit VLAN CTAG hardware
524           acceleration is enabled. When unset, the kernel's default will be
525           used.
526
527       ReceiveVLANCTAGFilter=
528           Takes a boolean. If set to true, receive filtering on VLAN CTAGs is
529           enabled. When unset, the kernel's default will be used.
530
531       TransmitVLANSTAGHardwareAcceleration=
532           Takes a boolean. If set to true, transmit VLAN STAG hardware
533           acceleration is enabled. When unset, the kernel's default will be
534           used.
535
536       NTupleFilter=
537           Takes a boolean. If set to true, receive N-tuple filters and
538           actions are enabled. When unset, the kernel's default will be used.
539
540       RxChannels=, TxChannels=, OtherChannels=, CombinedChannels=
541           Specifies the number of receive, transmit, other, or combined
542           channels, respectively. Takes an unsigned integer in the range
543           1...4294967295 or "max". If set to "max", the advertised maximum
544           value of the hardware will be used. When unset, the number will not
545           be changed. Defaults to unset.
546
547       RxBufferSize=, RxMiniBufferSize=, RxJumboBufferSize=, TxBufferSize=
548           Specifies the maximum number of pending packets in the NIC receive
549           buffer, mini receive buffer, jumbo receive buffer, or transmit
550           buffer, respectively. Takes an unsigned integer in the range
551           1...4294967295 or "max". If set to "max", the advertised maximum
552           value of the hardware will be used. When unset, the number will not
553           be changed. Defaults to unset.
554
555       RxFlowControl=
556           Takes a boolean. When set, enables receive flow control, also known
557           as the ethernet receive PAUSE message (generate and send ethernet
558           PAUSE frames). When unset, the kernel's default will be used.
559
560       TxFlowControl=
561           Takes a boolean. When set, enables transmit flow control, also
562           known as the ethernet transmit PAUSE message (respond to received
563           ethernet PAUSE frames). When unset, the kernel's default will be
564           used.
565
566       AutoNegotiationFlowControl=
567           Takes a boolean. When set, auto negotiation enables the interface
568           to exchange state advertisements with the connected peer so that
569           the two devices can agree on the ethernet PAUSE configuration. When
570           unset, the kernel's default will be used.
571
572       GenericSegmentOffloadMaxBytes=
573           Specifies the maximum size of a Generic Segment Offload (GSO)
574           packet the device should accept. The usual suffixes K, M, G are
575           supported and are understood to the base of 1024. An unsigned
576           integer in the range 1...65536. Defaults to unset.
577
578       GenericSegmentOffloadMaxSegments=
579           Specifies the maximum number of Generic Segment Offload (GSO)
580           segments the device should accept. An unsigned integer in the range
581           1...65535. Defaults to unset.
582
583       UseAdaptiveRxCoalesce=, UseAdaptiveTxCoalesce=
584           Boolean properties that, when set, enable/disable adaptive Rx/Tx
585           coalescing if the hardware supports it. When unset, the kernel's
586           default will be used.
587
588       RxCoalesceSec=, RxCoalesceIrqSec=, RxCoalesceLowSec=,
589       RxCoalesceHighSec=, TxCoalesceSec=, TxCoalesceIrqSec=,
590       TxCoalesceLowSec=, TxCoalesceHighSec=
591           These properties configure the delay before Rx/Tx interrupts are
592           generated after a packet is sent/received. The "Irq" properties
593           come into effect when the host is servicing an IRQ. The "Low" and
594           "High" properties come into effect when the packet rate drops below
595           the low packet rate threshold or exceeds the high packet rate
596           threshold respectively if adaptive Rx/Tx coalescing is enabled.
597           When unset, the kernel's defaults will be used.
598
599       RxMaxCoalescedFrames=, RxMaxCoalescedIrqFrames=,
600       RxMaxCoalescedLowFrames=, RxMaxCoalescedHighFrames=,
601       TxMaxCoalescedFrames=, TxMaxCoalescedIrqFrames=,
602       TxMaxCoalescedLowFrames=, TxMaxCoalescedHighFrames=
603           These properties configure the maximum number of frames that are
604           sent/received before a Rx/Tx interrupt is generated. The "Irq"
605           properties come into effect when the host is servicing an IRQ. The
606           "Low" and "High" properties come into effect when the packet rate
607           drops below the low packet rate threshold or exceeds the high
608           packet rate threshold respectively if adaptive Rx/Tx coalescing is
609           enabled. When unset, the kernel's defaults will be used.
610
611       CoalescePacketRateLow=, CoalescePacketRateHigh=
612           These properties configure the low and high packet rate (expressed
613           in packets per second) threshold respectively and are used to
614           determine when the corresponding coalescing settings for low and
615           high packet rates come into effect if adaptive Rx/Tx coalescing is
616           enabled. If unset, the kernel's defaults will be used.
617
618       CoalescePacketRateSampleIntervalSec=
619           Configures how often to sample the packet rate used for adaptive
620           Rx/Tx coalescing. This property cannot be zero. This lowest time
621           granularity supported by this property is seconds. Partial seconds
622           will be rounded up before being passed to the kernel. If unset, the
623           kernel's default will be used.
624
625       StatisticsBlockCoalesceSec=
626           How long to delay driver in-memory statistics block updates. If the
627           driver does not have an in-memory statistic block, this property is
628           ignored. This property cannot be zero. If unset, the kernel's
629           default will be used.
630
631       MDI=
632           Specifies the medium dependent interface (MDI) mode for the
633           interface. A MDI describes the interface from a physical layer
634           implementation to the physical medium used to carry the
635           transmission. Takes one of the following words: "straight" (or
636           equivalently: "mdi"), "crossover" (or equivalently: "mdi-x",
637           "mdix"), and "auto". When "straight", the MDI straight through mode
638           will be used. When "crossover", the MDI crossover (MDI-X) mode will
639           be used. When "auto", the MDI status is automatically detected.
640           Defaults to unset, and the kernel's default will be used.
641
642       SR-IOVVirtualFunctions=
643           Specifies the number of SR-IOV virtual functions. Takes an integer
644           in the range 0...2147483647. Defaults to unset, and automatically
645           determined from the values specified in the VirtualFunction=
646           settings in the [SR-IOV] sections.
647

[SR-IOV] SECTION OPTIONS

649       The [SR-IOV] section accepts the following keys. Specify several
650       [SR-IOV] sections to configure several SR-IOVs. SR-IOV provides the
651       ability to partition a single physical PCI resource into virtual PCI
652       functions which can then be injected into a VM. In the case of network
653       VFs, SR-IOV improves north-south network performance (that is, traffic
654       with endpoints outside the host machine) by allowing traffic to bypass
655       the host machine’s network stack.
656
657       VirtualFunction=
658           Specifies a Virtual Function (VF), lightweight PCIe function
659           designed solely to move data in and out. Takes an integer in the
660           range 0...2147483646. This option is compulsory.
661
662       VLANId=
663           Specifies VLAN ID of the virtual function. Takes an integer in the
664           range 1...4095.
665
666       QualityOfService=
667           Specifies quality of service of the virtual function. Takes an
668           integer in the range 1...4294967294.
669
670       VLANProtocol=
671           Specifies VLAN protocol of the virtual function. Takes "802.1Q" or
672           "802.1ad".
673
674       MACSpoofCheck=
675           Takes a boolean. Controls the MAC spoof checking. When unset, the
676           kernel's default will be used.
677
678       QueryReceiveSideScaling=
679           Takes a boolean. Toggle the ability of querying the receive side
680           scaling (RSS) configuration of the virtual function (VF). The VF
681           RSS information like RSS hash key may be considered sensitive on
682           some devices where this information is shared between VF and the
683           physical function (PF). When unset, the kernel's default will be
684           used.
685
686       Trust=
687           Takes a boolean. Allows one to set trust mode of the virtual
688           function (VF). When set, VF users can set a specific feature which
689           may impact security and/or performance. When unset, the kernel's
690           default will be used.
691
692       LinkState=
693           Allows one to set the link state of the virtual function (VF).
694           Takes a boolean or a special value "auto". Setting to "auto" means
695           a reflection of the physical function (PF) link state, "yes" lets
696           the VF to communicate with other VFs on this host even if the PF
697           link state is down, "no" causes the hardware to drop any packets
698           sent by the VF. When unset, the kernel's default will be used.
699
700       MACAddress=
701           Specifies the MAC address for the virtual function.
702

EXAMPLES

704       Example 1. /usr/lib/systemd/network/99-default.link
705
706       The link file 99-default.link that is shipped with systemd defines the
707       default naming policy for links.
708
709           [Link]
710           NamePolicy=kernel database onboard slot path
711           MACAddressPolicy=persistent
712
713       Example 2. /etc/systemd/network/10-dmz.link
714
715       This example assigns the fixed name "dmz0" to the interface with the
716       MAC address 00:a0:de:63:7a:e6:
717
718           [Match]
719           MACAddress=00:a0:de:63:7a:e6
720
721           [Link]
722           Name=dmz0
723
724       NamePolicy= is not set, so Name= takes effect. We use the "10-" prefix
725       to order this file early in the list. Note that it needs to be before
726       "99-link", i.e. it needs a numerical prefix, to have any effect at all.
727
728       Example 3. Debugging NamePolicy= assignments
729
730           $ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/hub0
731           ...
732           Parsed configuration file /usr/lib/systemd/network/99-default.link
733           Parsed configuration file /etc/systemd/network/10-eth0.link
734           ID_NET_DRIVER=cdc_ether
735           Config file /etc/systemd/network/10-eth0.link applies to device hub0
736           link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
737           hub0: Device has name_assign_type=4
738           Using default interface naming scheme 'v240'.
739           hub0: Policies didn't yield a name, using specified Name=hub0.
740           ID_NET_LINK_FILE=/etc/systemd/network/10-eth0.link
741           ID_NET_NAME=hub0
742           ...
743
744       Explicit Name= configuration wins in this case.
745
746           sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/enp0s31f6
747           ...
748           Parsed configuration file /usr/lib/systemd/network/99-default.link
749           Parsed configuration file /etc/systemd/network/10-eth0.link
750           Created link configuration context.
751           ID_NET_DRIVER=e1000e
752           Config file /usr/lib/systemd/network/99-default.link applies to device enp0s31f6
753           link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
754           enp0s31f6: Device has name_assign_type=4
755           Using default interface naming scheme 'v240'.
756           enp0s31f6: Policy *keep*: keeping existing userspace name
757           enp0s31f6: Device has addr_assign_type=0
758           enp0s31f6: MAC on the device already matches policy *persistent*
759           ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
760           ...
761
762       In this case, the interface was already renamed, so the keep policy
763       specified as the first option in 99-default.link means that the
764       existing name is preserved. If keep was removed, or if were in boot
765       before the renaming has happened, we might get the following instead:
766
767           enp0s31f6: Policy *path* yields "enp0s31f6".
768           enp0s31f6: Device has addr_assign_type=0
769           enp0s31f6: MAC on the device already matches policy *persistent*
770           ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
771           ID_NET_NAME=enp0s31f6
772           ...
773
774       Please note that the details of output are subject to change.
775
776       Example 4. /etc/systemd/network/10-internet.link
777
778       This example assigns the fixed name "internet0" to the interface with
779       the device path "pci-0000:00:1a.0-*":
780
781           [Match]
782           Path=pci-0000:00:1a.0-*
783
784           [Link]
785           Name=internet0
786
787       Example 5. /etc/systemd/network/25-wireless.link
788
789       Here's an overly complex example that shows the use of a large number
790       of [Match] and [Link] settings.
791
792           [Match]
793           MACAddress=12:34:56:78:9a:bc
794           Driver=brcmsmac
795           Path=pci-0000:02:00.0-*
796           Type=wlan
797           Virtualization=no
798           Host=my-laptop
799           Architecture=x86-64
800
801           [Link]
802           Name=wireless0
803           MTUBytes=1450
804           BitsPerSecond=10M
805           WakeOnLan=magic
806           MACAddress=cb:a9:87:65:43:21
807

SEE ALSO

809       systemd-udevd.service(8), udevadm(8), systemd.netdev(5),
810       systemd.network(5), systemd-network-generator.service(8)
811
812
813
814systemd 251                                                    SYSTEMD.LINK(5)
Impressum