CentOS DNS problem: Ping only IP domain name

Source: Internet
Author: User
Tags centos

Scenario: The day before the virtual machine in the configuration of the centos6.3, you can normally surf the internet, and the FTP server to build up, today a boot this goods unexpectedly can not surf the internet, depressed ....

Problem:

The following figure:

Can ping the IP address, but the domain name Ping pass ...

Resolution process: STEP1) A preliminary assessment of DNS problems

Step2) Googling ...

STEP3) Modify the configuration file/etc/resolv.conf and save, as shown below:

STEP4) Restart the service to load the configuration file

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/DNS/

STEP5) continue to test ping www.baidu.com results are as follows:

There are still errors ... Tangled....

STEP6) Check file/etc/resolv.conf, this thing turned into this.

STEP7) Rookie one, hundred think can't understand, Googling ... New discovery: If NIC configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0)

No information about DNS is set, and the file is refreshed to its original state each time the network service is restarted. Immediately configured, the NIC configuration is complete as follows:

After saving, restart service, success ...

Summary: When configuring DNS information, it is not valid to configure it in/etc/resolv.conf only if it is not configured in the NIC profile (/etc/sysconfig/network-scripts/ifcfg-eth0).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.