“ping: unknown host www.baidu.com “Problem solving

After selecting the bridge mode in VMware virtual machine and configuring the network, we found that Ping IP address can ping, but in Ping Baidu( www.baidu.com )If you can’t do it when you’re in bed, it’s a reminder:

So what’s the reason?

You can check whether the system is configured with DNS and enter the command cat/etc/ resolv.conf

As can be seen from the above results, the system is not configured with DNS. Here, you need to set DNS and enter the command: VI/etc/ resolv.conf

You can use Google’s public DNS service to add the following configuration to the file:

nameserver 8.8.8.8

nameserver 8.8.4.4

As shown in the figure below:

Reason: why configure DNS server

In the Internet, we communicate through IP address, and in order to facilitate users’ memory, we map IP to the corresponding domain name (e.g www.baidu.com ), So we use the command Ping Baidu( www.baidu.com )At the same time, the actual system also needs a DNS resolution process, through the domain name to find the corresponding IP, we can carry out the communication between the two hosts, and the DNS server is used to do this.

 

Similar Posts: