
1. Check NAT settings


##2. cd /etc/sysconfig/network -scripts/ Enter this directory and find the network configuration file

3. vi ifcfg-ens33 Enter the file for related configuration
Note: gateway, subnet mask The code must be consistent with the NAT configuration; the gateway and IP address must be in the same network segment as the subnet IP (that is, the first three numbers of the IP, for example: 192.168.152.xx)

4. Restart the network
service network restart
Recommended related tutorials:
centos tutorial
The above is the detailed content of How to solve centos unable to connect to the network. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn