Linux

Ubuntu 22.04: NIC interface name changes after kernel driver update, networkd service fails to bring up ens3

Environment

Environment

Ubuntu 22.04 LTS host (bare-metal Dell R740), two Intel X710 dual-port 10Gb NICs, running kernel 5.15.0-80-generic; netplan YAML config references interface name 'ens3' and systemd-networkd manages links.

Symptoms

Symptoms

After installing a vendor-provided NIC driver package and rebooting, the server's management VLAN lost connectivity. Services depending on the 'ens3' interface (DHCP client, monitoring agent) failed to start.

Observations

Observations

dmesg shows the Intel driver probing new firmware and registering ports at different PCI addresses; journalctl -u systemd-networkd reports 'link ens3: not found'; ip link output shows interfaces named 'ens7' and 'ens8' instead of 'ens3'; /etc/netplan/01-netcfg.yaml still references 'ens3'. No duplicate MACs visible on the local switch; switch shows link down/up events only for the server's physical ports at reboot time.

Already attempted

Already attempted

Verified netplan YAML; ran 'sudo netplan try' (no change). Created a temporary udev rule matching original MAC to 'ens3' and rebooted — rule not applied (udevadm test showed different device path). Reinstalled earlier kernel package and booted old kernel (5.15.0-76) — same names persisted. Ran 'udevadm info' on the new interfaces and compared ID_PATH values.

Question

Question

How can I restore the previous predictable interface names (ens3) reliably across reboots after the driver update, and what caused the name change so services stop referencing the expected name?

COMMUNITY RESPONSES

Verified community troubleshooting

0 replies

No answers yet..

Showing 0 of 0 community responses
AI DIAGNOSTICS

Incident analysis

Updated 1mo ago• Trouble ID

Most likely causes

Driver or NIC firmware update changed PCI device enumeration / ID_PATH so udev/systemd renamed interfaces. 85%
Netplan/systemd config was written for a previous hardware layout; predictable names were created from PCI slot rather than stable MAC, so any PCI re-enumeration produced new names. 70%
Manufacturer driver intentionally exposes virtual functions or reassigns PHY ports (SR-IOV/VF initialization) so interface naming shifts. 40%

Summary

Predictable network interface names are derived from hardware topology (PCI slot / ACPI path / MAC). A driver or firmware update changed the enumeration/path seen by udev (or the NIC moved PCI addresses), causing systemd/udev to assign different predictable names. Netplan and systemd-networkd continue to expect the old name; ad-hoc udev rules failed because device path attributes changed. Reverting solely the kernel may not revert PCI address assignment if firmware or driver initialized differently. Correct fixes should avoid hard-coding names tied to transient PCI paths and instead bind by stable attributes (PCI slot or persistent MAC) or update network config to match current names. If MACs changed, further investigation into NIC firmware or switch-level virtualization is required.

Suggested Fixes

Diagnostic step 1
Inspect udev attributes: run 'udevadm info -a -p /sys/class/net/<ifname>' for the new and old interfaces and compare ID_PATH, ID_MODEL, and MAC to identify a stable attribute to match.
Diagnostic step 2
Avoid binding to PCI path. Update netplan/systemd-networkd to reference interfaces by 'match:' with MAC address (addresses from 'ip link') or by 'driver' + 'name' if stable; example netplan snippet: network.interfaces: match: macaddress: 'aa:bb:cc:dd:ee:ff'.
Diagnostic step 3
If you prefer previous names, write a udev rule that matches stable attributes (MAC or ID_NET_NAME_MAC) and sets NAME, then test with 'udevadm control --reload' and 'udevadm trigger' before reboot. Keep a console/other access path in case net brings link down.

Continue troubleshooting

Matched from the title, description and tags