After centos is changed to the main board, the network cannot be accessed.

Source: Internet
Author: User

After the CentOS cloned from the VM is restored, the network cannot be connected. If ifconfig is used, no eth0 is detected, and the virtual NIC address is changed.
Solution:

First, open/etc/udev/rules. d/70-persistent-net.rules with the following content:
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 8f: 89: 97 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x1022: 0x2000 (pcnet32)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 50: bd: 17 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1"

In the past, the NIC Driver configured for the new virtual machine was re-installed to eth1 according to the new Nic, so there are two solutions:
First, delete the newly added eth1 configuration and change the Virtual Machine NIC address to the same as eth0;
The second is to change the NIC address and name in the/etc/sysconfig/network-scripts/ifcfg-eth0 to the same as eth1.

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.