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).