eth address change on centos when hardware changes

Subject:

references: http://zee.linxsol.com/system-administration/qdevice-eth0-does-not-seem-to-be-presentq-after-moving-or-cloning-a-rhelcentos-64-virtual-machine-in-vsphere.html

 

I have had to switch one box with another box for a more powerfull processor.  When I changed this my eth0 or eth1 change to eth2 generating a dynamic IP which I have a static IP for this machine.When this happens it is because there is a new MAC address change in the machine.  Go into /etc/udev/rules.d/70-persistent-net.ruleset the new MAC addy to name eth0 or eth1 whatever your /etc/sysconfig/network-scripts/ifcfg-eth* is and in this ifcfg-eth* (* for eth0 or eth1) make sure the new MAC where HWARE= is set the new mac.  then service network restart

2015-07-13 09:22:51gstlouis