Home > Article > Operation and Maintenance > How to solve the problem of CentOS network failure
1. Centos will not establish a local connection by default, at least in the virtual machine. Just create a new one yourself:
cd /etc/sysconfig/network- scripts/
vi ifcfg-eth0
DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes NM_CONTROLLED=yes
Save and exit.
Restart the network:
service network restart
2. Check whether the CentOS network configuration in the virtual machine is NAT
Modify the /etc/sysconfig/network-scprits/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 digit must be 1~255 The IP value of any value
GETWAY must be consistent with the IP in VMNET8 and the last digit is 2
Then restart the network.
Recommended tutorial: centos tutorial
The above is the detailed content of How to solve the problem of CentOS network failure. For more information, please follow other related articles on the PHP Chinese website!