Centos 7.6 MAC addresses change for a network interfaces

Babasaheb asked:

On one of the CentOS Linux release 7.6.1810 (Core) server the mac address’s of networfaces got changed e.g. eth0 has eth3’s mac address and so on . Does anyone know why this happens and how to resolve it ?

My answer:


For whatever reason, your system has disabled consistent network device naming. This means that instead of using modern device names for interfaces, which remain the same for each NIC, on every boot your NICs may come up with a random eth* identifier that you cannot predict.

You should re-enable consistent network device naming, and then reconfigure the NICs with their new consistent names, which will remain the same unless you physically change the hardware. If present, the boot command line options net.ifnames=0 and biosdevname=0 should be removed. If they were not present, then only net.ifnames=1 should be set.

You also should read the entire RHEL documentation chapter linked above, including the troubleshooting section, before beginning. This is a pretty invasive change and will require some downtime, but once complete it will solve the problem for the remaining life of the server hardware.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.