In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to eliminate network problems in linux. I hope you will gain a lot after reading this article. Let's discuss it together.
Ping
First, let's take a look at the ping command, which is a tool used to test whether the two hosts can communicate properly. The object of ping can be either an ip address or a domain name. This command can be used in both linux and windows cmd mode. The method of use is all the same.
# ping-c 4 8.210.247.5PING 8.210.247.5 (8.210.247.5) 56 (84) bytes of data.64 bytes from 8.210.247.5: icmp_seq=1 ttl=64 time=1.54 ms64 bytes from 8.210.247.5: icmp_seq=2 ttl=64 time=1.48 ms64 bytes from 8.210.247.5: icmp_seq=3 ttl=64 time=1.46 ms64 bytes from 8.210.247.5: icmp_seq=4 ttl=64 time=1.48 ms--- 8.210.247.5 ping statistics-4 packets transmitted, 4 received 0% packet loss, time 3004msrtt min/avg/max/mdev = 1.460 time 3004msrtt min/avg/max/mdev 1.548 ms # ping-c 1 baidu.com.
Here is a shell script to see which ip can communicate on the LAN
#! / bin/bashnet='192.168.2.'seqs= `seq 1 254`for seq in $seqsdo ip=$net$seq / usr/bin/ping-c 1-W 1$ ip > / dev/null 2 > & 1 if ["$?" = = "0"]; then echo "$ip is UP" fidone
Traceroute
This command is used to view the network of each node between the two hosts. If you are slow to visit a website, you can use this command to check the network status of all nodes.
# traceroute-n google.comtraceroute to google.com (172.217.163.238), 30 hops max, 60 byte packets 1 * 2 11.109.220.61 1.444 ms 1.577 ms 11.109.216.189 1.500 ms 3 11.109.220.190 5.512 ms * 11.109.220.174 5.382 ms 4 11.131.180.222 1.660 ms 11.131.180.218 1.519 ms 11.131.180.250 1.365 ms.
Nslookup
This command can reverse check the ip address through the domain name, and it is very easy to use.
Nslookup 5iqm.comServer: 100.100.2.136Address: 100.100.2.136#53Non-authoritative answer:Name: 5iqm.comAddress: 121.196.12.64
Netstat
. If the website cannot be accessed, the first thing we should do is the ip address of the ping server. If we can communicate with ping normally, then we should ping the website domain name to see if the dns is resolved properly. If there is no problem, the website is still not accessible, then you need to see if Port 80 is open to the public. The netstat command is used to check host port snooping.
# netstat-tlunpActive Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0 only servers 80 0.0.0.0 only servers * LISTEN 30721/nginx: master tcp 00 0.0.0.015 21 0.0.0 0 LISTEN 1275/pure-ftpd (SER tcp 0 0 0) 22 0 0 0 LISTEN 1167/sshd tcp 0 0 0 8 0 0 0 LISTEN 30721/nginx: master tcp 0 0 0.0.0.0purl 8888 0.0.0.0purl * LISTEN 2068/python
Telnet
This command can be used to test whether the specified port of the server is open to itself.
# telnet 8.210.110.139 22Trying 8.210.110.139...Connected to 8.210.110.139. Escape character is'^] '.SSH-2.0-OpenSSH_7.4# telnet 8.210.110.139 3306Trying 8.210.110.139.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.