Network interface naming changes on different machines

Issues related to configuring your network
Post Reply
Danilo7
Posts: 5
Joined: 2017/10/31 12:25:00

Network interface naming changes on different machines

Post by Danilo7 » 2017/10/31 12:42:01

Hello everyone, :)
I've got a question on network interface naming in Centos 7.

I've installed CentOS-7-x86_64-Minimal-1611.iso on two machines getting different interface names (link) on the integrated nics.
  • Centos 7 on HP DL20 gave me eno1 and eno2 (systemd udev).
    Centos on Dell R210II gave me em1 and em2 (biosdevname).
Why do I get different names, without any different configuration? :?:
Thanks
Last edited by Danilo7 on 2017/10/31 15:24:18, edited 1 time in total.

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

Re: Network interface naming changes on different machines

Post by TrevorH » 2017/10/31 14:59:31

Unfortunately that's how it works. How to disable it and revert to the old style ethX naming convention is one of the items in the CentOS 7 FAQ http://wiki.centos.org/FAQ
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

Danilo7
Posts: 5
Joined: 2017/10/31 12:25:00

Re: Network interface naming changes on different machines

Post by Danilo7 » 2017/10/31 15:24:01

TrevorH wrote:Unfortunately that's how it works. How to disable it and revert to the old style ethX naming convention is one of the items in the CentOS 7 FAQ http://wiki.centos.org/FAQ
Hi TrevorH,
first of all thanks for the prompt answer.
I've looked on the internet and found out that most people want to get back to the old ethX naming convention, but that's not what I need (for now).
I wanted to know why the two machines (Dell and HP) get different interface names with the same Centos 7 image, why it works like that. :o

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Network interface naming changes on different machines

Post by stevemowbray » 2017/10/31 16:07:45

Because they are different hardware.

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

Re: Network interface naming changes on different machines

Post by TrevorH » 2017/10/31 16:09:21

Dell machines are "special" because it was them that started the idea of changing the interface names in the first place. The ones starting "em" are embedded on the motherboard, ones with names like p1p1 are cards in PCI[e] slots that usually (not always) match their pci slot numbers from lspci - though on CentOS 7 these are usually called things like enp0s3 (from a VM of mine where the pci device is 00:03.0).

Pretty sure there's a systemd web page that describes how it does its naming conventions and it's absurdly complicated :-(
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

Danilo7
Posts: 5
Joined: 2017/10/31 12:25:00

Re: Network interface naming changes on different machines

Post by Danilo7 » 2017/10/31 16:25:54

TrevorH wrote:Dell machines are "special" because it was them that started the idea of changing the interface names in the first place. The ones starting "em" are embedded on the motherboard, ones with names like p1p1 are cards in PCI[e] slots that usually (not always) match their pci slot numbers from lspci - though on CentOS 7 these are usually called things like enp0s3 (from a VM of mine where the pci device is 00:03.0).

Pretty sure there's a systemd web page that describes how it does its naming conventions and it's absurdly complicated :-(
Thank you for the explanation! I'll try to look for the systemd page for curiosity.
stevemowbray wrote:Because they are different hardware.
Hi stevemowbray, I know the hardare of the NICs are different, I was just wondering why in the past i've installed the same OS lots of times but always got the same naming (ethX) even for different hardware.

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Network interface naming changes on different machines

Post by stevemowbray » 2017/10/31 17:46:39

You can have the old behaviour if you follow the instructions in the FAQ, as Trevor says. I find the new behaviour confusing and the reasons for using it unconvincing at best and disable it on all my machines.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Network interface naming changes on different machines

Post by jlehtone » 2017/11/02 08:31:29

Danilo7 wrote:I was just wondering why in the past i've installed the same OS lots of times ...
... with older kernels that did default to the old simple naming method that completely ignores hardware details?

The (new) complex method boasts with persistent names, but ignores that the eth* are extremely persistent in the minds of the users.

Post Reply