What should I do if I can ping the domain name successfully under CentOS but cannot ping it?

王林
Release: 2020-03-26 15:37:34
Original
3637 people have browsed it

What should I do if I can ping the domain name successfully under CentOS but cannot ping it?

Problem:

ping: www.baidu.com: Name or service not known
Copy after login

Analysis:

There is a problem with domain name resolution.

(Recommended tutorial:centos tutorial)

Solution:

1. Open the /etc/resolv.conf file

2. Add nameserver, as follows:

> nameserver 192.168.37.2
Copy after login

The IP following is the DNS address configured in ifcfg-ens33 before.

Recommended related video tutorials:linux video tutorial

The above is the detailed content of What should I do if I can ping the domain name successfully under CentOS but cannot ping it?. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!