[CentOS] CentOS 7 : network interface renamed from eth0 to eth1 after reboot

Sun Feb 9 13:10:44 UTC 2020
Nicolas Kovacs <info at microlinux.fr>

Hi,

I've done my fair share of CentOS 7 installations, but this is the first time I 
have this kind of weird problem. Here goes.

In my office I have a battered Dell Optiplex 320 PC with two NICs that I'm 
using as a bare metal sandbox server for testing purposes.

The CentOS 7 installer sees the connected network card as eth0. But after the 
first reboot, the interface comes up as eth1.

My first reflex was to rename ifcfg-eth0 to ifcfg-eth1 and edit it accordingly. 
Weirdly enough, on the subsequent reboot the interface comes back as eth0.

I took a peek in /etc/udev/rules.d to see if there was any persistent interface 
definition, but the directory is empty.

On a side note, I installed Ubuntu Server 16.04 LTS on that same machine and 
got the exact same problem. Debian installer sees the main network interface as 
eth0, but on the first reboot the interface comes back as eth1.

Any suggestions ?

Niki

-- 
Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Site : https://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32
Mob. : 06 51 80 12 12