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--
This article mainly introduces the Internet Message Control Protocol ICMP what is useful, has a certain reference value, the need for friends can refer to the next. I hope you all have a lot to gain after reading this article. Let's take a look at it together.
ICMP, or Internet Message Control Protocol, is used to report error conditions and related error messages. An icmp datagram is encapsulated in an ip datagram as its data portion. However, like ip, icmp is a network layer protocol. the following figure shows icmp message format:
ICMP Message Type
ICMP messages are generally divided into two categories: error report messages and query messages.
There are several types of error report messages:
Destination unreachable (type value 3): When the host or router is unable to deliver data, the message is sent to the source.
Timeout (type value 11): When TTL value in IP datagram is 0, or no successful delivery within specified time, timeout message is sent to source point.
Parameter Problem (Type 12): When a received datagram header contains incorrect fields, discard the packet and send a Parameter Problem message to the source.
Redirection (type value 5): When a router receives a packet, it knows that the destination address should be forwarded more efficiently from another router, so when it has forwarded the packet, it also sends a redirect message to the source point. Then the next datagram with the same destination address will go through another router.
Next, we look at query messages, mainly in one category: response request messages (type value 8) and reply messages (type value 0). The host that receives the response request message must return the reply message.
One application of ICMP: ping command
Now that we know a little about ICMP, let's look at an example of using ICMP--the ping command. This command is available not only on Linux but also on Windows.
ping baidu.com Ping baidu.com [220.181.38.148] with 32 bytes of data: reply from 220.181.38.148: bytes =32 time =32ms TTL=52 reply from 220.181.38.148: bytes =32 time =29ms TTL=52 reply from 220.181.38.148: bytes =32 time =27ms TTL=52 reply from 220.181.38.148: Ping statistics for byte =32 time =35ms TTL=52220.181.38.148: Packets: Sent = 4, Received = 4, Lost = 0 (0% lost), Estimated Time to Round Trip in milliseconds: Min = 27ms, Max = 35ms, Average = 30ms
Let's take a look at the workflow of the ping command: First, my host generates four ICMP messages, which are all response request messages, and sends these four ICMP messages to the Baidu server. If Baidu server can receive these four ICMP messages, then it will also send four ICMP reply messages to my host. Therefore, our host can calculate the packet loss rate and round-trip time according to the number of ICMP datagrams returned and the time of return.
Thank you for reading this article carefully, hope Xiaobian share Internet Message Control Protocol ICMP what content is helpful to everyone, but also hope that everyone more support, pay attention to industry information channels, encounter problems to find, detailed solutions waiting for you to learn!
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.