Home > Article > Operation and Maintenance > What should I do if my centos system cannot connect to the external network?
The solution is as follows:
1. Check the routing
# route -n
If you are missing the first route, It is definitely impossible to ping the external network.
(Recommended tutorial: centos usage tutorial)
2. Add dns
# vim /etc/resolv.conf nameserver 8.8.8.8
3. Add routing
# route add default gw 192.168.0.1
4. Restart the network card
service network restart
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What should I do if my centos system cannot connect to the external network?. For more information, please follow other related articles on the PHP Chinese website!