In the virtual machine VM installed CentOS system, network card selection bridge mode.
At the beginning of the time can also automatically obtain the IP address, suddenly one day the IP disappeared, and then how to restart can not get the IP address. Because the IP was previously available, and the VMware NAT Service and VMware DHCP Service Two have been started, no changes have been made, so the configuration is certainly no problem. Baffled!!!
Later check edit--virtual network Editor ..., go into the VMnet0 bridged auto-bridging--------------------------------VMnet0 vmnet To: "Behind the" Automatic "pull-down menu, found that there are two network cards, one is a VPN, a physical network card. Decisively will "Automatic" replacement for physical network card, restart the CentOS system, Long-lost IP back. PS: The network that my physical network card is connected to is automatically assigned IP.
Brother has the habit of taking notes, so hurriedly write it down. Hope to be useful to everyone.
CentOS Configure the network card to boot automatically obtain IP address:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Change onboot= "No" to onboot= "yes"
After saving: Service network restart
View Ip:ifconfig