Network Interface Names

qetesh

Cadet
Joined
Apr 27, 2022
Messages
2
Hi Forum,
I am quite new to TrueNAS but so far got along with reading docs and the forum. But now I am lost and can't find an answer to my problem:
My server has 3 Network interfaces, two onboard 1GB NICs and an added 2.5GBit NIC - all of them Intel.
I use the 2.5GBit one as the main interface to transfer data. One of the onboard NICs is linked into a VM as a PCI-Device and the third one is attached to a few other VMs. Now my problem occured when I added a USB3 controller to the system - all the PCI-Addresses changed which wasnt a problem for anything but the NIC that is attached to the VMs. Its name changed from enp7s(something) to enp12s0f1 - I assume this name is generated from the PCI-Address. The other two interfaces are named eno0 and ens2 which did not change.

Here's an overview again to make it hopefully more clear:
  • eno0
    • onboard Intel 1Gb NIC
    • current pci address: 0000:0c:00.0
    • Linked into one VM as a PCI-Device
  • enp12s0f1
    • onboard Intel 1Gb NIC
    • current pci address: 0000:0c:00.1
    • Attached to several VMs as virtual NIC
  • ens2
    • PCI-E card with Intel 2.5Gb NIC
    • current pci address: 0000:09:00.0
    • Main NIC for TrueNAS
So the big question is: How do I give enp12s0f1 a name that doesn't change everytime some (unrelated) hardware is changed? Since I am still in the process of finishing the system a few more changes might happen and it is annoying to go through all the VMs settings every time. The names of eno0 and ens2 did not change even though their pci addresses changed. And I don't know why the third interface did not get a fixed name as well from the start.

I hope this was clear enough and someone can help me. Let me know if some information is missing!
 

Karthanis

Cadet
Joined
Apr 26, 2022
Messages
1
How did you get the
  • 1x 2.5Gb Intel I225-LM PCIE
Working? On my system I see the IGC driver is installed, but it does not seem to be working....
 

qetesh

Cadet
Joined
Apr 27, 2022
Messages
2
How did you get the
  • 1x 2.5Gb Intel I225-LM PCIE
Working? On my system I see the IGC driver is installed, but it does not seem to be working....
TBH I just inserted it into a PCIe-Slot and it worked. Sorry I can't help you more...
 
Joined
Sep 14, 2022
Messages
2
I was able to solve this problem by adding a new entry under /etc/systemd/network/. On my reasonably fresh installation there was already an existing configuration file for a persistent network interface name at 10-persistent-net.link, which is close to what you want. So I created a new file:

Code:
# /etc/systemd/network/9-persistent-net.link

[Match]
MACAddress=YOUR_MAC_ADDRESS_HERE

[Link]
Name=eth0


After a single reboot the new name applied with no issues.
 
Top