Home  >  Article  >  Operation and Maintenance  >  How to solve the problem of not being able to ping the network under centos

How to solve the problem of not being able to ping the network under centos

王林
王林Original
2020-03-27 14:37:153670browse

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.

How to solve the problem of not being able to ping the network under centos

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!

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