Powershell
Posts: 44
Joined: Fri Apr 08, 2016 10:24 am

Crazy interface names

Wed Jun 22, 2016 8:45 pm

Just wondering, why the interfaces on Raspberry + Ubuntu have such crazy names like

wlx00e01ce3030f
or
enxb822ebfb32ad

Why not the usual wlan0, eth0 ?

asavah
Posts: 373
Joined: Thu Aug 14, 2014 12:49 am

Re: Crazy interface names

Wed Jun 22, 2016 8:50 pm

google: systemd predictable network interface names

SonOfAMotherlessGoat
Posts: 690
Joined: Tue Jun 16, 2015 6:01 am

Re: Crazy interface names

Wed Jun 22, 2016 8:52 pm

It's the systems way of assigning a unique ID to the interface. It's persistent across reboots. Yeah, it looks funny, but the en's are ethernet, wl are wireless.

If you had 3 ethernet adapters in your system, there's a chance (unless you do some UDEV configs) that any one of the 3 could be deemed eth0, and upon reboot another one of the 3 could be given the name eth0. With the UID names, you know exactly which interface is which, and it wont change when you reboot.
Account Inactive

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Crazy interface names

Wed Jun 22, 2016 8:54 pm

Powershell wrote:Just wondering, why the interfaces on Raspberry + Ubuntu have such crazy names like
wlx00e01ce3030f
or
enxb822ebfb32ad
Why not the usual wlan0, eth0 ?
I think it's to confuse you but they claim it has to do with being sure that the interface is a specific device and the old names couldn't be counted on in that regard due to the randomness of the boot up under different conditions and changes.

For example, if you had two ethernet cards and one was to the internet and one to your inside network, you'd want to *know* that you were opening ports up with the one on your inside network and not accidentally on the internet one. Apparently previous schemes could cause race conditions which made them basically give up and use what BSDs and Solaris use.

epoch1970
Posts: 5132
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Crazy interface names

Thu Jun 23, 2016 2:37 pm

That's pretty terrible.
Supposedly this format is not enabled by default, but in practice I use now a version of ubuntu that stubbornly refuses to use anything else.
To add insult to injury, none of the supposed workarounds have worked for me (another thing is not stable: systemd/udev), and my usual udev rules would rename every other interface but the enxb827ebxxxx one...

If finally found a way, it seems to work: create a rule in /etc/udev/rules.d/ named zz-something.rules (running late is important because we need to use an ENV variable), and add something like this:

Code: Select all

SUBSYSTEM=="net", ENV{ID_NET_NAME_MAC}=="enxb827ebxxxx", NAME="eth0"
It's a bit magic, I couldn't make it work with ATTRS{address} as all the other rules. Whatever.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Beginners”