After VMware clones CentOS 6.7, the NIC cannot be used.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.