Home  >  Article  >  Operation and Maintenance  >  What should I do if my centos system cannot connect to the external network?

What should I do if my centos system cannot connect to the external network?

王林
王林Original
2020-03-21 11:39:413895browse

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

What should I do if my centos system cannot connect to the external network?

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!

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