ethX port enumeration not stable

Post bug reports related to either the kiosk ISO or the kiosk wizard here.
tagon
White ninja
White ninja
Posts: 18
Joined: 07 Nov 2019, 14:13
Distribution: porteus-kiosk

ethX port enumeration not stable

Post#1 by tagon » 23 Jul 2021, 08:30

We have a project with an Aslan-W719C (a PanelPC with three LAN ports, labeled LAN1/2/3). Currently we use PK4.9 (Linux version 5.4.23-kiosk).

Recently we noticed that the Linux kernel assignment of physical LAN ports to eth0/1/2 names is not always the same.
  • During most boots, the order is (e.g.) LAN1=eth2, LAN2=eth1, LAN3=eth0. But sometimes the order is (e.g.) LAN1=eth2, LAN2=eth0, LAN3=eth1. (Just as an example, there seems to be no port that permanently 'stays in place'.)
  • This means that the configured port, e.g. "network_interface=eth1" sometimes has no connection to the network, because the cable is plugged into the hardware port that is normally associated with eth1, but now eth1 is associated to a different physical port.
Question: Is there a way to 'lock' the port assignment in place?

There must be some hardware that does not change, e.g. the PCI addresses. Could we use this as an order criterium? How?
  • I have 'dmesg' and 'ifconfig -a' output I can provide if this is helpful.
  • It does not matter if LAN1/2/3 are assigned to some random order, e.g. eth1/2/0, and it does not need to be the same for two different devices (we use a bootcmd script and ifconfig to only enable the configured ethX port). It's only important that on a given Aslan-PC it stays the same on subsequent boots.
  • On the 'net, I have found that this is actually a well-known problem - Linux kernels assign ethX names in the order the interfaces are found, and sometimes the detection order changes, depending on which hardware was detected first. On Ubuntu and RedHat, e.g. BIOS-assigned names/numbers can be used, or the 'first boot' situation is locked (using a config file). Of course this is something that might not be possible on a PK installation.
  • We do use 'persistent storage' (for the configuration file and browser cache of a PWA, in the future we might have more uses), so storing something locally is an option, and we can probably think up something ourselves (e.g. using some hardware address).
  • But maybe someone else had this problem already. Or maybe there is a PK or kernel option, or a script that can already fix this.
Thanks in advance!

EDIT: Typofix

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5660
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

ethX port enumeration not stable

Post#2 by fanthom » 23 Jul 2021, 10:28

Hello tagon,

I understand that you have one ethernet cable plugged to the kiosk PC.

Please disable unused NICs in the PC BIOS. That would be fastest solution.

Thanks
Please add [Solved] to your thread title if the solution was found.

tagon
White ninja
White ninja
Posts: 18
Joined: 07 Nov 2019, 14:13
Distribution: porteus-kiosk

ethX port enumeration not stable

Post#3 by tagon » 28 Jul 2021, 05:47

Thanks for the fast reply, fanthom,
fanthom wrote:
23 Jul 2021, 10:28
Please disable unused NICs in the PC BIOS. That would be fastest solution.
I'm not sure if the BIOS actually has an option for it, but I will check if it does.

Post Reply