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

王林
Release: 2020-03-27 14:37:15
Original
3676 people have browsed it

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

2. Restart the network card service:

systemctl restart network.service
Copy after login

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!

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