Nic configuration After cloning CentOS 6 from VMware

Source: Internet
Author: User

Nic configuration After cloning CentOS 6 from VMware

Because the cloned Virtual Machine only modifies the Virtual Machine name and other information, and does not modify any information in the virtual hard disk, the MAC address of the cloned Nic does not match the mac address recorded in the operating system, as a result, eth0 cannot be started. The operating system records the addition of a new Nic. The new Nic name is eth1, And the mac address is the new mac address assigned by vmware.

Solution:

1. Modify the/etc/udev/rules. d/70-persistent-net.rules file.

Delete eth0 information. Modify the name of the second eth1 Nic to eth0.

# Vim/etc/udev/rules. d/70-persistent-net.rules

2, modify/etc/sysconfig/network-scripts/ifcfg-eth0 configuration file, MAC address corresponds to the above

# Vim/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE = eth0

HWADDR = 00: 0c: 29: ed: 52: a3 // The MAC corresponds to the preceding

NM_CONTROLLED = yes

ONBOOT = yes

TYPE = Ethernet

BOOTPROTO = none // change to static IP address acquisition

IPV6INIT = no

USERCTL = no

IPADDR = 192.168.212.100 // Nic IP Address

NETMASK = 255.255.255.0 // Subnet Mask

GATEWAY = 192.168.212.1 // GATEWAY

DNS1 = 202.106.0.20 // DNS resolution address

3. restart the system to take effect.

# Reboot

4. View IP configuration information

# Ifconfig eth0

Eth0 Linkencap: Ethernet HWaddr00: 0C: 29: ED: 52: A3

Inet addr: 192.168.212.100Bcast: 192.168.212.255Mask: 255.255.255.0

Inet6addr: fe80: 20c: 29ff: feed: 52a3/64 Scope: Link


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.