I don't know what I did wrong, and I can't connect to the Internet for a long time. Baidu still can't connect to all kinds of things. Finally, I extracted the configuration that was previously available for networking and pasted it, and it was successful. The content of the configuration file is as follows:
vim /etc/resolv.conf
1 generated by /sbin/dhclient-script
2 search localdomain
3 nameserver 192.168.75.2
[ root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
1 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
2 DEVICE=eth0
3 BOOTPROTO=dhcp
4 HWADDR=00:0C:29:1E:F1:E3
5 ONBOOT=yes
~
In addition: The several strategies found on the Internet have been successful, but this time they failed life and death for unknown reasons. Anyway, after modifying the above, it is ok. Here is the search content:
The correct configuration method is as follows:
Make sure the virtual network card (VMware Network Adapter VMnet8) is turned on, then enter "ipconfig" in the Windows command line, and find the ipv4 address of VMware Network Adapter VMnet8, for example: 192.168.78.1)
Check whether the network configuration of CentOS in the virtual machine is NAT
Modify the /etc/sysconfig/network-scripts/eth0 file
The IP value of BROADCAST must be consistent with the ip in VMNET8 and the last digit must be 255
The IP value of IPADDR must be consistent with the ip in VMNET8 and the last bit must be any value from 1 to 255
The IP value of GETWAY must be consistent with the ip in VMNET8 and the last digit is 2.
** eg:**
My local ip is 192.168.78.1, so the correct configuration is:
BROADCAST=192.168.78.255
IPADDR=192.168.78.1
GETWAY=192.168.78.2
After configuration, please enter the command "service network restart" to restart the network service.
Use the "ping" command to see if the network is available.
The above is the introduction of the solution to the CentOS6.5 cannot connect to the network in VMware. If you also encounter the same problem, you may try to use the method described in this article to solve it and reconfigure the eth0 file.
Recommended Posts