Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NIC enumeration

    Scheduled Pinned Locked Moved Hardware
    8 Posts 4 Posters 940 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dirtyfreebooter
      last edited by

      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:01

      When 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.

      NogBadTheBadN GertjanG 2 Replies Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad @dirtyfreebooter
        last edited by NogBadTheBad

        @dirtyfreebooter Rename your interfaces to something meaningful to you in the Interfaces -> Interface Assignments page.

        Screenshot 2021-02-04 at 12.48.54.png

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          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 or pciconf -lv.

          Steve

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @dirtyfreebooter
            last edited by Gertjan

            @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.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • D
                dirtyfreebooter
                last edited by

                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
                
                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  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

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dirtyfreebooter @stephenw10
                    last edited by

                    @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!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.