Consistent Network Device Naming inconsistent

Issues related to configuring your network
Post Reply
dominicM
Posts: 5
Joined: 2017/06/12 10:53:35

Consistent Network Device Naming inconsistent

Post by dominicM » 2017/06/12 11:00:15

I installed Centos 7 Minimal on a consumer AMD APU platform and setup static ip manually disabling NetworkManager service. The problem is with the network interface naming scheme. When I installed the only ethernet port was named enp3s0 however it changed to enp4s0 after I added PCIe sata card. It then changed once more when I connected more hard drives or perhaps I might have removed the mSata wifi adapter at the same time. Regardless of this isn't the whole point of "Consistent Network Device Naming " to be consistent despite hardware changes? This is really frustrating and makes the headless server very unreliable. Why is this happening and is there a solution?
Last edited by dominicM on 2017/06/12 11:57:40, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Consistent Network Device Naming inconsistent

Post by TrevorH » 2017/06/12 11:54:08

If you don't like the new naming scheme then disable it using biosdevname=0 net.ifnames=0 on the kernel command line and revert to the old style ethX naming.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dominicM
Posts: 5
Joined: 2017/06/12 10:53:35

Re: Consistent Network Device Naming inconsistent

Post by dominicM » 2017/06/12 11:56:40

I don't dislike it, in fact I think it's a good idea, the problem is that it doesn't do what it's one purpose is supposed to be. I want to know why and how to fix it.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Consistent Network Device Naming inconsistent

Post by TrevorH » 2017/06/12 12:20:03

Apparently your motherboard renumbers all pci devices when new ones are added. Check the output from lspci and you should see that the device number changes when the enpXsY device name changes too.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dominicM
Posts: 5
Joined: 2017/06/12 10:53:35

Re: Consistent Network Device Naming inconsistent

Post by dominicM » 2017/06/12 14:17:06

That makes sense but then what is the point of this new system if its so unreliable, at the very least it should not be default. I mean how is anyone supposed to know which hardware behaves this way and which does not...

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Consistent Network Device Naming inconsistent

Post by TrevorH » 2017/06/12 14:26:07

Sorry, no idea, I disable it on all my VMs since my support 1st liners are used to eth0 = external, eth1 = internal. For physical hardware I've never installed new PCIe cards post install so have not run into that situation.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Consistent Network Device Naming inconsistent

Post by MartinR » 2017/06/12 14:41:19

There's something nagging at the back of my mind saying that if you set the MAC then that fixes the interface and the name will then be set from the file. I can't remember where I read it and I may have remembered it entirely wrongly, but it could be worth a look.

dominicM
Posts: 5
Joined: 2017/06/12 10:53:35

Re: Consistent Network Device Naming inconsistent

Post by dominicM » 2017/06/12 18:06:36

Maybe, but that kinda defeats the purpose of this new scheme if you have to use mac addresses.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Consistent Network Device Naming inconsistent

Post by MartinR » 2017/06/13 08:35:49

The point is though that you can say that socket is called eth0 and that one eth1 and then plug in the appropriate cables. Even with a single port it means that the name is fixed and won't change from enp3s0 to enp4s0 whatever you do, though Trevor has already given you the solution to the single port case. Still, if it isn't relevant to your specific case, "file & forget". ;)

dominicM
Posts: 5
Joined: 2017/06/12 10:53:35

Re: Consistent Network Device Naming inconsistent

Post by dominicM » 2017/06/13 09:37:13

Yeah, I will switch to the old scheme, just annoying that the default option is unreliable on an os that's mean to be reliable and stable. Not to mention the new feature doesn't do the one thing it's designed to do...

Post Reply