In VMware, The centos 6 Nic is not fixed, resulting in IP address changes

Source: Internet
Author: User

I have always encountered a problem recently. I have avoided it several times. Today I am making a decision to solve it.

Problem:

I want to fix the network adapter eth0 IP address, you can modify the successful/etc/sysconfig/network-scripts/ifcfg-eth0, restart the network adapter, eth0 cannot be started, when ifconfig, there is an eth1, but there is no ifcfg-eth1 file, so the IP has changed, the connection failed

/Ifcfg-eth0 configuration file content is as follows:

Device = eth0
Bootproto = static
Broadcase = 10.33.28.255
Hwaddr = 00: 51: 56: 2D: 6C: bb
Ipaddr = 10.33.28.230
Ipv6init = Yes
Ipv6_autoconf = Yes
Netmask = 255.255.255.0
Network = 10.33.28.0
Onboot = Yes
Dns1 = 202.104.xx.xx
Dns2 = 202.192.xx.xx
~

Solution:

Shut down the system, delete the NIC, then add a new Nic, and set the NIC address to the address of the above configuration file, that is, consistent with the ifcfg-eth0 file, at this time, you can view *. in the vmx configuration file, the MAC address has been changed.

Ethernet0.addresstype = "static"
Ethernet0.address = "00: 51: 56: 2D: 6C: BB"

Restart the system. The result is OK !!!

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.