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

How to solve the problem that linux can't ping the extranet?

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

Share

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

How to solve the problem that linux can't ping the extranet? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

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 first to obtain the ip address automatically.

2. Check the configuration through # 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 Nic to ensure that the DNS can be parsed

# service network restart

4. Check the resolution of DNS

# grep hosts / etc/nsswitch.conf after reading the above, have you mastered the solution that linux is unable to ping the extranet? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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