1、 Check carefully to determine whether the network card mode of the virtual machine is selected correctly. The physical environment uses the router to select the bridge mode. The stand-alone or dial-up Internet access selects the NAT mode. If you do not want to use the virtual machine to access the Internet, select the host mode

How to solve the problem of unable to Ping the Internet under Linux

2、 Check whether the gateway is configured correctly

1. First dhclient, automatically obtain the IP address

How to solve the problem of unable to Ping the Internet under Linux

2. Check the configuration through # VI / etc / sysconfig / network scripts / ifctg-eth0

How to solve the problem of unable to Ping the Internet under Linux

When setting onboot = yes to enable NIC automatically, and changing DHCP to static configuration, you should pay attention to the following

1) IP and gateway must be in the same network segment

2) DNS is usually set the same as gateway

3) Please refer to the real gateway configuration

How to solve the problem of unable to Ping the Internet under Linux

3. Restart the network card to ensure that DNS can be resolved

How to solve the problem of unable to Ping the Internet under Linux

4. Check DNS resolution

How to solve the problem of unable to Ping the Internet under Linux

If there is a problem with any of the above, after the correction, test again (Ctrl + C termination), it should be no problem, as shown in the figure:

How to solve the problem of unable to Ping the Internet under Linux

The above is the detailed content of Linux unable to Ping the Internet.

Leave a Reply

Your email address will not be published. Required fields are marked *