The virtual machine and the host can ping each other, the host can be networked, and the virtual machine cannot ping the external network.

  linux, question

1. Host ping Virtual Machine


2. Virtual machine ping host


3. Host ping External Network


4. Virtual machine ping external network


5. Virtual machines use bridging


6. virtual machine eth0 configuration


Conditions for ping Domain Name Communication:

1. DNS is available:

Check first

[root@~]# cat /etc/resolv.conf

This is to be set as your DNS server address.
Moreover, the virtual machine should be able to ping the DNS server address.

2. Gateway can reach:

Ping reachable
If it is not available, check the access between gateways.

From promptunknown hostSee should be can’t parse IP
Therefore, it is basically a DNS problem.

PS: 169.254 is a reserved address, which is generally not used as host IP. There is also DNS1= As far as I know, DNS is not provided here.