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".

NutWrench ,
@NutWrench@lemmy.world avatar

Also, make sure your password contains L's, 1's, 0's and O's in a font deliberately chosen to make them hard to tell apart.

renzev OP ,

And commas! To mess with the CSV file that it will inevitably be dumped into!

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.

neclimdul ,

I really appreciate this change. Prior to it was always a struggle to deploy servers successfully. You'd reboot and your database would be on the wrong interface and you could even remote in because the management interface was suddenly on a firewalled external only network. Ask me how I know.

With virtualization and containers this just got more complicated. I would constantly have to rewrite kvm entire configs because I'd drop a new nic in the machine. A nightmare.

Sure, it's gibberish for the desktop user but you can just use the UI and ignore the internal name. Not even sure the last time I saw it on my laptop. So no big deal.

jadedwench ,

I had to change mine to mac address naming on my proxmox server after the second time the name changed due to a GPU or SSD being added. It was kind of like, so what, if an SSD dies suddenly or I have some issue with a device you are going to rename my fucking nic card again while I am trying to troubleshoot? Absolutely deranged.

possiblylinux127 ,
@possiblylinux127@lemmy.zip avatar

Wait until you find out about vlans

muntedcrocodile ,

Fuck thats why my conky is fucked.

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.

suction ,

Small world thinking. Because you haven't seen the need for it doesn't mean it doesn't exist. Also, did you lose your CTRL, C, and V keys?

laurelraven ,

Yes, because everyone has need of this solution, and wants to have to copy and paste interface names every time they need to touch them, rather than having deterministic naming be an option to enable for those who actually need it...

suction ,

You know Linux isn’t just used by nerdy kids cosplaying as Mr Robot, right?

laurelraven ,

You know Linux isn't just used by enterprise sysadmins, right?

And even speaking as an enterprise sysadmin myself, I've not had need or use for deterministic interface naming once in my career. I have no clue how common that is, but most of the servers, both physical and virtual, that I've worked on only had one Ethernet port connected.

I see the purpose of this, but don't see a reason why it should be the default, or why it couldn't have been implemented like HHD/SSD UUIDs where the old dev names were left intact for easy use outside of fstab and the like where consistency could become a problem

ETA: you also seemed to miss the part of my initial reply to you about it being something that can be enabled by those who need it... And if you're going to say that the enterprise professionals who need it shouldn't have to turn it on every time they spin up a system, I'll remind you that enterprise admins working at that level where they're setting up enough servers for that to be a hassle are probably using orchestration like Ansible, Chef, or Puppet, and can just add that into their configs once

suction ,

TLDR

laurelraven ,

And I don't care, so whatever

Fades ,

life-long Kali fan

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!

mlg ,
@mlg@lemmy.world avatar

me setting my interface into monitor mode manually because it can't handle being split into mon and managed.

fruitycoder ,

No idea what mactab is, but maybe it solves it for me, but being able to go from interface name back to a rack full of heterogeneous PCI cards and go "yep it should be this port" was a wildly useful feature.

I feel like there should be automatic alias creation for simply interface names though.

interdimensionalmeme ,

Wlan1? how would you bridge different channels with only wlan0?

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