Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of not being able to ping the external Network in linux system

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

First, check carefully to determine whether the network card mode of the virtual machine is selected correctly, the physical environment uses the router to choose the bridging mode, the stand-alone or dial-up Internet access chooses the NAT mode, and if you do not want to use the virtual machine to access the Internet, choose the host mode.

Second, check whether the gateway is configured correctly

1. Dhclient is performed first, and ip address is obtained automatically.

two。 Configuration check via # vi / etc/sysconfig/network-scripts/ifctg-eth0

Set ONBOOT=yes to turn on the network card automatically, and change dhcp to static static configuration, pay attention to

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

2) the DNS is generally the same as the gateway

3) refer to the configuration of real machine gateway

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

# service network restart

4. View DNS resolution

# grep hosts / etc/nsswitch.conf

If there is a problem with any of the above, correct it and then test it (ctrl+c is terminated). It should be fine, as shown in the figure:

These are the details of not being able to ping the extranet under linux. Please pay attention to other related articles for more.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report