The CentOS system is cloned from VMware and then reset to eth0.

Source: Internet
Author: User

The CentOS system is cloned from VMware and then reset to eth0.

Problem: After cloning CentOS6.4 with VMware, it is found that only eth1 is in the system, and/etc/sysconfig/network-scripts/under only, ifcfg-eth0 file, although can access the Internet, but cannot set static IP.

Ifconfig eth0

Eth1: error fetching interface information: Device not found

Solution: vi/etc/udev/rules. d/70-persistent-net.rules is displayed as follows:

# PCI device 0x8086: 0x100f (e1000)

SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 48: 85: 9c ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"

Change NAME = "eth1" to NAME = "eth0"

And change the NIC address in ATTR {address} = "00: 0c: 29: 48: 85: 9c"

In the/etc/sysconfig/network-scripts/ifcfg-eth0 file, HWADDR = "00: 0C: 29: 48: 85: 9C" to match them.

Then reboot

Ifconfig eth0

Eth0Link encap: EthernetHWaddr 00: 0C: 29: 48: 85: 9C

Inet addr: 192.168.74.148Bcast: 192.168.74.255Mask: 255.255.255.0

Inet6 addr: fe80: 20c: 29ff: fe48: 859c/64 Scope: Link

Up broadcast running multicastmtu: 1500 Metric: 1

RX packets: 5032 errors: 0 dropped: 0 overruns: 0 frame: 0

TX packets: 3674 errors: 0 dropped: 0 overruns: 0 carrier: 0

Collisions: 0 FIG: 1000

RX bytes: 5762656 (5.4 MiB) TX bytes: 209372 (204.4 KiB)


Complete.

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.