SYSTEMD.NETWORK(5)
โจ SYSTEMD.NETWORK(5) โจ โ systemd.network
hiii bestie, this is the manual page for systemd.network, and yes the manual name is literally systemd.network ๐ it's giving "network configuration, but make it a file"
๐ NAME ๐
systemd.network โ Network configuration โจ
๐ฆ SYNOPSIS ๐ฆ
network.network
๐ธ DESCRIPTION ๐ธ
okay so first thing: a plain ini-style text file that encodes network configuration for matching network interfaces, and it's used by systemd-networkd(8). If you want the general rundown on how this syntax thing works, go read systemd.syntax(7) โ it's the origin story, iykyk ๐
The main network file must have the extension .network. Other extensions? ignored, not even invited to the group chat ๐ Networks are applied to links whenever the links appear.
heads up bestie ๐ซถ not all settings and configurations can be made with.networkfiles. Sometimes you're gonna needsystemd.link(5)orsystemd.netdev(5)files in conjunction with.networkfiles when you're working with physical and virtual network devices respectively. it's a collab, not a solo era โจ
Now the part where these files actually live. The .network files are read from the files located in:
- the system network directories
/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 configuration files are collectively sorted and processed in alphanumeric order, regardless of the directories in which they live. BUT โ files with identical filenames replace each other ๐ so watch out.
It is recommended that each filename is prefixed with a number smaller than "70" (e.g. 10-eth0.network). Otherwise, the default .network files or those generated by systemd-network-generator.service(8) may take precedence over user configured files. the audacity, honestly ๐ญ
Priority order, bestie, memorise it:
- Files in
/etc/have the highest priority ๐ - Files in
/run/take precedence over files with the same name under/usr/
This can be used to override a system-supplied configuration file with a local file if needed. iconic behaviour, we love a glow-up ๐
and as a special case: an empty file (file size 0) or symlink with the same name pointing to /dev/null disables the configuration file entirely (it is "masked"). like, gone. blocked. not in this house ๐
๐ง drop-in directories, the sequel ๐ง
Along with the network file foo.network, a "drop-in" directory foo.network.d/ may exist. All files with the suffix ".conf" from this directory will be merged in the alphanumeric order and parsed after the main file itself has been parsed. This is useful to alter or add configuration settings, without having to modify the main configuration file โ the way that you can just add a lil something without touching the original? obsessed ๐ Each drop-in file must have appropriate section headers though, no skipping that.
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 precedence:
- Drop-in files in
/etc/take precedence over those in/run/ - which in turn take precedence over those in
/usr/lib/
And one more for the road: drop-in files under any of these directories take precedence over the main network file wherever located. periodt. ๐
๐ [MATCH] SECTION OPTIONS ๐
okay bestie, here's the whole vibe. Your network file has two moods: a [Match] section that decides whether this file even gets to touch a given interface, and a [Network] section that says how that interface should be configured. And the rule? The first network file (in alphanumeric order) that matches a given interface is the one that gets applied. Every file after that is ignored โ even if it matches too. ๐ญ that's just how it is.
Also, major heads up: any network interface that has the ID_NET_MANAGED_BY= udev property set will never be matched by any .network files โ unless that property's value is literally the string "io.systemd.Network" โ even if the [Match] section would otherwise match. So you can use this to yeet specific interfaces out of systemd-networkd(8)'s management while keeping your [Match] section nice and generic. Basically the ID_NET_MANAGED_BY= property is the device declaring who owns it, which means concurrent network management implementations don't have to fight over who gets to manage what. ๐
no drama, no competition.
A network file is said to match a network interface when all the matches specified in the [Match] section are satisfied. And if a network file has no valid settings in its [Match] section at all? Then it matches everything and systemd-networkd will warn you about it. ๐ Hint bestie: to dodge the warning and make it super clear that you want to match all interfaces, just add this:
Name=*
The following keys are 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". (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.)
- colon-delimited hexadecimal โ each field must be one byte. E.g.
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 the hardware's permanent addresses. Like, whileMACAddress=matches the device's current MAC address, this one matches the device's permanent MAC address, which lowkey might be 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 from"ARPHRD_"macros inlinux/if_arp.h, so heads up: this list 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 come from 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, please quote the whole key-and-value pair. And if a value contains a quotation, escape that 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.)
Name=โ a whitespace-separated list of shell-style globs matching the device name, as exposed by the udev property"INTERFACE", or the device's alternative names. If the list is prefixed with a"!", the test is inverted. (Added in version 211.)WLANInterfaceType=โ a whitespace-separated list of wireless network type. Supported values are"ad-hoc","station","ap","ap-vlan","wds","monitor","mesh-point","p2p-client","p2p-go","p2p-device","ocb", and"nan". If the list is prefixed with a"!", the test is inverted. ๐ก (Added in version 244.)SSID=โ a whitespace-separated list of shell-style globs matching the SSID of the currently connected wireless LAN. If the list is prefixed with a"!", the test is inverted. (Added in version 244.)BSSID=โ a whitespace-separated list of hardware addresses of the currently connected wireless LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example inMACAddress=. 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 is reset. (Added in version 244.)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 running 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 tell the kernel what this interface is, bestie. It accepts these keys:
MACAddress=โ the hardware address you wanna slap on the device. ๐
Added in version 218.
MTUBytes=โ the maximum transmission unit, in bytes, for this device. The usual suffixes K, M, G are supported and they're understood to the base of 1024. โจ
Heads up though: if IPv6 is enabled on the interface and you pick an MTU below 1280 (that's the minimum MTU for IPv6, no cap), it'll get automatically bumped up to that value. The kernel said "not on my watch" ๐
Added in version 218.
ARP=โ takes a boolean. If it's true, IPv4 ARP (low-level Address Resolution Protocol) and IPv6 NDP (Neighbor Discovery Protocol) for this interface are enabled. Turning ARP off is genuinely useful when you're creating a bunch of MACVLAN or VLAN virtual interfaces stacked on top of one single lower-level physical interface โ those then just serve as a link/"bridge" device aggregating traffic onto the same physical link and don't participate in the network otherwise. ๐ฆ
Defaults to unset, and it's enabled when IPv4 link-local addressing is enabled in LinkLocalAddressing= or when an IPv4 address with DuplicateAddressDetection= enabled is requested. Otherwise, the kernel's default gets used.
Added in version 232.
Multicast=โ takes a boolean. If true, the multicast flag on the device is enabled. Defaults to unset and the flag stays unchanged. When it's disabled,IPv6AcceptRA=andIPv6SendRA=cannot be enabled. Sorry, that's the rules ๐ซถ
Added in version 239.
AllMulticast=โ takes a boolean. If true, the driver retrieves all multicast packets from the network. This happens when multicast routing is enabled. Defaults to unset. ๐
Added in version 239.
Promiscuous=โ takes a boolean. If true, promiscuous mode on the interface is enabled. Defaults to unset. ๐
If you set this to false for the underlying link of a "passthru" mode MACVLAN/MACVTAP, the virtual interface gets created with the "nopromisc" flag set.
Added in version 248.
Unmanaged=โ takes a boolean. When"yes", no attempts are made to bring up or configure matching links โ equivalent to there being no matching network files at all. Defaults to"no".
This is a lifesaver for stopping later matching network files from messing with certain interfaces that are fully controlled by other applications. ๐
Added in version 233.
Group=โ link groups are similar to the port ranges you'd find in managed switches. When network interfaces get added to a numbered group, you can perform operations on all the interfaces in that group at once. Takes an unsigned integer in the range0...2147483647. Defaults to unset.
Added in version 246.
RequiredForOnline=โ takes a boolean, a minimum operational state (like"carrier"), or a range of operational states separated with a colon (like"degraded:routable"). Check outnetworkctl(1)for the possible operational states. When"yes", the network is deemed required when figuring out whether the system is online (including when runningsystemd-networkd-wait-online). When"no", the network gets ignored when determining the online state. When a minimum operational state and an optional maximum operational state are set,systemd-networkd-wait-onlinedeems the interface online when the operational state is in the specified range. ๐ซ
Defaults to "yes" when ActivationPolicy= is not set, or set to "up", "always-up", or "bound". Defaults to "no" when ActivationPolicy= is set to "manual" or "down". And it's forced to "no" when ActivationPolicy= is set to "always-down".
The network will be brought up normally (as configured by ActivationPolicy=), but if there's no address being assigned by DHCP or the cable isn't plugged in, the link just stays offline and gets skipped automatically by systemd-networkd-wait-online if "RequiredForOnline=no".
The boolean value "yes" gets translated like this, iykyk:
- CAN devices โ
"carrier"
Added in version 256.
- Master devices, e.g. bond or bridge โ
"degraded-carrier"withRequiredFamilyForOnline=any
Added in version 256.
- Bonding port interfaces โ
"enslaved"
Added in version 256.
- Other interfaces โ
"degraded"
Added in version 236.
This setting can be overridden by the command line option for systemd-networkd-wait-online. Peep systemd-networkd-wait-online.service(8) for more deets.
Added in version 236.
RequiredFamilyForOnline=โ takes an address family. When specified, an IP address in the given family is deemed required when determining whether the link is online (including when runningsystemd-networkd-wait-online). Takes one of"ipv4","ipv6","both", or"any". Defaults to"any". Note that this option does absolutely nothing if"RequiredForOnline=no". ๐
Added in version 249.
ActivationPolicy=โ specifies the policy forsystemd-networkdmanaging the link's administrative state. Specifically, this controls howsystemd-networkdchanges the network device's"IFF_UP"flag โ which is sometimes controlled by system administrators by running stuff likeip link set dev eth0 uporip link set dev eth0 down, and can also be changed withnetworkctl up eth0ornetworkctl down eth0. ๐ฅ
Takes one of "up", "always-up", "manual", "always-down", "down", or "bound". When "manual", systemd-networkd will not change the link's admin state automatically โ the system administrator has to bring the interface up or down manually, as desired. When "up" (the default) or "always-up", or "down" or "always-down", systemd-networkd will set the link up or down, respectively, when the interface is (re)configured. When "always-up" or "always-down", systemd-networkd will set the link up or down, respectively, any time it detects a change in the administrative state. When BindCarrier= is also set, this is automatically set to "bound" and any other value is just ignored. ๐
When the policy is set to "down" or "manual", the default value of RequiredForOnline= is "no". When the policy is set to "always-down", the value of RequiredForOnline= is forced to "no".
The administrative state is not the same as the carrier state, so using "always-up" does not mean the link will never lose carrier. The link carrier depends on both the administrative state and the network device's physical connection. However, to avoid reconfiguration failures, when using "always-up", IgnoreCarrierLoss= is forced to true. ๐ซก
Added in version 248.
โจ [SR-IOV] SECTION OPTIONS โจ
SR-IOV is the ability to partition 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) by letting traffic bypass the host machine's network stack. It's giving โจbypass the middlemanโจ.
The presence of an [SR-IOV] section in a .link file will cause the creation and configuration of the specified virtual function. Within a .network file, the specified virtual function will be configured, but it must already exist. 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, bestie, you 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 will be 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 information like the RSS hash key may be considered sensitive on some devices where this information is shared between the VF and the physical function (PF). When unset, the kernel's default will be 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 will be 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 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 will be used. ๐
Added in version 251.
MACAddress=โ specifies the MAC address for the virtual function.
Added in version 251.
๐ธ [NETWORK] SECTION OPTIONS ๐ธ
The [Network] section accepts the following keys:
Description=โ a description of the device. This is only used for presentation purposes. Purely vibes, no function ๐
Added in version 211.
DHCP=โ enables DHCPv4 and/or DHCPv6 client support. Accepts"yes","no","ipv4", or"ipv6". Defaults to"no". ๐ฅ
Note that DHCPv6 will by default be triggered by Router Advertisements, if reception is enabled, regardless of this parameter. By explicitly enabling DHCPv6 support here, the DHCPv6 client will be started in the mode specified by the WithoutRA= setting in the [DHCPv6] section โ regardless of whether there are routers on the link, or what flags the routers pass. See IPv6AcceptRA=. ๐ง
Furthermore, note that by default the domain name specified through DHCP is not used for name resolution. See the option UseDomains= below.
See the [DHCPv4] or [DHCPv6] sections below for further configuration options for the DHCP client support.
Added in version 211.
DHCPRelay=โ takes either"upstream"or"downstream"๐ซ. Set it and your host is officially a DHCP relay agent, no cap."upstream"means the interface is the upstream side of the relay agent,"downstream"means it's the downstream side. For this whole relay thing to actually work you need at least one upstream interface and one downstream interface configured on the host, okay? That needsServerAddress=set in the[DHCPRelay]section insidenetworkd.conf. IfServerAddress=isn't configured, this setting is justโฆ ignored ๐. Peepnetworkd.conf(5)for the whole tea onServerAddress=and other host-wide settings. Also, extra per-interface settings live in the[DHCPRelay]section described below. Defaults to unset, and the interface is not used for DHCP relay forwarding.
Added in version 261.
DHCPServer=โ takes a boolean ๐."yes"and the DHCPv4 server gets started. Defaults to"no". More DHCP server settings live in the[DHCPServer]section described below.
Even if you enable this, the DHCP server will not start automatically โ it waits for persistent storage to be ready to load/save leases in the storage, unless PersistLeases=no/runtime is specified in the [DHCPServer] section. It gets started after systemd-networkd-persistent-storage.service is started, which calls networkctl persistent-storage yes. See networkctl(1) for more.
Added in version 215.
LinkLocalAddressing=โ enables link-local address autoconfiguration โจ. Accepts a boolean,ipv4, andipv6. An IPv6 link-local address gets configured whenyesoripv6. An IPv4 link-local address gets configured whenyesoripv4and when DHCPv4 autoconfiguration has been unsuccessful for some time. (IPv4 link-local address autoconfiguration will usually happen in parallel with repeated attempts to acquire a DHCPv4 lease.)
Defaults to no when KeepMaster= or Bridge= is set, or when the specified MACVLAN=/MACVTAP= has Mode=passthru, or ipv6 otherwise.
When IPv4 link-local addressing is enabled, ARP= is enabled unless it is explicitly configured ๐
Added in version 219.
IPv6LinkLocalAddressGenerationMode=โ specifies how the IPv6 link-local address is generated ๐ . Takes one of"eui64","none","stable-privacy"and"random". When unset,"stable-privacy"is used ifIPv6StableSecretAddress=is specified, and if not,"eui64"is used. Note that ifLinkLocalAddressing=is"no"or"ipv4", thenIPv6LinkLocalAddressGenerationMode=will be ignored ๐. Also, even ifLinkLocalAddressing=is"yes"or"ipv6", settingIPv6LinkLocalAddressGenerationMode=nonedisables configuring an IPv6 link-local address.
Added in version 246.
IPv6StableSecretAddress=โ takes an IPv6 address ๐ฆ. The specified address gets used as a stable secret for generating the IPv6 link-local address. If this setting is specified, andIPv6LinkLocalAddressGenerationMode=is unset, thenIPv6LinkLocalAddressGenerationMode=stable-privacyis implied. If this setting is not specified, and"stable-privacy"is set forIPv6LinkLocalAddressGenerationMode=, then a stable secret address will be generated from the local machine ID and the interface name.
Added in version 249.
IPv4LLStartAddress=โ specifies the first IPv4 link-local address to try ๐ธ. Takes an IPv4 address, for example169.254.1.2, from the link-local address range:169.254.0.0/16except for169.254.0.0/24and169.254.255.0/24. This one's lowkey useful if the device should always have the same address as long as there's no address conflict. When unset, a random address is automatically selected. Defaults to unset.
Added in version 252.
IPv4LLRoute=โ takes a boolean. If set to true, sets up the route needed for non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults tofalse.
Added in version 216.
DefaultRouteOnDevice=โ takes a boolean ๐. If set to true, sets up the IPv4 default route bound to the interface. Defaults tofalse. This is useful when creating routes on point-to-point interfaces. It's equivalent to, like, this:
ip route add default dev veth99
or,
[Route]
Gateway=0.0.0.0
Currently there's no way to specify, e.g., the table for the route configured by this setting ๐ญ. To configure the default route with such an additional property, please use the following instead:
[Route]
Gateway=0.0.0.0
Table=1234
If you'd like to create an IPv6 default route bound to the interface, please use the following:
[Route]
Gateway=::
Table=1234
Added in version 243.
LLMNR=โ takes a boolean or"resolve"๐. When true, enables Link-Local Multicast Name Resolution[3] on the link. When set to"resolve", only resolution is enabled โ not host registration and announcement. Defaults totrue. This setting is read bysystemd-resolved.service(8).
Added in version 216.
MulticastDNS=โ takes a boolean or"resolve"๐. When true, enables Multicast DNS[4] support on the link. When set to"resolve", only resolution is enabled โ not host or service registration and announcement. Defaults tofalse. This setting is read bysystemd-resolved.service(8).
Added in version 229.
DNSOverTLS=โ takes a boolean or"opportunistic"๐ฅ. When true, enables DNS-over-TLS[5] support on the link. When set to"opportunistic", compatibility with non-DNS-over-TLS servers is increased, by automatically turning off DNS-over-TLS servers in this case. This option defines a per-interface setting forresolved.conf(5)'s globalDNSOverTLS=option. Defaults to unset, and the global setting will be used. This setting is read bysystemd-resolved.service(8).
Added in version 239.
DNSSEC=โ takes a boolean or"allow-downgrade"๐ง. When true, enables DNSSEC[6] DNS validation support on the link. When set to"allow-downgrade", compatibility with non-DNSSEC capable networks is increased, by automatically turning off DNSSEC in this case. This option defines a per-interface setting forresolved.conf(5)'s globalDNSSEC=option. Defaults to unset, and the global setting will be used. This setting is read bysystemd-resolved.service(8).
Added in version 229.
DNSSECNegativeTrustAnchors=โ a space-separated list of DNSSEC negative trust anchor domains ๐. If specified and DNSSEC is enabled, look-ups done via the interface's DNS server will be subject to the list of negative trust anchors, and won't require authentication for the specified domains, or anything below it. Use this to disable DNSSEC authentication for specific private domains that can't be proven valid using the Internet DNS hierarchy. Defaults to the empty list. This setting is read bysystemd-resolved.service(8).
Added in version 229.
LLDP=โ controls support for Ethernet LLDP packet reception ๐ก. LLDP is a link-layer protocol commonly implemented on professional routers and bridges which announces which physical port a system is connected to, as well as other related data. Accepts a boolean or the special value"routers-only". When true, incoming LLDP packets are accepted and a database of all LLDP neighbors is maintained. If"routers-only"is set, only LLDP data of various types of routers is collected and LLDP data about other types of devices is ignored (such as stations, telephones and others). If false, LLDP reception is disabled. Defaults to"routers-only". Usenetworkctl(1)to query the collected neighbor data. LLDP is only available on Ethernet links. SeeEmitLLDP=below for enabling LLDP packet emission from the local system ๐.
Added in version 219.
EmitLLDP=โ controls support for Ethernet LLDP packet emission ๐ค. Accepts a boolean parameter or the special values"nearest-bridge","non-tpmr-bridge"and"customer-bridge". Defaults tofalse, which turns off LLDP packet emission. If not false, a short LLDP packet with information about the local system is sent out in regular intervals on the link. The LLDP packet will contain information about the local hostname, the local machine ID (as stored inmachine-id(5)) and the local interface name, as well as the pretty hostname of the system (as set inmachine-info(5)). LLDP emission is only available on Ethernet links.
โ ๏ธ bestie, listen: this setting passes data suitable for identification of host to the network and should thus not be enabled on untrusted networks, where such identification data should not be made available. Use this option to permit other systems to identify on which interfaces they are connected to this system.
The three special values control propagation of the LLDP packets. The "nearest-bridge" setting permits propagation only to the nearest connected bridge, "non-tpmr-bridge" permits propagation across Two-Port MAC Relays, but not any other bridges, and "customer-bridge" permits propagation until a customer bridge is reached. For details about these concepts, see IEEE 802.1AB-2016[7]. Note that configuring this setting to true is equivalent to "nearest-bridge", the recommended and most restricted level of propagation. See LLDP= above for an option to enable LLDP reception.
Added in version 230.
BindCarrier=โ a link name or a list of link names ๐ซถ. When set, controls the behavior of the current link. When all links in the list are in an operational down state, the current link is brought down. When at least one link has carrier, the current interface is brought up.
This forces ActivationPolicy= to be set to "bound".
Added in version 220.
Address=โ a static IPv4 or IPv6 address and its prefix length, separated by a/character ๐. Specify this key more than once to configure several addresses. The format of the address must be as described ininet_pton(3). This is a short-hand for an[Address]section only containing anAddresskey (see below). This option may be specified more than once.
okay so we're still deep in the Address= tea and bestie there is so much more ๐
If the address you hand over is literally 0.0.0.0 (that's the IPv4 one) or :: (the IPv6 one), then โจmagicโจ โ a whole new address range of whatever size you asked for gets auto-allocated out of a system-wide pool of unused ranges. But heads up: the prefix length has to be equal or larger than 8 for IPv4, and 64 for IPv6, no negotiating. The allocated range gets vibe-checked against every current network interface and every known network config file so you don't get address range conflicts. The default system-wide pool is made of 192.168.0.0/16, 172.16.0.0/12 and 10.0.0.0/8 for IPv4, plus fd00::/8 for IPv6. This whole thing is chef's kiss when you've got a ton of dynamically created network interfaces all sharing the same network configuration and you just want the address ranges to assign themselves. ๐ซถ
If you specify an IPv4 link-local address (169.254.0.0/16), then IPv4 Address Conflict Detection (RFC 5227[8]) is switched on for that address. Wanna assign an IPv4 link-local address without the conflict detection? Then use the [Address] section to set up the address and turn off DuplicateAddressDetection= instead, like this:
[Address]
Address=169.254.10.1/24
DuplicateAddressDetection=none
And if you specify an empty string, then every previous assignment in both the [Network] and [Address] sections gets cleared. poof. gone. ๐
Added in version 211.
Gateway=โ the gateway address, and it's gotta be in the format described ininet_pton(3). This is just a lil short-hand for a[Route]section that only contains aGateway=key. You can drop this option more than once. And if you specify an empty string? Then all previous assignments in both[Network]and[Route]sections get cleared. bye ๐
Added in version 211.
DNS=โ a DNS server address, and yes it also has to be in the format described ininet_pton(3). Can be specified more than once. Each address can optionally take a port number separated with":", a network interface name or index separated with"%", and a Server Name Indication (SNI) separated with"#". When you're specifying an IPv6 address with a port number, then the address must be wrapped in square brackets. So the acceptable full formats are"111.222.333.444:9953%ifname#example.com"for IPv4 and"[1111:2222::3333]:9953%ifname#example.com"for IPv6. If an empty string is assigned, then all previous assignments are cleared. This setting is read bysystemd-resolved.service(8). ๐
Added in version 211.
UseDomains=โ specifies the protocol-independent default value for the same settings in the[IPv6AcceptRA],[DHCPv4], and[DHCPv6]sections below. Takes a boolean, or the special valueroute. Also peep the same setting in[DHCPv4]below. Defaults to unset.
Added in version 256.
Domains=โ a whitespace-separated list of domains that should be resolved using the DNS servers on this link. Each item in the list should be a domain name, optionally prefixed with a tilde ("~"). The domains with the prefix are called "routing-only domains". The domains without the prefix are called "search domains" and they get used first as search suffixes for extending single-label hostnames (hostnames with no dots in them) into fully qualified domain names (FQDNs). So if a single-label hostname gets resolved on this interface, each of the specified search domains gets appended to it in turn, turning it into a fully qualified domain name, until one of them resolves successfully. slay ๐
Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for hostnames ending in those domains (which includes single label names, if any "search domains" are listed) get routed to the DNS servers configured for this interface. This domain routing logic is especially useful on multi-homed hosts where each interface has DNS servers serving particular private DNS zones. main character energy fr.
The "routing-only" domain "~." (tilde = "hey this is a routing domain", dot = the DNS root domain which is the implied suffix of all valid DNS names) has a special effect. It makes all DNS traffic that doesn't match another configured domain routing entry get routed to the DNS servers specified for this interface. This setting is useful when you wanna prefer a certain set of DNS servers if a link they're connected on is available.
This setting is read by systemd-resolved.service(8). "Search domains" correspond to the domain and search entries in resolv.conf(5). Domain name routing has no equivalent in the traditional glibc API, which literally has no concept of domain name servers limited to a specific link. iykyk.
This option may be specified more than once. If an empty string is assigned, then all previous assignments are cleared.
Added in version 216.
DNSDefaultRoute=โ takes a boolean argument. If true, this link's configured DNS servers get used for resolving domain names that don't match any link's configuredDomains=setting. If false, this link's configured DNS servers are never used for such domains, and are exclusively used for resolving names that match at least one of the domains configured on this link. If you don't specify it, it defaults to an automatic mode: queries that don't match any link's configured domains get routed to this link if it has no routing-only domains configured.
Added in version 240.
NTP=โ an NTP server address (either an IP address, or a hostname). This option may be specified more than once. This setting is read bysystemd-timesyncd.service(8). ๐โจ
Added in version 216.
IPv4Forwarding=โ configures IPv4 packet forwarding for the interface. Takes a boolean value. This controls thenet.ipv4.conf.INTERFACE.forwardingsysctl option of the network interface. See IP Sysctl[9] for more details about the sysctl option. Defaults to true ifIPMasquerade=is enabled for IPv4, otherwise the value specified to the same setting innetworkd.conf(5)will be used. If none of them are specified, the sysctl option will not be changed.
To control the global setting, use the same setting in networkd.conf(5).
Added in version 256.
IPv6Forwarding=โ configures interface-specific host/router behaviour. Takes a boolean value. This controls thenet.ipv6.conf.INTERFACE.forwardingsysctl option of the network interface. See IP Sysctl[9] for more details about the sysctl option. Defaults to true ifIPMasquerade=is enabled for IPv6 orIPv6SendRA=is enabled, otherwise the value specified to the same setting innetworkd.conf(5)will be used. If none of them are specified, the sysctl option will not be changed.
To control the global setting, use the same setting in networkd.conf(5).
okay bestie listen, this is important: unlikeIPv4Forwarding=, enabling per-interfaceIPv6Forwarding=on two or more interfaces DOES NOT make IPv6 packets get forwarded within the interfaces. This setting just controls the per-interface sysctl value, and that sysctl value is not directly correlated to whether packets are forwarded. To make sure IPv6 packets actually get forwarded, the global setting innetworkd.conf(5)needs to be enabled. periodt. ๐
Added in version 256.
IPMasquerade=โ configures IP masquerading for the network interface. If enabled, packets forwarded from the network interface will appear as coming from the local host. Typically you want this enabled on the downstream interface of routers. Takes one of"ipv4","ipv6","both", or"no". Defaults to"no". Note that any positive boolean values such as"yes"or"true"are now deprecated ๐ โ please use one of the values above. Specifying"ipv4"or"both"impliesIPv4Forwarding=settings in both the.networkfile for this interface and the globalnetworkd.conf(5), unless they're explicitly specified. Similarly forIPv6Forwarding=when"ipv6"or"both"is specified. SeeIPv4Forwarding=/IPv6Forwarding=above for the per-link settings, andnetworkd.conf(5)for the global settings.
Added in version 219.
IPv6PrivacyExtensions=โ configures use of stateless temporary addresses that change over time (see RFC 4941[10], Privacy Extensions for Stateless Address Autoconfiguration in IPv6). Takes a boolean or the special values"prefer-public"and"kernel". When true, it enables the privacy extensions and prefers temporary addresses over public addresses. When"prefer-public", it enables the privacy extensions, but prefers public addresses over temporary addresses. When false, the privacy extensions stay disabled. When"kernel", the kernel's default setting will be left in place. When unspecified, the value specified in the same setting innetworkd.conf(5)โ which defaults to"no"โ will be used. ๐ฆ
Added in version 222.
IPv6AcceptRA=โ takes a boolean. Controls IPv6 Router Advertisement (RA) reception support for the interface. If true, RAs are accepted; if false, RAs are ignored. When RAs are accepted, they may trigger the start of the DHCPv6 client if the relevant flags are set in the RA data, or if no routers are found on the link.
This cannot be enabled on devices aggregated in a bond device, or when IPv6 link-local addressing (see LinkLocalAddressing=) or multicasting (see Multicast=) is disabled. Note that multicasting is disabled by default for some configurations, e.g. bridge ports. So in that case Multicast= needs to be explicitly enabled to make this feature usable. When IPv6SendRA=, IPv6Forwarding=, or IPMasquerade= is enabled, this feature is disabled by default, but can be overridden by explicitly enabling this setting. Note that IPv6Forwarding= may be indirectly enabled when the global setting with the same name is enabled, or when IPMasquerade= is enabled on any other interfaces. See also IPv6Forwarding= and IPMasquerade= for more details. Enabled by default otherwise. โจ
Further settings for the IPv6 RA support may be configured in the [IPv6AcceptRA] section, see below.
Also see IP Sysctl[9] in the kernel documentation regarding "accept_ra", but note that systemd's setting of 1 (i.e. true) corresponds to kernel's setting of 2. not me pointing out the off-by-one, it's giving chaos ๐
ngl bestie, quick heads-up before we move on: the kernel's own implementation of the IPv6 RA protocol is always disabled, no matter what you set here. Like, periodt. If you enable this option, a userspace implementation of the IPv6 RA protocol gets used and the kernel's own one stays off โ because systemd-networkd needs to know all the deets supplied in the advertisements, and those deets are just not available from the kernel when the kernel is running its own implementation. so yeah, that's the whole situation ๐
Added in version 231.
IPv6DuplicateAddressDetection=โ sets how many IPv6 Duplicate Address Detection (DAD) probes get sent out. Leave it unset and the kernel's default takes the wheel. โจ
Added in version 228.
IPv6HopLimit=โ configures the IPv6 Hop Limit. Takes an integer in the range1...255. Every router that forwards the packet knocks the hop limit down by 1, and once the hop limit field hits zero, the packet gets yeeted into the void. Unset? kernel default, as always. ๐
Added in version 228.
IPv6RetransmissionTimeSec=โ configures the IPv6 Retransmission Time, aka the time between retransmitted Neighbor Solicitation messages. It's used by address resolution and the Neighbor Unreachability Detection algorithm. A value of zero is ignored and the kernel's current value gets used instead. Defaults to unset, which means... yep, the kernel's current value. ๐ฆ
Added in version 256.
IPv4DuplicateAddressDetectionTimeoutSec=โ the maximum timeout for IPv4 Duplicate Address Detection (RFC 5227). Gotta be a value between 1 millisecond and 60 seconds. If you set it, DAD takes a randomized time between 57% (4/7) and 100% of whatever value you gave. If you don't set it, it defaults to 200 milliseconds. ๐
Added in version 258.
IPv4ReversePathFilter=โ configures IPv4 Reverse Path Filtering. If it's enabled, when an IPv4 packet shows up the machine first checks whether the source of that packet would be routed through the interface it came in on. No route to the source on that interface? the machine drops the packet, no hesitation. Takes one of"no","strict", or"loose". When"no", no source validation happens at all. When"strict", every incoming packet gets tested against the FIB and if the incoming interface isn't the best reverse path, the packet check fails โ and by default, failed packets are discarded. When"loose", each incoming packet's source address is tested against the FIB, and the packet only gets dropped if the source address isn't reachable via any interface on that router. See RFC 3704[11]. When unset, the kernel's default will be used. ๐ฅ
Added in version 255.
MulticastIGMPVersion=โ configures the IPv4 Multicast IGMP Version to use, and controls the value of/proc/sys/net/ipv4/conf/INTERFACE/force_igmp_version. Takes one of"no","v1","v2", or"v3". When"no", no enforcement of an IGMP version is applied โ IGMPv1/v2 fallbacks are allowed, and systemd-networkd returns to IGMPv3 mode after all the IGMPv1/v2 Querier Present timers have expired. When"v1", IGMP version 1 is enforced: an IGMPv1 report gets returned even if IGMPv2/v3 queries come knocking. When"v2", IGMP version 2 is enforced: an IGMPv2 report is returned if an IGMPv2/v3 query is received, and systemd-networkd falls back to IGMPv1 if an IGMPv1 query shows up. When"v3", IGMP version 3 is enforced and the response is the same as with"no". Defaults to unset โ the sysctl is simply not set. ๐
Added in version 257.
IPv4AcceptLocal=โ takes a boolean. Accept packets with local source addresses. Paired with suitable routing, this can be used to direct packets between two local interfaces over the wire and have them accepted properly. When unset, the kernel's default will be used. ๐
Added in version 246.
IPv4RouteLocalnet=โ takes a boolean. When true, the kernel stops treating loopback addresses as martian source or destination while routing, which enables using127.0.0.0/8for local routing purposes. When unset, the kernel's default will be used. โจ
Added in version 248.
IPv4SrcValidMark=โ takes a boolean. When enabled, the packet's firewall mark (fwmark) is included in the reverse path filter route lookup for source address validation on this interface. This is particularly useful for policy routing setups where packets may arrive with source addresses that are only valid in routing tables selected by their fwmark. When unset, the kernel's default will be used. ๐
Added in version 261.
IPv4ProxyARP=โ takes a boolean. Configures proxy ARP for IPv4. Proxy ARP is that iconic technique where one host (usually a router) answers ARP requests meant for another machine โ by "faking" its identity, the router accepts responsibility for routing packets to the "real" destination. See RFC 1027[11]. When unset, the kernel's default will be used. ๐ซถ
Added in version 233.
IPv4ProxyARPPrivateVLAN=โ takes a boolean. Configures proxy ARP private VLAN for IPv4, also known as VLAN aggregation, private VLAN, source-port filtering, port-isolation, or MAC-forced forwarding.
This variant of the ARP proxy technique lets the ARP proxy reply back to the same interface. See RFC 3069[12]. When unset, the kernel's default will be used. ๐
Added in version 256.
IPv6ProxyNDP=โ takes a boolean. Configures proxy NDP for IPv6. Proxy NDP (Neighbor Discovery Protocol) is the IPv6 technique that allows routing addresses to a different destination when peers expect them to be present on a certain physical link. In that case, a router answers Neighbour Advertisement messages intended for another machine by offering its own MAC address as the destination. Unlike proxy ARP for IPv4, it is not enabled globally โ it only sends Neighbour Advertisement messages for addresses in the IPv6 neighbor proxy table, which you can also peek at withip -6 neighbour show proxy. systemd-networkd controls the per-interfaceproxy_ndpswitch for each configured interface depending on this option. When unset, the kernel's default will be used. ๐ง
Added in version 234.
ProxyNeighbor=โ takes an IPv4 or IPv6 address for which ARP requests or Neighbour Advertisement messages will be proxied. This option may be specified more than once. systemd-networkd adds the specified address to the kernel's neighbour proxy table. For an IPv4 address, a proxy ARP entry gets added. For an IPv6 address, a proxy NDP entry gets added. When an IPv6 address is specified,IPv6ProxyNDP=yesis implied โ and ifIPv6ProxyNDP=is explicitly disabled, IPv6 addresses specified withProxyNeighbor=are ignored. Note that, unlike IPv6, specifying an IPv4 address does not implyIPv4ProxyARP=. ๐
Added in version 262.
IPv6SendRA=โ whether to enable or disable Router Advertisement sending on a link. Takes a boolean value. When enabled, prefixes configured in[IPv6Prefix]sections and routes configured in the[IPv6RoutePrefix]sections are distributed as defined in the[IPv6SendRA]section. IfDHCPPrefixDelegation=is enabled, then the delegated prefixes are also distributed. See theDHCPPrefixDelegation=setting and the[IPv6SendRA],[IPv6Prefix],[IPv6RoutePrefix], and[DHCPPrefixDelegation]sections for more configuration options.
If enabled, IPv6Forwarding= on this interface is also enabled, unless that setting is explicitly specified. See IPv6Forwarding= in the above for more details. ๐ธ
Added in version 247.
DHCPPrefixDelegation=โ takes a boolean value. When enabled, it requests subnet prefixes on another link via the DHCPv6 protocol or via the 6RD option in the DHCPv4 protocol. An address within each delegated prefix gets assigned, and the prefixes get announced through IPv6 Router Advertisement ifIPv6SendRA=is enabled. This behaviour can be configured in the[DHCPPrefixDelegation]section. Defaults to disabled. ๐
Added in version 250.
IPv6MTUBytes=โ configures the IPv6 maximum transmission unit (MTU). An integer greater than or equal to 1280 bytes. When unset, the kernel's default will be used. โญ
Added in version 239.
MPLSRouting=โ controls whether Multi-protocol Label Switching (MPLS) routing is enabled on this interface. This configures/proc/sys/net/mpls/conf/INTERFACE/input. Takes a boolean. Defaults to unset, and the kernel's default will be used.
Note: systemd-networkd does not load any required kernel modules for MPLS. To enable the feature, thempls_routerkernel module must be loaded beforesystemd-networkd.serviceis started. Consider adding the kernel module tomodules-load.d(5). ๐ฅ
Added in version 258.
KeepMaster=โ takes a boolean value. When enabled, the current master interface index will not be changed, andBatmanAdvanced=,Bond=,Bridge=, andVRF=settings are ignored. This may be useful when a netdev with a master interface is created by another program, e.g.systemd-nspawn(1). Defaults to false. ๐
Added in version 250.
BatmanAdvanced=,Bond=,Bridge=,VRF=โ the name of the B.A.T.M.A.N. Advanced, bond, bridge, or VRF interface to add the link to. Seesystemd.netdev(5). ๐
Added in version 211.
IPoIB=,IPVLAN=,IPVTAP=,MACsec=,MACVLAN=,MACVTAP=,Tunnel=,VLAN=,VXLAN=,Xfrm=โ takes a space-separated list of stacked netdevs to be created on the interface. Seesystemd.netdev(5). This option may be specified more than once. If an empty string is specified, previous assignments for all netdev types are cleared. ๐งน
Added in version 211.
ActiveSlave=โ takes a boolean. Specifies the new active slave. The"ActiveSlave="option is only valid for following modes:"active-backup","balance-alb", and"balance-tlb". Defaults to false. ๐
Added in version 235.
PrimarySlave=โ takes a boolean. Specifies which slave is the primary device. The specified device will always be the active slave while it is available, and only when the primary is off-line will alternate devices be used. This is useful when one slave is preferred over another, e.g. when one slave has higher throughput than another. The"PrimarySlave="option is only valid for following modes:"active-backup","balance-alb", and"balance-tlb". Defaults to false. ๐
Added in version 235.
ConfigureWithoutCarrier= โ bestie this one takes a boolean, and it lets systemd-networkd configure a link even when it's got no carrier at all. Defaults to false. And here's the tea: if you turn it on and you haven't explicitly set IgnoreCarrierLoss= yourself, then IgnoreCarrierLoss= gets switched on too. Package deal ๐
Okay but listen, if you enable this and you want the interface to actually reach the "configured" state (which, btw, is the whole thing systemd-networkd-wait-online needs for the interface to behave properly), you gotta disable all the dynamic address configuration mechanisms โ we're talking DHCP= and IPv6AcceptRA= (which is on by default in most cases, just saying). And DuplicateAddressDetection= (default-on for IPv4 link-local addresses and all IPv6 addresses) needs to be disabled for every static address configuration too. Otherwise? Without carrier the interface just sits there stuck in "configuring" forever and systemd-networkd-wait-online for that interface times out ๐ญ. Also, highly recommend setting RequiredForOnline=no-carrier so systemd-networkd-wait-online actually works for the interface.
Added in version 235.
IgnoreCarrierLoss= โ takes a boolean or a timespan, flexible queen โจ When true, systemd-networkd keeps both the static and dynamic configuration of the interface even if its carrier is lost. When false, it drops both. When you give it a timespan, systemd-networkd waits that long and ignores the carrier loss if the link gets its carrier back within the window. Setting 0 seconds is the same as "no", and "infinite" is the same as "yes".
Setting a finite timespan is lowkey useful when, for example:
- A wireless interface is connecting to a network that has multiple access points with the same SSID.
- You're enslaving a wireless interface to a bond interface, which may disconnect from the connected access point and cause its carrier to be lost.
- The driver of the interface resets when the MTU is changed.
When Bond= is specified to a wireless interface, it defaults to 3 seconds. When the DHCPv4 client is enabled and UseMTU= in the [DHCPv4] section is enabled, it defaults to 5 seconds. Otherwise it defaults to whatever you set with ConfigureWithoutCarrier=. And when ActivationPolicy= is set to "always-up", this gets forced to "yes" and any user-specified values are just ignored, periodt.
Added in version 242.
KeepConfiguration= โ takes a boolean or one of "static", "dynamic-on-stop", and "dynamic". Let's break it down ๐
"static"โsystemd-networkdwill not drop statically configured addresses and routes when starting up the process."dynamic-on-stop"โ the dynamically configured addresses and routes (like DHCPv4, DHCPv6, SLAAC, and IPv4 link-local address) will not be dropped whensystemd-networkdis being stopped."dynamic"โ the dynamically configured addresses and routes will never be dropped, and the lifetime of DHCPv4 leases will be ignored. This is contrary to the DHCP specification, but it may be the best choice if, say, the root filesystem relies on this connection.
The setting "dynamic" implies "dynamic-on-stop", and "yes" implies "dynamic" and "static". Defaults to "dynamic-on-stop" when systemd-networkd is running in initrd, "yes" when the root filesystem is a network filesystem, and "no" otherwise.
Added in version 257.
โจ [ADDRESS] SECTION OPTIONS โจ
An [Address] section accepts the following keys. Specify several [Address] sections to configure several addresses. Stack 'em up, babe ๐ซถ
Address=โ As in the[Network]section. This setting is mandatory. Each[Address]section can contain oneAddress=setting.
Added in version 211.
Peer=โ The peer address in a point-to-point connection. Accepts the same format as theAddress=setting.
Added in version 216.
Broadcast=โ Takes an IPv4 address or boolean value. The address must be in the format described ininet_pton(3). If set totrue, then the IPv4 broadcast address will be derived from theAddress=setting. If set tofalse, then the broadcast address will not be set. Defaults totrue, except for wireguard interfaces, where it defaults tofalse.
Added in version 211.
Label=โ Specifies the label for the IPv4 address. The label must be a 7-bit ASCII string with a length of1...15characters. Defaults to unset.
Added in version 211.
PreferredLifetime=โ Lets the default "preferred lifetime" of the address be overridden. Only three settings are accepted:"forever","infinity"(which is the default and means the address never expires), and"0"(which means the address is considered immediately "expired" and will not be used, unless explicitly requested). A setting ofPreferredLifetime=0is useful for addresses that are added to be used only by a specific application, which is then configured to use them explicitly. Niche but iconic ๐
Added in version 230.
Scope=โ The scope of the address, which can be"global"(valid everywhere on the network, even through a gateway),"link"(only valid on this device, won't traverse a gateway), or"host"(only valid within the device itself, e.g.127.0.0.1), or an integer in the range0...255. Defaults to"global". IPv4 only โ IPv6 scope is automatically assigned by the kernel and cannot be set manually, sorry bestie.
Added in version 235.
RouteMetric=โ The metric of the prefix route, which points to the subnet of the configured IP address, taking the configured prefix length into account. Takes an unsigned integer in the range0...4294967295. When unset or set to0, the kernel's default value is used. This setting will be ignored whenAddPrefixRoute=isfalse.
Added in version 246.
HomeAddress=โ Takes a boolean. Designates this address the "home address" as defined in RFC 6275[13]. Supported only on IPv6. Defaults tofalse.
Added in version 232.
DuplicateAddressDetection=โ Takes one of"ipv4","ipv6","both", or"none". When"ipv4", performs IPv4 Address Conflict Detection โ see RFC 5227[8]. When"ipv6", performs IPv6 Duplicate Address Detection โ see RFC 4862[14]. Defaults to"ipv4"for IPv4 link-local addresses (169.254.0.0/16),"ipv6"for IPv6 addresses, and"none"otherwise.
When enabled, whether implicitly or not, ARP= is enabled unless it is explicitly configured.
Added in version 232.
ManageTemporaryAddress=โ Takes a boolean. Iftrue, the kernel manages temporary addresses created from this one as a template on behalf of Privacy Extensions RFC 3041[15]. For this to become active, theuse_tempaddrsysctl setting has to be set to a value greater than zero. The given address needs to have a prefix length of64. This flag allows using privacy extensions in a manually configured network, just like if stateless auto-configuration were active. Defaults tofalse.
Added in version 232.
AddPrefixRoute=โ Takes a boolean. Whentrue, the prefix route for the address is automatically added. Defaults totrue.
Added in version 245.
AutoJoin=โ Takes a boolean. Joining a multicast group on the ethernet level via theip maddrcommand wouldn't work if we have an Ethernet switch that does IGMP snooping, since the switch wouldn't replicate multicast packets on ports that didn't have IGMP reports for the multicast addresses. Linux vxlan interfaces created viaip link add vxlanorsystemd-networkd's netdev kindvxlanhave thegroupoption that enables them to do the required join. By extending theip addresscommand with the option"autojoin"we can get similar functionality for openvswitch (OVS) vxlan interfaces as well as other tunneling mechanisms that need to receive multicast traffic. Defaults to"no".
Added in version 232.
NetLabel=label โ okay this one's a whole moment, buckle up ๐ธ This setting provides a method for integrating static and dynamic network configuration into Linux NetLabel[16] subsystem rules, used by Linux Security Modules (LSMs)[17] for network access control. The label, with suitable LSM rules, can be used to control connectivity of (for example) a service with peers in the local network. At least with SELinux, only the ingress can be controlled but not egress. The benefit of using this setting is that it may be possible to apply the interface-independent part of NetLabel configuration at a very early stage of the system boot sequence โ at the time when the network interfaces aren't available yet โ withnetlabelctl(8), and the per-interface configuration withsystemd-networkdonce the interfaces show up later. Currently this feature is only implemented for SELinux.
The option expects a single NetLabel label. The label must conform to the lexicographic restrictions of LSM labels. When an interface is configured with IP addresses, the addresses and subnetwork masks will be appended to the NetLabel Fallback Peer Labeling[18] rules. They will be removed when the interface is deconfigured. Failures to manage the labels will be ignored.
โ ๏ธ Warning โ ๏ธ Once labeling is enabled for network traffic, a lot of LSM access control points in the Linux networking stack go from dormant to active. Care should be taken to avoid getting into a situation where, for example, remote connectivity is broken, when the security policy hasn't been updated to consider LSM per-packet access controls and no rules would allow any network traffic. Also note that additional configuration with netlabelctl(8) is needed.
Example:
[Address]
NetLabel=system_u:object_r:localnet_peer_t:s0
With the example rules applying for interface "eth0", when the interface is configured with an IPv4 address of 10.0.0.123/8, systemd-networkd performs the equivalent of the netlabelctl operation
netlabelctl unlbl add interface eth0 address:10.0.0.0/8 label:system_u:object_r:localnet_peer_t:s0
and the reverse operation when the IPv4 address is deconfigured. The configuration can be used with LSM rules; in the case of SELinux, to allow a SELinux domain to receive data from objects of the SELinux "peer" class. For example:
type localnet_peer_t;
allow my_server_t localnet_peer_t:peer recv;
The effect of the above configuration and rules (in the absence of other rules, as may be the case) is to only allow "my_server_t" (and nothing else) to receive data from local subnet 10.0.0.0/8 of interface "eth0".
NFTSet=source:family:table:set
Added in version 252. no wait โ that one belongs to the option right above this, keep scrolling bestie.
okay so NFTSet= is THE way to plug your network config into firewall rules using NFT[19] sets. โจ why is this iconic? because your static network config (or addresses you grabbed dynamically โ yeah, the same kind of directives live in other sections too) can get used in firewall rules, just with a lil NFT set type as the middleman. like, you could grant access to hosts in the local subnetwork only, super easily. and here's the slay part: firewall rules that use an interface's IP address get updated instantly when your network config changes, e.g. via DHCP. no reload, no drama. ๐
This option wants a whitespace-separated list of NFT set definitions. each definition is a colon-separated tuple of:
- source type โ one of
"address","prefix"or"ifindex" - NFT address family โ one of
"arp","bridge","inet","ip","ip6", or"netdev" - table name
- set name
The table and set names have to follow the lexicographic restrictions of NFT table names, periodt. And the type of the element used in the NFT filter has to match the type implied by the directive ("address", "prefix" or "ifindex") plus the address type (IPv4 or IPv6), exactly like the table below shows. ๐
๐ Table 1. Defined source type values ๐
"address"โ host IP address โ corresponding NFT type name:"ipv4_addr"or"ipv6_addr""prefix"โ network prefix โ corresponding NFT type name:"ipv4_addr"or"ipv6_addr", with"flags interval""ifindex"โ interface index โ corresponding NFT type name:"iface_index"
so when an interface gets configured with IP addresses, the addresses, subnetwork masks or interface index get appended to the NFT sets. ๐ฆ and when the interface is deconfigured, that info gets removed. but heads up: systemd-networkd only inserts elements into (or removes elements from) the sets. it does not set up the NFT rules, tables and sets for you โ you gotta prepare those elsewhere, in advance. and if it fails to manage the sets? those failures are just ignored. ๐
Example:
[Address]
NFTSet=prefix:netdev:filter:eth_ipv4_prefix
Corresponding NFT rules:
table netdev filter {
set eth_ipv4_prefix {
type ipv4_addr
flags interval
}
chain eth_ingress {
type filter hook ingress device "eth0" priority filter; policy drop;
ip daddr != @eth_ipv4_prefix drop
accept
}
}
Added in version 255.
๐ธ [NEIGHBOR] SECTION OPTIONS ๐ธ
A [Neighbor] section takes the following keys, bestie. this section adds a permanent, static entry to the neighbor table (IPv6) or the ARP table (IPv4) for the given hardware address, on the links matched for the network. want several static neighbors? just write several [Neighbor] sections. easy. ๐
Address=โ the IP address of the neighbor.
Added in version 240.
LinkLayerAddress=โ the link layer address (MAC address or IP address) of the neighbor.
Added in version 243.
๐ [IPV6ADDRESSLABEL] SECTION OPTIONS ๐
An [IPv6AddressLabel] section takes the following keys. write several [IPv6AddressLabel] sections and you get several address labels, no cap. these labels are used for address selection โ see RFC 3484[20]. precedence is managed by userspace, and only the label itself actually lives in the kernel. ๐ค
Label=โ the label for the prefix. takes an unsigned integer in the range0...4294967294(0xfffffffe).4294967295(0xffffffff) is reserved. this setting is mandatory.
Added in version 234.
Prefix=โ takes an IPv6 address with a prefix length, separated by a slash"/"character. this setting is mandatory.
Added in version 234.
๐ [ROUTINGPOLICYRULE] SECTION OPTIONS ๐
An [RoutingPolicyRule] section takes the following settings. stack up several [RoutingPolicyRule] sections to configure several rules. let's go. ๐ฅ
TypeOfService=โ specifies the Type of Service (ToS) field of packets to match. takes an unsigned integer in the range0...255. the field can be used to specify precedence (the first 3 bits) and ToS (the next 3 bits). it can also be used to specify Differentiated Services Code Point (DSCP) (the first 6 bits) and Explicit Congestion Notification (ECN) (the last 2 bits). see Type of Service[21] and Differentiated services[22] for more details.
Added in version 235.
From=โ specifies the source address prefix to match. possibly followed by a slash and the prefix length.
Added in version 235.
To=โ specifies the destination address prefix to match. possibly followed by a slash and the prefix length.
Added in version 235.
FirewallMark=โ specifies the iptables firewall mark value to match (a number in the range0...4294967295). optionally, the firewall mask (also a number between0...4294967295) can be suffixed with a slash ("/"), e.g."7/255". when the mark value is non-zero and no mask is explicitly specified, all bits of the mark are compared.
Added in version 235.
Table=โ specifies the routing table identifier to look up if the rule selector matches. takes one of the predefined names"default","main", and"local", plus names defined inRouteTable=innetworkd.conf(5), or a number between 1 and 4294967295. defaults to"main". ignored ifL3MasterDevice=is true.
Added in version 235.
Priority=โ specifies the priority of this rule.Priority=is an integer in the range0...4294967295. higher number means lower priority, and rules get processed in order of increasing number. defaults to unset, and then the kernel picks a value dynamically. โจ
Added in version 235.
GoTo=โ specifies the target priority used by the"goto"type of rule. takes an integer in the range1...4294967295. this must be larger than the priority of the rule specified inPriority=. when specified,Type=gotois implied. this is mandatory whenType=goto.
Added in version 257.
IncomingInterface=โ specifies incoming device to match. if the interface is loopback, the rule only matches packets originating from this host.
Added in version 236.
OutgoingInterface=โ specifies the outgoing device to match. the outgoing interface is only available for packets originating from local sockets that are bound to a device.
Added in version 236.
L3MasterDevice=โ takes a boolean. specifies whether the rule is to direct lookups to the tables associated with level 3 master devices (also known as Virtual Routing and Forwarding or VRF devices). for further details see Virtual Routing and Forwarding (VRF)[23]. defaults to false.
Added in version 256.
SourcePort=โ specifies the source IP port or IP port range match in forwarding information base (FIB) rules. a port range is specified by the lower and upper port separated by a dash. defaults to unset.
Added in version 240.
DestinationPort=โ specifies the destination IP port or IP port range match in forwarding information base (FIB) rules. a port range is specified by the lower and upper port separated by a dash. defaults to unset.
Added in version 240.
IPProtocol=โ specifies the IP protocol to match in forwarding information base (FIB) rules. takes an IP protocol name such as"tcp","udp"or"sctp", or an IP protocol number such as"6"for"tcp"or"17"for"udp". defaults to unset.
Added in version 240.
InvertRule=โ a boolean. specifies whether the rule is to be inverted. defaults to false.
Added in version 240.
Family=โ takes a special value"ipv4","ipv6", or"both". by default, the address family is determined by the address specified inTo=orFrom=. if neitherTo=norFrom=are specified, then it defaults to"ipv4".
Added in version 243.
User=โ takes a username, a user ID, or a range of user IDs separated by a dash. defaults to unset.
Added in version 245.
SuppressPrefixLength=โ takes a number N in the range0...128and rejects routing decisions that have a prefix length of N or less. defaults to unset.
Added in version 245.
SuppressInterfaceGroup=โ takes an integer in the range0...2147483647and rejects routing decisions that have an interface with the same group id. it has the same meaning assuppress_ifgroupinip rule. defaults to unset.
Added in version 250.
Type=โ specifies Routing Policy Database (RPDB) rule type. takes one of"table","goto","nop","blackhole","unreachable", or"prohibit". when"goto", the target priority must be specified inGoTo=. defaults to"table".
Added in version 248.
๐ [NEXTHOP] SECTION OPTIONS ๐
okay so bestie, the [NextHop] section is literally how we poke at the entries in the kernel's "nexthop" tables ๐
. It takes all of these settings, and if you want several hops you just write several [NextHop] sections. Simple as that โจ
Id=โ the id of the next hop. Feed it an integer in the range1...4294967295. This one is mandatory ifManageForeignNextHops=nois set innetworkd.conf(5). Otherwise, if you don't bother specifying it, an unused ID gets automatically picked for you ๐
Added in version 244.
Gateway=โ same energy as in the[Network]section ๐ซถ
Added in version 244.
Family=โ takes one of the special values"ipv4"or"ipv6". By default the family comes from whatever address you put inGateway=. But if there's noGateway=at all, it defaults to"ipv4"๐
Added in version 248.
OnLink=โ takes a boolean. Set it to true and the kernel stops checking whether the gateway is reachable directly by the current machine (i.e. attached to the local network), which means we can insert the nexthop into the kernel table without it complaining at us ๐. Defaults to"no".
Added in version 248.
Blackhole=โ takes a boolean. Enable it and packets to the corresponding routes get discarded silently โ and heads up,Gateway=cannot be specified alongside it. Defaults to"no".
Added in version 248.
Group=โ takes a whitespace separated list of nexthop IDs. Every ID must be in the range1...4294967295. Optionally each nexthop ID can carry a weight after a colon, like"id[:weight]", and that weight has to be in the range1...255. No weight specified? Then it's assumed to be 1 ๐ซ. This setting cannot be used together withGateway=,Family=, orBlackhole=. It can be specified multiple times, and if you assign an empty string, all previous assignments get cleared. Defaults to unset.
Added in version 249.
๐ฅ [ROUTE] SECTION OPTIONS ๐ฅ
The [Route] section takes the following settings. Want several routes? Write several [Route] sections, periodt ๐
Gateway=โ takes the gateway address, or the special values"_dhcp4"and"_ipv6ra". Set one of those special values and the gateway address handed over by DHCPv4 or IPv6 RA gets used instead. And when it's"_dhcp4", the acquired DHCPv4 address becomes the preferred source address of the route โ unless you explicitly set it inPreferredSource=๐
Added in version 211.
GatewayOnLink=โ takes a boolean. Set it to true and the kernel doesn't have to check whether the gateway is reachable directly by the current machine (i.e. attached to the local network), so we can drop the route into the kernel table without getting complained at ๐ซถ. Defaults to"no".
Added in version 234.
Destination=โ the destination prefix of the route. Might be followed by a slash and the prefix length. Leave it out and a full-length host route is assumed โจ
Added in version 211.
Source=โ the source prefix of the route. Might be followed by a slash and the prefix length. Leave it out and, same as above, a full-length host route is assumed.
Added in version 218.
Metric=โ the metric of the route. Takes an unsigned integer in the range0...4294967295. Defaults to unset, which means the kernel's default gets used instead ๐ธ
Added in version 216.
IPv6Preference=โ sets the route preference as defined in RFC 4191[24] for Router Discovery messages. Pick one of"low"(the route has the lowest priority),"medium"(the route has a default priority), or"high"(the route has the highest priority) ๐
Added in version 234.
Scope=โ the scope of the IPv4 route, which can be"global","site","link","host", or"nowhere":"global"means the route can reach hosts more than one hop away."site"means an interior route in the local autonomous system."link"means the route can only reach hosts on the local network (one hop away)."host"means the route will not leave the local machine (used for internal addresses like127.0.0.1)."nowhere"means the destination does not exist ๐
For an IPv4 route, it defaults to "host" if Type= is "local" or "nat", and "link" if Type= is "broadcast", "multicast", "anycast", or "unicast". In any other case it defaults to "global". And ngl, the value isn't used at all for IPv6 ๐
Added in version 219.
PreferredSource=โ the preferred source address of the route. Takes"no"or an address in the format described ininet_pton(3). IfGateway=_dhcp4is set, it defaults to the acquired DHCPv4 address. Otherwise it defaults to unset. The value"no"is actually useful when you want a route withGateway=_dhcp4but without setting the preferred source route address ๐ซ
Added in version 227.
Table=โ the table identifier for the route. Takes one of the predefined names"default","main", and"local", plus any names defined inRouteTable=innetworkd.conf(5), or a number between 1 and 4294967295. You can go grab the table withip route show table num๐. If it's unset andType=is"local","broadcast","anycast", or"nat", then"local"is used. In other cases it defaults to"main".
Added in version 230.
HopLimit=โ configures the per route hop limit. Takes an integer in the range1...255. See alsoIPv6HopLimit=โจ
Added in version 255.
Protocol=โ the protocol identifier for the route. Takes a number between 0 and 255, or the special values"kernel","boot","static","ra", and"dhcp". Defaults to"static".
Added in version 234.
Type=โ specifies the type for the route. Takes one of"unicast","local","broadcast","anycast","multicast","blackhole","unreachable","prohibit","throw","nat", and"xresolve". If it's"unicast", a regular route is defined โ i.e. a route telling you the path to take to a destination network address. If it's"blackhole", packets to the defined route get discarded silently ๐ณ๏ธ. If it's"unreachable", packets to the defined route get discarded and the ICMP message "Host Unreachable" is generated. If it's"prohibit", packets to the defined route get discarded and the ICMP message "Communication Administratively Prohibited" is generated ๐ซ. If it's"throw", route lookup in the current routing table will fail and the route selection process goes back to the Routing Policy Database (RPDB). Defaults to"unicast".
Added in version 235.
InitialCongestionWindow=โ the TCP initial congestion window, used during the start of a TCP connection. When a TCP session starts and a client requests a resource, the server's initial congestion window decides how many packets get sent during that first burst of data without waiting for acknowledgement. Takes a number between 1 and 1023. Heads up though, 100 is considered an extremely large value for this option ๐ญ. When unset, the kernel's default (typically 10) is used.
Added in version 237.
InitialAdvertisedReceiveWindow=โ the TCP initial advertised receive window is the amount of receive data (in bytes) that can initially be buffered at one time on a connection. The sending host can only send that much data before waiting for an acknowledgment and window update from the receiving host. Takes a number between 1 and 1023. And again, 100 is considered an extremely large value for this option ๐. When unset, the kernel's default gets used.
Added in version 237.
QuickAck=โ takes a boolean. When true, the TCP quick ACK mode for the route is enabled โก. When unset, the kernel's default gets used.
Added in version 237.
FastOpenNoCookie=โ takes a boolean. When true, it enables TCP fastopen without a cookie on a per-route basis. When unset, the kernel's default gets used ๐
Added in version 243.
MTUBytes=โ the maximum transmission unit in bytes to set for the route. The usual suffixesK,M,Gare supported and are understood to the base of 1024 ๐ธ
Added in version 239.
TCPAdvertisedMaximumSegmentSize=โ specifies the Path MSS (in bytes) hints given on the TCP layer. The usual suffixesK,M,Gare supported and understood to the base of 1024. It's an unsigned integer in the range1...4294967294. When unset, the kernel's default gets used.
Added in version 248.
TCPCongestionControlAlgorithm=โ specifies the TCP congestion control algorithm for the route. Takes a name of the algorithm, e.g."bbr","dctcp", or"vegas"๐๏ธ. When unset, the kernel's default gets used.
Added in version 252.
TCPRetransmissionTimeoutSec=โ specifies the TCP Retransmission Timeout (RTO) for the route. Takes time values in seconds. This value sets the timeout of an alive TCP connection when retransmissions remain unacknowledged โณ. When unset, the kernel's default gets used.
Added in version 255.
MultiPathRoute=โ configures a multipath route. Multipath routing is the technique of using multiple alternative paths through a network ๐ฃ๏ธ. Takes a gateway address and/or a network interface name or index (prefixed with@). At least one of those has to be specified. Optionally you can tack on a weight in1..256, separated with whitespace. This setting can be specified multiple times, and if an empty string is assigned, all previous assignments get cleared.
Examples:
MultiPathRoute=10.0.0.1@eth0 20
MultiPathRoute=192.168.1.1 50
MultiPathRoute=@wg0 15
MultiPathRoute=2001:db8::1@eth0
Added in version 245.
NextHop=โ specifies the nexthop id. Takes an unsigned integer in the range1...4294967295. If you set this, the corresponding[NextHop]section must be configured ๐ค. Defaults to unset.
Added in version 248.
๐ฆ [DHCPV4] SECTION OPTIONS ๐ฆ
The [DHCPv4] section configures the DHCPv4 client, if it's enabled with the DHCP= setting described above โจ
RequestAddress=โ takes an IPv4 address. When specified, the Requested IP Address option (option code 50) gets added with it to the initial DHCPDISCOVER message sent by the DHCP client ๐จ. Defaults to unset, and in that case an already assigned dynamic address on the interface is automatically picked ๐
Added in version 255.
SendHostname=โ when this is true (and bestie, true is the default โจ), your machine's hostname โ or whatever you shoved intoHostname=below โ gets sent off to the DHCP server. But like, it's picky: the hostname has to be 7-bit ASCII lower-case only, no spaces, and formatted as a valid DNS domain name. A single-label hostname goes out as DHCP option 12 (Host Name, RFC 2132[25]); a multi-label hostname (FQDN) goes out as DHCP option 81 (Client FQDN, RFC 4702[26]) instead. If it doesn't meet the vibe check, the hostname is not sent even if this option is true. ๐
Added in version 215.
Hostname=โ use this value for the hostname sent to the DHCP server instead of the machine's actual hostname. Same rules though, no exceptions: it must be 7-bit ASCII lower-case only, no spaces, and a valid DNS domain name. Multi-label hostnames (FQDNs) are totally fine here; seeSendHostname=above for the deets. ๐ฆ
Added in version 223.
MUDURL=โ when you set this, the Manufacturer Usage Description (MUD) URL you gave gets sent to the DHCPv4 server. Takes a URL up to 255 characters long, and it does a superficial little check that the string is a valid URL. DHCPv4 clients are meant to have at most one MUD URL associated with them. See RFC 8520[27].
MUD is an embedded software standard from the IETF that lets IoT device makers advertise device specs โ including the intended communication patterns for their device when it joins the network. Then the network can use that to author a context-specific access policy, so the device only functions within those parameters. iconic honestly. ๐
Added in version 246.
ClientIdentifier=โ which DHCPv4 client identifier to use. Takes one ofmacorduid. Ifmac, the MAC address of the link is used. Ifduid, an RFC4361-compliant Client ID โ that's the combo of IAID and DUID โ is used. IAID can be set withIAID=. DUID can be set withDUIDType=andDUIDRawData=. WhenAnonymize=is enabled,macis unconditionally used and whatever you specified gets ignored, periodt. When unspecified, the value from the same setting innetworkd.conf(5)is used.
Added in version 220.
VendorClassIdentifier=โ the vendor class identifier, used to identify vendor type and configuration. ๐
Added in version 216.
UserClass=โ a DHCPv4 client can use the UserClass option to identify the type or category of user or application it represents. The info in this option is a string representing the user class the client belongs to. Each class sets an identifying string that the DHCP service uses to classify clients. Takes a whitespace-separated list of strings.
Added in version 239.
DUIDType=โ overrides the globalDUIDType=setting just for this network. Peepnetworkd.conf(5)for what values are possible. โจ
Added in version 230.
DUIDRawData=โ overrides the globalDUIDRawData=setting just for this network. Again,networkd.conf(5)has the possible values.
Added in version 230.
IAID=โ the DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer. ๐ข
Added in version 230.
RapidCommit=โ takes a boolean. The DHCPv4 client can grab config parameters from a DHCPv4 server through a rapid two-message exchange (discover and ack). When the rapid commit option is set by both the DHCPv4 client and the DHCPv4 server, that two-message exchange is used. Otherwise it's the four-message exchange (discover, offer, request, and ack). The two-message one is faster, no cap. See RFC 4039[28] for details. Defaults to true whenAnonymize=noand neitherAllowList=norDenyList=is specified, and false otherwise.
Added in version 255.
Anonymize=โ takes a boolean. When true, the options sent to the DHCP server follow RFC 7844[29] (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information. Defaults to false. ๐ต๏ธ
This option should only be set to true whenMACAddressPolicy=is set torandom(seesystemd.link(5)).
When true, ClientIdentifier=mac, RapidCommit=no, SendHostname=no, Use6RD=no, UseCaptivePortal=no, UseMTU=no, UseNTP=no, UseSIP=no, and UseTimezone=no are implied, and these settings in the .network file are silently ignored. Also silently ignored: Hostname=, MUDURL=, RequestAddress=, RequestOptions=, SendOption=, SendVendorOption=, UserClass=, and VendorClassIdentifier=.
With this on, DHCP requests mimic the ones Microsoft Windows generates, to reduce the ability to fingerprint and recognize installations. That means DHCP request sizes grow and lease data becomes more comprehensive than normal โ though most of the requested data isn't actually used. ๐
Added in version 235.
RequestOptions=โ sets request options to be sent to the server in the DHCPv4 request options list. A whitespace-separated list of integers in the range1...254. Defaults to unset.
Added in version 244.
SendOption=โ send an arbitrary raw option in the DHCPv4 request. Takes a DHCP option number, data type and data separated with a colon ("option:type:value"). The option number must be an integer in the range1...254. The type takes one of"uint8","uint16","uint32","ipv4address", or"string". Special characters in the data string may be escaped using C-style escapes[30]. This setting can be specified multiple times. If an empty string is specified, then all options specified earlier are cleared. Defaults to unset.
Added in version 244.
SendVendorOption=โ send an arbitrary vendor option in the DHCPv4 request. Takes a DHCP option number, data type and data separated with a colon ("option:type:value"). The option number must be an integer in the range1...254. The type takes one of"uint8","uint16","uint32","ipv4address", or"string". Special characters in the data string may be escaped using C-style escapes[30]. This setting can be specified multiple times. If an empty string is specified, then all options specified earlier are cleared. Defaults to unset.
Added in version 246.
IPServiceType=โ takes one of the special values"none","CS6", or"CS4". When"none", no IP service type is set on the packet sent from the DHCPv4 client. When"CS6"(network control) or"CS4"(realtime), the corresponding service type is set. Defaults to"CS6".
Added in version 244.
SocketPriority=โ the Linux socket optionSO_PRIORITYapplied to the raw IP socket used for initial DHCPv4 messages. Unset by default. Usual values range from0to6. More details about theSO_PRIORITYsocket option live insocket(7). Can be used together with the[VLAN]sectionEgressQOSMaps=setting of the.netdevfile to set the 802.1Q VLAN ethernet tagged header priority โ seesystemd.netdev(5). ๐
Added in version 253.
BOOTP=โ takes a boolean. When enabled, the DHCPv4 client is configured to talk to BOOTP servers instead of DHCP servers. Defaults to off.
Added in version 258.
Label=โ specifies the label for the IPv4 address received from the DHCP server. The label must be a 7-bit ASCII string with a length of1...15characters. Defaults to unset.
Added in version 250.
UseDNS=โ when true (the default โจ), the DNS servers received from the DHCP server get used.
This corresponds to the nameserver option in resolv.conf(5).
Added in version 211.
RoutesToDNS=โ when true, the routes to the DNS servers received from the DHCP server get configured. WhenUseDNS=is disabled, this setting is ignored. Defaults to true.
Added in version 243.
UseNTP=โ when true (the default), the NTP servers received from the DHCP server get used bysystemd-timesyncd.service. โฐ
Added in version 220.
RoutesToNTP=โ when true, the routes to the NTP servers received from the DHCP server get configured. WhenUseNTP=is disabled, this setting is ignored. Defaults to true.
Added in version 249.
UseSIP=โ when true (the default), the SIP servers received from the DHCP server get collected and made available to client programs.
Added in version 244.
UseCaptivePortal=โ when true (the default), the captive portal advertised by the DHCP server gets recorded and made available to client programs, and displayed in thenetworkctl(1)status output per-link. ๐ซถ
Added in version 254.
UseDNR=โ when true, designated resolvers advertised by the DHCP server get used as encrypted DNS servers. See RFC 9463[31].
Defaults to unset, and the value for UseDNS= will be used.
Added in version 257.
UseMTU=โ when true, the interface maximum transmission unit from the DHCP server gets used on the current link. IfMTUBytes=is set, then this setting is ignored. Defaults to false.
Heads up though: some drivers will reset the interface if the MTU is changed. For those interfaces, please try using IgnoreCarrierLoss= with a short timespan, e.g. "3 seconds". ๐ญ
Added in version 211.
UseHostname=โ when true (the default), the hostname received from the DHCP server gets set as the transient hostname of the system.
Added in version 211.
UseDomains=โ takes a boolean, or the special valueroute. When true, the domain name received from the DHCP server gets used as the DNS search domain over this link, similar to what theDomains=setting does. If set toroute, the domain name received from the DHCP server is used for routing DNS queries only โ not for searching โ similar to what theDomains=setting does when the argument is prefixed with"~".
When unspecified, the value specified in the same setting in the [Network] section is used. When that's unspecified too, the value specified in the same setting in the [DHCPv4] section in networkd.conf(5) is used. When that's unspecified, the value specified in the same setting in the [Network] section in networkd.conf(5) is used. And when none of them are specified at all? Defaults to "no". ๐ฆ
Added in version 255.
lowkey the whole point: only turn this on for networks you trust, bestie. Flipping it messes with resolution of all hostnames โ especially single-label ones. The generally safer move is to use the domain you're handed as a routing domain instead of a search domain, so it doesn't go touching your local single-label resolution. โจ
When it's set to true, this setting is literally the same thing as the domain option in resolv.conf(5).
Added in version 216.
UseRoutes=โ when true (the default, bestie), the static routes get requested from the DHCP server and dropped into the routing table with a metric of1024and a scope ofglobal,linkorhost, depending on the route's destination and gateway. If the destination is on the local host (like127.x.x.x) or it's the same as the link's own address, scope goes tohost. Otherwise, if the gateway is null (a direct route, no cap), scope islink. Anything else? Scope defaults toglobal. ๐
Added in version 215.
RouteMetric=โ sets the routing metric for routes the DHCP server hands over (yes, including the prefix route added for that prefix). Takes an unsigned integer in the range0...4294967295. Defaults to1024.
Added in version 217.
RouteTable=numโ the table identifier for DHCP routes, periodt. Takes one of the predefined names"default","main"and"local", plus any names defined inRouteTable=innetworkd.conf(5), or just a number between1...4294967295.
When you use it together with VRF=, the VRF's routing table gets used when you don't specify this parameter. ๐ฆ
Added in version 232.
RouteMTUBytes=โ specifies the MTU for the DHCP routes. Go peek at the[Route]section for the full details, bestie.
Added in version 245.
QuickAck=โ takes a boolean. When true, TCP quick ACK mode is enabled for the routes configured by the acquired DHCPv4 lease. When it's unset, the kernel's default gets used. ๐ธ
Added in version 253.
InitialCongestionWindow=โ same energy as in the[Route]section.
Added in version 255.
InitialAdvertisedReceiveWindow=โ also as in the[Route]section.
Added in version 255.
UseGateway=โ when true, and the DHCP server provides a Router option, the default gateway based on the router address gets configured. Defaults to unset, and then the value you set withUseRoutes=is what's used instead.
Heads up: when the server provides both the Router and Classless Static Routes options, andUseRoutes=is enabled, the Router option is always ignored no matter what this setting says. SeeRFC 3442[32]. ๐ซถ
Added in version 246.
UseTimezone=โ when true, the timezone received from the DHCP server gets set as the timezone of the local system. Defaults to false.
Added in version 226.
Use6RD=โ when true, subnets of the received IPv6 prefix get assigned to downstream interfaces, which is what enablesDHCPPrefixDelegation=. See alsoDHCPPrefixDelegation=in the[Network]section, the[DHCPPrefixDelegation]section, andRFC 5969[33]. Defaults to false. โจ
Added in version 250.
UnassignedSubnetPolicy=โ takes"none", or one of the reject types:"unreachable","prohibit","blackhole", or"throw". If you pick a reject type, the reject route corresponding to the acquired 6RD prefix gets configured. For example, when it's"unreachable",
unreachable 2001:db8::/56 dev lo proto dhcp metric 1024 pref medium
gets configured. See RFC 7084[34]. If "none" is specified, no such route gets configured at all โ which is genuinely useful when you're planning to set up custom firewall rules that handle packets for unassigned subnets. Defaults to "unreachable". ๐ฅ
Added in version 257.
IPv6OnlyMode=โ when true, the DHCPv4 configuration gets delayed by the timespan the DHCP server provides, and it skips configuring dynamic IPv4 network connectivity if IPv6 connectivity is provided within that timespan. SeeRFC 8925[35]. Defaults to false. ๐
Added in version 255.
FallbackLeaseLifetimeSec=โ lets you set the DHCPv4 lease lifetime for when the DHCPv4 server doesn't send one. Takes one of"forever"or"infinity". If you specify it, the acquired address never expires. Defaults to unset.
Added in version 246.
RequestBroadcast=โ asks the server to use broadcast messages before the IP address has been configured. This is a must for devices that can't receive RAW packets, or that can't receive packets at all before an IP address has been configured. On the flip side: do not enable this on networks where broadcasts get filtered out. ๐
Added in version 216.
MaxAttempts=โ how many times the DHCPv4 client configuration should be attempted. Takes a number or"infinity". Defaults to"infinity". Ngl the time between retries grows exponentially, up to roughly one per minute, so the network won't get overloaded even if this number is huge. The default is suitable in most circumstances, fr fr.
Added in version 243.
ListenPort=โ set the port from which the DHCP client packets originate.
Added in version 233.
ServerPort=โ set the port on which the DHCP server is listening.
Added in version 256.
DenyList=โ a whitespace-separated list of IPv4 addresses. Each address can optionally take a prefix length after a"/". DHCP offers from servers in this list get rejected. Note that ifAllowList=is configured, thenDenyList=is ignored. ๐
Also note: this filters only DHCP offers, so the filtering might not work whenRapidCommit=is enabled. See alsoRapidCommit=above.
Added in version 246.
AllowList=โ a whitespace-separated list of IPv4 addresses. Each address can optionally take a prefix length after a"/". DHCP offers from servers in this list get accepted. ๐
Same warning as above, bestie: this filters only DHCP offers, so the filtering might not work whenRapidCommit=is enabled. See alsoRapidCommit=above.
Added in version 246.
SendRelease=โ when true, the DHCPv4 client sends a DHCP release packet when it stops. Defaults to true.
Added in version 243.
SendDecline=โ a boolean. When true,systemd-networkdperforms IPv4 Duplicate Address Detection on the address acquired by the DHCPv4 client. If a duplicate is detected, the DHCPv4 client rejects the address by sending aDHCPDECLINEpacket to the DHCP server and tries to obtain an IP address again. SeeRFC 5227[8]. Defaults to false. ๐ง
Added in version 245.
NetLabel=โ this applies the NetLabel for the addresses received with DHCP, exactly likeNetLabel=in the[Address]section applies it to statically configured addresses. SeeNetLabel=in the[Address]section for more details. ๐
Added in version 252.
NFTSet=โ this applies the NFT set for the network configuration received with DHCP, likeNFTSet=in the[Address]section applies it to static configuration. SeeNFTSet=in the[Address]section for more details. For"address"or"prefix"source types, the type of the element used in the NFT filter must be"ipv4_addr". ๐
Added in version 255.
โจ [DHCPV6] SECTION OPTIONS โจ
okay so this is the glow-up section for the DHCPv6 client ๐
it kicks in when you turn it on with the DHCP= setting we talked about earlier, or when the IPv6 Router Advertisement rolls up and drags it out of bed. either way, it's here, it's ready, it's giving main character energy ๐ฆ
MUDURL=,IAID=,DUIDType=,DUIDRawData=,RequestOptions=โ literally exactly the same as in the[DHCPv4]section. no notes, bestie, copy-paste vibes ๐ซถ โจ Added in version 246.SendOption=โ also same as in the[DHCPv4]section BUT listen, plot twist ๐ because DHCPv6 stores option numbers in 16-bit fields, the option number here is an integer in the range1...65536. โจ Added in version 246.SendOption=... no wait,SendVendorOption=โ this one sends an arbitrary vendor option in the DHCPv6 request ๐ it takes an enterprise identifier, a DHCP option number, a data type, and data, all glued together with colons:"enterprise identifier:option:type:value". the enterprise identifier is an unsigned integer in the range1...4294967294. the option number must be an integer in the range1...254. data type is one of"uint8","uint16","uint32","ipv4address","ipv6address", or"string". special characters in the data string can be escaped using C-style escapes[30] โจ this setting can be specified multiple times. and if you pass an empty string, then all the options you specified earlier get cleared โ poof, gone ๐ defaults to unset. โจ Added in version 246.UserClass=โ a DHCPv6 client can use the User Class option to identify the type or category of user or applications it represents ๐ง the info in this option is a string that represents the user class of which the client is a member. each class sets an identifying string of information to be used by the DHCP service to classify clients. special characters in the data string may be escaped using C-style escapes[30]. this setting can be specified multiple times, and if an empty string is specified then all options specified earlier are cleared. it takes a whitespace-separated list of strings. just so you know โ currently NUL bytes are not allowed ๐ โจ Added in version 246.VendorClass=โ lets a DHCPv6 client identify the vendor that manufactured the hardware it's running on ๐ the info in the data area of this option lives in one or more opaque fields that identify details of the hardware configuration. takes a whitespace-separated list of strings. โจ Added in version 246.PrefixDelegationHint=โ takes an IPv6 address with prefix length, same format asAddress=in the[Network]section ๐ธ the DHCPv6 client will include a prefix hint in the DHCPv6 solicitation it sends to the server. the prefix length must be in the range1...128. defaults to unset. โจ Added in version 244.UnassignedSubnetPolicy=โ takes"none"or one of the reject types:"unreachable","prohibit","blackhole", or"throw"๐ฅ if you pick a reject type, the reject route corresponding to the delegated prefix gets configured. like, for example, when it's"unreachable":
unreachable 2001:db8::/56 dev lo proto dhcp metric 1024 pref medium
will be configured. see RFC 7084[34] for the receipts. if "none" is specified, that route won't be configured at all โ which is lowkey useful when you're gonna set up custom firewall rules that handle packets for unassigned subnets yourself. defaults to "unreachable". โจ Added in version 257.
RouteTable=num โ the table identifier for routes installed by the DHCPv6 client, e.g. unreachable routes for delegated prefixes ๐ซ takes one of the predefined names"default","main", and"local", names defined inRouteTable=innetworkd.conf(5), or a number between1...4294967295.
when used in combination with VRF=, the VRF's routing table is used when this parameter is not specified. โจ Added in version 261.
RapidCommit=โ takes a boolean. the DHCPv6 client can obtain configuration parameters from a DHCPv6 server through a rapid two-message exchange (solicit and reply) โก when the rapid commit option is set by both the DHCPv6 client and the DHCPv6 server, that two-message exchange is used. otherwise it's the four-message exchange (solicit, advertise, request, and reply). the two-message one is faster, obviously, it's giving speed. see RFC 3315[36] for details. defaults to true, and the two-message exchange will be used if the server supports it. โจ Added in version 252.SendHostname=โ when true (the default), the machine's hostname (or the value you set withHostname=, described right below) gets sent to the DHCPv6 server ๐ฎ heads up tho: the hostname must consist only of 7-bit ASCII lower-case characters, with no spaces or dots, and be formatted as a valid DNS domain name. otherwise the hostname is not sent, even if this option is true ๐ญ โจ Added in version 255.Hostname=โ use this value for the hostname sent to the DHCPv6 server instead of the machine's hostname ๐ note that the hostname you specify must consist only of 7-bit ASCII lower-case characters and no spaces or dots, and be formatted as a valid DNS domain name. โจ Added in version 255.UseAddress=โ when true (the default), the IP addresses the DHCPv6 server hands over will be assigned ๐ โจ Added in version 248.UseCaptivePortal=โ when true (the default), the captive portal advertised by the DHCPv6 server gets recorded and made available to client programs, and shown in thenetworkctl(1)status output per-link ๐ โจ Added in version 254.UseDelegatedPrefix=โ when true (the default), the client will ask the DHCPv6 server to delegate prefixes ๐ฆ if the server provides prefixes to be delegated, then subnets of those prefixes get assigned to the interfaces that haveDHCPPrefixDelegation=yes. see also theDHCPPrefixDelegation=setting in the[Network]section, the settings in the[DHCPPrefixDelegation]section, and RFC 8415[37]. โจ Added in version 250.UseDNS=,UseDNR=,UseNTP=,UseSIP=,UseHostname=,UseDomains=,NetLabel=,SendRelease=โ as in the[DHCPv4]section, bestie, same energy ๐ โจ Added in version 243.NFTSet=โ this applies the NFT set for the network configuration received with DHCP, the same wayNFTSet=in the[Address]section applies it to static configuration ๐ seeNFTSet=in the[Address]section for more details. for"address"or"prefix"source types, the type of the element used in the NFT filter must be"ipv6_addr". โจ Added in version 255.WithoutRA=โ lets the DHCPv6 client start without the router advertisement's"managed"or"other configuration"flag ๐ค takes one of"no","solicit", or"information-request". if this isn't specified,"solicit"is used whenDHCPPrefixDelegation=is enabled andUplinkInterface=:selfis specified in the[DHCPPrefixDelegation]section. otherwise it defaults to"no", and the DHCPv6 client will be started when an RA is received. see also theDHCPv6Client=setting in the[IPv6AcceptRA]section. โจ Added in version 246.
โจ [DHCPPREFIXDELEGATION] SECTION OPTIONS โจ
the [DHCPPrefixDelegation] section configures subnet prefixes of the delegated prefixes acquired by a DHCPv6 client, or by a DHCPv4 client through the 6RD option on another interface ๐ธ the settings in here are used only when the DHCPPrefixDelegation= setting in the [Network] section is enabled. no setting, no section, no vibes.
UplinkInterface=โ specifies the name or the index of the uplink interface, or one of the special values":self"and":auto"๐ when":self", the interface itself is considered the uplink interface, andWithoutRA=solicitis implied if the setting isn't explicitly specified. when":auto", the first link which acquired prefixes to be delegated from the DHCPv6 or DHCPv4 server is selected. defaults to":auto". โจ Added in version 250.SubnetId=โ configure a specific subnet ID on the interface from a (previously) received prefix delegation ๐ซ you can either set"auto"(the default) or a specific subnet ID (as defined in RFC 4291[38], section 2.5.4), in which case the allowed value is hexadecimal, from0to0x7fffffffffffffffinclusive. โจ Added in version 246.Announce=โ takes a boolean. when enabled, andIPv6SendRA=in the[Network]section is enabled, the delegated prefixes are distributed through the IPv6 Router Advertisement ๐ข this setting will be ignored when theDHCPPrefixDelegation=setting is enabled on the upstream interface. defaults to yes. โจ Added in version 247.Assign=โ takes a boolean. specifies whether to add an address from the delegated prefixes which are received from the WAN interface by the DHCPv6 Prefix Delegation ๐ฆ when true (on the LAN interface), the EUI-64 algorithm will be used by default to form an interface identifier from the delegated prefixes. see also theToken=setting below. defaults to yes. โจ Added in version 246.Token=โ specifies an optional address generation mode for assigning an address in each delegated prefix ๐ธ this accepts the same syntax asToken=in the[IPv6AcceptRA]section. ifAssign=is set to false, then this setting will be ignored, sorry bestie. defaults to unset, which means the EUI-64 algorithm will be used. โจ Added in version 246.ManageTemporaryAddress=โ as in the[Address]section, but defaults to true ๐ โจ Added in version 248.RouteMetric=โ the metric of the route to the delegated prefix subnet. takes an unsigned integer in the range0...4294967295. when set to0, the kernel's default value is used. defaults to256. โจ Added in version 249.NetLabel=โ this applies the NetLabel for the addresses received with DHCP, the same wayNetLabel=in the[Address]section applies it to statically configured addresses โจ seeNetLabel=in the[Address]section for more details. โจ Added in version 252.NFTSet=โ this applies the NFT set for the network configuration received with DHCP, the same wayNFTSet=in the[Address]section applies it to static configuration ๐ฅ seeNFTSet=in the[Address]section for more details. for"address"or"prefix"source types, the type of the element used in the NFT filter must be"ipv6_addr". โจ Added in version 255.
โจ [IPV6ACCEPTRA] SECTION OPTIONS โจ
the [IPv6AcceptRA] section configures the IPv6 Router Advertisement (RA) client, if it's enabled with the IPv6AcceptRA= setting we covered earlier ๐ฆ
UseRedirect=โ when true (the default), a Redirect message sent by the current first-hop router will be accepted, and routes to redirected nodes will be configured ๐ซ โจ Added in version 256.Token=โ ok bestie, this one picks the optional address generation mode for Stateless Address Autoconfiguration (SLAAC) โจ here are the values that hit:eui64โ uses the EUI-64 algorithm to cook up an address for that prefix. Lowkey only Ethernet or InfiniBand interfaces are invited to this party.
Added in version 250.
static:ADDRESSโ you gotta put an IPv6 address after a colon (:), and the lower bits of your address get combined with the upper bits of a prefix that arrived in a Router Advertisement (RA) message to form a whole complete address. Heads up: if multiple prefixes show up in one RA message, or across multiple RA messages, addresses get formed from each of them using the address you supplied. This mode does SLAAC but with a static interface identifier instead of one made by the EUI-64 algorithm. And because the interface identifier is static, if Duplicate Address Detection catches that the computed address is a duplicate (already in use by another node on the link), then this mode just... fails to provide an address for that prefix ๐ญ. Also! If you hand it an IPv6 address withoutstatic, thenstaticmode is assumed anyway.
Added in version 250.
prefixstable[:ADDRESS][,UUID]โ uses the algorithm from RFC 7217[39] to generate interface identifiers. It can optionally take an IPv6 address separated with a colon (:). If you give it an IPv6 address, then an interface identifier is only generated when a prefix received in an RA message matches the address you supplied.
It can also optionally take a non-null UUID in the format that sd_id128_from_string() accepts, like "86b123b969ba4b7eb8b3d8605123525a" or "86b123b9-69ba-4b7e-b8b3-d8605123525a". If you specify a UUID, that value is used as the secret key to generate interface identifiers. If you don't, then an application specific ID generated with the system's machine-ID is used as the secret key. See sd-id128(3), sd_id128_from_string(3), and sd_id128_get_machine(3).
Not me dropping a warning but โ the "prefixstable" algorithm uses both the interface name and MAC address as input to the hash to compute the interface identifier. So if either of those changes, the resulting interface identifier (and address) changes too, even if the prefix received in the RA message hasn't changed at all. ๐
Added in version 250.
So if no address generation mode is specified (which is, btw, the default), or a received prefix doesn't match any of the addresses you gave in "prefixstable" mode, then the EUI-64 algorithm gets used for Ethernet or InfiniBand interfaces โ otherwise "prefixstable" forms an interface identifier for that prefix. That's the vibe.
This setting can be specified multiple times. And if you assign an empty string, then all previous assignments get cleared, poof, gone ๐ซถ.
Examples:
Token=eui64
Token=::1a:2b:3c:4d
Token=static:::1a:2b:3c:4d
Token=prefixstable
Token=prefixstable:2002:da8:1::
Added in version 250.
UseDNS=โ when true (the default, bestie), the DNS servers received in the Router Advertisement get used. This corresponds to thenameserveroption inresolv.conf(5).
Added in version 231.
UseDNR=โ when true, the DNR servers received in the Router Advertisement get used. Defaults to whateverUseDNS=is set to. โจ
Added in version 257.
UseDomains=โ takes a boolean, or the special value"route". When true, the domain name received via IPv6 Router Advertisement (RA) is used as a DNS search domain over this link, basically like whatDomains=does. If set to"route", the domain name received via IPv6 RA is used for routing DNS queries only, not for searching โ same energy asDomains=when the argument is prefixed with"~". Defaults to false.
Real talk: it's recommended to enable this only on trusted networks, because setting it affects resolution of all hostnames, especially single-label names. It's generally safer to use the supplied domain only as a routing domain rather than a search domain, so it doesn't mess with local resolution of single-label names. ๐
When set to true, this setting corresponds to the domain option in resolv.conf(5).
Added in version 231.
RouteTable=numโ the table identifier for the routes received in the Router Advertisement. Takes one of the predefined names"default","main", and"local", plus names defined inRouteTable=innetworkd.conf(5), or a number between 1...4294967295.
When used together with VRF=, the VRF's routing table gets used when this parameter isn't specified.
Added in version 232.
RouteMetric=โ sets the routing metric for the routes received in the Router Advertisement. Takes an unsigned integer in the range 0...4294967295, or three unsigned integers separated with":"โ in that case the first one is used when the router preference is high, the second for medium preference, and the last for low preference ("high:medium:low"). Defaults to"512:1024:2048".
Added in version 249.
QuickAck=โ takes a boolean. When true, the TCP quick ACK mode is enabled for the routes configured by the received RAs. When unset, the kernel's default is used.
Added in version 253.
UseMTU=โ takes a boolean. When true, the MTU received in the Router Advertisement gets used. Defaults to true.
Added in version 250.
UseHopLimit=โ takes a boolean. When true, the hop limit received in the Router Advertisement gets set on routes configured based on the advertisement. See alsoIPv6HopLimit=. Defaults to true.
Added in version 255.
UseReachableTime=โ takes a boolean. When true, the reachable time received in the Router Advertisement gets set on the interface receiving the advertisement. It's used as the base timespan of the validity of a neighbor entry. Defaults to true.
Added in version 256.
UseRetransmissionTime=โ takes a boolean. When true, the retransmission time received in the Router Advertisement gets set on the interface receiving the advertisement. It's used as the time between retransmissions of Neighbor Solicitation messages to a neighbor when resolving the address or when probing the reachability of a neighbor. Defaults to true.
Added in version 256.
UseGateway=โ when true (the default), the router address gets configured as the default gateway. Slay.
Added in version 250.
UseRoutePrefix=โ when true (the default), the routes corresponding to the route prefixes received in the Router Advertisement get configured.
Added in version 250.
UseCaptivePortal=โ when true (the default), the captive portal received in the Router Advertisement gets recorded and made available to client programs and displayed in thenetworkctl(1)status output per-link.
Added in version 254.
UsePREF64=โ when true, the IPv6 PREF64 (or NAT64) prefixes received in the Router Advertisement get recorded and made available to client programs and displayed in thenetworkctl(1)status output per-link. See RFC 8781[40]. Defaults to false.
Added in version 255.
UseAutonomousPrefix=โ when true (the default), the autonomous prefix received in the Router Advertisement gets used and takes precedence over any statically configured ones.
Added in version 242.
UseOnLinkPrefix=โ when true (the default), the onlink prefix received in the Router Advertisement gets used and takes precedence over any statically configured ones.
Added in version 242.
RouterDenyList=โ a whitespace-separated list of IPv6 router addresses. Each address can optionally take a prefix length after"/". Any information advertised by a listed router is ignored. ๐ซ
Added in version 248.
RouterAllowList=โ a whitespace-separated list of IPv6 router addresses. Each address can optionally take a prefix length after"/". Only information advertised by a listed router is accepted. Note that ifRouterAllowList=is configured, thenRouterDenyList=is ignored.
Added in version 248.
PrefixDenyList=โ a whitespace-separated list of IPv6 prefixes. Each prefix can optionally take its prefix length after"/". IPv6 prefixes supplied via router advertisements that are in the list get ignored.
Added in version 248.
PrefixAllowList=โ a whitespace-separated list of IPv6 prefixes. Each prefix can optionally take its prefix length after"/". IPv6 prefixes supplied via router advertisements that are in the list are allowed. Note that ifPrefixAllowList=is configured, thenPrefixDenyList=is ignored.
Added in version 248.
RouteDenyList=โ a whitespace-separated list of IPv6 route prefixes. Each prefix can optionally take its prefix length after"/". IPv6 route prefixes supplied via router advertisements that are in the list get ignored.
Added in version 248.
RouteAllowList=โ a whitespace-separated list of IPv6 route prefixes. Each prefix can optionally take its prefix length after"/". IPv6 route prefixes supplied via router advertisements that are in the list are allowed. Note that ifRouteAllowList=is configured, thenRouteDenyList=is ignored.
Added in version 248.
DHCPv6Client=โ takes a boolean, or the special value"always". When true, the DHCPv6 client gets started in"solicit"mode if the RA has the"managed"flag, or in"information-request"mode if the RA lacks the"managed"flag but has the"other configuration"flag. If set to"always", the DHCPv6 client gets started in"solicit"mode whenever an RA is received โ even if neither the"managed"nor the"other configuration"flag is set in the RA. This gets ignored whenWithoutRA=in the[DHCPv6]section is enabled, or whenUplinkInterface=:selfin the[DHCPPrefixDelegation]section is specified. Defaults to true. ๐
Added in version 246.
NetLabel=โ bestie, this does the NetLabel thing for the addresses you got via RA, exactly likeNetLabel=in the[Address]section does for addresses you set up by hand. Wanna know more? Go peek atNetLabel=in[Address]. ๐
Added in version 252.
NFTSet=โ same energy, but for NFT sets: this applies the NFT set to the network config you got from RA, just likeNFTSet=in[Address]applies it to static config. Go readNFTSet=in[Address]for the full tea. And heads up โ for"address"or"prefix"source types, the element type in your NFT filter has to be"ipv6_addr". No exceptions, periodt.
Added in version 255.
โจ [DHCPRELAY] SECTION OPTIONS โจ
Okay so the [DHCPRelay] section is where the per-interface settings for the DHCP relay agent live. Lowkey important: these settings only do anything when DHCPRelay= in the [Network] section is actually configured. Otherwise they're just sitting there, ignored, like an unread group chat. ๐
AgentAddress=โ takes an IPv4 address, and that address becomes the source IP of the packets getting forwarded to the upstream DHCP server. It might also get used for the Server Identifier Override sub-option and the Link Selection sub-option inside the Relay Agent Information option that gets appended to the DHCP messages headed upstream. This applies to both upstream and downstream interfaces, so no pick-me behavior here. Defaults to unset. If you leave it unset, a statically configured IPv4 address in the.networkfile gets picked automatically. And if you've got multiple static IPv4 addresses configured? Yeah, bestie, just set this explicitly. Trust. ๐
Added in version 261.
GatewayAddress=โ takes an IPv4 address, and it gets dropped into the"giaddr"field of the DHCP message header whenever the message is forwarded to the upstream DHCP server. This one is only used whenDHCPRelay=downstream, and straight-up ignored otherwise. Defaults to unset โ and in that case, whatever address you gave toAgentAddress=is used instead. ๐ซถ
Added in version 261.
CircuitId=โ sets the circuit ID of the downstream interface. It gets written as the Circuit ID sub-option inside the Relay Agent Information option of the forwarded DHCP message. Takes a data type and data separated by a colon ("type:value"). The type has to be one of"uint8","uint16","uint32","ipv4address","ipv6address", or"string". Special characters in the data string can be escaped with C-style escapes[30]. Only used whenDHCPRelay=downstream, ignored otherwise. If you don't set it, the name of the interface gets used. โจ
Added in version 261.
VirtualSubnetSelection=โ a unique identifier the DHCP server uses to pick the downstream subnet independently of giaddr, slay. This value goes in as the Virtual Subnet Selection sub-option of the Relay Agent Information option in the forwarded DHCP message. Takes a value in the same format asCircuitId=. Only used whenDHCPRelay=downstream, ignored otherwise. Defaults to unset, and the sub-option just isn't set at all. ๐
Added in version 261.
ExtraOption=โ adds an extra sub-option to the Relay Agent Information option, which gets appended to the DHCP messages forwarded to the upstream DHCP server. Takes a sub-option code, a data type, and data, separated by colons ("code:type:value"). The code is an integer in1...254. For what types and data are acceptable, go checkCircuitId=above. You can specify this multiple times, and if you hand it an empty string, all your previous assignments get cleared. Only used whenDHCPRelay=downstream, ignored otherwise. Defaults to unset โ no extra sub-option gets appended. ๐
Added in version 261.
InterfacePriority=โ sets the priority of the upstream interface, as an integer. When the host has multiple upstream interfaces, the one with the highest (largest) priority is the one used to forward DHCP messages to the upstream DHCP server. And if multiple interfaces are tied at the same priority? Which one gets used is unspecified โ so don't come crying, it's just how it is ๐ญ. Only used whenDHCPRelay=upstream, ignored otherwise. Defaults to zero.
Added in version 261.
โจ [DHCPSERVER] SECTION OPTIONS โจ
The [DHCPServer] section holds the settings for the DHCP server โ but only if you enabled it via the DHCPServer= option described above. No enabling, no server, no settings doing anything. ๐
ServerAddress=โ sets the server address for the DHCP server. Takes an IPv4 address with the prefix length separated by a slash, e.g."192.168.0.1/24". Defaults to unset, and one of the static IPv4 addresses configured in the[Network]or[Address]section gets automatically selected. This setting is your girl when the interface running the DHCP server has multiple static IPv4 addresses. ๐ธ
This implies Address= in the [Network] or [Address] section with the same address and prefix length. That is,
[Network]
DHCPServer=yes
Address=192.168.0.1/24
Address=192.168.0.2/24
[DHCPServer]
ServerAddress=192.168.0.1/24
or
[Network]
DHCPServer=yes
[Address]
Address=192.168.0.1/24
[Address]
Address=192.168.0.2/24
[DHCPServer]
ServerAddress=192.168.0.1/24
are equivalent to the following:
[Network]
DHCPServer=yes
Address=192.168.0.2/24
[DHCPServer]
ServerAddress=192.168.0.1/24
Since version 255, just like the Address= setting in [Network] or [Address], this also supports a null address, e.g. "0.0.0.0/24" โ and an unused address gets automatically selected. For the deets on that automatic address selection, see the Address= setting in [Network] section up above. ๐
Added in version 249.
PoolOffset=,PoolSize=โ configures the pool of addresses to hand out. The pool is a contiguous sequence of IP addresses in the subnet configured for the server address, and it does not include the subnet nor the broadcast address.PoolOffset=takes the offset of the pool from the start of the subnet, or zero to use the default value.PoolSize=takes the number of IP addresses in the pool, or zero to use the default value. By default, the pool starts at the first address after the subnet address and takes up the rest of the subnet, excluding the broadcast address. And if the pool includes the server address (which it does by default), that one is reserved and never handed out to clients. ๐
Added in version 226.
DefaultLeaseTimeSec=,MaxLeaseTimeSec=โ these control the default and maximum DHCP lease time passed to clients. They take time values in seconds or another common time unit, depending on the suffix. The default lease time is what clients get when they didn't ask for a specific lease time. If a client asks for a lease time longer than the maximum, it gets automatically shortened down to the specified time. The default lease time defaults to1h, and the maximum lease time to12h. Shorter lease times are a whole vibe if your DHCP config data changes a lot and you want clients to pick up the new settings faster. Longer lease times cut down on the DHCP network traffic that gets generated. Pick your fighter. โจ
Added in version 226.
UplinkInterface=โ takes the name or the index of the uplink interface, or one of the special values":none"and":auto". When emitting DNS, NTP, or SIP servers is enabled but no servers are specified, the servers configured in the uplink interface get emitted. With":auto", the link that has a default gateway with the highest priority gets automatically selected. With":none", no uplink interface is selected at all. Defaults to":auto". ๐ฆ
Added in version 249.
EmitDNS=,DNS=โEmitDNS=takes a boolean and configures whether the DHCP leases handed out to clients should contain DNS server information. Defaults to"yes". The DNS servers to pass to clients can be set with theDNS=option, which takes a list of IPv4 addresses, or the special value"_server_address"which gets converted to the address used by the DHCP server. ๐
If EmitDNS= is enabled but no servers are configured, the servers are automatically propagated from an "uplink" interface that has appropriate servers set. That "uplink" interface is determined by the default route of the system with the highest priority. Heads up though: this info is grabbed at the moment the lease is handed out, so it does not take uplink interfaces into account that only acquire DNS server info later. And if no suitable uplink interface is found, the DNS server data from /etc/resolv.conf gets used. Also note the leases are not refreshed if the uplink network config changes โ so to make sure clients regularly get the most current uplink DNS server info, it's advisable to shorten the DHCP lease time via MaxLeaseTimeSec= described above. ๐ซถ
This setting can be specified multiple times. And if you give it an empty string, then all DNS servers specified earlier get cleared.
Added in version 226.
EmitNTP=,NTP=,EmitSIP=,SIP=,EmitPOP3=,POP3=,EmitSMTP=,SMTP=,EmitLPR=,LPR=โ similar to theEmitDNS=andDNS=settings above, these configure whether and what server information for the indicated protocol gets emitted as part of the DHCP lease. Same syntax, same propagation semantics, same defaults asEmitDNS=andDNS=. No new lore, just more protocols getting the glow-up. โจ
Added in version 226.
EmitRouter=,Router=โEmitRouter=takes a boolean and configures whether the DHCP lease should contain the router option.Router=takes an IPv4 address and configures the router address to be emitted. WhenRouter=isn't specified, the server address gets used for the router option. WhenEmitRouter=is disabled,Router=gets ignored entirely.EmitRouter=defaults to true, andRouter=defaults to unset. ๐
Added in version 230.
EmitTimezone=,Timezone=โ takes a boolean and configures whether the DHCP leases handed out to clients should contain timezone information. Defaults to"yes".Timezone=takes a timezone string (like"Europe/Berlin"or"UTC") to pass to clients. If no explicit timezone is set, the system timezone of the local host gets propagated, as determined by the/etc/localtimesymlink. ๐
Added in version 226.
EmitDomain=โ takes a boolean, bestie. It decides whether the DHCP leases we hand out to clients carry domain name info with them (that's DHCP option 15). Defaults to"no".
Added in version 259.
Domain=โ takes a domain name (think"example.com") to pass along to DHCP clients. This is literally the DNS default domain for DHCP clients โ set it and clients will use it as their DNS search domain.
Okay so here's the cute part: if EmitDomain=yes is set but Domain= is not configured, the domain name gets auto-derived from the system's fully qualified hostname. So if the system hostname is "host.example.com", then "example.com" gets sent to clients. But if the hostname has no domain part at all (like, hostname is just "host"), then no domain name goes out to DHCP clients. When it's empty or unset, it defaults to no domain name.
Added in version 259.
BootServerAddress=โ takes an IPv4 address of the boot server, the kind PXE boot systems use. When you set it, this address gets sent in thesiaddrfield of the DHCP message header. See RFC 2131[41] for the deets. Defaults to unset.
Added in version 251.
BootServerName=โ takes a name of the boot server, again for PXE-boot-type situations. When specified, this name goes out in DHCP option 66 ("TFTP server name"). See RFC 2132[42] for more. Defaults to unset.
Just so you know: usually setting one of BootServerName= or BootServerAddress= is plenty, but you can totally set both if you want. No judgment. ๐
Added in version 251.
BootFilename=โ takes a path or URL to a file that something like a PXE boot loader loads. When set, that path is sent in DHCP option 67 ("Bootfile name"). See RFC 2132[42] for more. Defaults to unset.
Added in version 251.
IPv6OnlyPreferredSec=โ takes a timespan. This controls the RFC 8925[35] IPv6-Only Preferred option. Basically it's the DHCPv4 option that says "hey, this host supports an IPv6-only mode and is willing to forgo getting an IPv4 address if the network gives it IPv6 connectivity." Defaults to unset, and the option is not sent. The minimum allowed value is 300 seconds.
Added in version 255.
SendOption=โ sends a raw option with a value via the DHCPv4 server. Takes a DHCP option number, a data type, and data, formatted likeoption:type:value. The option number is an integer in the range 1...254. The type is one of"uint8","uint16","uint32","ipv4address","ipv6address", or"string". Special characters in the data string can be escaped using C-style escapes[30]. You can set this multiple times, no cap. And if you specify an empty string, then all the options you specified earlier get cleared. Defaults to unset.
Added in version 244.
SendVendorOption=โ sends a vendor option with a value via the DHCPv4 server. Same deal: takes a DHCP option number, a data type, and data asoption:type:value. The option number is an integer in the range 1...254. The type is one of"uint8","uint16","uint32","ipv4address", or"string". (Note: no"ipv6address"here, bestie โ different list!) Special characters in the data string can be escaped using C-style escapes[30]. This setting can be specified multiple times. If an empty string is specified, all options specified earlier are cleared. Defaults to unset.
Added in version 246.
RapidCommit=โ takes a boolean. When true, the server supports RFC 4039[43]. So when a client sends aDHCPDISCOVERmessage with the Rapid Commit option to the server, the server replies with aDHCPACKmessage instead of aDHCPOFFER. Defaults totrue.
Added in version 255.
PersistLeases=โ takes a boolean or the special value"runtime". Okay, listen up, this one has โจconsequencesโจ:- When
"yes", the DHCP server will load and save leases in the persistent storage. - When
"runtime", the DHCP server will load and save leases in the runtime storage โ so bound leases get lost when the runtime storage is cleared, e.g. by callingsystemctl clean systemd-networkd.service, or when the system reboots. - When
"no", the DHCP server neither loads nor saves leases in the persistent storage โ so bound leases get lost when the interface is reconfigured, e.g. bynetworkctl reconfigure, or whensystemd-networkd.service(8)is restarted.
- When
๐จ Using"runtime"and"no"may cause address conflict on the network after the leases are lost. So please take extra care when you disable this setting, fr fr.
When unspecified, the value specified in the same setting in networkd.conf(5) โ which defaults to "yes" โ will be used.
Added in version 256.
LocalLeaseDomain=โ takes a DNS domain name as argument. If specified,systemd-networkd.service(8)will integrate withsystemd-resolved.service(8)and make sure that the hostnames associated with each handed-out DHCP lease can be resolved to the IP addresses of that lease. Those hostnames get suffixed with the domain name you specify here. ๐
Heads up: this is purely about hostname resolution on the local system, i.e. from programs with access to the same systemd-resolved instances via D-Bus IPC, Varlink IPC, or the local DNS stub.
Added in version 259.
๐ [DHCPSERVERSTATICLEASE] SECTION OPTIONS ๐
The [DHCPServerStaticLease] section configures a static DHCP lease โ so we assign a fixed IPv4 address to a specific device based on its MAC address. Obsessed. And yes, you can specify this section multiple times. ๐
MACAddress=โ the hardware address of a device to match. This key is mandatory. No MAC, no vibes.
Added in version 249.
Address=โ the IPv4 address that should be assigned to the device matched withMACAddress=. This key is mandatory too.
Added in version 249.
Hostname=โ the hostname to send to the client in DHCP replies. This can be either a simple hostname (e.g."mydevice") or a fully qualified domain name (e.g."mydevice.example.com"), following RFC 1123 naming conventions. Each label can be up to 63 characters, with a total maximum length of 253 characters for FQDNs. When this option is set, the DHCP server will include the hostname in DHCP replies (bothOFFERandACK) to the client with the matched MAC address.
The server automatically picks the right DHCP option based on the hostname's format: simple hostnames (a single DNS label) go out via option 12 (Host Name) per RFC 2132, while FQDNs with multiple labels go out via option 81 (Client FQDN) per RFC 4702 using DNS wire format encoding. And the configured hostname is sent unconditionally โ any hostname the client requests in its DHCP message is just ignored. Sorry bestie, we're not taking requests. ๐
Added in version 259.
okay bestie ๐ we're in the Router Advertisement girlie zone now, and it's a lot in the best way. buckle up ๐
โจ [IPV6SENDRA] SECTION OPTIONS โจ
so like, the [IPv6SendRA] section is where you set up sending IPv6 Router Advertisements and decide whether this machine is gonna act as a router โ but only if you turned it on with the IPv6SendRA= option we talked about earlier, bestie. ๐
Your IPv6 network prefixes or routes? Those get defined with one or more [IPv6Prefix] or [IPv6RoutePrefix] sections. iykyk ๐ธ
Managed=,OtherInformation=โ takes a boolean, as always ๐. These control whether a DHCPv6 server is used to grab IPv6 addresses on the network link whenManaged=is set to"true", OR whether only extra network info can be obtained via DHCPv6 for the network link whenOtherInformation=is set to"true". Both of these default to"false", which fr fr means no DHCPv6 server is being used at all. ๐ซถ
Added in version 235.
RouterLifetimeSec=โ takes a timespan โณ. This configures the IPv6 router lifetime in seconds. The value must be either0seconds, or somewhere between4seconds and9000seconds โ no in-between nonsense, bestie, the kernel said so ๐ญ. When it's set to0, the host is not acting as a router, periodt. Defaults to1800seconds (which is 30 minutes, iconic).
Added in version 235.
ReachableTimeSec=โ this one configures the time used in the Neighbor Unreachability Detection algorithm, i.e. how long clients can assume a neighbor is reachable after they got a reachability confirmation โจ. Takes a time span in the range0...4294967295ms. When it's0, clients will handle it as if the value wasn't specified at all ๐. Defaults to0.
Added in version 256.
RetransmitSec=โ configures the time used in the Neighbor Unreachability Detection algorithm that clients can use as retransmit time on address resolution and the Neighbor Unreachability Detection algorithm ๐ซ. Takes a time span in the range0...4294967295ms. When0, clients will handle it as if the value wasn't specified. Defaults to0.
Added in version 255.
RouterPreference=โ configures the IPv6 router preference, but only ifRouterLifetimeSec=is non-zero, okay?? ๐ Valid values are"high","medium"and"low", with"normal"and"default"added as synonyms for"medium"just to make config life easier for us ๐ฅฐ. See RFC 4191[24] for the deets. Defaults to"medium".
Added in version 235.
HopLimit=โ configures hop limit ๐ฆ. Takes an integer in the range0...255. Also check outIPv6HopLimit=if you're curious.
Added in version 255.
UplinkInterface=โ specifies the name or the index of the uplink interface, or one of the special values":none"and":auto"๐. When emitting DNS servers or search domains is enabled but no servers are specified, the servers configured in the uplink interface will be emitted. When it's":auto", the value specified to the same setting in the[DHCPPrefixDelegation]section will be used ifDHCPPrefixDelegation=is enabled โ otherwise the link that has a default gateway with the highest priority gets automatically selected ๐. When it's":none", no uplink interface gets selected at all, we're on our own bestie ๐. Defaults to":auto".
Added in version 250.
EmitDNS=,DNS=โDNS=specifies a list of recursive DNS server IPv6 addresses that get distributed via Router Advertisement messages whenEmitDNS=is true โจ.DNS=also takes the special value"_link_local"โ and in that case the IPv6 link-local address is what gets distributed ๐. IfDNS=is empty, DNS servers get read from the[Network]section. And if the[Network]section doesn't have any DNS servers either? Then DNS servers from the uplink interface specified inUplinkInterface=will be used, we love a fallback chain ๐ . WhenEmitDNS=is false, no DNS server info is sent in Router Advertisement messages.EmitDNS=defaults totrue.
Added in version 235.
EmitDomains=,Domains=โ a list of DNS search domains distributed via Router Advertisement messages whenEmitDomains=is true ๐ธ. IfDomains=is empty, DNS search domains get read from the[Network]section. If the[Network]section doesn't have any DNS search domains either, DNS search domains from the uplink interface specified inUplinkInterface=will be used ๐ซถ. WhenEmitDomains=is false, no DNS search domain info is sent in Router Advertisement messages.EmitDomains=defaults totrue.
Added in version 235.
DNSLifetimeSec=โ lifetime in seconds for the DNS server addresses listed inDNS=and the search domains listed inDomains=โณ. Defaults to3600seconds (one hour, the classic).
Added in version 235.
HomeAgent=โ takes a boolean. Specifies that IPv6 router advertisements indicate to hosts that the router acts as a Home Agent and includes a Home Agent option ๐ . Defaults tofalse. See RFC 6275[13] for further details, bestie.
Added in version 255.
HomeAgentLifetimeSec=โ takes a timespan โณ. Specifies the lifetime of the Home Agent. It's an integer, and the default unit is seconds, in the range1...65535. Defaults to whatever you setRouterLifetimeSec=to ๐.
Added in version 255.
HomeAgentPreference=โ configures the IPv6 Home Agent preference ๐ซ. Takes an integer in the range0...65535. Defaults to0.
Added in version 255.
โจ [IPV6PREFIX] SECTION OPTIONS โจ
so one or more [IPv6Prefix] sections contain the IPv6 prefixes that get announced via Router Advertisements ๐ข. See RFC 4861[44] for further details, if you wanna go deep.
AddressAutoconfiguration=,OnLink=โ takes a boolean to specify whether IPv6 addresses can be autoconfigured with this prefix, and whether the prefix can be used for onlink determination ๐ฆ. Both settings default to"true"โ just to make configuration easier for us, they're so thoughtful ๐ฅฐ.
Added in version 235.
Prefix=โ the IPv6 prefix that's to be distributed to hosts โจ. Just like configuring static IPv6 addresses, you set this as an IPv6 prefix and its prefix length, separated by a/character ๐ . Use multiple[IPv6Prefix]sections to configure multiple IPv6 prefixes, because prefix lifetimes, address autoconfiguration and onlink status can all differ from one prefix to another โ they're individuals, let them be ๐.
Added in version 235.
PreferredLifetimeSec=,ValidLifetimeSec=โ preferred and valid lifetimes for the prefix, measured in seconds โณ.PreferredLifetimeSec=defaults to1800seconds (30 minutes) andValidLifetimeSec=defaults to3600seconds (one hour).
Added in version 235.
Assign=โ takes a boolean. When true, adds an address from the prefix ๐. Defaults tofalse.
Added in version 246.
Token=โ specifies an optional address generation mode for assigning an address in each prefix โจ. This accepts the same syntax asToken=in the[IPv6AcceptRA]section. IfAssign=is set to false, then this setting gets ignored entirely ๐. Defaults to unset, which means the EUI-64 algorithm will be used.
Added in version 250.
RouteMetric=โ the metric of the prefix route ๐. Takes an unsigned integer in the range0...4294967295. When unset or set to0, the kernel's default value is used. Heads up: this setting is ignored whenAssign=is false ๐.
Added in version 249.
โจ [IPV6ROUTEPREFIX] SECTION OPTIONS โจ
one or more [IPv6RoutePrefix] sections contain the IPv6 prefix routes that get announced via Router Advertisements ๐ข. See RFC 4191[24] for further details.
Route=โ the IPv6 route that's to be distributed to hosts ๐ฆ. Just like configuring static IPv6 routes, this is configured as an IPv6 prefix route and its prefix route length, separated by a/character. Use multiple[IPv6RoutePrefix]sections to configure multiple IPv6 prefix routes, bestie ๐ .
Added in version 244.
LifetimeSec=โ lifetime for the route prefix, measured in seconds โณ.LifetimeSec=defaults to3600seconds (one hour).
Added in version 244.
Preference=โ specifies the preference of the route option ๐ธ. Takes one of"high","medium", or"low". Defaults to"medium".
Added in version 258.
โจ [IPV6PREF64PREFIX] SECTION OPTIONS โจ
one or more [IPv6PREF64Prefix] sections contain the IPv6 PREF64 (or NAT64) prefixes that get announced via Router Advertisements ๐ข. See RFC 8781[40] for further details.
Prefix=โ the IPv6 PREF64 (or NAT64) prefix that's to be distributed to hosts โจ. This setting holds an IPv6 prefix that should be set up for NAT64 translation (PLAT) to allow 464XLAT on the network segment ๐. Use multiple[IPv6PREF64Prefix]sections to configure multiple IPv6 prefixes, because prefix lifetime can differ from one prefix to another โ again, they're individuals ๐. The prefix is an address with a prefix length, separated by a slash/character. Valid NAT64 prefix lengths are96,64,56,48,40, and32bits ๐ .
Added in version 255.
LifetimeSec=โ lifetime for the prefix, measured in seconds โณ. Should be greater than or equal toRouterLifetimeSec=โ don't be out here breaking that rule bestie ๐ญ.LifetimeSec=defaults to1800seconds.
Added in version 255.
and that's the prefix girlies handled ๐ there's still more coming so don't you dare close the tab ๐
๐ [BRIDGE] SECTION OPTIONS ๐
okay so the [Bridge] section is literally the port-settings glow-up station, and bestie it takes these keys ๐
UnicastFlood=โ takes a boolean. This is the "should I just yell it at everyone" switch: it controls whether the bridge floods traffic for which an FDB entry is missing AND the destination is unknown through this port. When unset, the kernel's default gets to make the call. Added in version 223.MulticastFlood=โ takes a boolean. Same energy as above but for multicast: controls whether the bridge floods traffic for which an MDB entry is missing and the destination is unknown through this port. When unset, kernel default, as always. Added in version 242.MulticastToUnicast=โ takes a boolean. This one sits on top of the bridge's multicast snooping feature, which means the unicast copies only get delivered to hosts that are actually interested ๐. When unset, the kernel's default will be used. Added in version 240.NeighborSuppression=โ takes a boolean. Sets whether ARP and ND neighbor suppression is enabled for this port. When unset, the kernel's default will be used. Added in version 242.Learning=โ takes a boolean. Sets whether MAC address learning is enabled for this port. When unset, the kernel's default will be used. Added in version 242.HairPin=โ takes a boolean. Sets whether traffic may be sent back out of the port on which it was received (yes it's giving "go back where you came from" ๐ ). When this flag is false, the bridge will not forward traffic back out of the receiving port. When unset, the kernel's default will be used. Added in version 223.Isolated=โ takes a boolean. Sets whether this port is isolated or not. Within a bridge, isolated ports can only communicate with non-isolated ports. When set totrue, this port can only talk to other ports whoseIsolatedsetting is false. When set tofalse, this port can communicate with any other ports. When unset, the kernel's default will be used. Added in version 251.UseBPDU=โ takes a boolean. Sets whether STP Bridge Protocol Data Units get processed by the bridge port. When unset, the kernel's default will be used. Added in version 223.FastLeave=โ takes a boolean. This flag lets the bridge immediately stop multicast traffic on a port that receives an IGMP Leave message, no hesitation, no waiting ๐ซถ. It's only used with IGMP snooping if that's enabled on the bridge. When unset, the kernel's default will be used. Added in version 223.AllowPortToBeRoot=โ takes a boolean. Sets whether a given port is allowed to become a root port, main character energy only. Only used when STP is enabled on the bridge. When unset, the kernel's default will be used. Added in version 223.ProxyARP=โ takes a boolean. Sets whether proxy ARP is enabled on this port. When unset, the kernel's default will be used. Added in version 243.ProxyARPWiFi=โ takes a boolean. Sets whether proxy ARP is enabled on this port while also meeting the extended requirements from the IEEE 802.11 and Hotspot 2.0 specs. When unset, the kernel's default will be used. Added in version 243.MulticastRouter=โ configures this port for having multicast routers attached, and a port with a multicast router receives all multicast traffic. It takes one of:"no"โ disable multicast routers on this port"query"โ let the system detect the presence of routers"permanent"โ permanently enable multicast traffic forwarding on this port"temporary"โ enable multicast routers temporarily on this port, not depending on incoming queries
When unset, the kernel's default will be used. Added in version 243.
Cost=โ sets the "cost" of sending packets of this interface. Every port in a bridge may have a different speed, and the cost decides which link gets used. Faster interfaces should have lower costs. It's an integer value between1and65535. Added in version 218.Priority=โ sets the "priority" of sending packets on this interface. Every port in a bridge may have a different priority, which decides which link gets used. Lower value means higher priority. It's an integer value between0to63.systemd-networkddoes not set any default, meaning the kernel default value of32is used. Added in version 234.Locked=,MACAuthenticationBypass=โ takes a boolean. Sets whether the port is "locked" and does not allow traffic forwarded until it's fully authenticated, e.g. via 802.1x. When unset, the kernel's default will be used. Added in version 258.
takes a boolean. Sets whether a locked port has "MAC Authentication Bypass" enabled and creates newly learned fdb entries in a "locked" state. User space can authenticate these entries by clearing the locked flag. Requires Learning to be enabled. When unset, the kernel's default will be used. Added in version 258.
VLANTunnel=โ takes a boolean. Sets whether vlan tunnel mode is to be enabled on this port. When unset, the kernel's default will be used. Added in version 258.
๐ธ [BRIDGEFDB] SECTION OPTIONS ๐ธ
The [BridgeFDB] section manages the forwarding database table of a port, and it accepts these keys. Spill several [BridgeFDB] sections if you want several static MAC table entries, it's giving collector behavior ๐
MACAddress=โ same as in the[Network]section. This key is mandatory, no skipping it bestie. Added in version 219.Destination=โ takes an IP address of the destination VXLAN tunnel endpoint. Added in version 243.VLANId=โ the VLAN ID for the new static MAC table entry. If omitted, no VLAN ID information is appended to the new static MAC table entry. Added in version 219.VNI=โ the VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to the remote VXLAN tunnel endpoint. Takes a number in the range1...16777215. Defaults to unset. Added in version 243.AssociatedWith=โ specifies where the address is associated with. Takes one of"use","self","master"or"router":"use"โ the address is in use. User space can use this option to indicate to the kernel that the fdb entry is in use."self"โ the address is associated with the port drivers fdb. Usually hardware."master"โ the address is associated with master devices fdb."router"โ the destination address is associated with a router. Note that it is valid if the referenced device is a VXLAN type device and has route shortcircuit enabled.
Defaults to "self". Added in version 243.
OutgoingInterface=โ specifies the name or index of the outgoing interface for the VXLAN device driver to reach the remote VXLAN tunnel endpoint. Defaults to unset. Added in version 249.
๐ฆ [BRIDGEMDB] SECTION OPTIONS ๐ฆ
The [BridgeMDB] section manages the multicast membership entries forwarding database table of a port, and it accepts these keys. Specify several [BridgeMDB] sections to configure several permanent multicast membership entries, go off โจ
MulticastGroupAddress=โ specifies the IPv4, IPv6, or L2 MAC multicast group address to add. This setting is mandatory. Added in version 247.VLANId=โ the VLAN ID for the new entry. Valid ranges are0(no VLAN) to4094. Optional, defaults to0. Added in version 247.
๐ [LLDP] SECTION OPTIONS ๐
The [LLDP] section manages the Link Layer Discovery Protocol (LLDP) and it accepts these keys:
MUDURL=โ when configured, the specified Manufacturer Usage Descriptions (MUD) URL will be sent in LLDP packets. The syntax and semantics are the same as forMUDURL=in the[DHCPv4]section described above ๐
The MUD URLs received via LLDP packets are saved and can be read using the sd_lldp_neighbor_get_mud_url() function.
Added in version 246.
๐ CAN SECTION OPTIONS ๐
The [CAN] section is your girl for managing the Controller Area Network (aka the CAN bus), and she takes all of these keys:
BitRate=โ the bitrate of the CAN device, in bits per second. You can use the usual SI prefixes (K, M) with a base of 1000 here, bestie. Takes a number in the range1...4294967295.
Added in version 239.
SamplePoint=โ optional sample point, in percent with one decimal (like"75%","87.5%") or permille (like"875โฐ"). Lowkey gets ignored whenBitRate=isn't specified, so don't come crying to me if it does nothing.
Added in version 239.
TimeQuantaNSec=,PropagationSegment=,PhaseBufferSegment1=,PhaseBufferSegment2=,SyncJumpWidth=โ these set the time quanta, propagation segment, phase buffer segment 1 and 2, and the synchronization jump width. They let you define the CAN bit-timing in a hardware independent format, exactly as proposed by the Bosch CAN 2.0 Specification.TimeQuantaNSec=takes a timespan in nanoseconds.PropagationSegment=,PhaseBufferSegment1=,PhaseBufferSegment2=, andSyncJumpWidth=take a number of time quantum as specified inTimeQuantaNSec=, and must be an unsigned integer in the range0...4294967295. Heads up: all of these exceptSyncJumpWidth=get ignored whenBitRate=is specified. ๐ซถ
Added in version 250.
DataBitRate=,DataSamplePoint=โ the bitrate and sample point for the data phase, if CAN-FD is in the picture. These are analogous to theBitRate=andSamplePoint=keys, bestie.
Added in version 246.
DataTimeQuantaNSec=,DataPropagationSegment=,DataPhaseBufferSegment1=,DataPhaseBufferSegment2=,DataSyncJumpWidth=โ the time quanta, propagation segment, phase buffer segment 1 and 2, and synchronization jump width for the data phase, if CAN-FD is used. These are analogous toTimeQuantaNSec=or its related settings.
Added in version 250.
FDMode=โ takes a boolean. When"yes", CAN-FD mode is enabled for the interface. Ngl, you should also set a bitrate and optional sample point for the CAN-FD data phase using theDataBitRate=andDataSamplePoint=keys, orDataTimeQuanta=and related settings. โจ
Added in version 246.
FDNonISO=โ takes a boolean. When"yes", non-ISO CAN-FD mode is enabled for the interface. When unset, the kernel's default will be used.
Added in version 246.
RestartSec=โ the automatic restart delay time. If you set it to a non-zero value, a restart of the CAN controller gets triggered automatically in case of a bus-off condition, after the specified delay time. Subsecond delays can be specified using decimals (like"0.1s") or a"ms"or"us"postfix. Using"infinity"or"0"will turn the automatic restart off. By default, automatic restart is disabled. ๐
Added in version 239.
Termination=โ takes a boolean or a termination resistor value in ohm, in the range0...65535. When"yes", the termination resistor is set to 120 ohm. When"no"or"0"is set, the termination resistor is disabled. When unset, the kernel's default will be used.
Added in version 246.
TripleSampling=โ takes a boolean. When"yes", three samples (instead of one) are used to determine the value of a received bit, by majority rule. When unset, the kernel's default will be used.
Added in version 242.
BusErrorReporting=โ takes a boolean. When"yes", reporting of CAN bus errors is activated. And bestie, those include single bit, frame format, and bit stuffing errors, unable to send dominant bit, unable to send recessive bit, bus overload, active error announcement, and error occurred on transmission. When unset, the kernel's default will be used. Note: in case of a CAN bus with a single CAN device, sending a CAN frame may result in a huge number of CAN bus errors. ๐ญ
Added in version 248.
ListenOnly=โ takes a boolean. When"yes", listen-only mode is enabled. When the interface is in listen-only mode, it neither transmits CAN frames nor sends the ACK bit. Listen-only mode is important to debug CAN networks without interfering with the communication or acknowledging the CAN frame. When unset, the kernel's default will be used.
Added in version 246.
Loopback=โ takes a boolean. When"yes", loopback mode is enabled. When loopback mode is enabled, the interface treats messages transmitted by itself as received messages. Loopback mode is important to debug CAN networks. When unset, the kernel's default will be used.
Added in version 250.
OneShot=โ takes a boolean. When"yes", one-shot mode is enabled. When unset, the kernel's default will be used.
Added in version 250.
PresumeACK=โ takes a boolean. When"yes", the interface will ignore missing CAN ACKs. When unset, the kernel's default will be used.
Added in version 250.
ClassicDataLengthCode=โ takes a boolean. When"yes", the interface will handle the 4bit data length code (DLC). When unset, the kernel's default will be used.
Added in version 250.
๐ IPOIB SECTION OPTIONS ๐
The [IPoIB] section manages IP over Infiniband and accepts the following keys:
Mode=โ takes one of the special values"datagram"or"connected". Defaults to unset, and the kernel's default is used.
When "datagram", the Infiniband unreliable datagram (UD) transport is used, and so the interface MTU is equal to the IB L2 MTU minus the IPoIB encapsulation header (4 bytes). For example, in a typical IB fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes. Math girlies rise up. ๐
When "connected", the Infiniband reliable connected (RC) transport is used. Connected mode takes advantage of the connected nature of the IB transport and allows an MTU up to the maximal IP packet size of 64K, which reduces the number of IP packets needed for handling large UDP datagrams, TCP segments, etc, and increases the performance for large messages. It's giving efficiency. ๐
Added in version 250.
IgnoreUserspaceMulticastGroups=โ takes a boolean value. When true, the kernel ignores multicast groups handled by userspace. Defaults to unset, and the kernel's default is used.
Added in version 250.
๐ QDISC SECTION OPTIONS ๐
The [QDisc] section manages the traffic control queueing discipline (qdisc).
Parent=โ specifies the parent Queueing Discipline (qdisc). Takes one of"clsact"or"ingress". This is mandatory, so like, you literally cannot skip it. ๐ซถ
Added in version 244.
Handle=โ configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.
๐ฆ NETWORKEMULATOR SECTION OPTIONS ๐ฆ
The [NetworkEmulator] section manages the queueing discipline (qdisc) of the network emulator. You can use it to configure the kernel packet scheduler and simulate packet delay and loss for UDP or TCP applications, or limit the bandwidth usage of a particular service to simulate internet connections. So iconic honestly.
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root".Handle=โ configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.DelaySec=โ specifies the fixed amount of delay to be added to all packets going out of the interface. Defaults to unset.
Added in version 245.
DelayJitterSec=โ specifies the chosen delay to be added to the packets outgoing to the network interface. Defaults to unset.
Added in version 245.
PacketLimit=โ specifies the maximum number of packets the qdisc may hold queued at a time. An unsigned integer in the range0...4294967294. Defaults to1000.
Added in version 245.
LossRate=โ specifies an independent loss probability to be added to the packets outgoing from the network interface. Takes a percentage value, suffixed with"%". Defaults to unset.
Added in version 245.
DuplicateRate=โ specifies that the chosen percent of packets is duplicated before queuing them. Takes a percentage value, suffixed with"%". Defaults to unset.
Added in version 245.
โจ [TOKENBUCKETFILTER] SECTION OPTIONS โจ
The [TokenBucketFilter] section runs the show for the queueing discipline (qdisc) of token bucket filter, aka tbf. ๐ชฃโจ Think of it like a lil bucket of tokens, and packets gotta grab a token before they get to go anywhere. Very bouncer-at-the-club energy. ๐
Parent=โ sets up the parent Queueing Discipline (qdisc). Bestie, you pick one of"root","clsact","ingress"or a class identifier. That class identifier? It's the major and minor numbers in hexadecimal, range0x1โ0xffff, glued together with a colon like"major:minor". Defaults to"root". ๐Handle=โ sets the major number of the unique identifier of the qdisc, which we call the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐LatencySec=โ the latency parameter, which is literally the maximum amount of time a packet can just vibe inside the Token Bucket Filter (TBF) before it's gotta move. Defaults to unset. Added in version 245. โญLimitBytes=โ the number of bytes that can be queued up waiting for tokens to become available. When the size gets suffixed withK,M, orG, it's parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset. Added in version 246. ๐ธBurstBytes=โ the size of the bucket ๐ชฃ. This is the max amount of bytes that tokens can be available for, like, instantaneous transfer. Suffix it withK,M, orGand it's parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset. Added in version 246. โจRate=โ the device specific bandwidth. When suffixed withK,M, orG, the specified bandwidth is parsed as Kilobits, Megabits, or Gigabits respectively, to the base of 1000 (yes bestie, 1000 not 1024, do not come for me). Defaults to unset. Added in version 245. ๐ฅMPUBytes=โ the Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes) for a packet. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to zero. ๐ซถ Added in version 245. ๐PeakRate=โ the maximum depletion rate of the bucket. When suffixed withK,M, orG, the specified size is parsed as Kilobits, Megabits, or Gigabits respectively, to the base of 1000. Defaults to unset. Added in version 245. โญMTUBytes=โ the size of the peakrate bucket. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset. Added in version 245. ๐
โจ [PIE] SECTION OPTIONS โจ
The [PIE] section handles the queueing discipline (qdisc) of Proportional Integral controller-Enhanced, aka PIE. ๐ฅง (not the dessert, unfortunately โ but the vibe is immaculate). It's a smart lil controller that keeps latency in check, and honestly? Iconic. ๐
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐PacketLimit=โ the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are dropped. ๐ญ An unsigned integer in the range1...4294967294. Defaults to unset and kernel's default is used. Added in version 246. โจ
โจ [FLOWQUEUEPIE] SECTION OPTIONS โจ
The "[FlowQueuePIE]" section manages the queueing discipline (qdisc) of Flow Queue Proportional Integral controller-Enhanced, aka fq_pie. It's PIE but with flow queueing, so it's giving main character energy with extra steps. ๐ง
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐ธPacketLimit=โ the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are dropped. ๐ An unsigned integer ranges1to4294967294. Defaults to unset and kernel's default is used. Added in version 247. ๐ฅ
โจ [STOCHASTICFAIRBLUE] SECTION OPTIONS โจ
The [StochasticFairBlue] section manages the queueing discipline (qdisc) of stochastic fair blue, aka sfb. Yes bestie, "stochastic fair blue" is the real name, I did not make that up. ๐ฆ
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐PacketLimit=โ the hard limit on the queue size in number of packets. Hit the limit and incoming packets are dropped. ๐ An unsigned integer in the range0...4294967294. Defaults to unset and kernel's default is used. Added in version 246. โญ
โจ [STOCHASTICFAIRNESSQUEUEING] SECTION OPTIONS โจ
The [StochasticFairnessQueueing] section manages the queueing discipline (qdisc) of stochastic fairness queueing, aka sfq. Another absolute mouthful of a name and we respect it for that. ๐
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. โจPerturbPeriodSec=โ the interval in seconds for queue algorithm perturbation. Defaults to unset. Added in version 245. ๐ธ
โจ [BFIFO] SECTION OPTIONS โจ
The [BFIFO] section manages the queueing discipline (qdisc) of Byte limited Packet First In First Out, aka bfifo. First in, first out, but measured in bytes. Very "wait your turn in line" of it. ๐
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐ฆLimitBytes=โ the hard limit in bytes on the FIFO buffer size. This size limit prevents overflow in case the kernel can't dequeue packets as quickly as it receives them (the kernel is doing its best, okay ๐ญ). When this limit is reached, incoming packets are dropped. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset and kernel default is used. Added in version 246. โจ
โจ [PFIFO] SECTION OPTIONS โจ
The [PFIFO] section manages the queueing discipline (qdisc) of Packet First In First Out, aka pfifo. Same line-energy as bfifo, except this one counts packets, not bytes. ๐ซถ
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐ธPacketLimit=โ the hard limit on the number of packets in the FIFO queue. The size limit prevents overflow in case the kernel is unable to dequeue packets as quickly as it receives them. When this limit is reached, incoming packets are dropped. ๐ An unsigned integer in the range0...4294967294. Defaults to unset and kernel's default is used. Added in version 246. โญ
โจ [PFIFOHEADDROP] SECTION OPTIONS โจ
The [PFIFOHeadDrop] section manages the queueing discipline (qdisc) of Packet First In First Out Head Drop, aka pfifo_head_drop. It drops from the head of the queue instead of the tail, which is a whole different vibe. ๐ฅ
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐PacketLimit=โ as in[PFIFO]section. (Yep, bestie, it's the exact same one โ no need to re-read the whole thing, just scroll up. ๐ ) Added in version 246. โจ
โจ [PFIFOFAST] SECTION OPTIONS โจ
The [PFIFOFast] section manages the queueing discipline (qdisc) of Packet First In First Out Fast, aka pfifo_fast. It's the fast one. The name is the whole pitch. โก
Parent=โ configures the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root". ๐Handle=โ configures the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset. ๐
โจ [CAKE] SECTION OPTIONS โจ
okay bestie so this section is in charge of the queueing discipline (qdisc) for Common Applications Kept Enhanced, aka CAKE ๐ it's giving fancy traffic management and we're obsessed.
Parent=โ sets up the parent Queueing Discipline (qdisc). You can pass"root","clsact","ingress", or a class identifier. That class identifier is written as the major and minor numbers in hexadecimal, in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the qdisc's unique identifier, aka the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.Bandwidth=โ the shaper bandwidth, bestie ๐ if you suffix it withK,M, orG, the size gets parsed as Kilobits, Megabits, or Gigabits respectively, all to the base of 1000. Defaults to unset and the kernel's default is used.
Added in version 246.
AutoRateIngress=โ takes a boolean value. Turns on automatic capacity estimation based on traffic arriving at this qdisc. This is most likely to be useful with cellular links, which tend to change quality randomly (we been knew ๐ฑ). If this setting is enabled, theBandwidth=setting is used as an initial estimate. Defaults to unset, and the kernel's default is used.
Added in version 250.
OverheadBytes=โ says how many bytes get addeded to the size of each packet (yes, "addeded", we're keeping that energy ๐). Bytes may be negative. Takes an integer in the range-64...256. Defaults to unset and kernel's default is used.
Added in version 246.
MPUBytes=โ rounds each packet (including overhead) up to the specified bytes. Takes an integer in the range1...256. Defaults to unset and kernel's default is used.
Added in version 250.
CompensationMode=โ takes one of"none","atm", or"ptm". Specifies the compensation mode for overhead calculation. When"none", no compensation is taken into account. When"atm", it enables the compensation for ATM cell framing, which is normally found on ADSL links. When"ptm", it enables the compensation for PTM encoding, which is normally found on VDSL2 links and uses a 64b/65b encoding scheme. Defaults to unset and the kernel's default is used.
Added in version 250.
UseRawPacketSize=โ takes a boolean value. When true, the packet size reported by the Linux kernel will be used, instead of the underlying IP packet size. Defaults to unset, and the kernel's default is used.
Added in version 250.
FlowIsolationMode=โ CAKE places packets from different flows into different queues, then packets from each queue are delivered fairly. This one specifies whether the fairness is based on source address, destination address, individual flows, or any combination of those. The available values are:noneโ the flow isolation is disabled, and all traffic passes through a single queue.
Added in version 250.
src-hostโ flows are defined only by source address. Equivalent to the"srchost"option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
dst-hostโ flows are defined only by destination address. Equivalent to the"dsthost"option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
hostsโ flows are defined by source-destination host pairs. Equivalent to the same option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
flowsโ flows are defined by the entire 5-tuple of source address, destination address, transport protocol, source port and destination port. Equivalent to the same option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
dual-src-hostโ flows are defined by the 5-tuple (see"flows"in the above), and fairness is applied first over source addresses, then over individual flows. Equivalent to the"dual-srchost"option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
dual-dst-hostโ flows are defined by the 5-tuple (see"flows"in the above), and fairness is applied first over destination addresses, then over individual flows. Equivalent to the"dual-dsthost"option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
tripleโ flows are defined by the 5-tuple (see"flows"), and fairness is applied over source and destination addresses, and also over individual flows. Equivalent to the"triple-isolate"option for tc qdisc command. See alsotc-cake(8).
Added in version 250.
Defaults to unset and the kernel's default is used.
Added in version 250.
NAT=โ takes a boolean value. When true, CAKE performs a NAT lookup before applying flow-isolation rules, to determine the true addresses and port numbers of the packet, to improve fairness between hosts inside the NAT ๐ฆ this has no practical effect whenFlowIsolationMode=is"none"or"flows", or if NAT is performed on a different host. Defaults to unset, and the kernel's default is used.
Added in version 250.
PriorityQueueingPreset=โ CAKE divides traffic into "tins", and each tin has its own independent set of flow-isolation queues, bandwidth threshold, and priority. This one specifies the preset of tin profiles โจ the available values are:besteffortโ disables priority queueing by placing all traffic in one tin.
Added in version 250.
precedenceโ enables priority queueing based on the legacy interpretation of TOS "Precedence" field. Use of this preset on the modern Internet is firmly discouraged ๐ญ like bestie pls don't.
Added in version 250.
diffserv8โ enables priority queueing based on the Differentiated Service ("DiffServ") field with eight tins: Background Traffic, High Throughput, Best Effort, Video Streaming, Low Latency Transactions, Interactive Shell, Minimum Latency, and Network Control.
Added in version 250.
diffserv4โ enables priority queueing based on the Differentiated Service ("DiffServ") field with four tins: Background Traffic, Best Effort, Streaming Media, and Latency Sensitive.
Added in version 250.
diffserv3โ enables priority queueing based on the Differentiated Service ("DiffServ") field with three tins: Background Traffic, Best Effort, and Latency Sensitive.
Added in version 250.
Defaults to unset, and the kernel's default is used.
Added in version 250.
FirewallMark=โ takes an integer in the range1...4294967295. When specified, firewall-mark-based overriding of CAKE's tin selection is enabled. Defaults to unset, and the kernel's default is used.
Added in version 250.
Wash=โ takes a boolean value. When true, CAKE clears the DSCP fields, except for ECN bits, of any packet passing through CAKE ๐งผ squeaky clean. Defaults to unset, and the kernel's default is used.
Added in version 250.
SplitGSO=โ takes a boolean value. When true, CAKE will split General Segmentation Offload (GSO) super-packets into their on-the-wire components and dequeue them individually. Defaults to unset, and the kernel's default is used.
Added in version 250.
RTTSec=โ specifies the RTT for the filter. Takes a timespan โฑ๏ธ typical values are e.g.100usfor extremely high-performance 10GigE+ networks like datacentre,1msfor non-WiFi LAN connections,100msfor typical internet connections. Defaults to unset, and the kernel's default will be used.
Added in version 253.
AckFilter=โ takes a boolean value, or the special value"aggressive". If enabled, ACKs in each flow are queued and redundant ACKs to the upstream are dropped. If yes, the filter will always keep at least two redundant ACKs in the queue, while in"aggressive"mode, it will filter down to a single ACK. This may improve download throughput on links with very asymmetrical rate limits ๐ฅ defaults to unset, and the kernel's default will be used.
Added in version 253.
โจ [CONTROLLEDDELAY] SECTION OPTIONS โจ
this one manages the queueing discipline (qdisc) of controlled delay, aka CoDel ๐
Parent=โ sets up the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.PacketLimit=โ specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are dropped ๐ an unsigned integer in the range0...4294967294. Defaults to unset and kernel's default is used.
Added in version 245.
TargetSec=โ takes a timespan. Specifies the acceptable minimum standing/persistent queue delay. Defaults to unset and kernel's default is used.
Added in version 245.
IntervalSec=โ takes a timespan. This is used to ensure that the measured minimum delay does not become too stale. Defaults to unset and kernel's default is used.
Added in version 245.
ECN=โ takes a boolean. This can be used to mark packets instead of dropping them ๐ธ defaults to unset and kernel's default is used.
Added in version 245.
CEThresholdSec=โ takes a timespan. This sets a threshold above which all packets are marked with ECN Congestion Experienced (CE). Defaults to unset and kernel's default is used.
Added in version 245.
โจ [DEFICITROUNDROBINSCHEDULER] SECTION OPTIONS โจ
Okay bestie, this section is in charge of the queueing discipline (qdisc) of the Deficit Round Robin Scheduler (DRR). It's giving very fair, very taking-turns energy ๐
Parent=โ sets the parent Queueing Discipline (qdisc) ๐. You can pass one of"root","clsact","ingress"or a class identifier. That class identifier is written as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the unique identifier of the qdisc, aka the handle ๐ธ. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.
๐ฆ [DEFICITROUNDROBINSCHEDULERCLASS] SECTION OPTIONS ๐ฆ
This one manages the traffic control class of the Deficit Round Robin Scheduler (DRR). Classy behavior only โจ
Parent=โ sets the parent Queueing Discipline (qdisc). Takes one of"root", or a qdisc identifier ๐. That qdisc identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffff, separated with a colon ("major:minor"). Defaults to"root".ClassId=โ sets the unique identifier of the class, no cap ๐งข. It's specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to unset.QuantumBytes=โ how many bytes a flow gets to dequeue before the scheduler moves on to the next class, literally ๐ซถ. Suffix it withK,M, orGand the size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to the MTU of the interface.
Added in version 246.
๐ [ENHANCEDTRANSMISSIONSELECTION] SECTION OPTIONS ๐
This section runs the queueing discipline (qdisc) of Enhanced Transmission Selection (ETS). Fancy name, fancy job ๐
Parent=โ sets the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier ๐ธ. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.Bands=โ the number of bands ๐. An unsigned integer in the range1...16. This value has to be at least big enough to cover the strict bands you set throughStrictBands=and the bandwidth-sharing bands you set inQuantumBytes=. No cutting corners bestie.
Added in version 246.
StrictBands=โ the number of bands that should be created in strict mode ๐ค. An unsigned integer in the range1...16.
Added in version 246.
QuantumBytes=โ the white-space separated list of quantum used in band-sharing bands โจ. When suffixed withK,M, orG, the size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. This setting can be specified multiple times. If an empty string is assigned, then all previous assignments are cleared (bye ๐).
Added in version 246.
PriorityMap=โ maps the priority of a packet to a band ๐ฆ. The argument is a whitespace separated list of numbers. The first number says which band packets with priority 0 should go to, the second is for priority 1, and so on. You can have up to 16 numbers in the list. If there are fewer, the default band that traffic with one of the unmentioned priorities goes to is the last one. Each band number must be in the range0...255. This setting can be specified multiple times. If an empty string is assigned, then all previous assignments are cleared.
Added in version 246.
๐ [GENERICRANDOMEARLYDETECTION] SECTION OPTIONS ๐
This section manages the queueing discipline (qdisc) of Generic Random Early Detection (GRED). Detecting, randomly, but make it generic ๐
Parent=โ sets the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier ๐. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.VirtualQueues=โ the number of virtual queues ๐ธ. Takes an integer in the range1...16. Defaults to unset and kernel's default is used.
Added in version 246.
DefaultVirtualQueue=โ the number of the default virtual queue. This must be less thanVirtualQueue=(yes, that's how it's spelled in the option name โ keep it exactly like that, no edits bestie ๐). Defaults to unset and kernel's default is used.
Added in version 246.
GenericRIO=โ takes a boolean. It turns on the RIO-like buffering scheme ๐ฅ. Defaults to unset and kernel's default is used.
Added in version 246.
๐ [FAIRQUEUEINGCONTROLLEDDELAY] SECTION OPTIONS ๐
This section manages the queueing discipline (qdisc) of fair queuing controlled delay (FQ-CoDel). Fair and chill, the duality ๐
Parent=โ sets the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.PacketLimit=โ the hard limit on the real queue size ๐ญ. When this limit is reached, incoming packets are dropped. Defaults to unset and kernel's default is used.
Added in version 245.
MemoryLimitBytes=โ the limit on the total number of bytes that can be queued in this FQ-CoDel instance ๐ซถ. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset and kernel's default is used.
Added in version 246.
Flows=โ the number of flows into which the incoming packets are classified ๐ธ. Defaults to unset and kernel's default is used.
Added in version 245.
TargetSec=โ takes a timespan. Specifies the acceptable minimum standing/persistent queue delay โจ. Defaults to unset and kernel's default is used.
Added in version 245.
IntervalSec=โ takes a timespan. This makes sure the measured minimum delay doesn't get too stale, no expired vibes here ๐ฆ. Defaults to unset and kernel's default is used.
Added in version 245.
QuantumBytes=โ the number of bytes used as the"deficit"in the fair queuing algorithm timespan. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset and kernel's default is used.
Added in version 246.
ECN=โ takes a boolean. This can be used to mark packets instead of dropping them ๐. Defaults to unset and kernel's default is used.
Added in version 245.
CEThresholdSec=โ takes a timespan. This sets a threshold above which all packets are marked with ECN Congestion Experienced (CE) ๐ . Defaults to unset and kernel's default is used.
Added in version 245.
๐ฅ [FAIRQUEUEING] SECTION OPTIONS ๐ฅ
This section manages the queueing discipline (qdisc) of fair queue traffic policing (FQ). Policing, but fair, we love to see it โญ
Parent=โ sets the parent Queueing Discipline (qdisc). Takes one of"root","clsact","ingress"or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range0x1โ0xffffseparated with a colon ("major:minor"). Defaults to"root".Handle=โ sets the major number of the unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range0x1โ0xffff. Defaults to unset.PacketLimit=โ the hard limit on the real queue size ๐ค. When this limit is reached, incoming packets are dropped. Defaults to unset and kernel's default is used.
Added in version 245.
FlowLimit=โ the hard limit on the maximum number of packets queued per flow ๐. Defaults to unset and kernel's default is used.
Added in version 245.
QuantumBytes=โ the credit per dequeue RR round, i.e. the amount of bytes a flow is allowed to dequeue at once ๐. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset and kernel's default is used.
Added in version 246.
InitialQuantumBytes=โ the initial sending rate credit, i.e. the amount of bytes a new flow is allowed to dequeue initially ๐ฑ. When suffixed withK,M, orG, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes respectively, to the base of 1024. Defaults to unset and kernel's default is used.
Added in version 245.
MaximumRate=โ the maximum sending rate of a flow ๐. When suffixed withK,M, orG, the specified size is parsed as Kilobits, Megabits, or Gigabits respectively, to the base of 1000 (yes, 1000, not 1024 โ don't get it twisted bestie ๐). Defaults to unset and kernel's default is used.
Added in version 245.
Buckets=โ the size of the hash table used for flow lookups ๐. Defaults to unset and kernel's default is used.
Added in version 245.
OrphanMask=โ takes an unsigned integer. For packets not owned by a socket, fq is able to mask a part of the hash and reduce the number of buckets associated with the traffic ๐ฆ. Defaults to unset and kernel's default is used.
Added in version 245.
Pacing=โ takes a boolean, and enables or disables flow pacing โจ. Defaults to unset and kernel's default is used.
Added in version 245.
CEThresholdSec=โ takes a timespan. This sets a threshold above which all packets are marked with ECN Congestion Experienced (CE) ๐ . Defaults to unset and kernel's default is used.
Added in version 245.
โจ [TRIVIALLINKEQUALIZER] SECTION OPTIONS โจ
Okay bestie, this section runs the show for the queueing discipline (qdisc) of the trivial link equalizer โ aka teql. Very demure, very niche. ๐
Parent=
Sets up the parent Queueing Discipline (qdisc). You can pass "root", "clsact", "ingress", or a class identifier. That class identifier is written as the major and minor numbers in hexadecimal in the range 0x1โ0xffff, joined with a colon ("major:minor"). Defaults to "root". ๐ซถ
Handle=
Sets the major number of the unique identifier of the qdisc, aka the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset. ๐ธ
Id=
Specifies the interface ID "N" of teql. Defaults to "0". Heads up though โ when teql is in the picture, currently, the module sch_teql with the max_equalizers=N+1 option has to be loaded before systemd-networkd is started. No cap. ๐
Added in version 245.
๐งบ [HIERARCHYTOKENBUCKET] SECTION OPTIONS ๐งบ
This one manages the queueing discipline (qdisc) of hierarchy token bucket (htb). It's giving traffic-shaping royalty. ๐
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", "clsact", "ingress" or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root". โจ
Handle=
Configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset. ๐ซ
DefaultClass=
Takes the minor id in hexadecimal of the default class. Unclassified traffic gets sent to the class. Defaults to unset. ๐
Added in version 246.
RateToQuantum=
Takes an unsigned integer. The DRR quantums are calculated by dividing the value configured in Rate= by RateToQuantum=. Math girlies rise ๐งฎโจ
Added in version 246.
๐ [HIERARCHYTOKENBUCKETCLASS] SECTION OPTIONS ๐
Now we're in the class zone โ this section manages the traffic control class of hierarchy token bucket (htb).
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", or a qdisc identifier. The qdisc identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root".
๐ Notice this one only takes"root"or a qdisc identifier โ no"clsact", no"ingress". Don't get cute.
ClassId=
Configures the unique identifier of the class. It is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to unset. ๐
Priority=
Specifies the priority of the class. In the round-robin process, classes with the lowest priority field are tried for packets first. ๐โโ๏ธ๐จ
Added in version 246.
QuantumBytes=
Specifies how many bytes to serve from leaf at once. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. ๐
Added in version 246.
MTUBytes=
Specifies the maximum packet size we create. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. ๐
Added in version 246.
OverheadBytes=
Takes an unsigned integer which specifies per-packet size overhead used in rate computations. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024.
Added in version 246.
Rate=
Specifies the maximum rate this class and all its children are guaranteed. When suffixed with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000. This setting is mandatory. ๐จ Not optional bestie, you have to set it.
Added in version 246.
CeilRate=
Specifies the maximum rate at which a class can send, if its parent has bandwidth to spare. When suffixed with K, M, or G, the specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000. When unset, the value specified with Rate= is used. ๐ฆ
Added in version 246.
BufferBytes=
Specifies the maximum bytes burst which can be accumulated during idle period. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. ๐
Added in version 246.
CeilBufferBytes=
Specifies the maximum bytes burst for ceil which can be accumulated during idle period. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024.
Added in version 246.
๐ [CLASSFULMULTIQUEUEING] SECTION OPTIONS ๐
This section manages the queueing discipline (qdisc) of Classful Multi Queueing (mq). Short and sweet, love that for us.
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", "clsact", "ingress" or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root". ๐
Handle=
Configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset.
๐ [BANDMULTIQUEUEING] SECTION OPTIONS ๐
And here's the sibling โ this section manages the queueing discipline (qdisc) of Band Multi Queueing (multiq). โจ
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", "clsact", "ingress" or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root".
Handle=
Configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset.
๐ [HEAVYHITTERFILTER] SECTION OPTIONS ๐
This section manages the queueing discipline (qdisc) of Heavy Hitter Filter (hhf). The name alone is iconic tbh.
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", "clsact", "ingress" or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root". ๐ธ
Handle=
Configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset.
PacketLimit=
Specifies the hard limit on the queue size in number of packets. When this limit is reached, incoming packets are dropped. ๐ญ An unsigned integer in the range 0...4294967294. Defaults to unset and kernel's default is used.
Added in version 246.
๐ฆ [QUICKFAIRQUEUEING] SECTION OPTIONS ๐ฆ
This section manages the queueing discipline (qdisc) of Quick Fair Queueing (QFQ). Fast. Fair. Fabulous. ๐
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", "clsact", "ingress" or a class identifier. The class identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root".
Handle=
Configures the major number of unique identifier of the qdisc, known as the handle. Takes a hexadecimal number in the range 0x1โ0xffff. Defaults to unset.
๐ [QUICKFAIRQUEUEINGCLASS] SECTION OPTIONS ๐
Class time! This section manages the traffic control class of Quick Fair Queueing (qfq).
Parent=
Configures the parent Queueing Discipline (qdisc). Takes one of "root", or a qdisc identifier. The qdisc identifier is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to "root".
๐ซถ Again: only"root"or a qdisc identifier here. No"clsact", no"ingress".
ClassId=
Configures the unique identifier of the class. It is specified as the major and minor numbers in hexadecimal in the range 0x1โ0xffff separated with a colon ("major:minor"). Defaults to unset. โญ
Weight=
Specifies the weight of the class. Takes an integer in the range 1...1023. Defaults to unset in which case the kernel default is used. โ๏ธ
Added in version 246.
MaxPacketBytes=
Specifies the maximum packet size in bytes for the class. When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1024. When unset, the kernel default is used. ๐ฆ
Added in version 246.
๐ [BRIDGEVLAN] SECTION OPTIONS ๐
Okay this one's a whole moment, so listen up bestie. The [BridgeVLAN] section manages the VLAN ID configuration of a bridge master or enslaved device. To make the settings in this section take an effect, VLANFiltering= option has to be enabled on the bridge master โ see the [Bridge] section in systemd.netdev(5) โ and each enslaved device needs to define the relevant VLAN IDs in its own [BridgeVLAN] section, which it has in common with the bridge master.
โ ๏ธ Real talk: all assigned VLAN IDs on the interface that are not configured in the .network file will be removed. Gone. Poof. ๐ญ
And if VLAN IDs on an interface need to be managed by other tools, then the settings in this section cannot be used in the matching .network file, and VLANFiltering= needs to be disabled on the bridge master. No exceptions, that's just the rules. ๐
VLAN=
The VLAN ID allowed on the port. This can be either a single ID or a range M-N. Takes an integer in the range 1...4094. This setting can be specified multiple times. If an empty string is assigned, then the all previous assignments are cleared. ๐งน
Added in version 231.
EgressUntagged=
The VLAN ID specified here will be used to untag frames on egress. Configuring EgressUntagged= implicates the use of VLAN= above and will enable the VLAN ID for ingress as well. This can be either a single ID or a range M-N. This setting can be specified multiple times. If an empty string is assigned, then the all previous assignments are cleared. โจ
Added in version 231.
PVID=
The port VLAN ID specified here is assigned to all untagged frames at ingress. Takes an VLAN ID or negative boolean value (e.g. "no"). When false, the currently assigned port VLAN ID will be dropped. Configuring PVID= implicates the use of VLAN= setting in the above and will enable the VLAN ID for ingress as well. Defaults to unset, and will keep the assigned port VLAN ID if exists. ๐ซถ
Added in version 231.
โจ [MOBILENETWORK] SECTION OPTIONS โจ
okay bestie so this section is where you set up the default settings for the ModemManager integration ๐ if you wanna know more about what ModemManager even is, go peek at https://modemmanager.org/docs/modemmanager/ โ that's the whole lore drop.
ngl, no matter what you put in the [MobileNetwork] section, you should highkey consider using the following for LTE modems. and yeah, the reason is kinda real: LTE modems don't typically support LLDP, because LLDP is a Layer 2 protocol for Ethernet networks and an LTE modem connects to a cellular network, not a local Ethernet LAN. so like... it just doesn't apply, periodt.
[Network]
LLDP=no
LinkLocalAddressing=no
IPv6AcceptRA=no
and now for the options themselves, all available in the [MobileNetwork] section ๐
APN=โ so an Access Point Name (APN) is the name of a gateway between a mobile network (GSM, GPRS, 3G, 4G and 5G) and another computer network. it's required in 3GPP. it defaults to unset, and when it's unset, no attempt to establish the connection is made โ like, zero, none, the vibe is "we're not even trying". โจ Added in version 260.AllowedAuthenticationMechanisms=โ the authentication method to use. you give it a white-space separated list of"none","pap","chap","mschap","mschapv2", or"eap"methods. it's optional in 3GPP. defaults to unset, in which case an automatically picked authentication method will be used. the algorithm is the main character here, she decides ๐ Added in version 260.User=โ the user name (if any) required by the network. optional in 3GPP, defaults to unset. Added in version 260.Password=โ the password (if any) required by the network. also optional in 3GPP, also defaults to unset. Added in version 260.IPFamily=โ the addressing type. takes one of"ipv4","ipv6","both", or"any". optional in 3GPP and CDMA. defaults to unset and automatically selected, she'll figure it out ๐ฆ Added in version 260.AllowRoaming=โ a boolean, we love a boolean. when true, connection is allowed during roaming. when false, connection is not allowed during roaming. optional in 3GPP. defaults to"yes". Added in version 260.PIN=โ the SIM-PIN unlock code. defaults to unset. Added in version 260.OperatorId=โ the ETSI MCC-MNC of a network to force registration with. defaults to unset. Added in version 260.RouteMetric=โ sets the routing metric for routes specified by the mobile network (including the prefix route added for the specified prefix). takes an unsigned integer in the range0...4294967295. when unset or set to0, the kernel's default value will be used โ so the kernel gets to pick, iconic of it tbh. Added in version 260.UseGateway=โ when true (and yes, that's the default ๐ธ), the router address will be configured as the default gateway. Added in version 260.
๐ EXAMPLES ๐
okay bestie, this is the part where it all comes together ๐ the theory is done, now we're looking at actual real-life config files that you can literally copy into /etc/systemd/network/ and go. every single one is verbatim, no cap.
โจ Example 1. Static network configuration โจ
# /etc/systemd/network/50-static.network
[Match]
Name=enp2s0
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
This brings the interface "enp2s0" up with a static address. The gateway you specified gets used for a default route. iconic, simple, no drama ๐
โจ Example 2. DHCP on ethernet links โจ
# /etc/systemd/network/60-dhcp.network
[Match]
Name=en*
[Network]
DHCP=yes
This enables DHCPv4 and DHCPv6 on all interfaces whose names start with "en" (i.e. ethernet interfaces). the * glob is doing the heavy lifting and she ate ๐
โจ Example 3. IPv6 Prefix Delegation (DHCPv6 PD) โจ
# /etc/systemd/network/55-dhcpv6-pd-upstream.network
[Match]
Name=enp1s0
[Network]
DHCP=ipv6
# The lines below are optional, to also assign an address in the delegated prefix
# to the upstream interface. Uncomment the lines below if necessary.
#[Network]
#DHCPPrefixDelegation=yes
#[DHCPPrefixDelegation]
#UplinkInterface=:self
#SubnetId=0
#Announce=no
# If the upstream network does not provides any Router Advertisement (RA) messages,
# then uncomment the lines below to make the DHCPv6 client forcibly started in the
# managed mode.
#[Network]
#IPv6AcceptRA=no
#[DHCPv6]
#WithoutRA=solicit
# If the upstream network provides Router Advertisement (RA) messages with the
# Managed bit unset, then uncomment the lines below to make the DHCPv6 client
# forcibly started in the managed mode when an RA is received.
#[DHCPv6]
#UseAddress=no
#[IPv6AcceptRA]
#DHCPv6Client=always
# /etc/systemd/network/55-dhcpv6-pd-downstream.network
[Match]
Name=enp2s0
[Network]
DHCPPrefixDelegation=yes
IPv6SendRA=yes
# It is expected that the host is acting as a router. So, usually it is not
# necessary to receive Router Advertisement from other hosts in the downstream network.
IPv6AcceptRA=no
[DHCPPrefixDelegation]
UplinkInterface=enp1s0
SubnetId=1
Announce=yes
This enables DHCPv6-PD on the interface enp1s0 as an upstream interface โ that's where the DHCPv6 client is running โ and enp2s0 as a downstream interface, which is where the prefix gets delegated to. The delegated prefixes get distributed by IPv6 Router Advertisement on the downstream network. fr fr this is the one everyone copy-pastes ๐
โจ Example 4. IPv6 Prefix Delegation (DHCPv4 6RD) โจ
# /etc/systemd/network/55-dhcpv4-6rd-upstream.network
[Match]
Name=enp1s0
[Network]
DHCP=ipv4
# When DHCPv4-6RD is used, the upstream network does not support IPv6.
# Hence, it is not necessary to wait for Router Advertisement, which is enabled by default.
IPv6AcceptRA=no
[DHCPv4]
Use6RD=yes
# /etc/systemd/network/55-dhcpv4-6rd-downstream.network
[Match]
Name=enp2s0
[Network]
DHCPPrefixDelegation=yes
IPv6SendRA=yes
# It is expected that the host is acting as a router. So, usually it is not
# necessary to receive Router Advertisement from other hosts in the downstream network.
IPv6AcceptRA=no
[DHCPPrefixDelegation]
UplinkInterface=enp1s0
SubnetId=1
Announce=yes
This enables DHCPv4-6RD on the interface enp1s0 as an upstream interface โ that's where the DHCPv4 client is running โ and enp2s0 as a downstream interface, which is where the prefix gets delegated to. The delegated prefixes get distributed by IPv6 Router Advertisement on the downstream network. same energy as Example 3 but the upstream is doing the v4 โ v6 pipeline ๐ฆ
โจ Example 5. A bridge with two enslaved links โจ
# /etc/systemd/network/25-bridge-static.netdev
[NetDev]
Name=bridge0
Kind=bridge
# /etc/systemd/network/25-bridge-static.network
[Match]
Name=bridge0
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
DNS=192.168.0.1
# /etc/systemd/network/25-bridge-slave-interface-1.network
[Match]
Name=enp2s0
[Network]
Bridge=bridge0
# /etc/systemd/network/25-bridge-slave-interface-2.network
[Match]
Name=wlp3s0
[Network]
Bridge=bridge0
This creates a bridge and attaches the devices "enp2s0" and "wlp3s0" to it. The bridge gets the specified static address and network assigned, and a default route via the specified gateway gets added. The specified DNS server gets added to the global list of DNS resolvers. four files, one glorious bridge, she's giving main character energy ๐
โจ Example 6. Bridge port with VLAN forwarding โจ
# /etc/systemd/network/25-bridge-slave-interface-1.network
[Match]
Name=enp2s0
[Network]
Bridge=bridge0
[BridgeVLAN]
VLAN=1-32
PVID=42
EgressUntagged=42
[BridgeVLAN]
VLAN=100-299
[BridgeVLAN]
EgressUntagged=300-400
This overrides the configuration from the previous example for the interface "enp2s0", and enables VLAN on that bridge port. VLAN IDs 1-32, 42, 100-400 get allowed. Packets tagged with VLAN IDs 42, 300-400 get untagged when they leave on this interface. Untagged packets arriving on this interface get assigned VLAN ID 42. notice how you can stack multiple [BridgeVLAN] sections โ obsessed ๐ญ
โจ Example 7. Various tunnels โจ
/etc/systemd/network/25-tunnels.network
[Match]
Name=ens1
[Network]
Tunnel=ipip-tun
Tunnel=sit-tun
Tunnel=gre-tun
Tunnel=vti-tun
/etc/systemd/network/25-tunnel-ipip.netdev
[NetDev]
Name=ipip-tun
Kind=ipip
/etc/systemd/network/25-tunnel-sit.netdev
[NetDev]
Name=sit-tun
Kind=sit
/etc/systemd/network/25-tunnel-gre.netdev
[NetDev]
Name=gre-tun
Kind=gre
/etc/systemd/network/25-tunnel-vti.netdev
[NetDev]
Name=vti-tun
Kind=vti
This brings the interface "ens1" up and creates an IPIP tunnel, a SIT tunnel, a GRE tunnel, and a VTI tunnel using it. four tunnels, one interface, absolutely unhinged in the best way ๐ฅ
โจ Example 8. A bond device โจ
# /etc/systemd/network/30-bond1.network
[Match]
Name=bond1
[Network]
DHCP=ipv6
# /etc/systemd/network/30-bond1.netdev
[NetDev]
Name=bond1
Kind=bond
# /etc/systemd/network/30-bond1-dev1.network
[Match]
MACAddress=52:54:00:e9:64:41
[Network]
Bond=bond1
# /etc/systemd/network/30-bond1-dev2.network
[Match]
MACAddress=52:54:00:e9:64:42
[Network]
Bond=bond1
This creates a bond device "bond1" and enslaves the two devices with MAC addresses 52:54:00:e9:64:41 and 52:54:00:e9:64:42 to it. IPv6 DHCP is used to acquire an address. matching by MAC instead of name because the names are chaotic and we respect that ๐
โจ Example 9. Virtual Routing and Forwarding (VRF) โจ
Add the "bond1" interface to the VRF master interface "vrf1". This redirects routes generated on this interface to be within the routing table defined during VRF creation. For kernels before 4.8, traffic will not be redirected towards the VRF's routing table unless specific ip-rules are added.
# /etc/systemd/network/25-vrf.network
[Match]
Name=bond1
[Network]
VRF=vrf1
heads up bestie: that kernel-version note is load-bearing. old kernels need extra ip-rules or the traffic justโฆ won't go where you think. not a vibe ๐ธ
โจ Example 10. MacVTap โจ
This brings up a network interface "macvtap-test" and attaches it to "enp0s25".
# /usr/lib/systemd/network/25-macvtap.network
[Match]
Name=enp0s25
[Network]
MACVTAP=macvtap-test
โจ Example 11. A Xfrm interface with physical underlying device. โจ
# /etc/systemd/network/27-xfrm.netdev
[NetDev]
Name=xfrm0
Kind=xfrm
[Xfrm]
InterfaceId=7
# /etc/systemd/network/27-eth0.network
[Match]
Name=eth0
[Network]
Xfrm=xfrm0
This creates an "xfrm0" interface and binds it to the "eth0" device. This allows hardware based ipsec offloading to the "eth0" nic. If offloading is not needed, xfrm interfaces can be assigned to the "lo" device. free hardware acceleration, we love to see it โจ
โจ Example 12. Connecting to a cellular network with ModemManager โจ
# /etc/systemd/network/27-wwan0.network
[Match]
Name=wwan0
[Network]
LLDP=no
LinkLocalAddressing=no
IPv6AcceptRA=no
[MobileNetwork]
APN=internet
AllowedAuthenticationMechanisms=none pap chap
User=user
Password=pass
IPFamily=both
AllowRoaming=no
PIN=1111
OperatorId=25503
RouteMetric=30
UseGateway=yes
This connects a cellular modem to a broadband network matched with the network interface "wwan0", with APN name "internet", allowed authentication "none", "pcap", or "chap", user name "user", their password "pass", allows both IPv4 and IPv6, does not allow roaming, SIM card pin unlock code "1111", only allows connecting to operator with MCC "25503", and sets up a default gateway with route metric of 30. full modem setup in one file, we are so back ๐ถ๐
๐ SEE ALSO ๐
systemd(1)systemd-networkd.service(8)systemd.link(5)systemd.netdev(5)systemd-network-generator.service(8)systemd-resolved.service(8)
go read those too bestie, they're the supporting cast and they're all icons in their own right ๐ซถ
๐ NOTES ๐
okay bestie, this is the reference section โ all the receipts, all the lore, all the โจsourcesโจ behind everything above. it's giving bibliography but make it cute. don't skip it, iykyk ๐ซถ
- ๐ฃ๐ฅ๐งจ๐ฅ๐ฅ๐ฃ 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. (yes the original really put bombs there. i did not add those. i respect the drama tho ๐) - System and Service Credentials โ https://systemd.io/CREDENTIALS
- Link-Local Multicast Name Resolution โ https://tools.ietf.org/html/rfc4795
- Multicast DNS โ https://tools.ietf.org/html/rfc6762
- DNS-over-TLS โ https://tools.ietf.org/html/rfc7858
- DNSSEC โ https://tools.ietf.org/html/rfc4033
- IEEE 802.1AB-2016 โ https://standards.ieee.org/findstds/standard/802.1AB-2016.html
- RFC 5227 โ https://tools.ietf.org/html/rfc5227
- IP Sysctl โ https://docs.kernel.org/networking/ip-sysctl.html
- RFC 4941 โ https://tools.ietf.org/html/rfc4941
- RFC 3704 โ https://tools.ietf.org/html/rfc1027
- RFC 3069 โ https://tools.ietf.org/html/rfc3069
- RFC 6275 โ https://tools.ietf.org/html/rfc6275
- RFC 4862 โ https://tools.ietf.org/html/rfc4862
- RFC 3041 โ https://tools.ietf.org/html/rfc3041
- NetLabel โ https://docs.kernel.org/netlabel/index.html
- Linux Security Modules (LSMs) โ https://en.wikipedia.org/wiki/Linux_Security_Modules
- NetLabel Fallback Peer Labeling โ https://github.com/SELinuxProject/selinux-notebook/blob/main/src/network_support.md
- NFT โ https://netfilter.org/projects/nftables/index.html
- RFC 3484 โ https://tools.ietf.org/html/rfc3484
- Type of Service โ https://en.wikipedia.org/wiki/Type_of_service
- Differentiated services โ https://en.wikipedia.org/wiki/Differentiated_services
- Virtual Routing and Forwarding (VRF) โ https://docs.kernel.org/networking/vrf.html
- RFC 4191 โ https://tools.ietf.org/html/rfc4191
- RFC 2132 โ https://tools.ietf.org/html/rfc2132
- RFC 4702 โ https://tools.ietf.org/html/rfc4702
- RFC 8520 โ https://tools.ietf.org/html/rfc8520
- RFC 4039 โ https://tools.ietf.org/html/rfc4039
- RFC 7844 โ https://tools.ietf.org/html/rfc7844
- C-style escapes โ https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences
- RFC 9463 โ https://datatracker.ietf.org/doc/html/rfc9463
- RFC 3442 โ https://datatracker.ietf.org/doc/html/rfc3442
- RFC 5969 โ https://tools.ietf.org/html/rfc5969
- RFC 7084 โ https://datatracker.ietf.org/doc/html/rfc7084
- RFC 8925 โ https://datatracker.ietf.org/doc/html/rfc8925
- RFC 3315 โ https://tools.ietf.org/html/rfc3315#section-17.2.1
- RFC 8415 โ https://www.rfc-editor.org/rfc/rfc8415.html#section-6.3
- RFC 4291 โ https://tools.ietf.org/html/rfc4291#section-2.5.4
- RFC 7217 โ https://tools.ietf.org/html/rfc7217
- RFC 8781 โ https://tools.ietf.org/html/rfc8781
- RFC 2131 โ https://www.rfc-editor.org/rfc/rfc2131.html
- RFC 2132 โ https://www.rfc-editor.org/rfc/rfc2132.html
- RFC 4039 โ https://datatracker.ietf.org/doc/html/rfc4039
- RFC 4861 โ https://tools.ietf.org/html/rfc4861
and that's the whole page, bestie!! ๐โจ you made it to the very end, which is genuinely iconic behavior, no cap ๐๐
this gorgeous little artifact is from systemd 262.1, filed under SYSTEMD.NETWORK(5) โ go forth and configure your networks, main character ๐ฆ๐ธ๐
๐ฆ 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