After VMware clones CentOS 6.7, the NIC cannot be used.
Clone CentOS6.7 with VMware, found that the system only eth1, and/etc/sysconfig/network-scripts/under only ifcfg-eth0 files, IP address is dynamic acquisition, although can access the Internet, however, the static IP address of eth0 cannot be set.
1. Comment out eth0 and change the following NAME = "eth1" to NAME = "eth0"
Vim/etc/udev/rules. d/70-persistent-net.rules
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 72: 15: 45 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x1022: 0x2000 (vmxnet)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 0b: c6: 4d ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"
~
The Modification result is:
# PCI device 0x1022: 0x2000 (pcnet32) eth0 has been commented out
# SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 72: 15: 45 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x1022: 0x2000 (vmxnet) change the automatically generated eth1 name to eth0
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 0b: c6: 4d ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
2. Change ATTR {address} = "00: 0c: 29: 0b: c6: 4d ", in the/etc/sysconfig/network-scripts/ifcfg-eth0 file, HWADDR = "00: 0c: 29: 0b: c6: 4d" to match them.
DEVICE = eth0
HWADDR = 00: 0C: 29: 0b: c6: 4d
TYPE = Ethernet
UUID = 9c82314b-32ef-4e1f-af8d-540310fd74c6
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = static
IPADDR = 192.168.103.231
NETMASK = 255.255.255.0
GATEWAY = 192.168.103.254
DNS1 = 192.168.103.254
DNS2 = 8.8.8.8
3. ThenInit 0OrREboot,The eth0 Nic is in normal use.