[systemd-devel] Antw: Re: [EXT] Finding network interface name in different distro

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Oct 19 08:45:51 UTC 2022


>>> Etienne Champetier <champetier.etienne at gmail.com> schrieb am 18.10.2022 um
17:15 in Nachricht
<CAOdf3gqb35ot6bpkgdjk6ay3anf6aGtbH3W-c5Jcc-a+=v6-Jw at mail.gmail.com>:
> Le mar. 18 oct. 2022 à 10:04, Ulrich Windl
> <Ulrich.Windl at rz.uni-regensburg.de> a écrit :
>>
>> >>> Etienne Champetier <champetier.etienne at gmail.com> schrieb am 15.10.2022
um
>> 02:41 in Nachricht
>> <CAOdf3goQ5+TNf7mTKCix_59AboWeoQWzpGfuWasJhtpr+ZmOwg at mail.gmail.com>:
>> > Hi All,
>> >
>> > When changing distro or distro major versions, network interfaces'
>> > names sometimes change.
>> > For example on some Dell server running CentOS 7 the interface is
>> > named em1 and running Alma 8 it's eno1.
>>
>> Wasn't the idea of "BIOS device name" that the interface's name matches the

> label printed on the chassis?
> 
> Some HPE Gen10 servers have the first port as eno5, on some recent
> Dell servers the first port is eno8303.
> I would love to use eno1 everywhere, but it's a mess.

A Dell PowerEdge R7415 (from 2018 or so) uses eno1 and eno2 for the embedded
NIC, ens4f0np0 and ens4f1np1 for add-on 10Gb NICs (as well as ens5f0np0 and
ens5f1np1 for an additional card). In Linux (SLES 15) the names became em1,
em2, p4p1, p4p2, p5p1, p5p2.
I'm surprised about the "eno8303".

Also I think using "p" twice (p<slot>p<port>) was a bad choice.

> 
>> > I'm looking for a way to find the new interface name in advance
>> > without booting the new OS.
>> > One way I found is to unpack the initramfs, mount bind /sys, chroot,
>> > and then run
>> > udevadm test-builtin net_id /sys/class/net/INTF
>> > Problem is that it doesn't give me right away the name according to
>> > the NamePolicy in 99-default.link
>> >
>> > Is there a command to get the future name right away ?
>> >
>> > Thanks
>> > Etienne
>>
>>
>>
>>





More information about the systemd-devel mailing list