After installing the ISO, the ethernet ports in my ngfw the ports are assigned randomly, e.g., port 6 -> igb0, port5 -> igb1 and so on, and also I had checked this issue in couple of devices. How to overcome this issue.
You can't. It's based on the order FreeBSD detects the devices during boot.
But you can reassign the ports during installation as described here: https://docs.opnsense.org/manual/install.html
You can even do things like this (https://forum.opnsense.org/index.php?topic=27023.msg132002#msg132002) with ethname and syshooks (https://docs.opnsense.org/development/backend/autorun.html#syshook). (Complete overkill here, simply assign and label the ports and move on.)
As OPNsense uses ports from software ports (not harware or physical ports) from both freebsd as well as openbsd. Which repository in OPNsense or which part of the build process is responsible for assigning physical ports and mapping them with respective physical ports number.
Quote from: nitish.patel on November 11, 2023, 10:24:14 AM
After installing the ISO, the ethernet ports in my ngfw the ports are assigned randomly, e.g., port 6 -> igb0, port5 -> igb1 and so on, and also I had checked this issue in couple of devices. How to overcome this issue.
They are not assigned randomly but in order of the devices on the PCI bus.
The fact that somebody printed some numbers on the case of some appliance bears no resemblance to the way FreeBSD sees those interfaces. If it bothers you I suggest you use a label printer.
Quote from: nitish.patel on November 15, 2023, 10:09:12 AM
As OPNsense uses ports from software ports (not harware or physical ports) from both freebsd as well as openbsd. Which repository in OPNsense or which part of the build process is responsible for assigning physical ports and mapping them with respective physical ports number.
It's the order they're presented on the PCI bus, nothing else. You'd have to contact the hardware manufacturer and have them rearrange the ports on the bus to change this behaviour.