In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what is the use of the ping command in linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
I found that there are a lot of tricks for ping commands under linux. Here are a few examples.
1. Ping www.baidu.com, the roughest usage, in which the host will keep sending ICMP echo request packets to the destination address until you press Ctrl+c
2. Ping-I eth0 www.baidu.com or ping-I 192.168.8.151 www.baidu.com, that is, the-I option can specify the network card from which the ping packet is sent, and the name of the network card or the IP address of the network card can be followed by-I.
3. The ping-c 3 www.baidu.com,-c option can specify how many ICMP packets to send. You can see that the host has received three ICMP echo reply packets, which is a response to the three echo request I sent.
4. The ping-t 20 www.baidu.com,-t option can set the TTL value of IP packets carrying ICMP messages.
From wireshark's grab package, you can see that ttl is set to 20.
5. The ping-s 10 www.baidu.com,-s option can set the size of the ICMP data part. You can see that the data part has 10 bytes. If you add 8 bytes of ICMP headers, the ICMP packet size is 18 bytes. Plus 20 bytes of IP headers, the IP packet size is 38 bytes.
6. The ping-p beef www.baidu.com,-p option sets the content of the data part of the icmp message, followed by beef, which is hexadecimal padding data, followed by a maximum of 16 bytes of data.
From the grab package of wireshark, we can see that the content of the data part is beef, and it is used to fill it repeatedly.
The above six are relatively simple options, and of course there are other options, which can basically be superimposed according to your own needs.
This is the end of this article on "what is the use of ping commands in linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please 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.
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.