Cause:
DNS is not set, so the ping from the external network cannot be pinged.
Solution:
(Recommended tutorial: centos usage tutorial)
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.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of centos cannot ping the network. For more information, please follow other related articles on the PHP Chinese website!