Jump to content

Nightmarish network interface names


ogogon

Recommended Posts

Greetings, colleagues!

 

When I connect a Wi-Fi USB adapter, the system assigns it a terrible interface name!

I'm used to the fact that a well-bred Linux gives them names like wlan0, wlan1, etc...

 

Armbian gives the name according to the following scheme: "wlx<MAC-ADDRESS>"! It is very uncomfortable!

 

How I can persuade him to give names according to the traditional scheme?

 

I am grateful for the answers on the essence of the question,

Ogogon.

Link to comment
Share on other sites

This change is not Armbian related, but a systemd/udev change, to fix a perceived issue with machines that have multiple ethernet interfaces.  Because the eth0, eth1 etc naming was not bould to a specific device, if for some reason they were detected in a different sequence at boot, eth0 would not be the eth0 from a previous boot. So the powers that be adopted the 'predicable naming system' which is tied to the hardware address of the device, which shouldn't change. You can read more about that here.

 

They suggest three options to revert to the older behaviour:

 

Quote
  1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's .link file for the default policy: ln -s /dev/null /etc/systemd/network/99-default.link
  2. You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.
  3. You pass the net.ifnames=0 on the kernel command line

(https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/)

 

A fourth option they didn't mention is to make a udev rule that links the predictable name to the un-predictable  ones to the predictable, but that is a bit harder.  It looks like the easiest uption is to mask the udev link rule.

Link to comment
Share on other sites

Hey,

1. Tried, didn't work
2. I am building a distro and want this to be independent to the interface name.

3.
I tried adding net.ifnames=0 to the kernel options, but it makes the module crash. Just as a sanity check net.ifnames=1 does not do this crash.
Here is the output:
aY6Mf9Y.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines