SYSTEMD.LINK(5)
๐ SYSTEMD.LINK(5) ๐
okay bestie, welcome to the manual page for systemd.link โ yes that's the section 5 one, and yes it's literally all about Network device configuration ๐ฆ. this is the file format that tells your system how to set up network devices, and we're gonna go through it together. grab a snack. ๐
โจ NAME โจ
systemd.link โ Network device configuration ๐
โจ SYNOPSIS โจ
link.link
โจ DESCRIPTION โจ
okay so. a .link file is just a plain ini-style text file that encodes configuration for matching network devices. it's used by systemd-udevd(8), and specifically by its net_setup_link builtin. if you wanna know the general syntax rules of this whole ini situation, go peek at systemd.syntax(7). ๐
heads up queen ๐ โ some distributions may incorporate.linkfiles in their early boot facilities (like, by including copies of the.linkfiles ininitramfs). so you might have to take manual steps to make sure any local changes you make are consistent with early-boot storage facilities. please consult the relevant distribution-specific documentation, i am begging you. ๐ญ
the .link files get read from the files located in:
- the system network directory
/usr/lib/systemd/networkand/usr/local/lib/systemd/network[1]๐ธ - the volatile runtime network directory
/run/systemd/network๐ฆ - the local administration network directory
/etc/systemd/network๐
all config files are collectively sorted and processed in alphanumeric order, regardless of which directories they live in. however โ and this is the tea โ โ files with identical filenames replace each other.
it's recommended that each filename is prefixed with a number smaller than "70" (e.g. 10-eth0.link). otherwise, the default .link files or those generated by systemd-network-generator.service(8) may take precedence over user configured files. not cute. ๐
priority order, from highest to lowest:
- files in
/etc/have the highest priority ๐ - files in
/run/take precedence over files with the same name in/usr/lib/ - this can be used to override a system-supplied link file with a local file if needed ๐
as a special case: an empty file (file size 0) or a symlink with the same name pointing to /dev/null disables the configuration file entirely (it is "masked"). poof, gone. ๐
๐ drop-ins, my beloved ๐
along with the link file foo.link, a "drop-in" directory foo.link.d/ may exist. all files with the suffix .conf from this directory will be merged in alphanumeric order and parsed after the main file itself has been parsed. this is so useful for altering or adding configuration settings without having to modify the main configuration file. iconique. โจ
each drop-in file must have appropriate section headers. don't forget them bestie, they're not optional. ๐ซถ
in addition to /etc/systemd/network, drop-in .d directories can be placed in /usr/lib/systemd/network or /run/systemd/network directories. and the priority goes like this:
- drop-in files in
/etc/take precedence over those in/run/ - which in turn take precedence over those in
/usr/lib/ - and drop-in files under any of these directories take precedence over the main link file wherever located ๐
๐ธ the two sections you actually came here for ๐ธ
the link file contains:
- a
[Match]section โ this determines if a given link file may be applied to a given device - a
[Link]section โ this specifies how the device should be configured ๐
the first (in lexicographic order) of the link files that matches a given device is the one that gets applied. so like, only one wins. ๐
not me reminding you that a default file99-default.linkis shipped by the system. any user-supplied.linkshould hence have a lexicographically earlier name to be considered at all. otherwise your file is just sitting there, unread, unnoticed. the way that is so tragic actually ๐ญ
and if you're having problems with your .link files? see udevadm(8) for diagnosing problems with .link files. it's giving debugging queen ๐ฅ
๐ [MATCH] SECTION OPTIONS ๐
okay so here's the tea bestie: a link file "matches" an interface only when every single match you wrote in [Match] is satisfied. no partial credit, no vibes-based maybe. ๐
and the plot twist? if a link file has no valid settings at all in [Match], it matches everything, and systemd-udevd will side-eye you with a warning about it. ๐
pro tip so you dodge that warning and make it crystal clear that yes, you really do want to match all interfaces โ just add this:
OriginalName=*
Also super important: the first link file (in alphanumeric order) that matches a given interface is the one that gets applied. every file after it is ignored, even if it matched too. first come, first served, periodt. ๐
here's every key that's accepted:
MACAddress=โ a whitespace-separated list of hardware addresses. the acceptable formats are:- colon-delimited hexadecimal โ each field must be one byte. e.g.
"12:34:56:78:90:ab"or"AA:BB:CC:DD:EE:FF".
- colon-delimited hexadecimal โ each field must be one byte. e.g.
Added in version 250.
- hyphen-delimited hexadecimal โ each field must be one byte. e.g.
"12-34-56-78-90-ab"or"AA-BB-CC-DD-EE-FF".
Added in version 250.
- dot-delimited hexadecimal โ each field must be two bytes. e.g.
"1234.5678.90ab"or"AABB.CCDD.EEFF".
Added in version 250.
- IPv4 address format โ e.g.
"127.0.0.1"or"192.168.0.1".
Added in version 250.
- IPv6 address format โ e.g.
"2001:0db8:85a3::8a2e:0370:7334"or"::1".
Added in version 250.
The total length of each MAC address must be 4 (for IPv4 tunnel), 6 (for Ethernet), 16 (for IPv6 tunnel), or 20 (for InfiniBand). This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list of hardware addresses defined prior to this is reset. Defaults to unset.
Added in version 211.
PermanentMACAddress=โ a whitespace-separated list of hardware's permanent addresses. so like,MACAddress=matches the device's current MAC address, but this one matches the device's permanent MAC address, which might be totally different from the current one. ๐ Use full colon-, hyphen- or dot-delimited hexadecimal, or IPv4 or IPv6 address format. This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list of hardware addresses defined prior to this is reset. Defaults to unset.
Added in version 245.
Path=โ a whitespace-separated list of shell-style globs matching the persistent path, as exposed by the udev propertyID_PATH.
Added in version 211.
Driver=โ a whitespace-separated list of shell-style globs matching the driver currently bound to the device, as exposed by the udev propertyID_NET_DRIVERof its parent device, or โ if that's not set โ the driver as exposed byethtool -iof the device itself. If the list is prefixed with a"!", the test is inverted.
Added in version 211.
Type=โ a whitespace-separated list of shell-style globs matching the device type, as exposed bynetworkctl list. If the list is prefixed with a"!", the test is inverted. some valid values are"ether","loopback","wlan","wwan". Valid types are named either from the udev"DEVTYPE"attribute, or"ARPHRD_"macros inlinux/if_arp.h, so heads up: this is not comprehensive.
Added in version 211.
Kind=โ a whitespace-separated list of shell-style globs matching the device kind, as exposed bynetworkctl status INTERFACEorip -d link show INTERFACE. If the list is prefixed with a"!", the test is inverted. some valid values are"bond","bridge","gre","tun","veth". Valid kinds are given by netlink's"IFLA_INFO_KIND"attribute, so again, not comprehensive.
Added in version 251.
Property=โ a whitespace-separated list of udev property names with their values after an equals sign ("="). If multiple properties are specified, the test results are ANDed. If the list is prefixed with a"!", the test is inverted. If a value contains white spaces, then please quote the whole key and value pair. If a value contains quotation, then please escape the quotation with"\".
Example: if a .link file has the following:
Property=ID_MODEL_ID=9999 "ID_VENDOR_FROM_DATABASE=vendor name" "KEY=with \"quotation\""
then, the .link file matches only when an interface has all the above three properties.
Added in version 243.
OriginalName=โ a whitespace-separated list of shell-style globs matching the device name, as exposed by the udev property"INTERFACE". This cannot be used to match on names that have already been changed from userspace. Caution is advised when matching on kernel-assigned names, as they are known to be unstable between reboots. โ ๏ธ
Added in version 218.
Host=โ matches against the hostname or machine ID of the host. SeeConditionHost=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 211.
Virtualization=โ checks whether the system is executed in a virtualized environment and optionally tests whether it's a specific implementation. SeeConditionVirtualization=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 211.
KernelCommandLine=โ checks whether a specific kernel command line option is set. SeeConditionKernelCommandLine=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 211.
KernelVersion=โ checks whether the kernel version (as reported byuname -r) matches a certain expression. SeeConditionKernelVersion=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 237.
Version=โ checks whether a software version matches a certain expression. SeeConditionVersion=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 258.
Credential=โ checks whether the specified credential was passed to thesystemd-udevd.serviceservice. See System and Service Credentials[2] for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 252.
Architecture=โ checks whether the system is running on a specific architecture. SeeConditionArchitecture=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 211.
Firmware=โ checks whether the system is running on a machine with the specified firmware. SeeConditionFirmware=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 249.
MachineTag=โ matches against the tags assigned to the local machine. SeeConditionMachineTag=insystemd.unit(5)for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, the previously assigned value is cleared.
Added in version 262.
๐ธ [LINK] SECTION OPTIONS ๐ธ
the [Link] section is where you actually do stuff instead of just matching. it accepts these keys:
Description=โ a description of the device.
Added in version 211.
Property=โ set specified udev properties. this takes a space separated list of key-value pairs concatenated with an equal sign ("="). Example:
Property=HOGE=foo BAR=baz
This option supports simple specifier expansion, see the Specifiers section below. This option can be specified multiple times. If an empty string is assigned, then all previous assignments are cleared.
This setting is useful to configure the "ID_NET_MANAGED_BY=" property which declares which network management service shall manage the interface, which is respected by systemd-networkd(8) and others. Use
Property=ID_NET_MANAGED_BY=io.systemd.Network
to declare explicitly that systemd-networkd shall manage the interface, or set the property to something else to declare explicitly it shall not do so. See systemd.network(5) for details how this property is used to match interface names.
Added in version 256.
ImportProperty=โ import specified udev properties from the saved database. this takes a space separated list of property names. Example:
ImportProperty=HOGE BAR
This option supports simple specifier expansion, see the Specifiers section below. This option can be specified multiple times. If an empty string is assigned, then all previous assignments are cleared.
If the same property is also set in Property= in the above, then the imported property value will be overridden by the value specified in Property=.
Added in version 256.
UnsetProperty=โ unset specified udev properties. this takes a space separated list of property names. Example:
UnsetProperty=HOGE BAR
This option supports simple specifier expansion, see the Specifiers section below. This option can be specified multiple times. If an empty string is assigned, then all previous assignments are cleared.
This setting is applied after ImportProperty= and Property= are applied. Hence, if the same property is specified in ImportProperty= or Property=, then the imported or specified property value will be ignored, and the property will be unset.
Added in version 256.
Alias=โ theifaliasinterface property is set to this value.
Added in version 211.
MACAddressPolicy=โ the policy by which the MAC address should be set. The available policies are:persistentโ If the hardware has a persistent MAC address (and honestly, most hardware should), and the kernel is actually using it, then nothing happens โ we leave it alone. But if it isn't, a new MAC address gets generated that is guaranteed to be the same on every boot for the given machine and the given device, but which is otherwise random. This whole thing depends onID_NET_NAME_*properties existing for the link. On hardware where those properties aren't set, the generation of a persistent MAC address will fail ๐ญ
Added in version 211.
randomโ If the kernel is already using a random MAC address, nothing happens. Otherwise a new address is randomly generated each time the device appears, typically at boot. Either way, the random address will have the"unicast"and"locally administered"bits set.
Added in version 211.
noneโ Keeps the MAC address assigned by the kernel. Or use the MAC address specified inMACAddress=.
Added in version 227.
An empty string assignment is equivalent to setting "none".
Added in version 211.
MACAddress=โ The interface MAC address to use. For this setting to take effect,MACAddressPolicy=must either be unset, empty, or"none". โจ
Added in version 211.
NamePolicy=โ An ordered, space-separated list of policies by which the interface name should be set.NamePolicy=may be disabled by specifyingnet.ifnames=0on the kernel command line. Each of the policies may fail, and the first successful one is used. The name is not set directly, but is exported to udev as the propertyID_NET_NAME, which is, by default, used by audev(7), rule to setNAME. The available policies are:kernelโ If the kernel claims that the name it has set for a device is predictable, then no renaming is performed.
Added in version 216.
databaseโ The name is set based on entries in the udev's Hardware Database with the keyID_NET_NAME_FROM_DATABASE.
Added in version 211.
onboardโ The name is set based on information given by the firmware for on-board devices, as exported by the udev propertyID_NET_NAME_ONBOARD. Seesystemd.net-naming-scheme(7).
Added in version 211.
slotโ The name is set based on information given by the firmware for hot-plug devices, as exported by the udev propertyID_NET_NAME_SLOT. Seesystemd.net-naming-scheme(7).
Added in version 211.
pathโ The name is set based on the device's physical location, as exported by the udev propertyID_NET_NAME_PATH. Seesystemd.net-naming-scheme(7).
Added in version 211.
macโ The name is set based on the device's persistent MAC address, as exported by the udev propertyID_NET_NAME_MAC. Seesystemd.net-naming-scheme(7).
Added in version 211.
keepโ If the device already had a name given by userspace (as part of creation of the device or a rename), keep it. ๐ซถ
Added in version 241.
Added in version 211.
Name=โ The interface name to use. This option has lower precedence thanNamePolicy=, so for this setting to take effect,NamePolicy=must either be unset, empty, disabled, or all policies configured there must fail. Also see the example below with"Name=dmz0".
Okay so heads up: specifying a name that the kernel might use for another interface (for example"eth0") is dangerous ๐ because the name assignment done by udev will race with the assignment done by the kernel, and only one interface may use the name. Depending on the order of operations, either udev or the kernel will win, making the naming unpredictable. It is best to use some different prefix, for example"internal0"/"external0"or"lan0"/"lan1"/"lan3".
Interface names must have a minimum length of 1 character and a maximum length of 15 characters, and may contain any 7bit ASCII character, with the exception of control characters, ":", "/" and "%". While "." is an allowed character, it is recommended to avoid it when naming interfaces as various tools (such as resolvconf(1)) use it as separator character. Also, fully numeric interface names are not allowed (in order to avoid ambiguity with interface specification by numeric indexes), nor are the special strings ".", "..", "all" and "default".
Added in version 211.
AlternativeNamesPolicy=โ A space-separated list of policies by which the interface's alternative names should be set. Each of the policies may fail, and all successful policies are used. The available policies are"database","onboard","slot","path", and"mac". If the kernel does not support the alternative names, then this setting will be ignored.
Added in version 245.
AlternativeName=โ The alternative interface name to use. This option can be specified multiple times. If the empty string is assigned to this option, the list is reset, and all prior assignments have no effect. If the kernel does not support the alternative names, then this setting will be ignored.
Alternative interface names may be used to identify interfaces in various tools. In contrast to the primary name (as configured with Name= above) there may be multiple alternative names referring to the same interface. Alternative names may have a maximum length of 127 characters, in contrast to the 15 allowed for the primary interface name, but otherwise are subject to the same naming constraints.
Added in version 245.
TransmitQueues=โ Specifies the device's number of transmit queues. An integer in the range1...16384. When unset, the kernel's default will be used.
Added in version 248.
ReceiveQueues=โ Specifies the device's number of receive queues. An integer in the range1...16384. When unset, the kernel's default will be used.
Added in version 248.
TransmitQueueLength=โ Specifies the transmit queue length of the device in number of packets. An unsigned integer in the range0...4294967294. When unset, the kernel's default will be used.
Added in version 248.
MTUBytes=โ The maximum transmission unit in bytes to set for the device. The usual suffixesK,M,Gare supported and are understood to the base of 1024.
Added in version 211.
BitsPerSecond=โ The speed to set for the device, the value is rounded down to the nearest Mbps. The usual suffixesK,M,Gare supported and are understood to the base of 1000.
Added in version 211.
Duplex=โ The duplex mode to set for the device. The accepted values arehalfandfull.
Added in version 211.
AutoNegotiation=โ Takes a boolean. If set toyes, automatic negotiation of transmission parameters is enabled. Autonegotiation is a procedure by which two connected ethernet devices choose common transmission parameters, such as speed, duplex mode, and flow control. When unset, the kernel's default will be used.
Note that if autonegotiation is enabled, speed and duplex settings are read-only. If autonegotiation is disabled, speed and duplex settings are writable if the driver supports multiple link modes.
Added in version 233.
WakeOnLan=โ The Wake-on-LAN policy to set for the device. Takes the special value"off"which disables Wake-on-LAN, or space separated list of the following words:phyโ Wake on PHY activity.
Added in version 211.
unicastโ Wake on unicast messages.
Added in version 235.
multicastโ Wake on multicast messages.
Added in version 235.
broadcastโ Wake on broadcast messages.
Added in version 235.
arpโ Wake on ARP.
Added in version 235.
magicโ Wake on receipt of a magic packet. โจ
Added in version 211.
secureonโ Enable SecureOn password for MagicPacket. Implied whenWakeOnLanPassword=is specified. If specified withoutWakeOnLanPassword=option, then the password is read from the credential"LINK.link.wol.password"(e.g.,"60-foo.link.wol.password"), and if the credential not found, then read from"wol.password". SeeImportCredential=/LoadCredential=/SetCredential=insystemd.exec(5)for details. The password in the credential, must be 6 bytes in hex format with each byte separated by a colon (":") like an Ethernet MAC address, e.g.,"aa:bb:cc:dd:ee:ff".
Added in version 235.
Defaults to unset, and the device's default will be used. This setting can be specified multiple times. If an empty string is assigned, then the all previous assignments are cleared.
Added in version 211.
WakeOnLanPassword=โ Specifies the SecureOn password for MagicPacket. Takes an absolute path to a regular file or anAF_UNIXstream socket, or the plain password. When a path to a regular file is specified, the password is read from it. When anAF_UNIXstream socket is specified, a connection is made to it and the password is read from it. The password must be 6 bytes in hex format with each byte separated by a colon (":") like an Ethernet MAC address, e.g.,"aa:bb:cc:dd:ee:ff". This impliesWakeOnLan=secureon. Defaults to unset, and the current value will not be changed.
Added in version 250.
Port=โ The port option is used to select the device port. The supported values are:tpโ An Ethernet interface using Twisted-Pair cable as the medium.
Added in version 234.
auiโ Attachment Unit Interface (AUI). Normally used with hubs.
Added in version 234.
bncโ An Ethernet interface using BNC connectors and co-axial cable.
Added in version 234.
miiโ An Ethernet interface using a Media Independent Interface (MII).
Added in version 234.
fibreโ An Ethernet interface using Optical Fibre as the medium.
Added in version 234.
Added in version 234.
Advertise=โ bestie, this is the one that picks which speeds and duplex modes your interface is gonna shout about when it's doing auto-negotiation. ๐ฃ๏ธโจ You're literally telling the link "hey, these are the vibes I'm willing to negotiate at."
And here's the tea ๐ซ โ setting this implies AutoNegotiation=yes all by itself. You don't gotta write it out twice, it just comes bundled. ๐
๐ซถ fr fr, the moment you setAdvertise=,AutoNegotiation=yesis riding shotgun whether you asked or not.
The supported values are:
๐ Table 1. Supported advertise values ๐
okay so this is the whole menu of Advertise= values, and each one comes with its speed in Mbps and its duplex mode. no cap, it's giving encyclopedia, but it's also the exact list so nothing gets invented ๐
10baset-fullโ 10 Mbps, full duplex10baset1brr-fullโ 10 Mbps, full duplex10baset1l-fullโ 10 Mbps, full duplex10baset1s-fullโ 10 Mbps, full duplex10baset-halfโ 10 Mbps, half duplex10baset1s-halfโ 10 Mbps, half duplex10baset1s-p2mp-halfโ 10 Mbps, half duplex100basefx-fullโ 100 Mbps, full duplex100baset-fullโ 100 Mbps, full duplex100baset1-fullโ 100 Mbps, full duplex100basefx-halfโ 100 Mbps, half duplex100baset-halfโ 100 Mbps, half duplex1000basekx-fullโ 1000 Mbps, full duplex1000baset-fullโ 1000 Mbps, full duplex1000baset1-fullโ 1000 Mbps, full duplex1000basex-fullโ 1000 Mbps, full duplex1000baset-halfโ 1000 Mbps, half duplex2500baset-fullโ 2500 Mbps, full duplex2500basex-fullโ 2500 Mbps, full duplex5000baset-fullโ 5000 Mbps, full duplex10000baser-fecโ 10000 Mbps, no duplex value listed10000basecr-fullโ 10000 Mbps, full duplex10000baseer-fullโ 10000 Mbps, full duplex10000basekr-fullโ 10000 Mbps, full duplex10000basekx4-fullโ 10000 Mbps, full duplex10000baselr-fullโ 10000 Mbps, full duplex10000baselrm-fullโ 10000 Mbps, full duplex10000basesr-fullโ 10000 Mbps, full duplex10000baset-fullโ 10000 Mbps, full duplex20000basekr2-fullโ 20000 Mbps, full duplex20000basemld2-fullโ 20000 Mbps, full duplex25000basecr-fullโ 25000 Mbps, full duplex25000basekr-fullโ 25000 Mbps, full duplex25000basesr-fullโ 25000 Mbps, full duplex40000basecr4-fullโ 40000 Mbps, full duplex40000basekr4-fullโ 40000 Mbps, full duplex40000baselr4-fullโ 40000 Mbps, full duplex40000basesr4-fullโ 40000 Mbps, full duplex50000basecr-fullโ 50000 Mbps, full duplex50000basecr2-fullโ 50000 Mbps, full duplex50000basedr-fullโ 50000 Mbps, full duplex50000basekr-fullโ 50000 Mbps, full duplex50000basekr2-fullโ 50000 Mbps, full duplex
bestie the way I need you to NOT guess at these โ they're the literal strings, so copy them exactly. periodt. ๐
okay picking right back up where we left off โ same three columns, same energy: the pattern name, its ID, and the field it maps to. here's the rest of the list, every single one, no skipping bestie ๐ซถ
50000baselr-er-fr-fullโ ID50000,full50000basesr-fullโ ID50000,full50000basesr2-fullโ ID50000,full56000basecr4-fullโ ID56000,full56000basekr4-fullโ ID56000,full56000baselr4-fullโ ID56000,full56000basesr4-fullโ ID56000,full100000basecr-fullโ ID100000,full100000basecr2-fullโ ID100000,full100000basecr4-fullโ ID100000,full100000basedr-fullโ ID100000,full100000basedr2-fullโ ID100000,full100000basekr-fullโ ID100000,full100000basekr2-fullโ ID100000,full100000basekr4-fullโ ID100000,full100000baselr-er-fr-fullโ ID100000,full100000baselr2-er2-fr2-fullโ ID100000,full100000baselr4-er4-fullโ ID100000,full100000basesr-fullโ ID100000,full100000basesr2-fullโ ID100000,full100000basesr4-fullโ ID100000,full200000basecr-fullโ ID200000,full200000basecr2-fullโ ID200000,full200000basecr4-fullโ ID200000,full200000basedr-2-fullโ ID200000,full200000basedr-fullโ ID200000,full200000basedr2-fullโ ID200000,full200000basedr4-fullโ ID200000,full200000basekr-fullโ ID200000,full200000basekr2-fullโ ID200000,full200000basekr4-fullโ ID200000,full200000baselr2-er2-fr2-fullโ ID200000,full200000baselr4-er4-fr4-fullโ ID200000,full200000basesr-fullโ ID200000,full200000basesr2-fullโ ID200000,full200000basesr4-fullโ ID200000,full200000basevr-fullโ ID200000,full400000basecr2-fullโ ID400000,full400000basecr4-fullโ ID400000,full400000basecr8-fullโ ID400000,full400000basedr2-2-fullโ ID400000,full400000basedr2-fullโ ID400000,full400000basedr4-fullโ ID400000,full400000basedr8-fullโ ID400000,full
bestie pls copy these character for character โ the hyphens and numbers are literally load-bearing, and a "fixed" spelling is a broken match. no cap. ๐
and the list keeps going, so don't you dare scroll away yet โ more coming right up โจ
โ 400000basekr2-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basekr4-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basekr8-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000baselr4-er4-fr4-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000baselr8-er8-fr8-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basesr2-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basesr4-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basesr8-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 400000basevr2-full โ 400000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basecr4-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basecr8-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basedr4-2-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basedr4-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basedr8-2-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basedr8-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basekr4-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basekr8-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basesr4-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basesr8-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basevr4-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 800000basevr8-full โ 800000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 1600000basecr8-full โ 1600000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 1600000basedr8-2-full โ 1600000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 1600000basedr8-full โ 1600000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ 1600000basekr8-full โ 1600000 โ full โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ asym-pause โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ aui โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ autonegotiation โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ backplane โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ bnc โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ fec-baser โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ fec-llrs โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ fec-none โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ fec-rs โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ fibre โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ mii โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ pause โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโค
โ tp โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
Okay bestie, that table was an absolute marathon and you deserve a lil snack break after reading it, but every single mode is up there, no skips, no "etc." โ that's the full roster of things you can hand to Advertise= ๐
By default this one is unset, which lowkey means all possible modes get advertised. You can pass it more than once and it just stacks โ every speed and mode you listed gets advertised together, no drama. But the second you assign the empty string to it, the whole list resets and every assignment you made before that just โจ ceases to exist โจ. Poof.
Added in version 240.
ReceiveChecksumOffload=โ takes a boolean. Set it totrueand hardware offload for checksumming ingress network packets (the ones coming in) is enabled. Leave it unset and you get whatever the kernel's default is, no opinion from systemd. Added in version 245. ๐ซถTransmitChecksumOffload=โ takes a boolean. Set it totrueand hardware offload for checksumming egress network packets (the ones heading out) is enabled. Unset means the kernel's default runs the show. Added in version 245. โจScatterGather=โ takes a boolean.trueenables the offload feature where the hardware builds a network packet out of multiple non-contiguous memory buffers โ it's giving "why would they need to be next to each other, that's so restrictive." Unset โ kernel's default. This corresponds to the commandethtool -K INTERFACE tx-scatter-gather on|off. Added in version 260. ๐ฅScatterGatherFragmentList=โ takes a boolean.trueenables the offload feature where the hardware builds a network packet from a chained list of socket buffers (bestie said "link them, it's fine"). Unset โ kernel's default. This corresponds to the commandethtool -K INTERFACE tx-scatter-gather-fraglist on|off. Added in version 260. ๐ธ
TCPSegmentationOffload=โ bestie, boolean time ๐ set it totrueand TCP Segmentation Offload (TSO) is on. Leave it unset and the kernel's default just does its thing. โจ Added in version 232.TCPECNSegmentationOffload=โ boolean again ๐ซถ settrueand TCP Segmentation Offload (TSO) still happens even when ECN (Explicit Congestion Notification) flags are active in the TCP stream. Unset โ kernel default, as always. This is literally the same as runningethtool -K INTERFACE tx-tcp-ecn-segmentation on|off. โจ Added in version 260.TCPMangleIdSegmentationOffload=โ boolean, and this one's for when your hardware is lowkey not it ๐ญ settrueand TCP Segmentation Offload (TSO) is performed even if the hardware can't correctly increment the IPv4 Identification (ID) field for each resulting packet. Unset โ kernel default. Same asethtool -K INTERFACE tx-tcp-mangleid-segmentation on|off. โจ Added in version 260.TCP6SegmentationOffload=โ boolean ๐trueenables TCP6 Segmentation Offload (tx-tcp6-segmentation). Unset โ kernel default. โจ Added in version 235.GenericSegmentationOffload=โ boolean ๐trueenables Generic Segmentation Offload (GSO). Unset โ kernel default. โจ Added in version 232.PartialGenericSegmentationOffload=โ boolean โจtrueenables Partial Generic Segmentation Offload (GSO_Partial). See Partial Generic Segmentation Offload[3] for more details, bestie. Unset โ kernel default. โจ Added in version 258.GenericReceiveOffload=โ boolean ๐trueenables Generic Receive Offload (GRO). Unset โ kernel default. โจ Added in version 232.GenericReceiveOffloadHardware=โ boolean ๐ฅtrueenables hardware accelerated Generic Receive Offload (GRO). Unset โ kernel default. โจ Added in version 250.GenericReceiveOffloadList=โ boolean ๐ฆtrueenables Generic Receive Offload (GRO) List for UDP. Unset โ kernel default. This one'sethtool -K INTERFACE rx-gro-list on|off. โจ Added in version 260.GenericReceiveOffloadUDPForwarding=โ boolean ๐ธtrueenables Generic Receive Offload (GRO) for aggregating incoming UDP packets. Unset โ kernel default. Corresponds toethtool -K INTERFACE rx-udp-gro-forwarding on|off. โจ Added in version 260.LargeReceiveOffload=โ boolean โญtrueenables Large Receive Offload (LRO). Unset โ kernel default. โจ Added in version 232.ReceivePacketSteeringCPUMask=โ configures the Receive Packet Steering (RPS) list of CPUs that RPS may forward traffic to ๐ takes a list of CPU indices or ranges separated by either whitespace or commas. You can also pass the special value"all", which includes every available CPU in the mask. CPU ranges are written as the lower and upper CPU indices separated by a dash (e.g."2-6"). This option may be specified more than once, and when you do, the specified list of CPU ranges gets merged. If an empty string is assigned, the list is reset โ all assignments prior to this will have no effect. Defaults to unset, and the RPS CPU list stays unchanged. To disable RPS when it was previously enabled, use the special value"disable". โจ Added in version 256.IRQAffinityPolicy=โ specifies the IRQ distribution strategy for network interface MSI/MSI-X interrupts ๐ takes one of"spread"or"single". When set to"spread", queue IRQs are distributed across CPUs using a topology-aware maximum distance algorithm that prefers CPUs on different NUMA nodes, then different physical cores, then different hyperthreads. When set to"single", all IRQs are pinned to a single CPU (CPU 0 by default, or the first CPU in the set specified byIRQAffinity=). When there are more IRQs than available CPUs, queues wrap around using round-robin assignment. When unset, no affinity management is performed. Setting this to an empty string explicitly disables affinity management.
This option only applies to devices with MSI/MSI-X interrupts discoverable via /sys/class/net/iface/device/msi_irqs/. Virtual devices (veth, tap) and legacy INTx devices are skipped with a notice logged.
Heads up bestie: if irqbalance(1) or similar IRQ management daemons are running, they may override the configured affinity ๐ consider disabling such daemons or configuring them to exclude managed interfaces.
โจ Added in version 260.
IRQAffinity=โ filters the set of CPUs eligible for IRQ placement ๐ takes a list of CPU indices or ranges separated by either whitespace or commas (e.g.,"0-3","0,2,4,6","0-3,8-11"). This option works in conjunction withIRQAffinityPolicy=andIRQAffinityNUMA=to constrain which CPUs receive network IRQs. When specified with"spread"policy, only the listed CPUs are considered for IRQ distribution. When specified with"single"policy, IRQs are pinned to the first CPU in the allowed set instead of CPU 0. Has no effect ifIRQAffinityPolicy=is not set. โจ Added in version 260.IRQAffinityNUMA=โ filters CPUs to those belonging to the specified NUMA node ๐ takes either"local"or an explicit NUMA node number (0,1,2, ...). When set to"local", the NUMA node local to the NIC's PCIe slot is used (determined from/sys/class/net/iface/device/numa_node). If the device's NUMA node cannot be determined (e.g., non-NUMA system), a warning is logged and IRQ affinity configuration is skipped.
When both IRQAffinity= and IRQAffinityNUMA= are specified, their intersection is used. If the intersection results in an empty set, an error is logged and no affinity is applied. Has no effect if IRQAffinityPolicy= is not set.
โจ Added in version 260.
ReceiveVLANCTAGHardwareAcceleration=โ boolean ๐trueenables receive VLAN CTAG hardware acceleration. Unset โ kernel default. โจ Added in version 250.TransmitVLANCTAGHardwareAcceleration=โ boolean ๐trueenables transmit VLAN CTAG hardware acceleration. Unset โ kernel default. โจ Added in version 250.ReceiveVLANCTAGFilter=โ boolean ๐ฆtrueenables receive filtering on VLAN CTAGs. Unset โ kernel default. โจ Added in version 250.TransmitVLANSTAGHardwareAcceleration=โ boolean ๐ฆtrueenables transmit VLAN STAG hardware acceleration. Unset โ kernel default. โจ Added in version 250.NTupleFilter=โ boolean ๐ฅtrueenables receive N-tuple filters and actions. Unset โ kernel default. โจ Added in version 250.ReceiveFCS=โ boolean ๐truepasses the Frame Check Sequence (FCS) value up the stack without trimming it, and lets userspace calculate error rate or link health. Unset โ kernel default. โจ Added in version 258.ReceiveAll=โ boolean ๐ญtruelets the interface also receive damaged ethernet frames. Unset โ kernel default. โจ Added in version 258.RxChannels=,TxChannels=,OtherChannels=,CombinedChannels=โ specifies the number of receive, transmit, other, or combined channels, respectively ๐ takes an unsigned integer in the range1...4294967295or"max". If set to"max", the advertised maximum value of the hardware will be used. When unset, the number will not be changed. Defaults to unset. โจ Added in version 239.RxBufferSize=,RxMiniBufferSize=,RxJumboBufferSize=,TxBufferSize=โ specifies the maximum number of pending packets in the NIC receive buffer, mini receive buffer, jumbo receive buffer, or transmit buffer, respectively ๐ธ takes an unsigned integer in the range1...4294967295or"max". If set to"max", the advertised maximum value of the hardware will be used. When unset, the number will not be changed. Defaults to unset. โจ Added in version 244.RxFlowControl=โ boolean โญ when set, enables receive flow control, also known as the ethernet receive PAUSE message (generate and send ethernet PAUSE frames). When unset, the kernel's default will be used. โจ Added in version 246.TxFlowControl=โ boolean โญ when set, enables transmit flow control, also known as the ethernet transmit PAUSE message (respond to received ethernet PAUSE frames). When unset, the kernel's default will be used. โจ Added in version 246.AutoNegotiationFlowControl=โ boolean โจ when set, auto negotiation enables the interface to exchange state advertisements with the connected peer so that the two devices can agree on the ethernet PAUSE configuration. When unset, the kernel's default will be used. โจ Added in version 246.GenericSegmentOffloadMaxBytes=โ specifies the maximum size of a Generic Segment Offload (GSO) packet the device should accept ๐ซถ the usual suffixesK,M,Gare supported and are understood to the base of 1024. An unsigned integer in the range1...65536. Defaults to unset. โจ Added in version 248.GenericSegmentOffloadMaxSegments=โ specifies the maximum number of Generic Segment Offload (GSO) segments the device should accept ๐ซถ an unsigned integer in the range1...65535. Defaults to unset. โจ Added in version 248.UseAdaptiveRxCoalesce=,UseAdaptiveTxCoalesce=โ boolean properties that, when set, enable/disable adaptive Rx/Tx coalescing if the hardware supports it ๐ฅ when unset, the kernel's default will be used. โจ Added in version 250.RxCoalesceSec=,RxCoalesceIrqSec=,RxCoalesceLowSec=,RxCoalesceHighSec=,TxCoalesceSec=,TxCoalesceIrqSec=,TxCoalesceLowSec=,TxCoalesceHighSec=โ bestie these set the delay before Rx/Tx interrupts get generated after a packet is sent or received. The "Irq" ones kick in when the host is off servicing an IRQ. The "Low" and "High" ones kick in when the packet rate drops below the low threshold or exceeds the high threshold respectively โ but only if adaptive Rx/Tx coalescing is enabled. When you leave them unset, the kernel's defaults are used, periodt.
Added in version 250. โจ
RxMaxCoalescedFrames=,RxMaxCoalescedIrqFrames=,RxMaxCoalescedLowFrames=,RxMaxCoalescedHighFrames=,TxMaxCoalescedFrames=,TxMaxCoalescedIrqFrames=,TxMaxCoalescedLowFrames=,TxMaxCoalescedHighFrames=โ these set the max number of frames sent/received before an Rx/Tx interrupt gets generated. Same deal as above, the "Irq" ones apply when the host is servicing an IRQ, and the "Low"/"High" ones apply when the packet rate dips below the low threshold or goes over the high threshold respectively, if adaptive Rx/Tx coalescing is enabled. Unset = kernel's defaults, no cap. ๐
Added in version 250. โจ
CoalescePacketRateLow=,CoalescePacketRateHigh=โ these set the low and high packet rate thresholds respectively (in packets per second, iykyk) and they're what decides when the corresponding coalescing settings for low and high packet rates actually come into effect โ that is, if adaptive Rx/Tx coalescing is enabled. Unset? The kernel's defaults, always. ๐ซถ
Added in version 250. โจ
CoalescePacketRateSampleIntervalSec=โ how often to sample the packet rate used for adaptive Rx/Tx coalescing. This one can't be zero, bestie. The lowest time granularity it supports is seconds, and partial seconds get rounded up before being passed to the kernel. Unset = the kernel's default. ๐ธ
Added in version 250. โจ
StatisticsBlockCoalesceSec=โ how long to delay driver in-memory statistics block updates. If the driver doesn't have an in-memory statistic block, this property is just ignored (not me being ignored ๐). Can't be zero. Unset = the kernel's default. ๐
Added in version 250. โจ
MDI=โ sets the medium dependent interface (MDI) mode for the interface. An MDI describes the interface from a physical layer implementation to the physical medium used to carry the transmission, if you were wondering. Takes one of these words: "straight" (or equivalently "mdi"), "crossover" (or equivalently "mdi-x", "mdix"), and "auto". When "straight", MDI straight through mode is used. When "crossover", MDI crossover (MDI-X) mode is used. When "auto", the MDI status is automatically detected. Defaults to unset, and the kernel's default gets used. ๐
Added in version 251. โจ
SR-IOVVirtualFunctions=โ sets the number of SR-IOV virtual functions. Takes an integer in the range0...2147483647. Defaults to unset, and it's automatically determined from the values you specified in theVirtualFunction=settings in the[SR-IOV]sections. ๐
Added in version 251. โจ
๐ง [SR-IOV] SECTION OPTIONS ๐ง
SR-IOV is giving main character energy โ it partitions a single physical PCI resource into virtual PCI functions which can then be, like, injected into a VM. In the case of network VFs, SR-IOV reduces latency and CPU utilisation for north-south network traffic (that's traffic with endpoints outside the host machine, bestie), by letting traffic bypass the host machine's network stack. Obsessed. ๐ฅ
The presence of an [SR-IOV] section in a .link file causes the creation and configuration of the specified virtual function. Within a .network file, the specified virtual function gets configured, but it must already exist โ no creating on the fly there. Specify several [SR-IOV] sections to configure several SR-IOVs. ๐
The [SR-IOV] section accepts the following keys.
VirtualFunction=โ specifies a Virtual Function (VF), a lightweight PCIe function designed solely to move data in and out. Takes an integer in the range0...2147483646. This option is compulsory โ you literally cannot skip it. ๐ญ
Added in version 251. โจ
VLANId=โ specifies the VLAN ID of the virtual function. Takes an integer in the range1...4095. ๐
Added in version 251. โจ
QualityOfService=โ specifies the quality of service of the virtual function. Takes an integer in the range1...4294967294. ๐ธ
Added in version 251. โจ
VLANProtocol=โ specifies the VLAN protocol of the virtual function. Takes "802.1Q" or "802.1ad". ๐ฆ
Added in version 251. โจ
MACSpoofCheck=โ takes a boolean. Controls the MAC spoof checking. When unset, the kernel's default gets used. ๐
Added in version 251. โจ
QueryReceiveSideScaling=โ takes a boolean. Toggles the ability of querying the receive side scaling (RSS) configuration of the virtual function (VF). The VF RSS info like the RSS hash key may be considered sensitive on some devices where this info is shared between the VF and the physical function (PF). When unset, the kernel's default gets used. ๐
Added in version 251. โจ
Trust=โ takes a boolean. Lets you set the trust mode of the virtual function (VF). When set, VF users can set a specific feature which may impact security and/or performance. When unset, the kernel's default gets used. ๐
Added in version 251. โจ
LinkState=โ lets you set the link state of the virtual function (VF). Takes a boolean or the special value "auto". Setting it to "auto" means a reflection of the physical function (PF) link state, "yes" lets the VF communicate with other VFs on this host even if the PF link state is down, and "no" causes the hardware to drop any packets sent by the VF. When unset, the kernel's default gets used. ๐
Added in version 251. โจ
MACAddress=โ specifies the MAC address for the virtual function. ๐
Added in version 251. โจ
โก [ENERGYEFFICIENTETHERNET] SECTION OPTIONS โก
The [EnergyEfficientEthernet] section controls the Energy Efficient Ethernet (EEE) feature of the interface, and it accepts the following keys. Saving energy AND serving looks? Iconic. ๐ฑ
Enable=โ takes a boolean argument. When true, the Energy Efficient Ethernet (EEE) feature gets enabled on the interface. Defaults to unset, and the enablement of EEE stays unchanged. โจ
Added in version 258. โจ
TxLowPowerIdle=โ takes a boolean argument. When true, the transmit Low Power Idle (Tx-LPI) mode of the Energy Efficient Ethernet feature gets enabled on the interface. Defaults to unset, and the enablement of the mode stays unchanged. ๐ด
Added in version 258. โจ
TxLowPowerIdleSec=โ takes a timespan. This configures how long the interface should not enter the Low Power Idle mode after transmission. If it's too short, it may decrease performance. If it's too long, it may not gain energy saving. Defaults to unset, and the timespan stays unchanged. Balance is everything bestie ๐ง
Added in version 258. โจ
LinkMode=โ takes a list of link modes, e.g."1000baset-full". See the table for theAdvertise=setting in the[Link]section above for possible values. This configures the Energy Efficient Ethernet capable connection modes to be advertised. Defaults to unset, and the advertised modes stay unchanged. ๐ฆ
Added in version 258. โจ
๐ฎ SPECIFIERS ๐ฎ
Some settings resolve specifiers which may be used to write generic unit files referring to runtime or unit parameters that get replaced when the unit files are loaded. Specifiers must be known and resolvable for the setting to be valid. The following specifiers are understood: ๐
๐ Table 2. Specifiers available in unit files ๐
ok bestie here's the full rundown, every single one, no skips:
"%a"โ Architecture. A short string identifying the architecture of the local system. A string such asx86,x86-64orarm64. See the architectures defined forConditionArchitecture=insystemd.unit(5)for a full list."%A"โ Operating system image version. The operating system image version identifier of the running system, as read from theIMAGE_VERSION=field of/etc/os-release. If not set, resolves to an empty string. Seeos-release(5)for more information."%b"โ Boot ID. The boot ID of the running system, formatted as string. Seerandom(4)for more information."%B"โ Operating system build ID. The operating system build identifier of the running system, as read from theBUILD_ID=field of/etc/os-release. If not set, resolves to an empty string. Seeos-release(5)for more information."%H"โ Host name. The hostname of the running system."%l"โ Short host name. The hostname of the running system, truncated at the first dot to remove any domain component."%m"โ Machine ID. The machine ID of the running system, formatted as string. Seemachine-id(5)for more information."%M"โ Operating system image identifier. The operating system image identifier of the running system, as read from theIMAGE_ID=field of/etc/os-release. If not set, resolves to an empty string. Seeos-release(5)for more information."%o"โ Operating system ID. The operating system identifier of the running system, as read from theID=field of/etc/os-release. Seeos-release(5)for more information."%q"โ Pretty host name. The pretty hostname of the running system, as read from thePRETTY_HOSTNAME=field of/etc/machine-info. If not set, resolves to the short hostname. Seemachine-info(5)for more information."%T"โ Directory for temporary files. This is either/tmpor the path"$TMPDIR","$TEMP"or"$TMP"are set to. (Note that the directory may be specified without a trailing slash.)"%v"โ Kernel release. Identical touname -routput."%V"โ Directory for larger and persistent temporary files. This is either/var/tmpor the path"$TMPDIR","$TEMP"or"$TMP"are set to. (Note that the directory may be specified without a trailing slash.)"%w"โ Operating system version ID. The operating system version identifier of the running system, as read from theVERSION_ID=field of/etc/os-release. If not set, resolves to an empty string. Seeos-release(5)for more information."%W"โ Operating system variant ID. The operating system variant identifier of the running system, as read from theVARIANT_ID=field of/etc/os-release. If not set, resolves to an empty string. Seeos-release(5)for more information.
ngl the way %a through %W is literally just the system doxxing itself to your config files ๐
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ
EXAMPLES โจ
Example 1. /usr/lib/systemd/network/99-default.link
Okay so the link file 99-default.link that ships with systemd? It defines the default policies for the interface name, alternative names, and MAC address of links. Main character behavior, honestly. Here's the whole serve:
[Match]
OriginalName=*
[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent
Example 2. /etc/systemd/network/10-dmz.link
This one assigns the fixed name dmz0 to the interface with the MAC address 00:a0:de:63:7a:e6:
[Match]
MACAddress=00:a0:de:63:7a:e6
[Link]
Name=dmz0
NamePolicy= is not set, so Name= takes effect. We use the 10- prefix to order this file early in the list. And bestie, note that it needs to be before 99-default.link, i.e. it needs a numerical prefix, to have any effect at all. No prefix, no power. Periodt. ๐
Example 3. (Re-)applying a .link file to an interface
After a new .link file has been created, or an existing .link file modified, the new settings may be applied to the matching interface with the following commands:
$ sudo udevadm control --reload
$ sudo ip link set eth0 down
$ sudo udevadm trigger --verbose --settle --action add /sys/class/net/eth0
You may also need to stop the service that manages the network interface, e.g. systemd-networkd.service(8) or NetworkManager.service, before the above operation, and then restart the service after that. For more details about udevadm command, see udevadm(8). iykyk ๐ฆ
Example 4. Debugging NamePolicy= assignments
$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/hub0
...
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/10-eth0.link
ID_NET_DRIVER=cdc_ether
Config file /etc/systemd/network/10-eth0.link applies to device hub0
link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
hub0: Device has name_assign_type=4
Using default interface naming scheme 'v240'.
hub0: Policies did not yield a name, using specified Name=hub0.
ID_NET_LINK_FILE=/etc/systemd/network/10-eth0.link
ID_NET_NAME=hub0
...
Explicit Name= configuration wins in this case.
sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/enp0s31f6
...
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/10-eth0.link
Created link configuration context.
ID_NET_DRIVER=e1000e
Config file /usr/lib/systemd/network/99-default.link applies to device enp0s31f6
link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
enp0s31f6: Device has name_assign_type=4
Using default interface naming scheme 'v240'.
enp0s31f6: Policy *keep*: keeping existing userspace name
enp0s31f6: Device has addr_assign_type=0
enp0s31f6: MAC on the device already matches policy *persistent*
ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
...
In this case, the interface was already renamed, so the keep policy specified as the first option in 99-default.link means that the existing name is preserved. If keep was removed, or if we were in boot before the renaming has happened, we might get the following instead:
enp0s31f6: Policy *path* yields "enp0s31f6".
enp0s31f6: Device has addr_assign_type=0
enp0s31f6: MAC on the device already matches policy *persistent*
ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
ID_NET_NAME=enp0s31f6
...
Please note that the details of output are subject to change. Not me reading the fine print. ๐
Example 5. /etc/systemd/network/10-internet.link
This example assigns the fixed name internet0 to the interface with the device path pci-0000:00:1a.0-*:
[Match]
Path=pci-0000:00:1a.0-*
[Link]
Name=internet0
Example 6. /etc/systemd/network/25-wireless.link
Here's an overly complex example that shows the use of a large number of [Match] and [Link] settings. She's extra, but she's serving. ๐
[Match]
MACAddress=12:34:56:78:9a:bc
Driver=brcmsmac
Path=pci-0000:02:00.0-*
Type=wlan
Virtualization=no
Host=my-laptop
Architecture=x86-64
[Link]
Name=wireless0
MTUBytes=1450
BitsPerSecond=10M
WakeOnLan=magic
MACAddress=cb:a9:87:65:43:21
SEE ALSO ๐
systemd-udevd.service(8)udevadm(8)systemd.netdev(5)systemd.network(5)systemd-network-generator.service(8)
NOTES ๐
- ๐ฃ๐ฅ๐งจ๐ฅ๐ฅ๐ฃ Please note that those configuration files must be available at all times. If
/usr/local/is a separate partition, it may not be available during early boot, and must not be used for configuration. - System and Service Credentials
https://systemd.io/CREDENTIALS - Partial Generic Segmentation Offload
https://docs.kernel.org/networking/segmentation-offloads.html#partial-generic-segmentation-offload
That's the whole page, bestie. This is the systemd 262.1 era of SYSTEMD.LINK(5), with the date doing its lil footer thing at the very bottom. Go rename something responsibly. Bye! ๐โจ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms