928
submitted 5 months ago by renzev@lemmy.world to c/linuxmemes@lemmy.world

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

top 50 comments
sorted by: hot top controversial new old
[-] fossphi@lemm.ee 126 points 5 months ago

Good lord, this is a top tier meme!

[-] renzev@lemmy.world 69 points 5 months ago

Thanks, glad you like it! I spent quite some time re-making the template from scratch in inkscape, because the original meme din't have enough space for the text

[-] fossphi@lemm.ee 38 points 5 months ago

Heck yeah, vectorised libre memes ftw!

[-] RustyNova@lemmy.world 12 points 5 months ago

I often do the same for my memes. I like them high quality

load more comments (1 replies)
[-] orwellianlocksmith@lemmy.world 96 points 5 months ago

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@lemmy.dbzer0.com 53 points 5 months ago* (last edited 5 months ago)

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

[-] shasta@lemm.ee 8 points 5 months ago
load more comments (2 replies)
[-] Allero@lemmy.today 86 points 5 months ago

Love the explainer to the meme.

Keep up the good work!

[-] renzev@lemmy.world 29 points 5 months ago

Thanks! Memes as education material / propaganda FTW

[-] DogWater@lemmy.world 9 points 5 months ago

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

[-] Murdoc@sh.itjust.works 8 points 5 months ago

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.

[-] notabot@lemm.ee 74 points 5 months ago

It's amazing how many linux problems stem from 'Redhat, however, found this solution too simple and instead devised their own scheme'. Just about every over complex, bloated bit of nonsense we have to fight with has the same genesis.

[-] renzev@lemmy.world 29 points 5 months ago

What I really don't understand is why distro maintainers feel the need to actually go along with these changes. Like, sure, if this predictable interface naming thing worked as intended, I can definitely see how it can be useful for server administrators. You could just hardcode the automatic interface names instead of assigning them manually in /etc/mactab. But why would the rest of us ever need this? Most personal machines have at most one wifi card and one ethernet device, so wlan0 and eth0 are perfectly predictable. And even if you have multiple wifi or ethernet adapters, your networking is probably handled by network-manager, so you never actually have to put interface names into config files. Why force enterprise-grade bloat on users who just want a simple desktop experience?

[-] ikidd@lemmy.world 15 points 5 months ago

As to why distro maintainers go along, if you had to vet every time the network stack updated and make sure it doesn't break your custom solution to predictable naming, you'd probably just go along with it and let anyone that needed it devise and maintain their own solution. 99% of users won't worry about it.

[-] notabot@lemm.ee 7 points 5 months ago

No need for a custom solution, we already had ways to make predictable names that worked better than this. Giving each interface a name that represents it's job makes life so much easier when you have several, naming them after which PCI bus they're on does not.

load more comments (14 replies)
[-] Count042@lemmy.ml 21 points 5 months ago

It's amazing how many of those started with Lennart, too.

[-] notabot@lemm.ee 14 points 5 months ago

He's definitely off my Christmas card list. He seems desperate to leave a legacy, but he keeps trying to turn Linux into windows instead.

load more comments (7 replies)
load more comments (26 replies)
[-] ace@lemmy.ananace.dev 46 points 5 months ago

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.

load more comments (4 replies)
[-] cheddar@programming.dev 45 points 5 months ago

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

[-] Scrollone@feddit.it 12 points 5 months ago

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

[-] xenoclast@lemmy.world 8 points 5 months ago

Holy shit. I must be really old.

[-] cypherpunks@lemmy.ml 32 points 5 months ago

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@lemmy.world 40 points 5 months ago

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

[-] ouRKaoS@lemmy.today 25 points 5 months ago

I'm getting "Twitch plays Pokemon" vibes...

I smell a community event brewing… :D

load more comments (3 replies)
[-] blackstrat@lemmy.fwgx.uk 31 points 5 months ago

As someone who worked on a pre-systemd linux system with multiple NICs and needed them all configured automatically from an OS image based on where it was in the rack, I can't stress enough how good deterministic interface names are.

Booting up a system and each time having different names for each NIC was a nightmare.

Frankly 90+% of what systemd has done is tremendously positive and makes linux a better operating system to use, both for sys admins and end users.

load more comments (1 replies)
[-] NaoPb@eviltoast.org 31 points 5 months ago

I actually prefer the eth0 and wlan0.

[-] caden 22 points 5 months ago

That's what the meme is saying too

load more comments (1 replies)
[-] bitwaba@lemmy.world 30 points 5 months ago

"the order in which the system discovered it" is not deterministic

This is the same problem they had with hard drive names and it seems to have been solved in a sensible way, i.e. /dev/sda still points to the first disk detected by the system, but you can look look in /dev/disk/by-path (or by-uuid, etc) to see the physical address of the devices on the system and what they are symlinked back to, and set your fstab or mdadm arrays to be configured based on those unique identifiers instead.

So, I guess what I'd like to know is why hasn't this been solved the same way? When you boot up they should present every hard wired Ethernet port as ethX, and the hardware address interface should be present as well but aliased back to the eth. Then you can build the your network configs based on either one.

Shouldn't be that hard right?

[-] nekusoul@lemmy.nekusoul.de 24 points 5 months ago

Cries in nvme1n1p6, which is my current OS partition.

load more comments (2 replies)
[-] lemmyvore@feddit.nl 8 points 5 months ago

But nobody uses /dev/sdX anymore (not after they wipe the wrong disk once anyway). They either use logical UUIDs or hardware WWN/serial.

[-] renzev@lemmy.world 10 points 5 months ago* (last edited 5 months ago)

idk man I use /dev/sdX when running commands interactively and PARTLABELs in my /etc/fstab. All those letters and numbers in UUIDs are too much for my monkey brain to handle lol

[-] bitwaba@lemmy.world 7 points 5 months ago* (last edited 5 months ago)

Yeah, the point is "you can use either one", instead of "we made the choice for you"

[-] thisisnotgoingwell@programming.dev 7 points 5 months ago* (last edited 5 months ago)

As a data center engineer of 10+ years, I struggled to understand this at first. In my world, the hardware does a POST before the OS boots and has an inventory of what hardware components are available, so it shouldn't matter in what order they are discovered, since the interface names should make a correlation between the interface and the pcie slot that NIC exists in.

Where the water gets muddled is in virtualized servers. The NICs no longer have a correlation to a specific hardware component, and you may need to configure different interfaces in the virtualized OS for different networks. I think in trying to create a methodology that is agnostic to bare metal/virtualized OSs, it was decided that the naming convention should be uniform.

Probably seems like bloat to the average admin who is unconcerned with whether these NICs are physical or virtual, they just want to configure their server.

load more comments (1 replies)
[-] NegativeLookBehind@lemmy.world 28 points 5 months ago

eth0? No no, we need wlps0n1pn2d4es6vsd9c69420

[-] apfelwoiSchoppen@lemmy.world 26 points 5 months ago

I miss seeing this meme format on Lemmy. It's so good, and this one is no exception.

[-] renzev@lemmy.world 32 points 5 months ago

Thanks! I love this format so much. I can't find it now, but one of my favourite memes in this genre was something like this:

STOP DOING

  • Tasks were never meant to be completed
  • Years of working, but there's STILL MORE SHIT TO DO
  • Wanted to get some work done anyway, for a laugh? We had a tool for that: it was called SIMULATION GAMES
  • "Please let me sacrifice a third of my life to justify my existence. Please let me spend eight hours a day working just to be able to do it again the next day" - statements dreamt up by the utterly deranged

Look at what people have been demanding our respect for all this time, with all the schedules and todo lists we have built for them:

These are REAL things done by REAL people

<Pictures of gmail, microsoft outlook, and some TODO list app>

They have played us for absolute fools

load more comments (3 replies)
[-] maxinstuff@lemmy.world 20 points 5 months ago* (last edited 5 months ago)

Here I am on a laptop with no ethernet ports (probably works over USB-C? No idea, haven't tried), and a single wifi adapter. Guess I'll give it a try:

ip link show

What I expected

wlan0

What I got

wlp242s0

Neat 👍 😎 👍

[-] derpgon@programming.dev 9 points 5 months ago

enp2s0, wlp3s0, and my fav enp4s0f3u1u3

[-] MonkderDritte@feddit.de 13 points 5 months ago

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

[-] 01101000_01101001@mander.xyz 13 points 5 months ago

This is the goddamned truth

[-] NutWrench@lemmy.world 11 points 5 months ago

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.

load more comments (1 replies)
[-] Mora@pawb.social 11 points 5 months ago

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@programming.dev 10 points 5 months ago

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@lemmy.world 9 points 5 months ago* (last edited 5 months ago)

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.

[-] neclimdul@lemmy.world 9 points 5 months ago

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.

[-] possiblylinux127@lemmy.zip 7 points 5 months ago

Wait until you find out about vlans

load more comments
view more: next ›
this post was submitted on 27 Jun 2024
928 points (96.6% liked)

linuxmemes

21282 readers
1900 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS