Re: how to compute predictable network interface names?
On 02/16/2017 12:47 PM, Christian Seiler wrote:
>
> On a system with predictable names running? Or on a system
> pre-upgrade?
>
Its more "pre-installation". I boot a USB stick and run
my own installer (using debootstrap or creating a clone).
The NIC name is needed to setup /etc/network/interfaces.
I know how the interfaces are named using the old scheme,
but the predictable names are hard to guess.
> Because if you have a system that's being upgraded at the
> moment, the following command _might_ work _after_ you've
> upgraded udev and _before_ you've rebooted the system.
>
> udevadm info /sys/class/net/eth4
>
> Look at ID_NET_NAME there.
>
I found 3 for eth0 on my desktop PC:
E: ID_NET_NAME_MAC=enx54bef70930bd
E: ID_NET_NAME_ONBOARD=eno1
E: ID_NET_NAME_PATH=enp0s25
For a server with 6 NICs I got for eth4
E: ID_NET_NAME_MAC=enx0cc47a860566
E: ID_NET_NAME_PATH=enp4s0f2
E: ID_NET_NAME_SLOT=ens261f2
A wild guess would be it is "ID_NET_NAME_PATH" unless there is
a "ID_NET_NAME_ONBOARD" ? I understand that this is the fragile
part.
Nice tip, thanx very much
Harri
Reply to: