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

王林
Release: 2020-03-21 11:39:41
Original
3915 people have browsed it

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
Copy after login

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
Copy after login

3. Add routing

# route add default gw 192.168.0.1
Copy after login

4. Restart the network card

service network restart
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template