[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Predictable Network Interface Names



Le 30/03/2022 à 20:39, Greg Wooledge a écrit :

Doesn't matter.  You can choose a memorable name.  The MAC address is
simply the data point you place in the config file, so the system knows
this is the interface you're talking about.

unicorn:~$ cat /etc/systemd/network/10-lan0.link
[Match]
MACAddress=18:60:24:77:5c:ec

[Link]
Name=lan0

That's what I'm using.  Of course, this relies on the MAC address being
consistent across boots.  I've heard of some cases where this isn't
true, but I believe those cases involved removable devices (USB network
interfaces or similar).

"lan0" is familiar to me from HP-UX, and it also isn't "eth0", so there's
no risk of collision with the kernel's default name scheme.  I have
no idea what happens if you try to assign the names "eth0" and "eth1"
to a pair of interfaces that come up as "eth1" and "eth0" by default.
Are the renames done sequentially?  Will they fail in this case?  I don't
know, and I don't want to find out the hard way.


Be aware that bridge or bond interfaces get their mac address from one of the inner inetrface, thus you may have to add a macth (eg a match on the driver)



Reply to: