Edit the “persistent net” rule. Comment out the old rule with a #,
and change eth1 to eth0` on the new rule when the MAC has changed.
123456789101112
[root@mudns ~]# vim /etc/udev/rules.d/70-persistent-net.rules# This file was automatically generated by the /lib/udev/write_net_rules# program, run by the persistent-net-generator.rules rules file.## You can modify it, as long as you keep each rule on a single# line, and change only the value of the NAME= key.# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:aa:bb:cc", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"# PCI device 0x15ad:0x07b0 (vmxnet3)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:cc:dd:ee", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
2. Network Script
Edit the ifcfg-eth0 network script, and change the HWADDR line