NIC enumeration
-
I have 8 i210 NICs on my motherboard.
System LAN1 MAC Address: ac:1f:6b:7b:07:fa
System LAN2 MAC Address: ac:1f:6b:7b:07:fb
System LAN3 MAC Address: ac:1f:6b:7b:07:fc
System LAN4 MAC Address: ac:1f:6b:7b:07:fd
System LAN5 MAC Address: ac:1f:6b:7b:07:fe
System LAN6 MAC Address: ac:1f:6b:7b:07:ff
System LAN7 MAC Address: ac:1f:6b:7b:08:00
System LAN8 MAC Address: ac:1f:6b:7b:08:01When pfSense (2.4 or 2.5) boots, igb is LAN5, then LAN1,2,3,4,6,7,8. LAN5 is always out of order. There is nothing in the BIOS that lets me change the order and went I boot Ubuntu or Debian, the NICs are enumerated in the correct order.
Its totally minor, but is there an easy way to fix this?
I was looking at something like, https://github.com/eborisch/ethname .. but was unsure where to put the
rc.conf
entries required. -
@dirtyfreebooter Rename your interfaces to something meaningful to you in the Interfaces -> Interface Assignments page.
-
There's no way to 'fix' that in pfSense directly. They are numbered in the order they are enumerated so I think that NIC is on a different PCI bus.
Hard to imagine that from the MAC addresses. Check the boot log orpciconf -lv
.Steve
-
@dirtyfreebooter said in NIC enumeration:
correct order.
Thy this :
Export config.
Open it up with an editor like notepad++
It's an xml file, so easy to read.You'll find a section
<interfaces> <wan> ...... </wan> <lan> ...... </lan> ..... (etc) </interfaces>
Reorder the section.
Import the config. -
The config doesn't make any difference to the MAC address to base interface name relationship.
igb0 will always be ac:1f:6b:7b:07:fe unless you add or remove other igb NICs.
Steve
-
interesting, i didn't think to look at the PCI bus addresses.. Linux must be rearranging them by MAC address with udev probably, because it does appear that going by PCI bus address order, LAN5 is first?
igb0@pci0:3:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb1@pci0:4:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb2@pci0:5:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb3@pci0:6:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb4@pci0:7:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb5@pci0:8:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb6@pci0:9:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb7@pci0:10:0:0: class=0x020000 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet
-
igb0 will always be first. If that happens to be the LAN5 NIC/MAC then yes.
But, yeah, that is first because it's in the lowest position on the bus.
In FreeBSD 12 and hence pfSense 2.5 there is a function named PCI Device Wiring.
I've never tried it but it looks like you could use that to force that device to be igb4 for example by setting the device hint:
hint.igb.4.at="pci0:3:0"
That would then shuffle the others so they should appear in MAC order.
But I would not do that. That doesn't get stored in the config so if you ever had to re-install the interfaces would be incorrectly assigned until you added it again.
Steve
-
@stephenw10 oh yea, didn't really think about the re-install case.. that argument alone overrides my OCD, as if i ever have to re-install I want to be to just grab a backup config and be back up and running. Thanks!