After centos6 changes the NIC, the NIC name is auto-incrementing. For example, if it was originally eth0 and changed to eth1, the original eth0 cannot be used. You need to modify the file:
When the NIC changes. When the NIC is added or the NIC is changed, the file will change. Modify the mac or eth * name accordingly.
1. Vi/etc/udev/rules. d/70-persistent-net.rules
Physical Machine Settings:
# PCI device 0x10ec: 0x8139 (8139too)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: e0: 4c: 90: 06: 83 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x10ec: 0x8168 (r8169)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: e0: 4c: 10: cd: AB ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"
VM settings:
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 37: f8: 69 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 37: f8: 73 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"
2. Change device = eth * in vi/etc/sysconfig/network-scripts/ifcfg-eth * to the value corresponding to MAC.
3. After modification, remember to restart reboot to make the modification take effect.