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

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    To me it seems they followed the hdd UUID style, rather than sda0 or hda0 that can change at boot you now have a fixed UUID to work with. I can see this being important on larger server networks

    • notabot@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      Having consistent interface names on servers that have several is useful, but we already had that option. The interface names they generate are not only hard to remember, but not terribly useful as they’re based on things like which PCI slot they’re in, rather than what their purpose is. You want interface names like wan0 and DMZ, not enp0s2. Of course, you can set it up to use useful names, but it’s more complicated than it used to be, so while the systemd approach looks like a good idea on the surface, it’s actually a retrograde step.

    • laurelraven@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      But the SSD/HDD solution doesn’t replace /dev/[s|h]da# entirely, just adds a consistent way to set them in configs like fstab. You can still use the old device names so working with them at the command line is still easy for the most part.

        • laurelraven@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          I mean, you should be careful with destructive changes and commands whether the interface names can change or not… And since they won’t change outside of a reboot, I’ve yet to run into a scenario where that becomes a problem as I’m looking at and making sure I’m talking to the correct device before starting anyway

          • BCsven@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            2 days ago

            Yep, i always type the line and take a break, and check the drives in another terminal first, before committing, but the web is full of people “argg I just dd the wrong drive”.