SUSE Support

Here When You Need Us

Predictable network interface naming changed in SLES 15 SP3 for certain devices

This document (000020541) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 Service Pack 4
SUSE Linux Enterprise Server 15 Service Pack 3

Situation

By default SLE uses the "classical" interface names like eth0 etc, but the system is booting with net.ifnames=1 to activate policy-based network interface naming.

As an example the interface that was named enp59s0f1 on SLE 15 SP2 now shows up as ens2f1 in the output of ip link which at the same time lists the "desired" name as "altname" :
# ip l
...
5: ens2f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:fd:fe:ad:09:b9 brd ff:ff:ff:ff:ff:ff
    altname enp59s0f1
...


Comparing the output of udevadm info -e reveals that a new property - ID_NET_NAME_SLOT - is exposed on SLE 15 SP3.

Selected lines of the output from SLE 15 SP2 :
P: /devices/pci0000:3a/0000:3a:00.0/0000:3b:00.1/net/enp59s0f1
E: DEVPATH=/devices/pci0000:3a/0000:3a:00.0/0000:3b:00.1/net/enp59s0f1
E: ID_MODEL_FROM_DATABASE=Ethernet Controller XL710 for 40GbE QSFP+ (Ethernet Converged Network Adapter XL710-Q1)
E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
E: ID_NET_NAME_PATH=enp59s0f1
E: ID_PATH=pci-0000:3b:00.1
E: ID_PATH_TAG=pci-0000_3b_00_1
E: INTERFACE=enp59s0f1
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp59s0f1


Selected lines of the output from SLE 15 SP3 :
P: /devices/pci0000:3a/0000:3a:00.0/0000:3b:00.1/net/ens2f1
E: DEVPATH=/devices/pci0000:3a/0000:3a:00.0/0000:3b:00.1/net/ens2f1
E: ID_MODEL_FROM_DATABASE=Ethernet Controller XL710 for 40GbE QSFP+ (Ethernet Converged Network Adapter XL710-Q1)
E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
E: ID_NET_NAME_PATH=enp59s0f1
E: ID_NET_NAME_SLOT=ens2f1
E: ID_PATH=pci-0000:3b:00.1
E: ID_PATH_TAG=pci-0000_3b_00_1
E: INTERFACE=ens2f1
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/ens2f1


On SLES servers booted with net.ifnames=1 to activate predictable network interface naming with systemd/udev NamePolicy, the interfaces of certain network devices get named differently after upgrading from SLES 15 SP2 (or earlier) to SLES 15 SP3 or later.

Resolution

The network naming policies are defined in the file /usr/lib/systemd/network/99-default.link.
Since this file may be overwritten by a systemd update, it is strongly recommended to make a copy of the file in /etc/systemd/network/ and make changes in the copy instead.
The contents of configuration files in /etc/systemd/ overrides the defaults in files in /usr/lib/systemd/.

# cp /usr/lib/systemd/network/99-default.link /etc/systemd/network/99-default.link

Swap the order of slot and path in NamePolicy in /etc/systemd/network/99-default.link to
NamePolicy=keep kernel database onboard path slot

Rebuild the initrd with
# /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force
and reboot the system.

Note : If dracut is invoked with the -N (--no-hostonly) argument, then the files in /etc/systemd/network/ will not be included in the initrd.
To address that add
--include /etc/systemd/network/ /etc/systemd/network/
to the dracut command.


Relevant output of udevadm info -e for the device mentioned in the cause section should now look like this :
P: /devices/pci0000:85/0000:85:02.0/0000:86:00.0/net/enp134s0f0
E: DEVPATH=/devices/pci0000:85/0000:85:02.0/0000:86:00.0/net/enp134s0f0
E: INTERFACE=enp134s0f0
E: ID_NET_NAME_PATH=enp134s0f0
E: ID_NET_NAME_SLOT=ens7f0
E: ID_NET_DRIVER=i40e
E: ID_NET_LINK_FILE=/etc/systemd/network/99-default.link


The policies are outlined in:  man systemd.link.

NOTE : If the file /etc/udev/rules.d/70-persistent-net.rules exists, it should be removed to enable predictable network interface names.

Cause

In the observed case on SLES 15 SP3, the cause is that some Intel SR-IOV physical and virtual function interfaces exposed the ID_NET_NAME_SLOT property, which had not been exposed previously.

Considering the default policy in /usr/lib/systemd/network/99-default.link :
[Link]
NamePolicy=keep kernel database onboard slot path

interfaces that were earlier named based on ID_NET_NAME_PATH now get named based on ID_NET_NAME_SLOT if this property has not been exposed in earlier SLES versions.

The command "udevadm info -e" will expose the available properties for the devices.
Relevant lines from the output for an example device :
P: /devices/pci0000:85/0000:85:02.0/0000:86:00.0/net/ens7f0
E: DEVPATH=/devices/pci0000:85/0000:85:02.0/0000:86:00.0/net/ens7f0
E: SUBSYSTEM=net
E: INTERFACE=ens7f0
E: ID_NET_NAME_PATH=enp134s0f0
E: ID_NET_NAME_SLOT=ens7f0
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_MODEL_FROM_DATABASE=Ethernet Controller XXV710 for 25GbE SFP28 (Ethernet 25G 2P XXV710 Adapter)
E: ID_PATH=pci-0000:86:00.0
E: ID_NET_DRIVER=i40e
E: ID_NET_LINK_FILE=/etc/systemd/network/99-default.link

Additional Information

The problem can also appear on SLE 15 SP2 running on a SLE 12 SP4/5 KVM host as QEMU version 3.1.1 does expose the SLOT while QEMU 4.2 on SLES 15 SP2+ does not.

In configurations where network devices are behind a PCI bridge, udev might create multiple devices with the same slot name.
This problem is fixed in systemd-246.16-150300.7.39.1 released in February 2022.
 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020541
  • Creation Date: 13-Jan-2022
  • Modified Date:06-Feb-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.