From 78e9bb837c258ac0ec7712b3d612cc2f407e731e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:42 +0200 Subject: Merging upstream version 256. Signed-off-by: Daniel Baumann --- man/systemd.net-naming-scheme.xml | 129 +++++++++++++++++++++++++++++--------- 1 file changed, 100 insertions(+), 29 deletions(-) (limited to 'man/systemd.net-naming-scheme.xml') diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml index e9c00c9..ff811c2 100644 --- a/man/systemd.net-naming-scheme.xml +++ b/man/systemd.net-naming-scheme.xml @@ -1,6 +1,6 @@ + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> @@ -38,7 +38,7 @@ implemented version, but it is also possible to set one of the older versions to preserve compatibility. This may be useful for example for distributions, which may introduce new versions of systemd in stable releases without changing the naming scheme. The naming scheme may also be overridden - using the net.naming-scheme= kernel command line switch, see + using the net.naming_scheme= kernel command line switch, see systemd-udevd.service8. Available naming schemes are described below. @@ -97,8 +97,8 @@ - ID_NET_NAME_ONBOARD=prefixonumber - ID_NET_NAME_ONBOARD=prefixdnumber + ID_NET_NAME_ONBOARD=prefixonumber + ID_NET_NAME_ONBOARD=prefixdnumber This name is set based on the numeric ordering information given by the firmware for on-board devices. Different schemes are used depending on the firmware type, as described in @@ -135,7 +135,7 @@ - ID_NET_LABEL_ONBOARD=prefix label + ID_NET_LABEL_ONBOARD=prefix label This property is set based on textual label given by the firmware for on-board devices. The name consists of the prefix concatenated with the label. This is only available for @@ -147,7 +147,7 @@ - ID_NET_NAME_MAC=prefixxAABBCCDDEEFF + ID_NET_NAME_MAC=prefixxAABBCCDDEEFF This name consists of the prefix, letter x, and 12 hexadecimal digits of the MAC address. It is available if the device has a fixed MAC address. Because this name @@ -159,13 +159,13 @@ - ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port] - ID_NET_NAME_SLOT=prefixvslot - ID_NET_NAME_SLOT=prefixxslot - ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]bnumber - ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]uport…[cconfig][iinterface] - ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]vslot - ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]rslot + ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port] + ID_NET_NAME_SLOT=prefixvslot + ID_NET_NAME_SLOT=prefixxslot + ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]bnumber + ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]uport…[cconfig][iinterface] + ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]vslot + ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]rslot This property describes the slot position. Different schemes are used depending on the bus type, as described in the table below. In case of USB, BCMA, and SR-VIO devices, the full @@ -223,7 +223,7 @@ The PCI domain is only prepended when it is not 0. All multi-function PCI devices will carry - the ffunction number in the device name, including + the ffunction number in the device name, including the function 0 device. For non-multi-function devices, the number is suppressed if 0. The port name port_name is used, or the port number ddev_port if the name is not known. @@ -251,13 +251,13 @@ - ID_NET_NAME_PATH=prefixcbus_id - ID_NET_NAME_PATH=prefixavendormodeliinstance - ID_NET_NAME_PATH=prefixiaddressnport_name - ID_NET_NAME_PATH=prefixuport - ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port] - ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]bnumber - ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]uport…[cconfig][iinterface] + ID_NET_NAME_PATH=prefixcbus_id + ID_NET_NAME_PATH=prefixavendormodeliinstance + ID_NET_NAME_PATH=prefixiaddressnport_name + ID_NET_NAME_PATH=prefixuport + ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port] + ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]bnumber + ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]uport…[cconfig][iinterface] This property describes the device installation location. Different schemes are used depending on the bus type, as described in the table below. For BCMA and USB devices, PCI path @@ -326,7 +326,7 @@ History The following "naming schemes" have been defined (which may be chosen at system boot-up time via - the net.naming-scheme= kernel command line switch, see above): + the net.naming_scheme= kernel command line switch, see above): @@ -508,7 +508,7 @@ Naming was changed for SR-IOV virtual device representors, optionally settable at compilation time. The rslot suffix was added to differentiate SR-IOV virtual device representors attached to a single physical device interface. - Because of a mistake, this scheme was not the the default scheme for systemd version + Because of a mistake, this scheme was not the default scheme for systemd version 254. @@ -531,6 +531,47 @@ particular version of systemd). + + Limiting the use of specific sysfs attributes + + When creating names for network cards, some naming schemes use data from sysfs populated + by the kernel. This means that although a specific naming scheme in udev is picked, + the network card's name can still change when a new kernel version adds a new sysfs attribute. + For example if kernel starts setting the phys_port_name, udev will append the + "nphys_port_name" suffix to the device name. + + + + ID_NET_NAME_ALLOW=BOOL + + This udev property sets a fallback policy for reading a sysfs attribute. + If set to 0 udev will not read any sysfs attribute by default, unless it is + explicitly allowlisted, see below. If set to 1 udev can use any sysfs attribute + unless it is explicitly forbidden. The default value is 1. + + + + + + + ID_NET_NAME_ALLOW_sysfsattr=BOOL + + This udev property explicitly states if udev shall use the specified + sysfsattr, when composing the device name. + + + + + + + With these options, users can set an allowlist or denylist for sysfs attributes. To create + an allowlist, the user needs to set ID_NET_NAME_ALLOW=0 for the device and then list + the allowed attributes with the + ID_NET_NAME_ALLOW_sysfsattr=1 + options. In case of a denylist, the user needs to provide the list of denied attributes with + the ID_NET_NAME_ALLOW_sysfsattr=0 options. + + Examples @@ -617,16 +658,46 @@ ID_NET_NAME_PATH=enp0s29u1u2 ID_NET_NAME_MAC=enx026d3c00000a ID_NET_NAME_PATH=encf5f0 + + + Set an allowlist for reading sysfs attributes for network card naming + + /etc/udev/hwdb.d/50-net-naming-allowlist.hwdb +net:naming:drvirtio_net:* + ID_NET_NAME_ALLOW=0 + ID_NET_NAME_ALLOW_ACPI_INDEX=1 + ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1 + ID_NET_NAME_ALLOW_ADDRESS=1 + ID_NET_NAME_ALLOW_ARI_ENABLED=1 + ID_NET_NAME_ALLOW_DEV_PORT=1 + ID_NET_NAME_ALLOW_FUNCTION_ID=1 + ID_NET_NAME_ALLOW_IFLINK=1 + ID_NET_NAME_ALLOW_INDEX=1 + ID_NET_NAME_ALLOW_LABEL=1 + ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1 + ID_NET_NAME_ALLOW_TYPE=1 + + + + Set a denylist so that specified sysfs attribute are ignored + + /etc/udev/hwdb.d/50-net-naming-denylist.hwdb +net:naming:drvirtio_net:* + ID_NET_NAME_ALLOW=1 + ID_NET_NAME_ALLOW_DEV_PORT=0 + ID_NET_NAME_ALLOW_PHYS_PORT_NAME=0 + + See Also - - udev7, - udevadm8, - Predictable Network Interface Names, - systemd-nspawn1 - + + udev7 + udevadm8 + Predictable Network Interface Names + systemd-nspawn1 + -- cgit v1.2.3