Normally, the first time that Linux recognizes a NIC is eth0, and the second one is eth1. Sometimes we use the virtual machine cloning technology after the network card information will change, the newly cloned virtual host network card name may become eth1. No matter how we modify it, this is a problem when we use N virtual machines for ha-heartbeat experiments.
In this case it is because the replication system in the process of copying files already have a network card in/etc/udev/rules.d/70-persistent-net.rules is recognized as eth0, and the virtual machine is recognized as eth1.
Workaround:
1. Edit/etc/udev/rules.d/70-persistent-net.rules, find the same line as Ifconfig-a's Mac (name= ' eth1 ' line) and change it to "Name=eth0", Then remove the above line (name= ' eth0 ').
Vim/etc/udev/rules.d/70-persistent-net.rules
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:bb:41:2b", attr{type}== "1", kernel== "eth*" , name= "Eth0"
2. Edit the/etc/sysconfig/network-script/ifcfg-eth0, change the Mac to correct, and delete the UUID.
3. Edit the/etc/sysconf/network and change the hostname.
4. Reboot is in effect!
This article is from the "small White love life" blog, please be sure to keep this source http://sf1314.blog.51cto.com/13295031/1978475
How to modify the NIC eth1 to eth0 under Linux