Home > Article > Operation and Maintenance > How to solve the problem of not being able to ping the network under centos
Problem:
The IP address in the centos system is configured correctly, but the network cannot be pinged, ping: unknown host www.baidu.com.
Cause analysis:
Because the DNS is not set, pinging the external network cannot be pinged.
(Recommended tutorial: centos tutorial)
Solution:
1. Add DNS to the file /etc/resolv.conf
search localdomain nameserver 192.168.0.1 nameserver 61.139.2.69
2. Restart the network card service:
systemctl restart network.service
The ping was successful.
Related video tutorial recommendations: linux video tutorial
The above is the detailed content of How to solve the problem of not being able to ping the network under centos. For more information, please follow other related articles on the PHP Chinese website!