Why is the interface names changing?

Using Ubuntu 18.04 and their kernels the interface name comes up as enp2s0f0.

When installing the mlnx-en-dkms package (version 5.2-1.0.4.0.g13e6dd1) driver provided by mellanox the interface name comes up as enp2s0f0np0

How can I prevent / preserve the name change between reboots / reloading the mlx5_core kernel module? Is there a single udev rule that will keep the name the same where I don’t have to specify a specific rule for each mellanox mac?

Or is systemd causing this some how?

Hi,

Please refer to the below section in MLNX_OFED UM for PersistentNaming

https://docs.mellanox.com/display/OFEDv522200/Ethernet+Interface#EthernetInterface-PersistentNaming

Thanks,

Samer

Sure that works but I’m looking for a rule a little more dynamic without needing to know the mac adddress of each interface. Really just want it to match the name scheme that the in kernel driver uses.

what is the “np” part of new interface name mean/referrs?