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 ?
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 ?
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
andbiosdevname=0
should be removed. If they were not present, then onlynet.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.
NetworkManager probably did that. To prevent it in the future, just disable it if you're not specifically using it for something. Otherwise, save your configurations so you can restore them later.
To fix things up, Edit file
/etc/default/grub
and addnet.ifnames=0 biosdevname=0 to line GRUB_CMDLINE_LINUX
, then re-make a GRUB configuration file and overwrite existing one:Edit NAME and DEVICE parameters in ifcfg file to new Network Interface name.
Edit ifcfg file name:
Repeat as needed for all eth-s.
As long as NetworkManager is off, nothing will mess them around anymore.
Adding MACADDR field in interface files fixed it for me. As explained in https://access.redhat.com/solutions/70215