Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Props to Alpine and Kali for disabling this bullshit out of the box

Context for newbies: Linux refers to network adapters (wifi cards, ethernet cards, etc.) by so called "interfaces". For the longest time, the interface names were assigned based on the type of device and the order in which the system discovered it. So, eth0, eth1, wlan0, and wwan0 are all possible interface names. This, however, can be an issue: "the order in which the system discovered it" is not deterministic, which means hardware can switch interface names across reboots. This can be a real issue for things like servers that rely on interface names staying the same.

The solution to this issue is to assign custom names based on MAC address. The MAC address is hardcoded into the network adaptor, and will not change. (There are other ways to do this as well, such as setting udev rules).

Redhat, however, found this solution too simple and instead devised their own scheme for assigning network interface names. It fails at solving the problem it was created to solve while making it much harder to type and remember interface names.

To disable predictable interface naming and switch back to the old scheme, add net.ifnames=0 and biosdevname=0 to your boot paramets.

The template for this meme is called "stop doing math".

ace ,
@ace@lemmy.ananace.dev avatar

The predictable interface naming has solved a few issues at work, mainly in regards to when we have to work with expensive piece-of-shit (enterprise) systems, since they sometimes explode if your server changes interface names.
Normally wouldn't be an issue, but a bunch of our hardware - multiple vendors and all - initialize the onboard NIC pretty late, which causes them to switch position almost every other boot.

I've personally stopped caring about interface names nowadays though, I just use automation to shove NetworkManager onto the machine and use it to get a properly managed connection instead, so it can deal with all the stupid things that the hardware does.

corsicanguppy , (edited )

expensive piece-of-shit (enterprise) systems, since they sometimes explode if your server changes interface names.

At no time in the past 25 years with Medium Iron have I seen something blow up on a reboot because an interface comes up late. We'd solved the issue of unreliable init order in 1998 - RH6? Zoot? Compaq, Supermicro, even embedded stuff on was-shit/still-shit gigabyte mobos. /etc/udev/rules.d handled this reliably, consistently and perfectly. Fight me.

acockworkorange ,

FIGHT! FIGHT! FIGHT! FIGHT! FIGHT!

ace ,
@ace@lemmy.ananace.dev avatar

You're lucky to not have to deal with some of this hardware then, because it really feels like there are manufacturers who are determined to rediscover as many solved problems as they possibly can.

Got to spend way too much time last year with a certain piece of HPC hardware that can sometimes finish booting, and then sit idle at the login prompt for almost half a minute before the onboard NIC finally decides to appear on the PCI bus.
The most 'amusing' part is that it does have the onboard NIC functional during boot, since it's a netbooted system. It just seems to go into some kind of hard reset when handing over to the OS.

Of course, that's really nothing compared to a couple of multi-socket storage servers we have, which sometime drop half the PCI bus on the floor when under certain kinds of load, requiring them to be unplugged from power entirely before the bus can be used again.

MonkderDritte ,

with expensive piece-of-shit (enterprise) systems, since they sometimes explode if your server changes interface names.

Glass canons are brittle, huh?

cheddar ,
@cheddar@programming.dev avatar

I laughed so hard. Then I cried remembering good old days of eth0.

xenoclast ,

Holy shit. I must be really old.

Scrollone ,

I laughed but now that I know it I'm going to change the udev rules back to eth0.

d00phy ,

So I do HPC installations, and using Mellanox/NVIDIA adapters in Ethernet mode absolutely sucks. First, when you initially install them, they’re named something like ens2f0, where “2” generally corresponds to the PCI slot. Pretty easy, until you install MOFED. Yeah, I know you don’t need MOFED, but the drivers included in RHEL are waaay old. Anyway, after installing the newer drivers, that exact same interface becomes ens2f0np0!

What’s even better is there’s no guarantee that a PCI Ethernet card in PCI slot 2 will be “ens2…” which I would argue is predictive!

Allero ,

Love the explainer to the meme.

Keep up the good work!

renzev OP ,

Thanks! Memes as education material / propaganda FTW

DogWater ,

I was going to commend you as well. Top notch. I appreciate it

Murdoc ,

I came here to say this. I don't really do networking so I don't have much care for this issue, but the clarity of the explanation was enjoyable. Plus I learned a couple of little things too.

MonkderDritte ,

Kernel parameters? This is a udev thing, just change the udev rule.

orwellianlocksmith ,

I have no idea at all of what this is about but I feel strongly that OP is right and we must urgently fix this disgusting problem we are facing with the interfaces. Get em, OP, get the bastards. Solidarity

Simon ,

Having no idea what this is about and being on a Linux meme subreddit is peak Lemmy.

shasta ,

Solidarity, Reg.

TerraRoot ,

Was that a terry pratchett reference?

shasta ,

Life of Brian

cypherpunks ,
@cypherpunks@lemmy.ml avatar

Redhat, however, found this solution too simple and instead devised their own scheme for assigning network interface names. It fails at solving the problem it was created to solve

I somehow first read "Redhat" as "Reddit" in this sentence, and so was briefly thinking that perhaps this bad idea originated there 😂

renzev OP ,

"reddit makes a linux distro" would be hilarious and terrifying

TheEntity ,

So basically Arch?

JackRiddle ,

Arch is too well made to be made by reddit. While redditors are drawn to it, they could never have actually made it themselves.

barsquid ,

If that was made by redditors then where is the delusional far-right propaganda?

ouRKaoS ,
gravitas_deficiency ,

I smell a community event brewing… :D

possiblylinux127 ,
@possiblylinux127@lemmy.zip avatar

Wait until you find out about vlans

Badabinski ,

I always just derive the interface name from first principles. Like, if I want to know which interface will be used to get out to the internet in a script, I'll just find the one that's L2 adjacent with the default gateway. If I'm given an egress or cidr, I'll just find the interface that has that IP. Modern iproute2 has a JSON output option which makes getting this information pretty trivial. Doing that means that it doesn't matter what scheme your OS is using.

I personally prefer the persistent names for Ethernet, although I don't like them for WiFi. Luckily, it seems like my wireless adapter always just ends up as wlan0. I'm not sure why that's the case, but it works out well in the end for me.

01101000_01101001 ,

This is the goddamned truth

Mora ,

Thanks for this post. I've been working with Interfaces on Red Hat nodes this week and I've already wondered what the hell is going on there.

onlinepersona ,

To disable predictable interface naming and switch back to the old scheme, add net.ifnames=0 and biosdevname=0 to your boot paramets.

What is the old scheme? This?

The solution to this issue is to assign custom names based on MAC address. The MAC address is hardcoded into the network adaptor, and will not change. (There are other ways to do this as well, such as setting udev rules).

Does that mean that until you name something it's unusable?

Anti Commercial-AI license

renzev OP , (edited )

No, the "old scheme" is the one that assigns wlan0, wlan1, eth0, eth1, and so on by default. I would say these names are pretty usable.

The part you quoted is what you need to do if you specifically need to be sure that a specific card gets a specifc name 100% of the time. You don't have to bother with it unless you have a reason to.

muntedcrocodile ,

Fuck thats why my conky is fucked.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • random
  • incremental_games
  • meta
  • All magazines