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 connecting to the Internet in linux

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

Share

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

What the editor shares today is the solution to whether linux connects to the Internet or not. Maybe you are no stranger to linux, or you have never known linux. But don't worry, today the editor will use the simplest description to describe the solution to whether linux connects to the Internet or not.

1. Check the ip information of the current environment configuration

Second, check whether the network configuration is correct

[root@hadoop/] # cat / etc/sysconfig/network-scripts/ifcfg-eth0

The network profile IPADDR=192.168.1.226 / / IP address GATEWAY=192.168.1.1 / / gateway address DNS1=8.8.8.8 / / DNS resolution server NETMASK=255.255.255.0 / / subnet mask pointed to by DECIVE=eth0 / /

3. Whether the gateway set under ping can be connected with ping. If the gateway cannot be connected, the gateway address under / etc/sysconfig/network-scripts/ifcfg-eth0 file needs to be modified.

[root@hadoop/] # ping 192.168.1.1

Check whether the DNS server is correct and use the command

[root@hadoop etc] # cat resolv.conf

5. The DNS service configured by ping resolves the address to see if it can be ping. If it cannot be connected, it needs to be modified, but it must be guaranteed to be a normal and usable DNS address.

6. Only after the above configurations are correct, you can connect to the external network resources, and then test whether you can ping the public network resources.

[root@hadoop etc] # ping www.baidu.com

This is the end of the solution to whether linux is connected to the Internet or not. Of course, it is not just the above analysis, but the editor can guarantee its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.

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