I have an Ubuntu 18.04 box with a number of network interfaces.

If I add a new NVMe SSD to the system, the network device names change.

For example, enp60s0 might become enp61s0.

Is this expected? The box is headless, so adding a new drive renders in inaccessible, because all the network interface configuration is lost. This is not ideal.

  • 1
    Exactly the same thing happened to me just now, lol. Thanks for asking the question for me. Pity I had to waste time debugging the problem and getting the network working again though. Not the best design, IMHO. Commented Feb 13, 2023 at 8:34

1 Answer 1


The NVMe SSD connects directly to the PCIe bus, and apparently your hardware presents a different bus topology depending on whether or not the NVMe device is present.

If a network device shifts from enp60s0 to enp61s0, that means its PCI bus ID has shifted from 3c:00.0 to 3d:00.0. This is probably a quirk of your hardware/motherboard, and may not be able to be avoided. Depending on the hardware design, a system firmware (BIOS/UEFI) upgrade might or might not help.

But you could use several possible methods to lock down the name of the network interface or to specify a custom name for it.

For example, you could write a .link file in /etc/systemd/network/ directory to force the system to assign the name of your choice:



This example file, when placed into /etc/systemd/network as 70-eno1.link would assign the name eno1 to a NIC with a MAC address 11:22:33:44:55:66. I use this to supply enoN style names to integrated on-board NICs if the system firmware does not have the appropriate data structures to allow them be automatically detected as on-board NICs. (The NamePolicy=onboard line might actually be unnecessary.)

You could use the same syntax to assign any other name, including forcing the name enp60s0 if you wish.

  • +1, just I think I'd recommend using a name that's not really one validly generated by the shipped name policy, such as net1 or if1 or something based on the name of the "network" connected to that interface such as internal0 or lan3. See documentation for Name= for examples. But this is a minor nitpick, since it's unlikely a new "onboard" will ever show up on an existing server... Oh and yes I believe NamingPolicy=onboard is indeed unnecessary. If you specify a name explicitly, that name will be used.
    – filbranden
    Commented Mar 7, 2019 at 9:00
  • This completely defeats the purpose of having consistent names in the first place. Perfect example of ideal lab solution getting destroyed in the real world. Funny thing is that in this particular case, the user would not have had any problem with the older naming scheme (eth0 etc)
    – Mehdi
    Commented Mar 14, 2023 at 14:06
  • @Mehdi nothing stops you from using the old naming: freedesktop.org/wiki/Software/systemd/… which is basically what the solution above explains Commented Jun 20, 2023 at 3:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .