From a4c9bf2e51c92b411c88804070373f1e2123331a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 14 Dec 2021 11:29:08 +0900 Subject: network-generator: support to set NamePolicy= through kernel command line argument Closes #16296. --- man/systemd-udevd.service.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'man/systemd-udevd.service.xml') diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml index 32cb82bac3..1bc86469be 100644 --- a/man/systemd-udevd.service.xml +++ b/man/systemd-udevd.service.xml @@ -224,6 +224,45 @@ appear, which affects older name derivation algorithms, too. + + net.ifname-policy=policy1[,policy2,…][,MAC] + + Specifies naming policies applied when renaming network interfaces. Takes a list of + policies and an optional MAC address separated with comma. Each policy value must be one of + the policies understood by the NamePolicy= setting in .link files, e.g. + onboard or path. See + systemd.link5 + for more details. When the MAC address is specified, the policies are applied to the + interface which has the address. When no MAC address is specified, the policies are applied + to all interfaces. This kernel command line argument can be specified multiple times. This + argument is not directly read from systemd-udevd, but read and converted + to a .link file by systemd-network-generator. So, to make this argument + take effect, systemd-network-generator.service must be enabled and + started before starting systemd-udevd.service. See + systemd-network-generator.service8 + for more details about the service. + Example: + net.ifname-policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab +net.ifname-policy=keep,kernel,path,slot,onboard,mac + This is mostly equivalent to creating the following .link files: + # 91-name-policy-with-mac.link +[Match] +MACAddress=01:23:45:67:89:ab + +[Link] +NamePolicy=keep kernel path slot onboard +AlternativeNamePolicy=path slot onboard + and + # 92-name-policy-for-all.link +[Match] +OriginalName=* + +[Link] +NamePolicy=keep kernel path slot onboard mac +AlternativeNamePolicy=path slot onboard mac + + + -- cgit v1.2.1