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 !!!