How to modify the NIC after vmwarevm cloning CentOS 6.5

Source: Internet
Author: User

How to modify the NIC after vmwarevm cloning CentOS 6.5

How to modify the NIC after vmwarevm cloning CentOS 6.5

After the CentOS6.5 system is installed on the vmwarevm, the pure system is cloned several times for later testing. The clone process is very simple. The problem after cloning is that the MAC address of the cloned Nic is the same as the MAC address of the original system, and there is a conflict in the LAN. You need to change the cloned MAC address.

Explanation: in fact, the cloned system has two NICs eth0 and eth1. eth1 actually works, and eth0 is cloned. The clone system generates a new mac address, because the system will add 1 to eth0.

The procedure is as follows:

Software environment: VMware Workstation 10.0 Virtual Machine CentOS 6.5 physical machine Windows 7

1. First, go to the original system and run the command to view the NIC information.

# Ifconfig

The NIC is not loaded when the system starts by default. The eth0 information is not displayed.

Run commands

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

View the MAC address of the eth0 Nic

DEVICE = eth0

HWADDR = 00: 0C: 29: 16: F4: F0

TYPE = Ethernet

UUID = 0b1f4512-cefa-4a9e-ae85-adb2ac2a9903

ONBOOT = no

NM_CONTROLLED = yes

BOOTPROTO = dhcp

Modify this ONBOOT = yes option and then enable Nic loading.

After editing is complete, the esc key exits. Enter: wq to save and exit.

2. Go to the cloned system in the same step and check the NIC address. The MAC address is the same.

Run

#/Etc/init. d/network restart

Restart NETWORK SERVICE

Failed failure prompt

3. Edit the NIC Device

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

The following content is displayed, and two NICs eth0 and eth1 are displayed. eth0 is the clone system, and eth1 is the regenerate system.

# PCI device0x1022: 0x2000 (pcnet32)

SUBSYSTEM = "net", ACTION = "add", DRIVERS = "*", ATTR {address} = "00: 0c: 29: 16: f4: f0 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth0"

# PCI device0x1022: 0x2000 (pcnet32)

SUBSYSTEM = "net", ACTION = "add", DRIVERS = "*", ATTR {address} = "00: 0c: 29: 52: 45: 97 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth1"

Add # comment out the first Nic, change the 2nd Nic to eth0, and record the mac address.

# PCI device0x1022: 0x2000 (pcnet32)

# SUBSYSTEM = "net", ACTION = "add", DRIVERS = "*", ATTR {address} = "00: 0c: 29: 16: f4: f0 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth0"

# PCI device0x1022: 0x2000 (pcnet32)

SUBSYSTEM = "net", ACTION = "add", DRIVERS = "*", ATTR {address} = "00: 0c: 29: 52: 45: 97 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth0"

After editing is complete, the esc key exits. Enter: wq to save and exit.

4. Execute

#/Etc/init. d/network restart

Restart NETWORK SERVICE

Still prompt failure,

# Reboot

Restart the system to solve the problem.

5. After the system is restarted, run the command

1 # vi/etc/sysconfig/network-scripts/ifcfg-eth0

Modify the MAC address "00: 0c: 29: 16: f4: f0" to "00: 0c: 29: 52: 45: 97" and save and exit.

Run

1 #/etc/init. d/network restart

Restart NETWORK SERVICE

No failure prompt will be prompted now


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.