:: Re: [DNG] My Qemu LAN-peer document…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: tito
日付:  
To: dng
題目: Re: [DNG] My Qemu LAN-peer documentation is now in its first draft
On Wed, 03 Mar 2021 14:52:57 +0000
g4sra via Dng <dng@???> wrote:

> <-- huge snip -->
>
> Just for completeness should someone dig this thread up trying to
> solve an issue...such as a 12 port router....
>
> The kernel's FDT determines the order of detection for built-in
> interfaces. Learn how to make them, then don't change it and the
> interfaces will always come up the same way.


Hi,
Cannot confirm that as I have a board with 8 onboard ports

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)
09:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0a:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0b:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0c:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0d:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0e:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
0f:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)

and they used to come up in all possible permutations.
When I added a 4 port addon card

07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
07:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
08:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
08:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

things got even more funny.

> Mask (delete, override with empty) e/udev rules and scripts and use
> the purpose created 'ifrename' utility. And don't use SystemD OS..


eudev could do nothing because the names I would have liked where in use
same for ifrename. It works eventually if you use so called predictable new names
and rename to old style names but even then you cannot be sure the predictable
names will stay the same at next reboot.
The only working solution is to:

1) at boot rename all detected interfaces to some temporary name (e.g. eth*renamed)
2) rename eth*renamed to eth{0-99} by a hardcoded list of mac addresses in the 
    wanted order.
3) don't use udev it will not work (e.g delete 70-net-persistent-names.rules)
4) eventually recreate 70-net-persistent-names.rules on the fly at boot
    after having renamed the interfaces with the desired names linked
      to mac addresses.
5) make sure  70-net-persistent-names.rules is DELETED at reboot (or is on volatile storage)
      or chances will be good that you will be locked out of your box at the next reboot.


Ciao,
Tito