890

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

you are viewing a single comment's thread
view the rest of the comments
[-] bitwaba@lemmy.world 29 points 3 days 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?

[-] jj4211@lemmy.world 3 points 3 days ago

And at least in some distributions, they do exactly that, a number of aliases for the same interface. And you can add your own.

load more comments (7 replies)
this post was submitted on 27 Jun 2024
890 points (96.5% liked)

linuxmemes

19671 readers
84 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS