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

  • renzev@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    33
    arrow-down
    4
    ·
    6 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
      link
      fedilink
      English
      arrow-up
      15
      ·
      6 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
        link
        fedilink
        arrow-up
        7
        ·
        6 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.

    • notabot@lemm.ee
      link
      fedilink
      arrow-up
      6
      arrow-down
      2
      ·
      6 months ago

      Personally I’d do away with NetworkManager too and just configure the interfaces directly, but that might just be me being old and grumpy!

      I think most distros go along because their upstream did. There are comparatively few ‘top level’ distributions, the main ones (by usage) being Redhat and Debian. Most everything else branches from those. Redhat’s got enough clout on the market that there’s a sort of pull towards complying with it just to not be left put.

      I use Debian, but I think they’re crazy for swallowing everything Redhat pushes, they could easily stick to the cleaner options and have a better system for it. At least they let you opt out of systemd, so life is a little more tolerable.

      • renzev@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 months ago

        I’d do away with network-manager on a stationary system too, but I’m on a laptop, and unless there’s some trick I don’t know about, configuring wifi by hand for every new network I come across sounds like a bit of a pain. Especially for corporate/institution network that use fancy things like PEAP

        • notabot@lemm.ee
          link
          fedilink
          arrow-up
          4
          arrow-down
          2
          ·
          6 months ago

          That’s fair, it does make sense to use it on a laptop, but it really should be the sort of thing you add when needed rather than having it jammed in whether it’s useful or not.

          Every time I need to do something even slightly different to a basic setup I find myself inventing new curses for those who screwed things up with these overblown, over complex, minimally functional abominations. Just give me vi and the basic configuration files and let me get on with it!

          • renzev@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            2
            ·
            6 months ago

            I find myself inventing new curses for those who screwed things up with these overblown, over complex, minimally functional abominations

            Gosh, tell me about it. I once tried writing a custom wifi signal strength indicator app that got its information from network-manager. Apparently the only way to programmatically communicate with network-manager is through dbus, which is just terrible. Scarce to no documentation, poor support for any language other than C/C++, and once you do get it working, it’s the most disgusting and overly verbose code you’ve ever seen, just to query the status of the wifi card. Could’ve exposed the API through raw unix sockets or something, but nope, they had to reinvent the wheel on that one as well.

            Just give me vi and the basic configuration files and let me get on with it!

            I’ll take this opportunity to shill for Void Linux, it sounds like exactly what you’re describing. I’ve been a happy user for like 5 years now. I particularly like how nothing ever breaks, because there’s not much to break on such a minimal system.

            …well, actually, a few things did break over the years, but most of those were due to user error haha.

            • notabot@lemm.ee
              link
              fedilink
              arrow-up
              4
              ·
              6 months ago

              In news that will shock no-one, dbus was, of course, initially created by a Redhat engineer. I get the idea of having a general purpose bus that everything can communicate on, but they somehow managed to even make that complex.

              You make a compelling case for Void Linux. I use Debian or a RHEL derivative for work, primarily so there’s at least a chance to hand systems off to someone else to maintain, the less known distros seem to meet with blank looks.

              I want to give NixOS a try sometime, as I like the idea of declaritively defining the system

              • llii@discuss.tchncs.de
                link
                fedilink
                arrow-up
                3
                ·
                edit-2
                6 months ago

                I want to give NixOS a try sometime, as I like the idea of declaritively defining the system

                That seems to be even more convoluted and complex.

                “Just one more abstraction layer, I swear!”

                I’m a NixOS noob bytheway, so please correct me if I’m wrong.

                • notabot@lemm.ee
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  6 months ago

                  I think the difference is the level it’s happening at. As I said, I haven’t tried it yet, but it looks like a simple, unfussy and minimal distribution that you then add functionality to via configuration. Having that declarative configuration means it’s easy to test new setups, roll back changes and even easily create modified configuration for other servers.

                  • renzev@lemmy.worldOP
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    6 months ago

                    I use nixos on my homeserver, but I’m looking to switch it to Void as well. For me personally I just realized that it’s easier to set everything up with shell scripts and docker-compose. But that’s just my personal experience, by all means go ahead and try out nixos if you have the time. It has lots of unique features that you can’t replicate with “just a bunch of shell scripts”. This video does a great job of selling nixos. Maybe my favourite part of nixos is how they make “shortcuts” for a lot of common tasks. For example, setting up a letsencrypt ssl certificate for your webserver with autorenewal can be done in just two lines of config.

        • crater2150@feddit.de
          link
          fedilink
          arrow-up
          2
          ·
          6 months ago

          If by “configuring wifi by hand” you mean writing config files by hand, that’s actually not necessary with plain wpa_supplicant too. There is wpa-gui (or wpa-cute if you prefer Qt over GTK), which is basically a GUI frontend to wpa_supplicant, which makes adding new networks nearly as easy as with NetworkManager. But it’s a far less modern looking UI than the NM frontends.

          • renzev@lemmy.worldOP
            link
            fedilink
            arrow-up
            1
            ·
            6 months ago

            Thanks for the info, I’ll take a look. “far less modern looking” is a selling point for me haha. Give me those win95-looking gtk2 interfaces!

      • MonkderDritte@feddit.de
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        6 months ago

        Personally I’d do away with NetworkManager too and just configure the interfaces directly

        Connman and iwd have nice graphical interfaces btw. I got that route after nm disbehaved and i couldn’t figure out why (same for systemd and s6/dinit after systemd-dnsd threw a fit).