If you ping the domain name, ping:unknown host xxx.xxx appears.
But when you ping the IP address, you can pass it.
The DNS server is not configured properly,
Check the configuration file/etc/resolv.conf, if there is nameserver xxx.xxx.xxx.xxx, such as the use of DNS server nameserver 8.8.8.8, if any, modify an available DNS server, such as 8.8.8.8 or 4.4.4.4, Save exit!
Of course, if even the IP ping 8.8.8.8 are not ping, then the network configuration is a problem: can be resolved:
1, first check whether Ifconfig has an intranet IP address, if not, then configure
Ifconfig eth0 192.168.1.100 up,
You can configure the mask at the same time:
Also use the route command to view the current default gateway, if not, configure one,
Route add default GW 192.168.1.1,
After the configuration of these two, you can normally ping the network, if you can not ping www.baidu.com, then go to check the DNS server
from:http://blog.csdn.net/menlinshuangxi/article/details/7968955
Workaround for Ping:unknown host www.baidu.com problem under Linux--ubuntu configuration of local area network