In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Ping principle and ICMP Protocol
In the past, when I first looked at it, I always thought that the network protocol could only be encapsulated layer by layer. Although looking for information, it was said that there were IP, arp, ICMP and IGMP protocols on the network at the same time, but I just couldn't make a detour. Now I think, alas.
The principle of ping
The ping program is used to detect whether the host can communicate with the host. If it is not possible to ping to a host, it means that a connection cannot be established with that host. Ping uses the ICMP protocol, which sends an icmp echo request message to the destination host. The ICMP protocol stipulates that the destination host must return an ICMP echo reply message to the source host. If the source host receives a reply within a certain period of time, the host is considered reachable.
The ICMP protocol is sent over the IP protocol, which is a connectionless, unreliable packet protocol.
ICMP protocol packet in actual transmission: 20-byte IP header + 8-byte ICMP header + 1472 bytes 38 bytes
ICMP header: 8-bit type + 8-bit code + 16-bit checksum + (different types and codes, different formats)
By grabbing the packets, the icmp protocol discovers an ordered alphabet of random segments or segments.
ICMP is (Internet Control Message Protocol) Internet control message protocol, a connectionless protocol. The control message refers to the message of the network itself, such as whether the network is unreachable, whether the host is reachable, whether the route is available, and so on. These control messages themselves do not transmit user data.
Grab a packet to analyze a set of data:
For request packet capture, you can see that the type is 8 and the code is 0, which represents the request echo (ping request) and has a 16-bit checksum.
*
For the grab packet of reply, you can see that the type is 0 and the code is 0, which represents the echo reply (ping reply)
Attach a specific type of ICMP message
ICMP protocols are roughly divided into two categories, one is query message, the other is error message. The query message has the following uses:
Ping query
Subnet mask query (used to initialize the subnet mask when the diskless workstation initializes itself)
Timestamp query (can be used to synchronize time)
The error message is generated when there is an error in data transmission. I won't repeat it.
Application of 2.ICMP-- ping
Ping is arguably the most famous application of ICMP when we don't go to one of our websites. Usually ping this website. Ping will show some useful information back. The general information is as follows:
Reply from 10.4.24.1: bytes=32 time
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.